Is it possible to compile .cl file using NVIDIA's nvcc compiler?? I am trying to set up visual studio 2010 to code Opencl under CUDA platform. But when I select CUDA C/C++ Compiler to compile and build .cl file, it gives me errors like nvcc does not exist. What is the issue?
相关问题
- The behavior of __CUDA_ARCH__ macro
- OpenCL:Why Pointer to a pointer cannot be passed a
- AMD CPU versus Intel CPU openCL
- Does CUDA allow multiple applications on same gpu
- OpenCL on Linux with integrated intel graphic chip
相关文章
- What's the relation between nvidia driver, cud
- How can I use 100% of VRAM on a secondary GPU from
- NVidia CUDA toolkit 7.5.27 failing to install on O
- thrust: fill isolate space
- OpenCL autocorrelation kernel
- Is it necessary to enqueue read/write when using C
- Differences between cl_khr_fp64 and cl_amd_fp64?
- Using clCreateSubBuffer
You should be able to use
nvcc
to compile OpenCL codes. Normally, I would suggest using a filename extension of.c
for a C-compliant code, and.cpp
for a C++ compliant code(*), howevernvcc
has filename extension override options (-x ...
) so that we can modify the behavior. Here is a worked example using CUDA 8.0.61, RHEL 7, Tesla K20x:Note that the code here doesn't do anything sensible or significant, so I'd prefer to avoid questions. It's just for demonstration of compilation of a C++ compliant OpenCL code.
(*)(Because such files could also be readily processed by an ordinary host compiler, e.g. gnu compilers, with appropriate switches for include and link options.)