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 the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.