User`s guide

reset
11-271
reset
Reset GPU device and clear its memory
Syntax
reset(gpudev)
Description
reset(gpudev) resets the GPU device and clears its memory of gpuArray and
CUDAKernel data. The GPU device identified by gpudev remains the selected device,
but all gpuArray and CUDAKernel objects in MATLAB representing data on that device
are invalid.
Arguments
gpudev GPUDevice object representing the currently selected device
Tips
After you reset a GPU device, any variables representing arrays or kernels on the device
are invalid; you should clear or redefine them.
Examples
Reset GPU Device
Create a gpuArray on the selected GPU device, then reset the device.
g = gpuDevice(1);
M = gpuArray(magic(4));