wait (GPUDevice)
Wait for GPU calculation to complete
Syntax
wait(gpudev)
Description
wait(gpudev)
blocks execution in MATLAB®until the GPU device identified by theGPUDeviceobjectgpudev
completes its calculations. This can be used before calls totoc
when 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 callwait
in that situation.
Introduced in R2014b
Was this topic helpful?