pub struct Procedural { /* private fields */ }Expand description
Runtime state of a procedural source. origin tracks regions selected by Tile::at. Its
recipe computes at its own element; a read names the element it wants.
Implementations§
Source§impl Procedural
impl Procedural
Sourcepub fn tile_in<T: Numeric>(self, partitioning: &Partitioning) -> Tile
pub fn tile_in<T: Numeric>(self, partitioning: &Partitioning) -> Tile
This source as a tile at the root of partitioning, windowed by its regions like an
operand bound to it: its space must be the partitioning’s, or some of its axes.
Sourcepub fn __expand_tile<T: Numeric>(
scope: &Scope,
this: <Self as CubeType>::ExpandType,
) -> <Tile as CubeType>::ExpandType
pub fn __expand_tile<T: Numeric>( scope: &Scope, this: <Self as CubeType>::ExpandType, ) -> <Tile as CubeType>::ExpandType
This source as a tile, placed alone.
Sourcepub fn __expand_tile_in<T: Numeric>(
scope: &Scope,
this: <Self as CubeType>::ExpandType,
partitioning: &<Partitioning as CubeType>::ExpandType,
) -> <Tile as CubeType>::ExpandType
pub fn __expand_tile_in<T: Numeric>( scope: &Scope, this: <Self as CubeType>::ExpandType, partitioning: &<Partitioning as CubeType>::ExpandType, ) -> <Tile as CubeType>::ExpandType
This source as a tile at the root of partitioning, windowed by its regions like an
operand bound to it: its space must be the partitioning’s, or some of its axes.
Source§impl Procedural
impl Procedural
Sourcepub fn new<T: Numeric, R: Recipe<T> + 'static>(
_space: Space,
_recipe: R,
) -> Self
pub fn new<T: Numeric, R: Recipe<T> + 'static>( _space: Space, _recipe: R, ) -> Self
A memory-free source over space, evaluated from recipe, which computes at T, where it
is read.
pub fn __expand_new<T: Numeric, R: Recipe<T> + 'static>( scope: &Scope, space: Space, recipe: R::ExpandType, ) -> ProceduralExpand
Sourcepub fn separable<T: Numeric, R: Separable<T> + 'static>(
_space: Space,
_recipe: R,
) -> Selfwhere
R::ExpandType: FactorReads,
pub fn separable<T: Numeric, R: Separable<T> + 'static>(
_space: Space,
_recipe: R,
) -> Selfwhere
R::ExpandType: FactorReads,
new keeping the recipe’s factorization, one factor per contracted axis.
pub fn __expand_separable<T: Numeric, R: Separable<T> + 'static>(
scope: &Scope,
space: Space,
recipe: R::ExpandType,
) -> ProceduralExpandwhere
R::ExpandType: SeparableExpand<T> + FactorReads,
Sourcepub fn normalized(self, _taps: TapSupport, _guard: DivGuard) -> Self
pub fn normalized(self, _taps: TapSupport, _guard: DivGuard) -> Self
Normalize each factor’s taps where the gather contraction evaluates them. The recipe must state a factorization.
Trait Implementations§
Source§impl Clone for Procedural
impl Clone for Procedural
Source§impl CubeType for Procedural
impl CubeType for Procedural
type ExpandType = ProceduralExpand
Source§impl Vectorized for Procedural
impl Vectorized for Procedural
fn vector_size(&self) -> usize
fn __expand_vector_size(scope: &Scope, this: &Self::ExpandType) -> usize
Source§impl<T: Numeric, W: Size> ViewOperations<Vector<T, W>, Sequence<u32>> for Procedural
impl<T: Numeric, W: Size> ViewOperations<Vector<T, W>, Sequence<u32>> for Procedural
fn read(&self, pos: C) -> T
fn read_checked(&self, pos: C) -> T
fn read_masked(&self, pos: C, value: T) -> T
fn read_unchecked(&self, pos: C) -> T
Source§fn as_linear_slice(&self, pos: C, size: C) -> &[T]
fn as_linear_slice(&self, pos: C, size: C) -> &[T]
pos, with size.
The layout handles translation into concrete indices.Source§fn tensor_map_load(&self, barrier: &Barrier, shared_memory: &mut [T], pos: C)
fn tensor_map_load(&self, barrier: &Barrier, shared_memory: &mut [T], pos: C)
fn shape(&self) -> C
fn is_in_bounds(&self, pos: C) -> bool
fn __expand_read( scope: &Scope, this: &Self::ExpandType, pos: <C as CubeType>::ExpandType, ) -> <T as CubeType>::ExpandType
fn __expand_read_checked( scope: &Scope, this: &Self::ExpandType, pos: <C as CubeType>::ExpandType, ) -> <T as CubeType>::ExpandType
fn __expand_read_masked( scope: &Scope, this: &Self::ExpandType, pos: <C as CubeType>::ExpandType, value: <T as CubeType>::ExpandType, ) -> <T as CubeType>::ExpandType
fn __expand_read_unchecked( scope: &Scope, this: &Self::ExpandType, pos: <C as CubeType>::ExpandType, ) -> <T as CubeType>::ExpandType
fn __expand_as_linear_slice<'infer, 'scope>( scope: &'scope Scope, this: &'infer Self::ExpandType, pos: <C as CubeType>::ExpandType, size: <C as CubeType>::ExpandType, ) -> &'infer <[T] as CubeType>::ExpandType ⓘ
fn __expand_tensor_map_load( scope: &Scope, this: &Self::ExpandType, barrier: &<Barrier as CubeType>::ExpandType, shared_memory: &mut <[T] as CubeType>::ExpandType, pos: <C as CubeType>::ExpandType, )
fn __expand_shape( scope: &Scope, this: &Self::ExpandType, ) -> <C as CubeType>::ExpandType
fn __expand_is_in_bounds( scope: &Scope, this: &Self::ExpandType, pos: <C as CubeType>::ExpandType, ) -> <bool as CubeType>::ExpandType
Auto Trait Implementations§
impl Freeze for Procedural
impl RefUnwindSafe for Procedural
impl Send for Procedural
impl Sync for Procedural
impl Unpin for Procedural
impl UnsafeUnpin for Procedural
impl UnwindSafe for Procedural
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