pub struct TensorViewMut<'a, T, A: Backend = CpuBackend> { /* private fields */ }Implementations§
Source§impl<'a, T, A: Backend> TensorViewMut<'a, T, A>
impl<'a, T, A: Backend> TensorViewMut<'a, T, A>
pub fn as_mut_ptr(&mut self) -> *mut T
pub fn sizes(&self) -> &[usize]
pub fn shape(&self) -> &Dimensions
pub fn strides(&self) -> &[usize]
pub fn flatten(self) -> TensorViewMut<'a, T, A>
pub fn reshape(self, sizes: impl AsRef<[usize]>) -> TensorViewMut<'a, T, A>
pub fn get(self, index: usize) -> Option<Self>
pub fn split_mut(self) -> impl Iterator<Item = Self>
pub fn total_len(&self) -> usize
Source§impl<'a, T> TensorViewMut<'a, T, CpuBackend>
impl<'a, T> TensorViewMut<'a, T, CpuBackend>
Trait Implementations§
Auto Trait Implementations§
impl<'a, T, A> Freeze for TensorViewMut<'a, T, A>
impl<'a, T, A> RefUnwindSafe for TensorViewMut<'a, T, A>where
T: RefUnwindSafe,
A: RefUnwindSafe,
impl<'a, T, A = CpuBackend> !Send for TensorViewMut<'a, T, A>
impl<'a, T, A = CpuBackend> !Sync for TensorViewMut<'a, T, A>
impl<'a, T, A> Unpin for TensorViewMut<'a, T, A>
impl<'a, T, A> UnsafeUnpin for TensorViewMut<'a, T, A>
impl<'a, T, A = CpuBackend> !UnwindSafe for TensorViewMut<'a, T, A>
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> 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