pub struct Levels { /* private fields */ }Expand description
A partitioning stated from the leaf up.
Implementations§
Source§impl Levels
impl Levels
Sourcepub fn leaf(tile: &[(Axis, usize)]) -> Self
pub fn leaf(tile: &[(Axis, usize)]) -> Self
The tile one worker holds at the bottom, e.g. an instruction’s shape.
Sourcepub fn walk(self, counts: &[(Axis, usize)]) -> Self
pub fn walk(self, counts: &[(Axis, usize)]) -> Self
Every worker steps through this many of the level below.
Sourcepub fn walk_every(self, axes: &[Axis]) -> Self
pub fn walk_every(self, axes: &[Axis]) -> Self
Every worker steps through every tile of the level below along axes.
Sourcepub fn units(self, counts: &[(Axis, usize)]) -> Self
pub fn units(self, counts: &[(Axis, usize)]) -> Self
This many of the thing below, one per unit of the plane.
Sourcepub fn units_distributed(self, axis: Axis, count: usize) -> Self
pub fn units_distributed(self, axis: Axis, count: usize) -> Self
This many of the level below, taken in turns by however many units the launch runs.
Sourcepub fn planes(self, counts: &[(Axis, usize)]) -> Self
pub fn planes(self, counts: &[(Axis, usize)]) -> Self
This many of the level below, one per plane of the cube.
Sourcepub fn plane_groups(self, planes: usize, counts: &[(Axis, usize)]) -> Self
pub fn plane_groups(self, planes: usize, counts: &[(Axis, usize)]) -> Self
This many of the level below, one per group of planes consecutive planes of the cube: an
instruction the group’s planes issue together, a warpgroup MMA’s four, takes each tile.
Sourcepub fn planes_across(self, axis: Axis, planes: usize) -> Self
pub fn planes_across(self, axis: Axis, planes: usize) -> Self
Every tile of the level below along axis, dealt to planes planes of the cube in runs:
the planes need not divide the tiles, and a plane past the last whole run takes the rest.
What splits a walk between the planes where its steps have no factor the planes fit.
Sourcepub fn cubes(self, axes: &[Axis]) -> Self
pub fn cubes(self, axes: &[Axis]) -> Self
One cube for every box these axes hold; the entries ride the grid’s X, Y, Z in order.
Sourcepub fn launch_planes(self, axes: &[Axis], order: PlaneOrder) -> Self
pub fn launch_planes(self, axes: &[Axis], order: PlaneOrder) -> Self
One plane of the launch for every tile these axes hold, the planes taking them in order:
the outermost level of a partitioning with no cube level. A plane routine’s planes share
nothing, so which cube a plane sits in is the launch’s grouping, not a level of the
partitioning; the order sets the cubes’ size (PlaneOrder::planes_per_cube).
Sourcepub fn launch_units(self, axes: &[Axis], cube: UnitCube) -> Self
pub fn launch_units(self, axes: &[Axis], cube: UnitCube) -> Self
One unit of the launch for every tile these axes hold, in row order, the units grouped in
cubes of cube: the outermost level of a partitioning with no cube or plane level. A unit
routine’s units share nothing, so which cube or plane a unit sits in is the launch’s
grouping, not a level of the partitioning, and for unit in &partitioning walks them.
Sourcepub fn across(self, axis: Axis, cubes: usize) -> Self
pub fn across(self, axis: Axis, cubes: usize) -> Self
Distribute axis of the cube level just stated across cubes cubes, each a run (split-K).
Distribute this level’s tiles to cubes cubes as one flat index (stream-K).
Sourcepub fn ordered(self, order: CubeOrder) -> Self
pub fn ordered(self, order: CubeOrder) -> Self
The order the cube level just stated distributes its boxes to the grid.
Sourcepub fn filled_by(self, n: usize) -> Self
pub fn filled_by(self, n: usize) -> Self
This walk’s stages are filled by n extra planes that take no tile.
Sourcepub fn interleaved(self, axis: Axis) -> Self
pub fn interleaved(self, axis: Axis) -> Self
The workers of the level just stated take axis’s tiles in turns rather than in runs.
Sourcepub fn reversed(self, axis: Axis) -> Self
pub fn reversed(self, axis: Axis) -> Self
The level just stated, a cube level or a plane level spanning the launch, hands out
axis’s tiles from the last to the first: the first workers launched take the last tiles.
Where the later tiles hold more work, the heaviest start first and the light ones fill in
behind them.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Levels
impl RefUnwindSafe for Levels
impl Send for Levels
impl Sync for Levels
impl Unpin for Levels
impl UnsafeUnpin for Levels
impl UnwindSafe for Levels
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneExpand for Twhere
T: Clone,
impl<T> CloneExpand for Twhere
T: Clone,
fn __expand_clone_method(&self, _: &Scope) -> T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSend for T
impl<T> DowncastSend for T
Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more