2

Configurations for MATLAB and CUDA

The C-MEX file is the basic starting point for using CUDA and GPUs. These functions are dynamically loaded as a function during MATLAB sessions. There are many reasons why we write our own c-mex files. Although the parallel computing toolbox from Mathworks and other third party CPU toolboxes provide the CUDA interface, many constraints and limitations hinder full utilization of CUDA and GPUs. The generic way of using the c-mex file, however, has endless custom extensions and is flexible in using the CUDA libraries provided by NVIDIA and other CUDA companies. In this chapter, you learn about configuring MATLAB for c-mex programming, making the simplest c-mex example Hello, c-mex, configuring CUDA for MATLAB, ...

Get Accelerating MATLAB with GPU Computing now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.