Support for GPU Arrays - MATLAB & Simulink (original) (raw)

You can use GPU arrays as input and output arguments to an entry-point function when generating CUDA® MEX, source code, static libraries, dynamic libraries, and executables. GPU Coder™ automatically takes care of CPU-GPU copies based on the input type and the usage of the variable in your MATLAB® design. The GPU array functionality is useful in minimizing CPU-GPU copies when you are trying to:

To mark an input to the entry-point function as a GPU type, use one of the following approaches:

Considerations

Limitations

See Also

coder.gpu.kernel | coder.gpu.kernelfun | gpucoder.matrixMatrixKernel | coder.gpu.constantMemory | gpucoder.stencilKernel