pub struct ShardsRefMut<'a> { /* private fields */ }Expand description
Mutable reference to a shard array.
Implementations§
Source§impl<'a> ShardsRefMut<'a>
impl<'a> ShardsRefMut<'a>
Sourcepub fn dist2_mut(
&mut self,
pos: usize,
dist: usize,
) -> (&mut [[u8; 64]], &mut [[u8; 64]])
pub fn dist2_mut( &mut self, pos: usize, dist: usize, ) -> (&mut [[u8; 64]], &mut [[u8; 64]])
Returns mutable references to shards at pos and pos + dist.
See source code of Naive::fft for an example.
§Panics
If dist is 0.
Sourcepub fn dist4_mut(
&mut self,
pos: usize,
dist: usize,
) -> (&'_ mut [[u8; 64]], &'_ mut [[u8; 64]], &'_ mut [[u8; 64]], &'_ mut [[u8; 64]])
pub fn dist4_mut( &mut self, pos: usize, dist: usize, ) -> (&'_ mut [[u8; 64]], &'_ mut [[u8; 64]], &'_ mut [[u8; 64]], &'_ mut [[u8; 64]])
Returns mutable references to shards at
pos, pos + dist, pos + dist * 2 and pos + dist * 3.
See source code of NoSimd::fft for an example
(specifically the private method fft_butterfly_two_layers).
§Panics
If dist is 0.
Sourcepub fn new(
shard_count: usize,
shard_chunk_count: usize,
data: &'a mut [[u8; 64]],
) -> Self
pub fn new( shard_count: usize, shard_chunk_count: usize, data: &'a mut [[u8; 64]], ) -> Self
Creates new ShardsRefMut that references given data.
§Panics
If data.len() < shard_count * shard_chunk_count.
Sourcepub fn split_at_mut(
&mut self,
mid: usize,
) -> (ShardsRefMut<'_>, ShardsRefMut<'_>)
pub fn split_at_mut( &mut self, mid: usize, ) -> (ShardsRefMut<'_>, ShardsRefMut<'_>)
Splits this ShardsRefMut into two so that
first includes shards 0..mid and second includes shards mid...
Sourcepub fn zero<R: RangeBounds<usize>>(&mut self, range: R)
pub fn zero<R: RangeBounds<usize>>(&mut self, range: R)
Fills the given shard-range with 0u8:s.
Trait Implementations§
Source§impl Index<usize> for ShardsRefMut<'_>
impl Index<usize> for ShardsRefMut<'_>
Auto Trait Implementations§
impl<'a> !UnwindSafe for ShardsRefMut<'a>
impl<'a> Freeze for ShardsRefMut<'a>
impl<'a> RefUnwindSafe for ShardsRefMut<'a>
impl<'a> Send for ShardsRefMut<'a>
impl<'a> Sync for ShardsRefMut<'a>
impl<'a> Unpin for ShardsRefMut<'a>
impl<'a> UnsafeUnpin for ShardsRefMut<'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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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