OpenCL code generation now seems to work! For CPUs, at least - embarrassingly faster than my Pthreads version.