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/

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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With