我尝试在 Xcode 中编译此代码,但出现上述错误
const char *KernelSource = "\n"\
"__kernel void pi( \n"\
"__global float* out, \n"\
"uint cntSteps \n"\
") \n"\
"{ \n"\
" const uint idThread = get_local_id(0); \n"\
" uint numprocs = get_global_size(0); \n"\
" const float local_num = (float)cntSteps / numprocs; \n"\
"float step = 1.0 / cntSteps; \n"\
"float sum = 0.0; \n"\
"float x; \n"\
"int localmax = (idThread + 1) * local_num; \n"\
"for(uint i = idThread * local_num; i < localmax; i++) \n"\
"{ \n"\
"x = step * (i + 0.5); \n"\
"sum = sum + 4.0 / (1.0 + x * x); \n"\
"} \n"\
"out[idThread] = sum * step; \n"\
"} \n";
知道这个内核有什么问题!,