Paccone

Kernel doesn't load in program object

Discussion created by Paccone on Jul 22, 2010
Latest reply on Jul 22, 2010 by Paccone

Hi I'm a newbie I'm missing something when try to load a kernel into program object.

The opencl initialization runs fine, until it gets to load the kernel:

 

// Wait what a kernel!
char kernelio[] = "__kernel void karmelo(__global const int a, __global int b)  {b = a + 1;}";

// count bytes
size_t kdim;
for(kdim = 0; kernelio[kdim] != '\0'; kdim++);
cout << "kernel read" << endl;
   
// Insert kernel in program object
cl_program program = clCreateProgramWithSource(contesto, 1, (const char **)&kernelio,
    (const size_t *)&kdim, &context_err);

cout << "kernel inserted in program object" << endl;


When launch the binary, I get only the "kernel read" response message, followed by "Segmentation fault" and end.

I cant figure out the issue!

 



Outcomes