pub unsafe extern "C" fn cuStreamWaitValue32_v2(
stream: CUstream,
addr: CUdeviceptr,
value: cuuint32_t,
flags: c_uint,
) -> CUresult
Expand description
\brief Wait on a memory location
Enqueues a synchronization of the stream on the given memory location. Work ordered after the operation will block until the given condition on the memory is satisfied. By default, the condition is to wait for (int32_t)(*addr - value) >= 0, a cyclic greater-or-equal. Other condition types can be specified via \p flags.
If the memory was registered via ::cuMemHostRegister(), the device pointer should be obtained with ::cuMemHostGetDevicePointer(). This function cannot be used with managed memory (::cuMemAllocManaged).
Support for CU_STREAM_WAIT_VALUE_NOR can be queried with ::cuDeviceGetAttribute() and ::CU_DEVICE_ATTRIBUTE_CAN_USE_STREAM_WAIT_VALUE_NOR_V2.
\note Warning: Improper use of this API may deadlock the application. Synchronization ordering established through this API is not visible to CUDA. CUDA tasks that are (even indirectly) ordered by this API should also have that order expressed with CUDA-visible dependencies such as events. This ensures that the scheduler does not serialize them in an improper order.
\param stream The stream to synchronize on the memory location. \param addr The memory location to wait on. \param value The value to compare with the memory location. \param flags See ::CUstreamWaitValue_flags.
\return ::CUDA_SUCCESS, ::CUDA_ERROR_INVALID_VALUE, ::CUDA_ERROR_NOT_SUPPORTED \notefnerr
\sa ::cuStreamWaitValue64, ::cuStreamWriteValue32, ::cuStreamWriteValue64, ::cuStreamBatchMemOp, ::cuMemHostRegister, ::cuStreamWaitEvent