pub struct Dim { /* private fields */ }Implementations§
Source§impl Dim
impl Dim
pub fn shape(&self) -> &[usize]
pub fn ret_stride(&mut self, stride: Layout)
pub fn nd_stride(&self) -> Layout
pub fn shape_mut(&mut self) -> &mut [usize]
pub fn shape_layout_mut(&mut self) -> &mut Layout
pub fn shape_layout(&self) -> &Layout
pub fn stride_layout_mut(&mut self) -> &mut Layout
pub fn stride_layout(&self) -> &Layout
pub fn stride(&self) -> &[usize]
pub fn stride_4d(&self) -> (usize, usize, usize, usize)
pub fn stride_3d(&self) -> (usize, usize, usize)
pub fn stride_2d(&self) -> (usize, usize)
pub fn stride_1d(&self) -> usize
pub fn stride_3(&self) -> usize
pub fn stride_2(&self) -> usize
pub fn stride_1(&self) -> usize
pub fn stride_0(&self) -> usize
pub fn dim_3(&self) -> usize
pub fn dim_2(&self) -> usize
pub fn dim_1(&self) -> usize
pub fn dim_0(&self) -> usize
pub fn dim4(&self) -> (usize, usize, usize, usize)
pub fn dim3(&self) -> (usize, usize, usize)
pub fn dim2(&self) -> (usize, usize)
pub fn dim1(&self) -> usize
pub fn n_dims(&self) -> usize
pub fn nrows(&self) -> usize
pub fn is_vector(&self) -> bool
pub fn transpose(&mut self, d1: usize, d2: usize) -> GResult<Dim>
pub fn is_contiguous(&self) -> bool
pub fn ggml_is_contiguous(&self) -> bool
pub fn is_permuted(&self) -> bool
pub fn is_scalar(&self) -> bool
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Dim
impl RefUnwindSafe for Dim
impl Send for Dim
impl Sync for Dim
impl Unpin for Dim
impl UnsafeUnpin for Dim
impl UnwindSafe for Dim
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