FireSync API
 All Classes Files Functions Variables Typedefs Friends Macros Modules Pages
kStatus kCudaStream_Synchronize ( kCudaStream  stream,
kCudaSync  sync = kCUDA_SYNC_WAIT_HOST,
kBool  isHostOperation = kTRUE 
)

Conditionally synchronizes a Cuda stream.

If kCUDA_SYNC_DEFAULT is provided as the 'sync' argument, then the synchronization mode will be resolved by examining the stream's default synchronization mode (kCudaStream_DefaultSync).

Synchronization will be performed if the resolved synchronization mode is kCUDA_SYNC_WAIT, or if the resolved synchronization mode is kCUDA_SYNC_WAIT_HOST and the isHostOperation parameter is kTRUE.

If synchronization is performed, this function will block until all operations on the stream have been completed.

Parameters
streamCuda stream.
syncSynchronization mode (optional, defaults to kCUDA_SYNC_WAIT_HOST).
isHostOperationDoes the most recent operation affect memory access from the host (optional, defaults to kTRUE)?
Returns
Operation status.