Mojo struct
ProducerTile
struct ProducerTile[origin: MutOrigin, ring_buffer_type: AnyStruct[RingBuffer[ring_buffer_type.dtype, ring_buffer_type.layout, ring_buffer_type.pipeline_stages, ring_buffer_type.block_rows, ring_buffer_type.block_cols, ring_buffer_type.warp_rows, ring_buffer_type.warp_cols, ring_buffer_type.reads_per_warp_block, ring_buffer_type.tile_buffers, ring_buffer_type.sync_strategy_type]], warps_processed_per_producer: Int]
Context manager for producer access to a single ring buffer tile.
Fieldsβ
- βproducer_view_ptr (
ProducerTile[origin, ring_buffer_type, warps_processed_per_producer].ProducerViewPtrType): - βstage (
Int): - βproducer_iteration (
Int): - βwarp_tile_idx (
Int):
Implemented traitsβ
AnyType,
Copyable,
ImplicitlyCopyable,
ImplicitlyDestructible,
Movable,
RegisterPassable,
TrivialRegisterPassable
comptime membersβ
ProducerViewPtrTypeβ
comptime ProducerViewPtrType = Pointer[ProducerView[origin, ring_buffer_type, warps_processed_per_producer], origin]
ProducerViewTypeβ
comptime ProducerViewType = ProducerView[origin, ring_buffer_type, warps_processed_per_producer]
Methodsβ
__init__β
__init__(producer_view_ptr: Pointer[ProducerView[origin, ring_buffer_type, warps_processed_per_producer], origin], stage: Int, producer_iteration: Int, warp_tile_idx: Int) -> Self
__enter__β
__enter__(mut self) -> ring_buffer_type.WarpTileTupleType
Acquire the tile for use.
Returns:
ring_buffer_type.WarpTileTupleType
__exit__β
__exit__(mut self)
Release the tile back to consumers.
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!