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§
Source§impl<'a, T> StridedViewMut<'a, T>
impl<'a, T> StridedViewMut<'a, T>
Sourcepub fn new(
data: &'a mut [T],
dims: &[usize],
strides: &[isize],
offset: isize,
) -> Result<Self>
pub fn new( data: &'a mut [T], dims: &[usize], strides: &[isize], offset: isize, ) -> Result<Self>
Create a new mutable strided view.
Sourcepub unsafe fn new_unchecked(
data: &'a mut [T],
dims: &[usize],
strides: &[isize],
offset: isize,
) -> Self
pub unsafe fn new_unchecked( data: &'a mut [T], dims: &[usize], strides: &[isize], offset: isize, ) -> Self
Create without bounds checking.
§Safety
Caller must ensure all index combinations stay within bounds.
Sourcepub 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.
Sourcepub fn permute(self, perm: &[usize]) -> Result<StridedViewMut<'a, T>>
pub fn permute(self, perm: &[usize]) -> Result<StridedViewMut<'a, T>>
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.
Sourcepub fn as_view(&self) -> StridedView<'_, T, Identity>
pub fn as_view(&self) -> StridedView<'_, T, Identity>
Reborrow as an immutable view.
Trait Implementations§
Source§impl<T: Debug> Debug for StridedViewMut<'_, T>
impl<T: Debug> Debug for StridedViewMut<'_, T>
impl<T: Send> Send for StridedViewMut<'_, T>
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