Struct hotg_rune_core::TensorViewMut
source · [−]pub struct TensorViewMut<'t, T, const RANK: usize> { /* private fields */ }
Expand description
A mutable view into a Tensor
with a particular rank (number of
dimensions).
Implementations
sourceimpl<'t, T, const RANK: usize> TensorViewMut<'t, T, RANK>
impl<'t, T, const RANK: usize> TensorViewMut<'t, T, RANK>
pub fn elements(&mut self) -> &mut [T]ⓘNotable traits for &'_ [u8]impl<'_> Read for &'_ [u8]impl<'_> Write for &'_ mut [u8]
pub fn dimensions(&self) -> [usize; RANK]
pub fn get(&self, indices: [usize; RANK]) -> Option<&T>
pub fn get_mut(&mut self, indices: [usize; RANK]) -> Option<&mut T>
pub fn slice<const NEW_RANK: usize>(
&self,
leading_indices: &[usize]
) -> Option<TensorView<'_, T, NEW_RANK>>
sourcepub fn slice_mut<const NEW_RANK: usize>(
&mut self,
leading_indices: &[usize]
) -> Option<TensorViewMut<'_, T, RANK>> where
T: Clone,
pub fn slice_mut<const NEW_RANK: usize>(
&mut self,
leading_indices: &[usize]
) -> Option<TensorViewMut<'_, T, RANK>> where
T: Clone,
The TensorViewMut
version of Tensor::slice_mut()
.
Trait Implementations
sourceimpl<'t, T: Debug, const RANK: usize> Debug for TensorViewMut<'t, T, RANK>
impl<'t, T: Debug, const RANK: usize> Debug for TensorViewMut<'t, T, RANK>
sourceimpl<'t, T> Index<usize> for TensorViewMut<'t, T, 1>
impl<'t, T> Index<usize> for TensorViewMut<'t, T, 1>
sourceimpl<'t, T> IndexMut<usize> for TensorViewMut<'t, T, 1>
impl<'t, T> IndexMut<usize> for TensorViewMut<'t, T, 1>
sourceimpl<'t, T: PartialEq, const RANK: usize> PartialEq<TensorViewMut<'t, T, RANK>> for TensorViewMut<'t, T, RANK>
impl<'t, T: PartialEq, const RANK: usize> PartialEq<TensorViewMut<'t, T, RANK>> for TensorViewMut<'t, T, RANK>
sourcefn eq(&self, other: &TensorViewMut<'t, T, RANK>) -> bool
fn eq(&self, other: &TensorViewMut<'t, T, RANK>) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &TensorViewMut<'t, T, RANK>) -> bool
fn ne(&self, other: &TensorViewMut<'t, T, RANK>) -> bool
This method tests for !=
.
impl<'t, T, const RANK: usize> StructuralPartialEq for TensorViewMut<'t, T, RANK>
Auto Trait Implementations
impl<'t, T, const RANK: usize> RefUnwindSafe for TensorViewMut<'t, T, RANK> where
T: RefUnwindSafe,
impl<'t, T, const RANK: usize> Send for TensorViewMut<'t, T, RANK> where
T: Send,
impl<'t, T, const RANK: usize> Sync for TensorViewMut<'t, T, RANK> where
T: Sync,
impl<'t, T, const RANK: usize> Unpin for TensorViewMut<'t, T, RANK>
impl<'t, T, const RANK: usize> !UnwindSafe for TensorViewMut<'t, T, RANK>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more