GPU Algorithm Acceleration

Accelerate your code using basic GPU computing

To speed up your code, you can try using your computer’s GPU. If all the functions that you want to use are supported on the GPU, you can simply use the gpuArray function to transfer input data to the GPU, and call the gather function to retrieve the output data from the GPU. For deep learning, MATLAB® provides automatic parallel support for multiple GPUs. You need Parallel Computing Toolbox™ to enable GPU support.


expand all

fftFast Fourier transform
ifftInverse fast Fourier transform
fft22-D fast Fourier transform
ifft22-D inverse fast Fourier transform
fftshiftShift zero-frequency component to center of spectrum
ifftshiftInverse zero-frequency shift
dctDiscrete cosine transform
idctInverse discrete cosine transform
cztChirp Z-transform
filter1-D digital filter
filter22-D digital filter
convConvolution and polynomial multiplication
conv22-D convolution
cconvModulo-n circular convolution
fftfiltFFT-based FIR filtering using overlap-add method
xcorr22-D cross-correlation
peak2peakMaximum-to-minimum difference
peak2rmsPeak-magnitude-to-RMS ratio
rmsRoot-mean-square level
sincSinc function
spectrogramSpectrogram using short-time Fourier transform
stftShort-time Fourier transform
wvdWigner-Ville distribution and smoothed pseudo Wigner-Ville distribution
gatherTransfer distributed array or gpuArray to local workspace
gpuArrayArray stored on GPU


Run MATLAB Functions on a GPU (Parallel Computing Toolbox)

Hundreds of functions in MATLAB and other toolboxes run automatically on a GPU if you supply a gpuArray argument.

GPU Support by Release (Parallel Computing Toolbox)

Support for NVIDIA® GPU architectures by MATLAB release.

Run MATLAB Functions on Multiple GPUs (Parallel Computing Toolbox)

This example shows how to run MATLAB code on multiple GPUs in parallel, first on your local machine, then scaling up to a cluster.

Deep Learning with MATLAB on Multiple GPUs (Deep Learning Toolbox)

Specify multiple GPUs to use locally or in the cloud for training.

Pedestrian and Bicyclist Classification Using Deep Learning (Phased Array System Toolbox)

This example shows how to classify pedestrians and bicyclists based on their micro-Doppler characteristics using a deep learning network and time-frequency analysis.