For the complete documentation index, see llms.txt. Markdown versions of all pages are available by appending .md to any URL (e.g. /get-started.md).
Mojo function
mbarrier_init
def mbarrier_init[type: AnyType](shared_mem: Pointer[type, address_space=AddressSpace.SHARED], num_threads: Int32)
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.
Parameters:
- โtype (
AnyType): The data type stored at the barrier location.
Args:
- โshared_mem (
Pointer[type, address_space=AddressSpace.SHARED]): Pointer to shared memory location for the barrier. - โnum_threads (
Int32): Number of threads that will synchronize on this barrier.