3 ms·
If you ever get the chance to write something in OpenCL and then in CUDA I promise you will understand immediately why Google didn't push for it. There is a lo
by belval 3y ago
If you ever get the chance to write something in OpenCL and then in CUDA I promise you will understand immediately why Google didn't push for it.
There is a lot more boilerplate to it, read/write to the buffer, queueing being handled explicitly. Here's an example that illustrate what I mean: https://github.com/rsnemmen/OpenCL-examples/blob/master/mandelbrot/mandelbrot.c#L12 https://github.com/rsnemmen/OpenCL-examples/blob/master/mand...
For comparison here is an implementation in CUDA: http://selkie.macalester.edu/csinparallel/modules/CUDAArchitecture/build/html/1-Mandelbrot/Mandelbrot.html http://selkie.macalester.edu/csinparallel/modules/CUDAArchit...
Notice how the CUDA code is more readable.
- bryanlarsen 3y agoGoogle is part of the Khronos group. They were well positioned to steer the standard towards one that doesn't suck. Or they could have championed a different standard. Google has the scale that only Google is to blame that they are still heavily dependent on a closed standard. Open Standards almost always beat closed ones. IMO AMD was right to bet on open standards. They lost the bet but I think it was the right bet.
- barbariangrunge 3y ago> the Khronos group I still wake up at night, sweating, thinking about my time learning OpenGL in university. The docs were a nightmare back then
- shaklee3 3y agoopenCL != openGL
- SuchAnonMuchWow 3y agoIn the link provided, the CUDA example only show the compute kernel itself and not the boilerplate required to run it. On the other hand, your OpenCL example only show the boilerplate. This is the OpenCL kernel from the same repo, for a more fair comparison: https://github.com/rsnemmen/OpenCL-examples/blob/master/mandelbrot/mandelbrot.cl https://github.com/rsnemmen/OpenCL-examples/blob/master/mand... This is much more readable. OpenCL-C the language is fine: it's how you deploy the program on the cards that is complicated with opencl.