These are small demos for isolated systems, I have yet to see somebody ship a full solution using OpenCL.
anyways it´s irrelevant what other apps has it, when it´s possible.
It’s not irrelevant, at all. We need to leverage having others bite out their teeth on getting a fully-featured OpenCL solution shipped. If “they” can’t do it, that’s a sign that “we” probably shouldn’t even bother. I have very little confidence in OpenCL, so far.
Regarding re-writing the entire code from scratch I don´t think that´s necessary. The examples of C/CUDA code comparisons I´ve seen some of the force calcs could remain.
It is necessary. Maybe you can copy over some routines, but you still need to completey redesign it to work for the GPU computation model, which is the bulk of the work. Then cross your fingers and hope driver bugs don’t get in your way.
But that´s for a developer to decide. What could be done quickly is check out Brechts code for Cycles and compare how much different the CUDA/C code is compared to the C code that´s being run instead on CPUs.
The kernel part of it is almost identical, but that’s because Cycles was designed to work within GPGPU limits.
EDIT: To be a bit more specific, the problem isn’t the language, but the computation/memory model. C and OpenCL are for the most part the same language, you just cannot use things like dynamic memory, recursive function calls or function pointers. You also can’t just code something as you would for the CPU and expect it to be fast.
On a side note:
´ <- this is not an apostrophe, it is an acute accent
` ← this is not an apostrophe, either, it is a grave accent
’ ← this is an apostrophe
People, please use the correct character for apostrophes, it shows you have a firm grasp on the English language and it makes reading your stuff much more pleasant (at least to me).
Compare the following sentences:
I’ve never had a problem using apostrophes!
I´ve come at least close!
I`ve really got a problem with them!
Which one do you like better? (It actually doesn’t matter, the last two are just wrong.)