部署OpenCL应用程序?

问题描述:

我目前正在学习OpencL,我发现它有点难以理解它实际工作原理。
我使用MinGW编译器与ATI APP SDK。
当我运行目标时,我收到错误消息

I am currently learning OpencL and am finding it somewhat difficult to understand how it actually works. I am using MinGW compiler with ATI APP SDK. When I run the target I get error message

我没有将OpenCL.dll放在与我的应用程序相同的文件夹中。
现在在Windows上搜索一下我可以在

I have not placed any OpenCL.dll in the same folder as my application. Now searching a bit on Windows I can find this dll in

C:/Windows/SysWOW64
C:/Windows/System32/DriverStore/...
C:/Windows/System32
C:/Program Files(x86)/AMD APP SDK /...

所以我的问题是如何部署我的应用程序?
我应该用我的应用程序分发OpenCL.dll吗?

So my question is how should I deploy my application? Should I distribute OpenCL.dll with my application?

您的应用程序找不到clReleaseDevice的原因是因为您将应用程序写入OpenCL 1.2标头,但您的计算机上只有OpenCL 1.1运行时。您不能在OpenCL 1.1运行时调用OpenCL 1.2 API。我建议使用OpenCL 1.1标题,除非你只在OpenCL 1.2设备上运行。它将使您的代码在OpenCL 1.1平台和设备上安全运行。

The reason why your application can't find clReleaseDevice is because you wrote your application to the OpenCL 1.2 headers but you only have a OpenCL 1.1 runtime on your machine. You can't call OpenCL 1.2 API on an OpenCL 1.1 runtime. I recommend using the OpenCL 1.1 headers unless you only run on OpenCL 1.2 devices. It will keep your code safe for running on OpenCL 1.1 platforms and devices.