I keep getting an internal error despite successful builds of the below openCL code. The error message is not very helpful as it does not point out the line or column. Can any body spot this. The kernel code (for the openCL program) was able to independently compile under OpenCL™ Code Builder (64-bit)
I am using windows 10 64-bit and my video card is intel HD 4000. My openCL 1.2.
CLRuntimeError: clBuildProgram() failed with error CL_BUILD_PROGRAM_FAILURE (-11)
Logs are:
fcl build 1 succeeded.
fcl build 2 succeeded.
Error: internal error.
Source was:
#pragma OPENCL_EXTENSION cl_khr_fp64 : enable
typedef struct tag_sinterest{
float *high;
float *low;
}sinterest;
typedef struct tag_sfutures{
int time;
float put;
sinterest *interest;
}sfutures;
__kernel void Float(float *_high_index,
float *_high,
float *_low_index,
float *_low,
float _put,
float _call,
float _call_float)
{
int k = get_global_id(0);
float _float = (float)(pow(_high[k]-_high_index[k],2.0f)+pow(_low[k]-_low_index[k],2.0f));
_call += _float*_put;
_call_float += _float;
}
__kernel void Interest(sinterest *_interest_index,
sinterest *_interest,
float _put,
float _call,
float _call_float)
{
int j = get_global_id(0);
if(j >= 0)
{
Float(_interest_index[j].high,_interest[j].high,_interest_index[j].low,_interest[j].low,_put,_call,_call_float);
}
}
__kernel void Futures(sfutures *_futures,
int _index,
int _stop,
float _call)
{
float _call_float = 0.0f;
int _start = _stop - (42 * 30 * 1440 *60);
if(_index > 1)
{
_call = 0.0f;
int i = get_global_id(0);
if(_futures[i].time < _stop && _futures[i].time >= _start)
{
Interest(_futures[_index-1].interest,_futures[i].interest,_futures[i].put,_call,_call_float);
}
}
if(_call_float > 0.0f)
{
_call /= _call_float;
}
}