问题
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/

回答1:
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.
来源:https://stackoverflow.com/questions/36816301/clenquetask-showing-deprecated-in-opencl-2-0