问题
i have this output from the compiler with clGetProgramBuildInfo from this kernel:
CVMS_ERROR_SERVICE_FAILURE: CVMS compiler has crashed or hung managing the service
__kernel void vadd(
__global char* char_array,
int m,
int n,
__global long* result)
{
int index = get_global_id(0);
int max_n = n/m;
if(index == m-1){
max_n = n - (n/m)*(m-1);
}
long max[ max_n ];
int offset = log2((double)m);
for (int it=0; it < max_n; it++)
{
__global char* bits = &(char_array[64*(n/m)*(index-1)+it*64]);
int count=0;
for(int i=offset; i<=64; i++)
{
if(bits[i]=='0'){
count++;
}else{
break;
}
}
max[it] = count;
}
*result = 0;
long tmp = 0;
for(int i=0; i<max_n;i++)
{
if(max[i] > *result){*result = max[i];}
}
*result = tmp +1;
}
i get this output changing the line "int offset = log2(m);" in "int offset = log2((double)m);" before the compiler log the the call to log2(m) was ambiguous how can i call log2 properly? Thanks
来源:https://stackoverflow.com/questions/60082588/opencl-cvms-error-service-failure-cvms-compiler-has-crashed-or-hung-managing-th