作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在尝试使用OpenCL(Java包装器,使用Eclipse)对一些数据执行一堆计算。内核本身不包含计算。相反,它调用其他功能来完成工作。
现在,有一个似乎无效的功能。运行良好:
int scaled(floatMemory fMem, int a, float b){
int result = indexAlloc(fMem);
float a0 = getf(fMem,a,0);
float a1 = getf(fMem,a,1);
float a2 = getf(fMem,a,2);
setf(fMem, result, a0, a1, a2);
return 0;
}
int scaled(floatMemory fMem, int a, float b){
int result = indexAlloc(fMem);
float a0 = getf(fMem,a,0);
float a1 = getf(fMem,a,1);
float a2 = getf(fMem,a,2);
setf(fMem, result, a0*b, a1*b, a2*b);
return 0;
}
#
# A fatal error has been detected by the Java Runtime Environment:
#
# EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x5a619b14, pid=7416, tid=12112
#
# JRE version: 7.0_25-b16
# Java VM: Java HotSpot(TM) Client VM (23.25-b01 mixed mode, sharing windows-x86 )
# Problematic frame:
# C [igdbcl32.dll+0x79b14] Delete+0x78a94
#
# Failed to write core dump. Minidumps are not enabled by default on client versions of Windows
#
# An error report file with more information is saved as:
# ~:\~\~\~\~\~\bin\hs_err_pid7416.log
#
# If you would like to submit a bug report, please visit:
# http://bugreport.sun.com/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#
最佳答案
抱歉,这有点晚了,但也许可以对某人有所帮助。
事实证明,我试图返回的浮点数在离开函数后就被释放了,例如:
float sum(float a, float b) {
float x = a+b;
return x;
}
关于compiler-errors - OpenCL : can multiplying by a float cause an internal error?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17307179/
我是一名优秀的程序员,十分优秀!