pub struct StridedTile {
pub shape: Tile2,
pub strides: Strides2,
}Expand description
Strided tile: each row stride is configurable. Lets a kernel read a non-contiguous view (e.g. last-axis Narrow output) with the same TileIO interface as a contiguous tile.
Fields§
§shape: Tile2§strides: Strides2Trait Implementations§
Source§impl Clone for StridedTile
impl Clone for StridedTile
Source§fn clone(&self) -> StridedTile
fn clone(&self) -> StridedTile
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for StridedTile
impl Debug for StridedTile
Source§impl TileIO for StridedTile
impl TileIO for StridedTile
Source§unsafe fn address(&self, base: *const f32, c: Coord2) -> *const f32
unsafe fn address(&self, base: *const f32, c: Coord2) -> *const f32
Compute the byte address for a coordinate. Used by
load / store / prefetch so impls only need to define
the address arithmetic once.
SAFETY: caller checks bounds.Source§unsafe fn load(&self, base: *const f32, c: Coord2) -> f32
unsafe fn load(&self, base: *const f32, c: Coord2) -> f32
Load a tile element by
(row, col).
SAFETY: caller ensures the address is valid for read.impl Copy for StridedTile
Auto Trait Implementations§
impl Freeze for StridedTile
impl RefUnwindSafe for StridedTile
impl Send for StridedTile
impl Sync for StridedTile
impl Unpin for StridedTile
impl UnsafeUnpin for StridedTile
impl UnwindSafe for StridedTile
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
Converts
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>
Converts
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