s_barrier in core::arch::amdgpu - Rust
Description: Synchronize all wavefronts in a workgroup.

Skip to main content

## s_barrier

# Function s_barrier

Source

    pub fn s_barrier()

🔬This is a nightly-only experimental API. (`stdarch_amdgpu` #149988)
Available on AMD GPU only.
Expand description

Synchronize all wavefronts in a workgroup.

Each wavefronts in a workgroup waits at the barrier until all wavefronts in the workgroup arrive at a barrier.

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.