cl_uint to size_t

Discussion created by uforob on Jan 5, 2012
Latest reply on Jan 7, 2012 by uforob

I would like to create an application using a number of work-items equal to number of compute_units (i already have an application with number of items equals to number of the cells of the grid but i would like to confront this new implementation on CPU).

I'm having troubles because the number of compute units is of type cl_uint and the global worl size is obviously size_t, I tried normal assignment and various explicit casting but the result of a printf of global work size variable is always 0.

I'm using pure C, not C++, on GNU/Linux. I'm sure the error is that because assigning a number (e.g. 8) to the global work size variable the printf and all computation are correct

Thank you.