It would help if you posted the actual error code returned, but it looks like you’re passing the wrong arguments. You should be passing binary rather than teste_aloprado, and the size should I think be num_dispositivos * sizeof(unsigned char *).
Technically each time you’ve used char it should be unsigned char, but in reality I don’t think it’ll make much difference.
But, in clgetprogramwithbinary and in
sivia = clCreateKernel(program,“sivia”,&erro_create_kernel); ,
no error occurs, but when i call to run kernel the error below occurs:
Kernel Sivia deu zebra! -48
-48
Identificacao do erro: CL_INVALID_KERNEL - -48
Error: Runtime failed to load kernels from OCL binary!
At first it seems that i caught the binary and put in a file, and after load in a buffer.
When i loaded and made the program object with the binary with clCreateProgramWithBinary no error occurs, but in clCreateKernel(program,“sivia”,&erro_create_kernel);