在Cygwin中配置OpenCL? [英] Configure OpenCL under Cygwin?
问题描述
如何在Cygwin下安装OpenCL驱动程序?
例如,linux下的OpenCL通常会检查/ etc / OpenCL / vendors列表中是否有ICD驱动程序在Linux上,nvidia.icd引用了libnvidia-opencl.so.1),但由于Cygwin没有任何Nvidia或OpenCL包,我假设我必须手动设置链接。
我有Windows Nvidia CUDA开发套件安装在同一台机器上,但不清楚这些文件是否应该是链接到的文件。
[注意,我已经构建了来自coprthr的OpenCL加载器实现libopencl.a,所以部分完成 - 它只是想出如何引用ICD]
- 确保OpenCL标题位于包含路径上。您可以在此处下载。
- 链接到
要运行程序,需要找到动态OpenCL库DLL。 NVidia驱动程序通常安装在C:\Windows \System32。
这对我有用。
How can I install OpenCL drivers under Cygwin?
For example, OpenCL under linux normally checks the /etc/OpenCL/vendors list for links to ICD drivers (e.g. on Linux, nvidia.icd references libnvidia-opencl.so.1), but since Cygwin doesn't have any Nvidia or OpenCL package, I'm assuming I'll have to set the links up manually.
I do have the Windows Nvidia CUDA dev kit installed on the same machine, but it's not obvious whether one of those files should be the one to link to.
[Note that I've already built the OpenCL loader implementation libopencl.a from coprthr, so that part is done - it's just figuring out how to reference the ICD]
To compile a C/C++ OpenCL program on Windows using Cygwin or MinGW you need to:
- Make sure the OpenCL headers are on the include path. You can download them here.
- Link against a static OpenCL library (libopencl.a), which you already have.
To run the program, it needs to find the dynamic OpenCL library DLL. The NVidia driver usually installs it at C:\Windows\System32.
This works for me.
这篇关于在Cygwin中配置OpenCL?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!