Compiler errors OpenCL:乘以浮点数会导致内部错误吗?

Compiler errors OpenCL:乘以浮点数会导致内部错误吗?,compiler-errors,floating-point,runtime-error,opencl,internal,Compiler Errors,Floating Point,Runtime Error,Opencl,Internal,我试图使用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 =

我试图使用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;
}
但是,此代码会导致内部错误(请参阅倒数第二条语句):

我尝试了其他一些逻辑测试,我发现浮点值“b”(即无限或空)有问题有人能帮我核实一下吗?

PS:这是控制台中打印的内容:

#
# 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;
}

变量x在函数外部不存在,因此当我试图从调用方函数访问它时,出现了一个错误。解决方案是设置我自己的缓冲区(这是一个棘手的问题),以便变量在整个线程中保持完整性。

您使用的是哪个Java OpenCL包装器?
float sum(float a, float b) {
float x = a+b;
return x;
}