Documentation

wait (GPUDevice)

Wait for GPU calculation to complete

Syntax

wait(gpudev)

Description

wait(gpudev)blocks execution in MATLAB®until the GPU device identified by theGPUDeviceobjectgpudevcompletes its calculations. This can be used before calls totocwhen timing GPU code that does not gather results back to the workspace. When gathering results from a GPU, MATLAB automatically waits until all GPU calculations are complete, so you do not need to explicitly callwaitin that situation.

Introduced in R2014b

Was this topic helpful?