Mojo function
mbarrier_init
mbarrier_init[type: AnyType](shared_mem: UnsafePointer[type, address_space=AddressSpace(3), alignment=alignment, mut=mut, origin=origin], num_threads: SIMD[int32, 1])
Initialize a shared memory barrier for synchronizing multiple threads.
Sets up a memory barrier in shared memory that will be used to synchronize the specified number of threads. Only supported on NVIDIA GPUs.
Args:
- shared_mem (
UnsafePointer[type, address_space=AddressSpace(3), alignment=alignment, mut=mut, origin=origin]
): Pointer to shared memory location for the barrier. - num_threads (
SIMD[int32, 1]
): Number of threads that will synchronize on this barrier.
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!