pub struct ParallelCompressionAdaptor<C> { /* private fields */ }Expand description
A simple adapter that wraps any PseudoCompressionFunction to implement ParallelCompression.
This adapter provides a straightforward way to use existing compression functions in parallel contexts by applying them sequentially to each N-element chunk.
Implementations§
Source§impl<C> ParallelCompressionAdaptor<C>
impl<C> ParallelCompressionAdaptor<C>
Sourcepub fn new(compression: C) -> Self
pub fn new(compression: C) -> Self
Creates a new adapter wrapping the given compression function.
Sourcepub fn compression(&self) -> &C
pub fn compression(&self) -> &C
Returns a reference to the underlying compression function.
Trait Implementations§
Source§impl<C: Clone> Clone for ParallelCompressionAdaptor<C>
impl<C: Clone> Clone for ParallelCompressionAdaptor<C>
Source§fn clone(&self) -> ParallelCompressionAdaptor<C>
fn clone(&self) -> ParallelCompressionAdaptor<C>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<C: Debug> Debug for ParallelCompressionAdaptor<C>
impl<C: Debug> Debug for ParallelCompressionAdaptor<C>
Source§impl<T, C, const ARITY: usize> ParallelPseudoCompression<T, ARITY> for ParallelCompressionAdaptor<C>
impl<T, C, const ARITY: usize> ParallelPseudoCompression<T, ARITY> for ParallelCompressionAdaptor<C>
Source§type Compression = C
type Compression = C
The underlying compression function that performs N-to-1 compression.
Source§fn compression(&self) -> &Self::Compression
fn compression(&self) -> &Self::Compression
Returns a reference to the underlying compression function.
Source§fn parallel_compress(&self, inputs: &[T], out: &mut [MaybeUninit<T>])
fn parallel_compress(&self, inputs: &[T], out: &mut [MaybeUninit<T>])
Compresses multiple N-element chunks in parallel. Read more
Auto Trait Implementations§
impl<C> Freeze for ParallelCompressionAdaptor<C>where
C: Freeze,
impl<C> RefUnwindSafe for ParallelCompressionAdaptor<C>where
C: RefUnwindSafe,
impl<C> Send for ParallelCompressionAdaptor<C>where
C: Send,
impl<C> Sync for ParallelCompressionAdaptor<C>where
C: Sync,
impl<C> Unpin for ParallelCompressionAdaptor<C>where
C: Unpin,
impl<C> UnwindSafe for ParallelCompressionAdaptor<C>where
C: UnwindSafe,
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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