HDK volume advect compare with Vex/Ocl

I’ve made one of my first HDK plugin. This was more a test in order to work with volumes in c++. You can find the code here.

_

This node read one volume on input1 and advect the data with 3 volumes on input2. I’ve made a comparaison with Vex and Opencl with a volume of 100*100*100 and 3 substeps in advection :

  • HDK advect : 1.813s
  • Volumewrangle : 0.398s
  • Opencl : 0.025s

I was surprised to get so much differences. My code in HDK is not threaded and I guess not optimized, I’ve made a test to thread my code with THREADED_METHOD2  but I didn’t get any improvement yet. My next step will be to try threads, opencl or cuda in HDK.

_

The Opencl Code seems in this case much better, for those who want to have a look the otl is here and I have a hip file here. (made with indie licences)