[−][src]Struct math::tensor::TensorShape
The shape of an N-dimensional tensor has a size for each dimension, with an
associated stride, e.g., a row-major 3 x 5 matrix will have a stride of 5
for the dimension of size 3 and a stride of 1 for the dimension of size 5,
and the resulting dims_strides
is [(3, 5), (5, 1)]
. Index 0 of
dims_strides
always refers to the leftmost dimension.
Implementations
impl TensorShape
[src]
pub fn dims(&self) -> Vec<Length>
[src]
pub fn strides(&self) -> Vec<Stride>
[src]
pub fn ndim(&self) -> usize
[src]
pub fn num_elements(&self) -> usize
[src]
Trait Implementations
impl Clone for TensorShape
[src]
pub fn clone(&self) -> TensorShape
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for TensorShape
[src]
impl Eq for TensorShape
[src]
impl From<&'_ [isize; 1]> for TensorShape
[src]
impl From<&'_ [isize; 2]> for TensorShape
[src]
impl From<&'_ [isize; 3]> for TensorShape
[src]
impl From<&'_ [isize; 4]> for TensorShape
[src]
impl From<&'_ [isize; 5]> for TensorShape
[src]
impl From<&'_ [isize; 6]> for TensorShape
[src]
impl From<&'_ [isize; 7]> for TensorShape
[src]
impl From<&'_ [isize; 8]> for TensorShape
[src]
impl From<&'_ [usize; 1]> for TensorShape
[src]
impl From<&'_ [usize; 2]> for TensorShape
[src]
impl From<&'_ [usize; 3]> for TensorShape
[src]
impl From<&'_ [usize; 4]> for TensorShape
[src]
impl From<&'_ [usize; 5]> for TensorShape
[src]
impl From<&'_ [usize; 6]> for TensorShape
[src]
impl From<&'_ [usize; 7]> for TensorShape
[src]
impl From<&'_ [usize; 8]> for TensorShape
[src]
impl From<&'_ Vec<i32, Global>> for TensorShape
[src]
impl From<&'_ Vec<i64, Global>> for TensorShape
[src]
impl From<&'_ Vec<isize, Global>> for TensorShape
[src]
impl From<&'_ Vec<u32, Global>> for TensorShape
[src]
impl From<&'_ Vec<u64, Global>> for TensorShape
[src]
impl From<&'_ Vec<usize, Global>> for TensorShape
[src]
impl From<[i32; 1]> for TensorShape
[src]
impl From<[i32; 2]> for TensorShape
[src]
impl From<[i32; 3]> for TensorShape
[src]
impl From<[i32; 4]> for TensorShape
[src]
impl From<[i32; 5]> for TensorShape
[src]
impl From<[i32; 6]> for TensorShape
[src]
impl From<[i32; 7]> for TensorShape
[src]
impl From<[i32; 8]> for TensorShape
[src]
impl From<[i64; 1]> for TensorShape
[src]
impl From<[i64; 2]> for TensorShape
[src]
impl From<[i64; 3]> for TensorShape
[src]
impl From<[i64; 4]> for TensorShape
[src]
impl From<[i64; 5]> for TensorShape
[src]
impl From<[i64; 6]> for TensorShape
[src]
impl From<[i64; 7]> for TensorShape
[src]
impl From<[i64; 8]> for TensorShape
[src]
impl From<[isize; 1]> for TensorShape
[src]
impl From<[isize; 2]> for TensorShape
[src]
impl From<[isize; 3]> for TensorShape
[src]
impl From<[isize; 4]> for TensorShape
[src]
impl From<[isize; 5]> for TensorShape
[src]
impl From<[isize; 6]> for TensorShape
[src]
impl From<[isize; 7]> for TensorShape
[src]
impl From<[isize; 8]> for TensorShape
[src]
impl From<[u32; 1]> for TensorShape
[src]
impl From<[u32; 2]> for TensorShape
[src]
impl From<[u32; 3]> for TensorShape
[src]
impl From<[u32; 4]> for TensorShape
[src]
impl From<[u32; 5]> for TensorShape
[src]
impl From<[u32; 6]> for TensorShape
[src]
impl From<[u32; 7]> for TensorShape
[src]
impl From<[u32; 8]> for TensorShape
[src]
impl From<[u64; 1]> for TensorShape
[src]
impl From<[u64; 2]> for TensorShape
[src]
impl From<[u64; 3]> for TensorShape
[src]
impl From<[u64; 4]> for TensorShape
[src]
impl From<[u64; 5]> for TensorShape
[src]
impl From<[u64; 6]> for TensorShape
[src]
impl From<[u64; 7]> for TensorShape
[src]
impl From<[u64; 8]> for TensorShape
[src]
impl From<[usize; 1]> for TensorShape
[src]
impl From<[usize; 2]> for TensorShape
[src]
impl From<[usize; 3]> for TensorShape
[src]
impl From<[usize; 4]> for TensorShape
[src]
impl From<[usize; 5]> for TensorShape
[src]
impl From<[usize; 6]> for TensorShape
[src]
impl From<[usize; 7]> for TensorShape
[src]
impl From<[usize; 8]> for TensorShape
[src]
impl From<Vec<i32, Global>> for TensorShape
[src]
impl From<Vec<i64, Global>> for TensorShape
[src]
impl From<Vec<isize, Global>> for TensorShape
[src]
impl From<Vec<u32, Global>> for TensorShape
[src]
impl From<Vec<u64, Global>> for TensorShape
[src]
impl From<Vec<usize, Global>> for TensorShape
[src]
impl Ord for TensorShape
[src]
pub fn cmp(&self, other: &TensorShape) -> Ordering
[src]
#[must_use]pub fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]pub fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]pub fn clamp(self, min: Self, max: Self) -> Self
1.50.0[src]
impl PartialEq<TensorShape> for TensorShape
[src]
pub fn eq(&self, other: &TensorShape) -> bool
[src]
pub fn ne(&self, other: &TensorShape) -> bool
[src]
impl PartialOrd<TensorShape> for TensorShape
[src]
pub fn partial_cmp(&self, other: &TensorShape) -> Option<Ordering>
[src]
pub fn lt(&self, other: &TensorShape) -> bool
[src]
pub fn le(&self, other: &TensorShape) -> bool
[src]
pub fn gt(&self, other: &TensorShape) -> bool
[src]
pub fn ge(&self, other: &TensorShape) -> bool
[src]
impl StructuralEq for TensorShape
[src]
impl StructuralPartialEq for TensorShape
[src]
Auto Trait Implementations
impl RefUnwindSafe for TensorShape
[src]
impl Send for TensorShape
[src]
impl Sync for TensorShape
[src]
impl Unpin for TensorShape
[src]
impl UnwindSafe for TensorShape
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Pointable for T
pub const ALIGN: usize
type Init = T
The type for initializers.
pub unsafe fn init(init: <T as Pointable>::Init) -> usize
pub unsafe fn deref<'a>(ptr: usize) -> &'a T
pub unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T
pub unsafe fn drop(ptr: usize)
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,