Two dimensional global worksize

Hello eveveryone,

I’m writing a simple OpenCL program which needs a two dimensional global worksize. When using a one dimensional worksize, I used a variable of type size_t to pass the value of the global worksize to the enqueueNDRange function.
What should I pass to the function now? A pointer to an array?

I’ve been googling this but I got nowhere.

Thanks,
caseClosed

Pass a pointer to a two-dimensional array of size_t. Remember that the get_local_size(0) should evenly divide get_global_size(0), and similarly get_local_size(1) should evenly divide get_global_size(1), and the limits on the number of work-items per work-group.

Got it!

Thanks a lot!!
caseClosed