Mojo function
mbarrier_test_wait
mbarrier_test_wait[type: AnyType](shared_mem: UnsafePointer[type, address_space=AddressSpace(3), alignment=alignment, mut=mut, origin=origin], state: Int) -> Bool
Test if all threads have arrived at the memory barrier.
Non-blocking check to see if all participating threads have reached the barrier. Only supported on NVIDIA GPUs.
Args:
- shared_mem (
UnsafePointer[type, address_space=AddressSpace(3), alignment=alignment, mut=mut, origin=origin]
): Pointer to the shared memory barrier. - state (
Int
): Expected state of the memory barrier.
Returns:
True if all threads have arrived, False otherwise.
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!