Struct StridedViewMut
pub struct StridedViewMut<'a, T> { /* private fields */ }Expand description
Dynamic-rank mutable strided view.
Always uses Identity element operation for write simplicity.
Julia typically applies ops on the read side.
Implementations§
§impl<'a, T> StridedViewMut<'a, T>
impl<'a, T> StridedViewMut<'a, T>
pub fn new(
data: &'a mut [T],
dims: &[usize],
strides: &[isize],
offset: isize,
) -> Result<StridedViewMut<'a, T>, StridedError>
pub fn new( data: &'a mut [T], dims: &[usize], strides: &[isize], offset: isize, ) -> Result<StridedViewMut<'a, T>, StridedError>
Create a new mutable strided view.
pub unsafe fn new_unchecked(
data: &'a mut [T],
dims: &[usize],
strides: &[isize],
offset: isize,
) -> StridedViewMut<'a, T>
pub unsafe fn new_unchecked( data: &'a mut [T], dims: &[usize], strides: &[isize], offset: isize, ) -> StridedViewMut<'a, T>
Create without bounds checking.
§Safety
Caller must ensure all index combinations stay within bounds.
pub fn as_mut_ptr(&self) -> *mut T
pub fn as_mut_ptr(&self) -> *mut T
Raw mutable pointer to element at the view’s base offset.
pub fn permute(
self,
perm: &[usize],
) -> Result<StridedViewMut<'a, T>, StridedError>
pub fn permute( self, perm: &[usize], ) -> Result<StridedViewMut<'a, T>, StridedError>
Permute dimensions, consuming the mutable view.
Returns a new mutable view with reordered dimensions and strides.
Takes self by value to prevent aliasing of mutable views.
pub fn as_view(&self) -> StridedView<'_, T>
pub fn as_view(&self) -> StridedView<'_, T>
Reborrow as an immutable view.
Trait Implementations§
§impl<T> Debug for StridedViewMut<'_, T>where
T: Debug,
impl<T> Debug for StridedViewMut<'_, T>where
T: Debug,
impl<T> Send for StridedViewMut<'_, T>where
T: Send,
Auto Trait Implementations§
impl<'a, T> Freeze for StridedViewMut<'a, T>
impl<'a, T> RefUnwindSafe for StridedViewMut<'a, T>where
T: RefUnwindSafe,
impl<'a, T> !Sync for StridedViewMut<'a, T>
impl<'a, T> Unpin for StridedViewMut<'a, T>
impl<'a, T> !UnwindSafe for StridedViewMut<'a, T>
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