Skip to main content

Mojo struct

OutPipeline

@register_passable(trivial) struct OutPipeline[num_out_stages: Int, num_producer: Int, num_consumer: Int]

OutPipeline has num_out_stages stages. num_out_stages refers to how many output stages we pipeline for performing the output store.

Fields

  • mbar (MBarType):
  • state (PipelineState[OutPipeline[num_out_stages, num_producer, num_consumer].num_stages]):

Implemented traits

AnyType, Copyable, ImplicitlyCopyable, ImplicitlyDestructible, Movable

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

num_stages

comptime num_stages = num_out_stages

Methods

__init__

__init__(mbar: UnsafePointer[SharedMemBarrier, MutAnyOrigin, address_space=AddressSpace.SHARED]) -> Self

init

init(self)

producer_mbar

producer_mbar(self) -> MBarType

Returns:

MBarType

consumer_mbar

consumer_mbar(self) -> MBarType

Returns:

MBarType

producer_acquire

producer_acquire(self)

Returns the dynamic pipe idx.

consumer_wait

consumer_wait(self)

consumer_release

consumer_release(mut self, e: Int32)

producer_commit

producer_commit(mut self)

num_mbars

static num_mbars() -> UInt32

Returns:

UInt32

Was this page helpful?