cudaStreamAddCallback: Add a callback to a compute stream

Description Usage Arguments References See Also

Description

Adds a callback to be called on the host after all currently enqueued items in the stream have completed. For each cudaStreamAddCallback call, a callback will be executed exactly once. The callback will block later work in the stream until it is finished.

Usage

1
cudaStreamAddCallback(stream, callback, userData, flags)

Arguments

stream

Stream to add callback to

callback

The function to call once preceding stream operations are complete

userData

User specified data to be passed to the callback function

flags

Reserved for future use, must be 0

References

http://docs.nvidia.com/cuda/cuda-driver-api/index.html

See Also

cudaStreamCreate cudaStreamCreateWithFlags cudaStreamQuery cudaStreamSynchronize cudaStreamWaitEvent cudaStreamDestroy


duncantl/RCUDA documentation built on May 15, 2019, 5:26 p.m.