pub struct Shape { /* private fields */ }Implementations§
Source§impl Shape
impl Shape
pub const fn scalar() -> Self
pub fn vector(elements: u32) -> Self
pub fn matrix(rows: u32, columns: u32) -> Self
pub fn of(dims: impl AsRef<[u32]>) -> Self
pub const fn dims(self) -> [u32; 4]
pub const fn elements(self) -> u32
pub fn strides(self) -> [u32; 4]
pub fn combines_with(self, other: Self) -> bool
pub fn combined(self, other: Self) -> Self
pub fn fits_within(self, other: Self) -> bool
pub fn batch(self) -> [u32; 2]
pub fn reduced(self, axis: u32) -> Self
pub fn rows(self) -> u32
pub fn columns(self) -> u32
pub fn is_scalar(self) -> bool
Trait Implementations§
impl Copy for Shape
impl Eq for Shape
impl StructuralPartialEq for Shape
Auto Trait Implementations§
impl Freeze for Shape
impl RefUnwindSafe for Shape
impl Send for Shape
impl Sync for Shape
impl Unpin for Shape
impl UnsafeUnpin for Shape
impl UnwindSafe for Shape
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