pub struct IoDim {
pub n: usize,
pub is: isize,
pub os: isize,
}Expand description
Dimension specification with separate input and output strides.
This allows representing transforms where input and output have different memory layouts (e.g., different strides, in-place vs out-of-place).
Fields§
§n: usizeSize of this dimension.
is: isizeInput stride (can be negative for reversed access).
os: isizeOutput stride (can be negative for reversed access).
Implementations§
Source§impl IoDim
impl IoDim
Sourcepub const fn contiguous(n: usize) -> Self
pub const fn contiguous(n: usize) -> Self
Create a contiguous dimension (stride = 1 for both input and output).
Sourcepub const fn is_contiguous(&self) -> bool
pub const fn is_contiguous(&self) -> bool
Check if this dimension is contiguous.
Sourcepub const fn is_inplace_compatible(&self) -> bool
pub const fn is_inplace_compatible(&self) -> bool
Check if input and output have the same stride.
Trait Implementations§
impl Eq for IoDim
impl StructuralPartialEq for IoDim
Auto Trait Implementations§
impl Freeze for IoDim
impl RefUnwindSafe for IoDim
impl Send for IoDim
impl Sync for IoDim
impl Unpin for IoDim
impl UnsafeUnpin for IoDim
impl UnwindSafe for IoDim
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.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