Main Content
wait
Wait for GPU calculation to complete
Syntax
Description
wait(
blocks execution in MATLAB® until the GPU device identified by the gpudev
)GPUDevice
object
gpudev
completes its calculations. This can be used before calls to
tic
and toc
when timing GPU code that does not gather results back to the workspace.
When gathering results from a GPU using the gather
function, MATLAB waits until all GPU calculations are complete, so you do not need to
explicitly call wait
in that situation.
Examples
Input Arguments
Extended Capabilities
Version History
Introduced in R2014b