I’m getting “Access violation reading location 0x4c432f2f” when trying to create a program from source. My code looks like this:
char * source = "__kernel void VectorAdd(__global const float* a, __global const float* b, \
__global float* c, int iNumElements)\
{\
some CL code here\
}";
szKernelLength = strlen(source); //szKernelLength is of size_t type
cpProgram = clCreateProgramWithSource(cxGPUContext, 1, (const char **)source, &szKernelLength, &ciErr1);
I have no idea, whats wrong. I’ve also copy-pasted two support functions (shrFindFilePath and oclLoadProgSource) from SDK source files to do the job, but the result was the same…
I tried to query the context, source code and the number of devices of the program using clGetProgramInfo, acquired values matched, so I guss that program created with clCreateProgramWithSource is OK. But when I tried to query binary size, I got zero, so the build was unsuccessful. Any ideas? And is there any way to see compile output? Thanks in advance…