Mojo function
named_barrier_arrive
named_barrier_arrive[num_threads: SIMD[int32, 1]](id: SIMD[int32, 1] = 0)
Arrives at a named synchronization barrier at the block level.
This function marks the arrival of a named synchronization barrier point using a specific barrier ID.
Notes:
- Only supported on NVIDIA GPUs.
- Maps directly to the
nvvm.barrier.arrive
instruction. - Useful for fine-grained synchronization when different subsets of threads need to synchronize independently.
- The barrier ID must not exceed 16.
- All threads participating in the barrier must specify the same num_threads value.
Parameters:
- num_threads (
SIMD
): The number of threads that must reach the barrier before any can proceed.
Args:
- id (
SIMD
): The barrier identifier (0-16). Default is 0.
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!