Skip to main content

writelane_u32

Function writelane_u32 

Source
pub unsafe fn writelane_u32(value: u32, lane: u32, default: u32) -> u32
🔬This is a nightly-only experimental API. (stdarch_amdgpu #149988)
Available on AMD GPU only.
Expand description

Return value for the lane at index lane in the wavefront. Return default for all other lanes.

The value to write and lane select arguments must be uniform across the currently active threads of the current wavefront. Otherwise, the result is undefined.

value is the value returned by lane. default is the value returned by all lanes other than lane.

This intrinsic does not behave like a normal function call; it is a “convergent” operation and as such has non-standard control-flow effects which need special treatment by the language. Rust currently does not properly support convergent operations. This operation is hence provided on a best-effort basis. Using it may result in incorrect code under some circumstances.