Utilizing GPUs (Graphical Processing Units; primarily known for being found in high-end video cards) for scientific computing is a trend that has increasingly gained traction within the last decade. GPU computing is applicable to problems that are both massively parallel at a low level, and are computationally intensive (i.e. not data-transfer intensive). In many cases, MATLAB makes it very simple to use a GPU (if a GPU is available) interactively. Many existing MATLAB functions taking vectors or matrices have analogous functions that take vectors or matrices stored in a GPU's memory, and use the GPU to perform the calculation instead of the CPU. For instance, the following simple example demonstrates the difference:


% Standard way: running a fast fourier transform on the CPU
A = rand(2^16,1);
B = fft(A);

% Running a fast fourier transform on a GPU
A = gpuArray(rand(2^16,1));
B = fft(A);

This gives a taste of what is possible with MATLAB and GPU computing. For more information on GPU computing in general, see Understanding GPU Architecture.

 
©   Cornell University  |  Center for Advanced Computing  |  Copyright Statement  |  Inclusivity Statement