oclSimpleKernel creates a kernel object by compiling the supplied
code. The kernel can them be used in oclRun.oclSimpleKernel(device, name, code, precision = c("single", "double"))oclDevices()) to compile the kernel on.oclRun.oclSimpleKernel creates a new OpenCL context, then creates and
builds the program specified by code and finally creates a kernel
from the program. The kernel built by this function is simple in that it can have
exactly one vector output and arbitrarily many inputs. The first
argument of the kernel must be __global double* for the output
and the second argument must be const int for the length of the
output vector. All additional arguments are optional. See
oclRun for an example of a simple kernel.
Note that building a kernel can take substantial amount of time (depending on the OpenCL implementation) so it is generally a good idea to compile a kernel once and re-use it many times.
oclDevices, oclRun