Hi, I want to ask a question: The diffenent between CUDA and OpenCL.
(1) CUDA does some language extension from C and C++?
(2) OpenCL does not do any language extension from C and C++, it is just a API?
(3) Is there any methodes for CUDA can support AMD GPU?
The CUDA “runtime” programming interface uses some extensions to C/C++, most notably the <<<…, …>>> syntax to launch kernels. The “driver” programming interface is strictly C-based, as is OpenCL.
There is no official way to run CUDA code on AMD GPUs, but have a look at Ocelot.
CUDA and OpenCL are basically C/C++ API’s for connecting host code(CPU) to device code(GPU.) Both CUDA and OpenCL device codes(GPU side) are also C/C++.
But, like tera said, CUDA has 2 APIs: Runtime and Driver API. The Runtime API has a few really nice compiler features, so that you can mix unified GPU and CPU code in a single file compile it very easily, and it’s just fun, simpler, and cleaner to get started coding! Porting CUDA code to OpenCL shouldn’t be too complicated though. For large programs, the extra overhead of OpenCL should be insignificant.