pub type hipStreamBatchMemOpParams = hipStreamBatchMemOpParams_union;Expand description
@brief Union representing batch memory operation parameters for HIP streams.
hipStreamBatchMemOpParams is used to specify the parameters for batch memory operations in a HIP stream. This union supports various operations including waiting for a specific value, writing a value, and different flags for wait conditions.
@details The union includes fields for different types of operations defined in the enum hipStreamBatchMemOpType:
- hipStreamMemOpWaitValue32: Wait for a 32-bit value.
- hipStreamMemOpWriteValue32: Write a 32-bit value.
- hipStreamMemOpWaitValue64: Wait for a 64-bit value.
- hipStreamMemOpWriteValue64: Write a 64-bit value.
Each operation type includes an address, the value to wait for or write, flags, and an optional alias that is not relevant on AMD GPUs. Flags can be used to specify different wait conditions such as equality, bitwise AND, greater than or equal, and bitwise NOR.
Example usage: @code hipStreamBatchMemOpParams myArray[2]; myArray[0].operation = hipStreamMemOpWaitValue32; myArray[0].waitValue.address = waitAddr1; myArray[0].waitValue.value = 0x1; myArray[0].waitValue.flags = CU_STREAM_WAIT_VALUE_EQ;
myArray[1].operation = hipStreamMemOpWriteValue32; myArray[1].writeValue.address = writeAddr1; myArray[1].writeValue.value = 0x1; myArray[1].writeValue.flags = 0x0;
result = hipStreamBatchMemOp(stream, 2, myArray, 0); @endcode
Aliased Type§
#[repr(C)]pub union hipStreamBatchMemOpParams {
pub operation: u32,
pub waitValue: hipStreamBatchMemOpParams_union_hipStreamMemOpWaitValueParams_t,
pub writeValue: hipStreamBatchMemOpParams_union_hipStreamMemOpWriteValueParams_t,
pub flushRemoteWrites: hipStreamBatchMemOpParams_union_hipStreamMemOpFlushRemoteWritesParams_t,
pub memoryBarrier: hipStreamBatchMemOpParams_union_hipStreamMemOpMemoryBarrierParams_t,
pub pad: [u64; 6],
}Fields§
§operation: u32§waitValue: hipStreamBatchMemOpParams_union_hipStreamMemOpWaitValueParams_t§writeValue: hipStreamBatchMemOpParams_union_hipStreamMemOpWriteValueParams_t§flushRemoteWrites: hipStreamBatchMemOpParams_union_hipStreamMemOpFlushRemoteWritesParams_t< Currently not supported on AMD
memoryBarrier: hipStreamBatchMemOpParams_union_hipStreamMemOpMemoryBarrierParams_t< Currently not supported on AMD
pad: [u64; 6]