Re: OpenGL/CL Java Binding Performance
Posted by notzed on Feb 03, 2012; 10:41pm
URL: https://forum.jogamp.org/OpenGL-CL-Java-Binding-Performance-tp3618916p3714481.html
OpenCL depends heavily on the target device and the algorithm, so without more details your numbers don't mean much. Porting a CPU algorithm to a GPU will almost always result in very poor code: often 1-3 orders of magnitude out from the potential. And if you're using a CPU backend, be aware that the CPU backends (at least the AMD one) is still fairly immature: don't expect magic out of it, it's still just a c compiler and also you must explicitly write the code to use vectors to access the simd units (last time i looked).
If you want to compare what you're claiming you want to compare, just port the same application to muliple languages. HelloWorld is just based on the C examples, so it should be trivial and presumably there's the same for c++.
Although JNI and JOCL have some overheads, I think you'll find they're quite small compared to the overheads already present in opencl. Because of those, an efficient opencl application necessarily queues a relatively small number of compute-heavy tasks and spends most of it's time sitting around waiting for results: in which case any overheads are hidden anyway.