Documentation

GPU Computing in MATLAB

Accelerate your code using basic GPU computing

Functions

gpuArray Create array on GPU
gather Transfer distributed array or gpuArray to local workspace
existsOnGPU Determine if gpuArray or CUDAKernel is available on GPU
gpuDevice 查询或选择GPU设备
gpuDeviceCount Number of GPU devices present
gputimeit Time required to run function on GPU
reset Reset GPU device and clear its memory
wait (GPUDevice) Wait for GPU calculation to complete
arrayfun Apply function to each element of array on GPU
bsxfun Binary singleton expansion function for gpuArray
pagefun Apply function to each page of array on GPU

Classes

gpuArray Array stored on GPU
GPUDevice 图ics processing unit (GPU)
GPUDeviceManager Manager for GPU Devices

Topics

Identify and Select a GPU Device

UsegpuDeviceto identify and select which device you want to use.

Establish Arrays on a GPU

AgpuArrayin MATLAB®represents an array that is stored on the GPU.

Run Built-In Functions on a GPU

Many MATLAB built-in functions supportgpuArrayinput arguments.

Run Element-wise MATLAB Code on GPU

Use examples to learn about running MATLAB code on a GPU

Improve Performance of Small Matrix Problems on the GPU using PAGEFUN

This example shows how to usepagefunto improve the performance of applying a large number of independent rotations and translations to objects in a 3-D environment.

Measure and Improve GPU Performance

The purpose of GPU computing in MATLAB is to speed up your applications.

Control Random Number Streams

By default, each worker in a cluster working on the same job has a unique random number stream.

Was this topic helpful?