IMPORTANT: To view this page as Markdown, append `.md` to the URL (e.g. /get-started.md). For the complete documentation index, see llms.txt.
Skip to main content
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 struct

CPAsyncBarrierHandler

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, Deinitable, ImplicitlyCopyable, Movable, RegisterPassable, TrivialRegisterPassable

Methods

__init__

def __init__[num_stages: Int](mut pipeline: ProducerConsumerPipeline[num_stages], num_consumers: Int, cluster_size: Int) -> Self

prepare_stage

def prepare_stage(self, mem_barrier: Pointer[SharedMemBarrier, address_space=AddressSpace.SHARED])

complete_stage

def complete_stage(self, mem_barrier: Pointer[SharedMemBarrier, address_space=AddressSpace.SHARED])