OpenCL implementation in OpenFrameworks in official release


Are the developers of OF thinking in implementing OpenCL in next releases of OF?

I think this should be implemented in the official release, making it a standard for use with OF.

in order to obtain the max processing power out of one computer or groups of computers.

What do you think?

Personally at the moment I think that OpenCL is something that belongs in an addon, such as ( )

It’s pretty early days for OpenCL, certainly too early to bring it to the core in my opinion.


I agree with hahakid. Also, to play the devil’s advocate, why choose OpenCl as the oF core GPGPU solution, but not Cuda? Maintaining it in an addon avoids that particulare problem, at least.

I agree it would be nice to have OpenCL by default. The great thing about OpenCL is that it is an open standard that can run on any hardware, whereas CUDA is Nvidia only. That being said, it is very young and I’ve read about several different GPGPU implementations being planned that might try to supplant it.

…which is is an even stronger indicator that it should not be in the core, but in an addon.
also, where are the drawbacks of maintaining it as an addon?
additionally, gpgpu is still an advanced topic which is not usable/suitable/practical for everyone, so why include it in the core?
in any case, it would have to be a stable addon anyway before even being considered for inclusion into the oF core.

So be an addon.
But make it official so that we can use it freely and in a standard way (for everyone, equally implemented, compatible with every OS and upgradeable without loose of compatibility with previous versions), in order to exchange code that works without the limitations of MSA implementation and license.

are you aware what you are (flippantly, imho) demanding here in one sentence?
also, what exactly about the license are you finding limiting? - it’s a really generous one, and basically the same one as the license for oF itself!

of course, you’re most welcome to start work on an addon yourself. probably best by forking/improving msaOpencl; or roll your own solution if you can code a better implementation. :slight_smile:

don’t forget, everyone here is a volunteer! most are doing this in their freetime.

Ok. It was not a demand it was a suggestion or opinion.

I apologize for my error, indeed the licenses are similar.

Are you aware of the advantages of openCL?

Do you think that is ok to have an implementation that runs only on MAC?

And have an extra license info that does not help code additions to the implementation?

OpenCL is a relatively new standard that can make a revolution in high demanding calculation software using both CPU, GPU and other network CPUs and GPUs, and because it is a standard it works on every GPUs and CPUs.

New code that uses opencl can be added to OF using more and more complex features.

Hi Tim. i´m lazy on search, can you point out what implementations are trying to supplant opencl? At the moment opencl is the only one. Or we have to wait for some years for something new to get into the software controlling the hardware?

DirectCompute is Microsofts DirectX implementation of a GPGPU, ATI Stream is the AMD implementation (supports OpenCL btw), and finally CUDA is NVidia implementation.

It’s still pretty early days for OpenCL but I think it may eventually be picked up as a way to use CUDA and Stream w/o certain optimisations. Khronos keeps a list of compliant devices here that you can check out if you’re interested. I feel like generally implementations are getting better and more widespread, but most projects seem to writing bindings for CUDA over OpenCL (oCV, etc).

As far as an addon, there’s really not a ton needed. The openCL addon Memo wrote wraps a few CL functions:


it also creates some really nice stuff for r/w to pixels that could be updated a bit for 007 (maybe I’ll take a stab at that) and some convenience functions but it’s not monolithic and heavily-reliant on OSX (which is kind of the point of oCL anyways). I think (could be wrong) the only OSX-specific functionality is how the libraries are included and the projects are set up. If you’re not on OSX or have any non-standard GPGPU setup (I do) then you’d need to redo all that stuff for your particular set-up anyways. Just my 2p.

just to add to the CUDA vs. OpenCL discussion… some people might find these links interesting

btw I prefer CUDA, being that it’s a more mature language and has a faster pace when it comes to number increments. :slight_smile: