Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

clEnqueTask showing deprecated in openCL 2.0

I am trying to build a hello world program in Visual Studio using OpenCL AMD SDK, but it is saying that a few commands are deprecated. I tried to define a macro CL_USE_DEPRECATED_OPENCL_1_2_APIS, but it's still not working. What do I need to do?

For the code I referred to : https://www.fixstars.com/en/opencl/book/OpenCLProgrammingBook/first-opencl-program/

ImageLink

like image 903
Ayush Nigam Avatar asked Jan 22 '26 06:01

Ayush Nigam


1 Answers

Yoink! Stealing DarkZeros comment.

From https://www.khronos.org/registry/cl/sdk/1.0/docs/man/xhtml/clEnqueueTask.html we read:

clEnqueueTask is equivalent to calling clEnqueueNDRangeKernel with work_dim = 1, global_work_offset = NULL, global_work_size[0] set to 1, and local_work_size[0] set to 1.

Replace your clEnqueueTask with clEnqueueNDRangeKernel as described above.

like image 195
Andreas Avatar answered Jan 23 '26 20:01

Andreas



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!