User`s guide

parallel.gpu.CUDAKernel
11-223
int idx = blockIdx.x * blockDim.x + threadIdx.x;
if (idx < vecLen) {
pi[idx] += c;
}
and simpleEx.ptx contains the PTX resulting from compiling simpleEx.cu into
PTX, both of the following statements return a kernel object that you can use to call the
addToVector CUDA kernel.
kern = parallel.gpu.CUDAKernel('simpleEx.ptx', ...
'simpleEx.cu');
kern = parallel.gpu.CUDAKernel('simpleEx.ptx', ...
'float *, float, int');
See Also
arrayfun | feval | existsOnGPU | gpuArray | reset