char* tmp = malloc(src_gpu_mmul_cl_len);
memcpy(tmp, src_gpu_mmul_cl, src_gpu_mmul_cl_len);
- cl_program program = clCreateProgramWithSource(GPU_context, 1, (const char**)&tmp, NULL, &err);
+ const char* ptr = (const char*)src_gpu_mmul_cl;
+ cl_program program = clCreateProgramWithSource(GPU_context, 1, (const char**)&src_gpu_mmul_cl, NULL, &err);
if (err != CL_SUCCESS)
{
fprintf(stderr, "GPU fatal error: clCreateProgramWithSource() failed.\n");