“clCreateCommandQueue 被声明为已否决” 这是怎么回事

baidu_21171511 2014-10-23 09:42:18
平台是intel 核显2500,安装sdk后可以启动2个设备,一个是硬件支持的1.2另一个是软件模拟的2.0。
网上找了个简单的程序编译,出现如此错误提示“clCreateCommandQueue 被声明为已否决”

谁能解释一下为什么
...全文
3401 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
matrixtrank 2016-01-27
  • 打赏
  • 举报
回复
The clCreateCommandQueue function was deprecated as of OpenCL 2.0, and replaced with clCreateCommandQueueWithProperties. If you are only targeting devices that support OpenCL 2.0 (some recent Intel and AMD processors at the time of writing), you can safely use this new function. If you need your code to run on devices that don't yet support OpenCL 2.0, you can continue using the deprecated clCreateCommandQueue function by using the preprocessor macros that the OpenCL headers provide, e.g: #define CL_USE_DEPRECATED_OPENCL_1_2_APIS #include <CL/cl.h>
baidu_21171511 2014-10-24
  • 打赏
  • 举报
回复
这个弄明白了,intel的sdk已经是2.0那个clCreateCommandQueue 函数在cl.h里声明为弃用。所以有这个提示。 如果一定要开发1.2的,需要在vs里代码里加入

#pragma warning( disable : 4996 )
outstander 2014-10-23
  • 打赏
  • 举报
回复
SDK和IDE配置正确的么?是否还有其他报错?

602

社区成员

发帖
与我相关
我的任务
社区描述
异构开发技术
社区管理员
  • OpenCL和异构编程社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧