Mojo struct
CPAsyncBarrierHandler
@register_passable(trivial)
struct CPAsyncBarrierHandler
The cp.async barrier handler: noop on prepare, arrives on complete.
Initializes the pipeline on construction (phase=0, barrier counts).
Implemented traits
AnyType,
BarrierHandler,
Copyable,
ImplicitlyCopyable,
ImplicitlyDestructible,
Movable,
RegisterPassable,
TrivialRegisterPassable
comptime members
__copyinit__is_trivial
comptime __copyinit__is_trivial = True
__del__is_trivial
comptime __del__is_trivial = True
__moveinit__is_trivial
comptime __moveinit__is_trivial = True
Methods
__init__
__init__[num_stages: Int](mut pipeline: ProducerConsumerPipeline[num_stages], num_consumers: Int, cluster_size: Int) -> Self
prepare_stage
prepare_stage(self, mem_barrier: LegacyUnsafePointer[SharedMemBarrier, address_space=AddressSpace.SHARED])
complete_stage
complete_stage(self, mem_barrier: LegacyUnsafePointer[SharedMemBarrier, address_space=AddressSpace.SHARED])
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!