hipStreamWaitValue32

Function hipStreamWaitValue32 

Source
pub unsafe extern "C" fn hipStreamWaitValue32(
    stream: hipStream_t,
    ptr: *mut c_void,
    value: u32,
    flags: c_uint,
    mask: u32,
) -> hipError_t
Expand description

@brief Enqueues a wait command to the stream.[BETA]

@param [in] stream - Stream identifier @param [in] ptr - Pointer to memory object allocated using #hipMallocSignalMemory flag @param [in] value - Value to be used in compare operation @param [in] flags - Defines the compare operation, supported values are #hipStreamWaitValueGte #hipStreamWaitValueEq, #hipStreamWaitValueAnd and #hipStreamWaitValueNor @param [in] mask - Mask to be applied on value at memory before it is compared with value, default value is set to enable every bit

@returns #hipSuccess, #hipErrorInvalidValue

Enqueues a wait command to the stream, all operations enqueued on this stream after this, will not execute until the defined wait condition is true.

#hipStreamWaitValueGte: waits until *ptr&mask >= value

#hipStreamWaitValueEq : waits until *ptr&mask == value

#hipStreamWaitValueAnd: waits until ((*ptr&mask) & value) != 0

#hipStreamWaitValueNor: waits until ~((*ptr&mask) | (value&mask)) != 0

@note when using #hipStreamWaitValueNor, mask is applied on both ‘value’ and ‘*ptr’.

@note Support for #hipStreamWaitValue32 can be queried using ‘hipDeviceGetAttribute()’ and ‘hipDeviceAttributeCanUseStreamWaitValue’ flag.

@warning This API is marked as Beta. While this feature is complete, it can change and might have outstanding issues.

@see hipExtMallocWithFlags, hipFree, hipStreamWaitValue64, hipStreamWriteValue64, hipStreamWriteValue32, hipDeviceGetAttribute