CUDA or OpenCL

Hi! I´m learning CUDA and GPGPU programming, but I wonder if it wouldn´t be better start with OpenCL, since NVIDIA is supporting it and OpenCL targets devices from different manufacturers. I´ve also read that in terms of performance OpenCL is just a little slower than CUDA and in some cases it´s even faster. What would be the best choice if we look at the near future?

Thanks,

JP

The Cuda compiler is more mature (you are less likely to suffer from compiler bugs), and starting kernels from your program requires less setup code with Cuda than it does with OpenCL. Plus, converting programs from Cuda to OpenCL and vice versa is not difficult. So if your current goal is to learn GPU programming then you are better of with Cuda. If you decide at some point that you need to use OpenCL for some reason then you won’t have any problems because your knowledge from Cuda will easily transfer to OpenCL.

thanks for the answer… i think i´ll stick to CUDA by now…

In my opinion, writing programs for OpenCL is much harder than writing programs for CUDA. When I learned OpenCL, having CUDA as a base was extremely helpful in understanding what OpenCL was trying to do, so I would also recommend that you start with CUDA.

Matt