GPU CUDA and MEX Programming
If running MATLAB® functions on the GPU does not sufficiently speed up your code, or if you
need to use advanced GPU CUDA features, you can write your own CUDA code and run it in MATLAB by generating an executable MEX file using mexcuda or an executable kernel using parallel.gpu.CUDAKernel.
Generally, using MEX files is more flexible than using CUDAKernel
objects. For more information, see Run MEX Functions Containing CUDA Code.
Functions
Topics
- Run MEX Functions Containing CUDA Code
If running MATLAB functions on the GPU does not sufficiently speed up your code, or if you need to use advanced GPU CUDA features, you can write your own CUDA code and run it in MATLAB by generating an executable MEX file using
mexcuda. - Run CUDA or PTX Code on GPU
If running MATLAB functions on the GPU does not sufficiently speed up your code, or if you need to use advanced GPU CUDA features, you can write your own CUDA code and run it in MATLAB by an executable kernel using
parallel.gpu.CUDAKernel.

