For the complete documentation index, see llms.txt. Markdown versions of all pages are available by appending .md to any URL (e.g. /max/get-started.md).
Mojo struct
RawBarrierStorage
struct RawBarrierStorage[count: Int]
Escape hatch: Raw barrier storage for custom patterns.
Use this when the standard pipeline storage doesn't fit your needs. You're responsible for initialization and synchronization semantics.
Example:
# Custom barrier layout for specialized synchronization
struct MyCustomSmem:
var custom_barriers: RawBarrierStorage[8]
def init_custom(ref[SHARED] self):
ptr = self.custom_barriers.ptr()
# Custom initialization...Parametersβ
- βcount (
Int): Total number of barriers to allocate.
Fieldsβ
- βstorage (
RawBarrierStorage[count].Array.Storage):
Implemented traitsβ
AnyType,
ImplicitlyDestructible
comptime membersβ
Arrayβ
comptime Array = SMemArray[SharedMemBarrier, count]
Methodsβ
barriersβ
barriers(ref[AddressSpace._value] self) -> RawBarrierStorage[count].Array
Returns:
RawBarrierStorage[count].Array
ptrβ
ptr(ref[AddressSpace._value] self) -> MbarPtr
Get raw pointer for custom usage.
Returns:
MbarPtr
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!