clEnqueTask显示在openCL 2.0中已弃用 [英] clEnqueTask showing deprecated in openCL 2.0

查看:72
本文介绍了clEnqueTask显示在openCL 2.0中已弃用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用OpenCL AMD SDK在Visual Studio中构建一个hello world程序,但是这是不推荐使用的一些命令.我试图定义一个宏CL_USE_DEPRECATED_OPENCL_1_2_APIS,但是它仍然无法正常工作.我该怎么办?

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?

对于我提到的代码: https://www.fixstars.com/en/opencl/book/OpenCLProgrammingBook/first-opencl-program/

推荐答案

哟!窃取DarkZeros评论.

Yoink! Stealing DarkZeros comment.

来自 https://www.khronos .org/registry/cl/sdk/1.0/docs/man/xhtml/clEnqueueTask.html 我们读到:

clEnqueueTask等效于使用以下命令调用clEnqueueNDRangeKernel work_dim = 1,global_work_offset = NULL,global_work_size [0]设置为1, 并且local_work_size [0]设置为1.

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.

如上所述,用clEnqueueNDRangeKernel替换clEnqueueTask.

Replace your clEnqueueTask with clEnqueueNDRangeKernel as described above.

这篇关于clEnqueTask显示在openCL 2.0中已弃用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆