Andreas Mieritz
Andreas Mieritz

Reputation: 145

OpenCL enqueTask vs enqueNDRangeKernel

I'm writing OpenCL using the c++ bindings, trying to make a small library.

NDRange offset(0);
NDRange global_size(numWorkItems);
NDRange local_size(1);

//this call fails with error code -56
err = queue.enqueueNDRangeKernel(kernelReduction, offset, global_size, local_size);
//this call works:
err = queue.enqueueTask(kernelReduction);

Now, Error code -56 is CL_INVALID_GLOBAL_OFFSET. And I have no clue why the first call would fail. Any suggestions?

Upvotes: 1

Views: 1036

Answers (2)

Thomas
Thomas

Reputation: 3381

If you are using OpenCL 1.0, you cannot use global offsets afaik (you need to work around by using a constant memory counter or something). Try updating the bindings to OpenCL 1.1 if they don't automatically adapt and make sure you update your drivers as well.

Upvotes: 2

mfa
mfa

Reputation: 5087

global_work_offset must be NULL. Any value here should produce CL_INVALID_GLOBAL_OFFSET.

check it out: clEnqueueNDRangeKernel

Upvotes: 1

Related Questions