pub struct SrcDest<'src, 'dst, T: Copy> { /* private fields */ }Expand description
Input-output buffer for vectorized operations.
This can either be a single mutable buffer for operations that execute
in-place (&mut [T]) or a pair of input and output buffers where the
output is uninitialized (([T], &mut [MaybeUninit<T>])) and both buffers
must have the same length.
Implementations§
Source§impl<'dst, T: Copy> SrcDest<'_, 'dst, T>
impl<'dst, T: Copy> SrcDest<'_, 'dst, T>
Sourcepub fn src_dest_ptr(&mut self) -> (*const T, *mut MaybeUninit<T>, usize)
pub fn src_dest_ptr(&mut self) -> (*const T, *mut MaybeUninit<T>, usize)
Return source and destination slice pointers and the length.
The source and destination will either alias, or the destination will be a non-aliasing, uninitialized slice.
Sourcepub unsafe fn dest_assume_init(self) -> &'dst mut [T]
pub unsafe fn dest_assume_init(self) -> &'dst mut [T]
Return the initialized destination slice.
§Safety
If this instance was constructed with an uninitialized destination buffer, all elements must have been initialized before this is called.
Trait Implementations§
Auto Trait Implementations§
impl<'src, 'dst, T> Freeze for SrcDest<'src, 'dst, T>
impl<'src, 'dst, T> RefUnwindSafe for SrcDest<'src, 'dst, T>where
T: RefUnwindSafe,
impl<'src, 'dst, T> Send for SrcDest<'src, 'dst, T>
impl<'src, 'dst, T> Sync for SrcDest<'src, 'dst, T>where
T: Sync,
impl<'src, 'dst, T> Unpin for SrcDest<'src, 'dst, T>
impl<'src, 'dst, T> !UnwindSafe for SrcDest<'src, 'dst, 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