Problems with clGetContextInfo

Discussion created by koveras on Nov 23, 2009
Latest reply on Mar 5, 2010 by roddomi
I cannot use OpenCL because clGetContext info returns invalid values


I'm trying to run the following code:

size_t param_value_size_ret;

cl_int ret = clGetContextInfo(context,param_name,0,NULL,&param_value_size_ret);

cl_device_id * param_value = malloc(param_value_size_ret);

ret = clGetContextInfo((cl_context)context,param_name,param_value_size_ret,param_value,NULL);


Well, the problem comes when clGetContextInfo finishes.  After it, the value of param_value_size_ret has changed, and I don't know why!

EDIT: clGetContextInfo tells me that I have 2009267360 devices on my computer!!!

I'm compiling with MinGW(GCC 4.4) and I don't know what to do

Could somebody tell me something about that?

Thank you!

(Sorry for my English...)