could just be my implementation of opencl but this requires passing a __stdcall function pointer (windows maybe?)
not sure how this compiled (C++11???) but you can't declare an array of variable size in C++ last time I checked (and last time my compiler checked heh)