pub struct InterPhaseReduction<T> { /* private fields */ }Expand description
Inter-phase reduction state
Implementations§
Source§impl<T: Default + Clone + Copy> InterPhaseReduction<T>
impl<T: Default + Clone + Copy> InterPhaseReduction<T>
Sourcepub fn with_config(input_size: usize, config: ReductionConfig) -> Self
pub fn with_config(input_size: usize, config: ReductionConfig) -> Self
Create with full configuration
Sourcepub fn config(&self) -> &ReductionConfig
pub fn config(&self) -> &ReductionConfig
Get configuration
Sourcepub fn input_size(&self) -> usize
pub fn input_size(&self) -> usize
Get input size
Sourcepub fn current_phase(&self) -> u32
pub fn current_phase(&self) -> u32
Get current phase
Sourcepub fn phase_start(&self, phase: u32) -> Result<(), ReductionError>
pub fn phase_start(&self, phase: u32) -> Result<(), ReductionError>
Start a phase
Sourcepub fn phase_complete(&self, phase: u32) -> Result<(), ReductionError>
pub fn phase_complete(&self, phase: u32) -> Result<(), ReductionError>
Complete a phase
Sourcepub fn phase_failed(&self, phase: u32)
pub fn phase_failed(&self, phase: u32)
Mark a phase as failed
Sourcepub fn phase_state(&self, phase: u32) -> PhaseState
pub fn phase_state(&self, phase: u32) -> PhaseState
Get phase state
Sourcepub fn is_complete(&self) -> bool
pub fn is_complete(&self) -> bool
Check if reduction is complete
Sourcepub fn get_buffer(&self, phase: u32) -> Option<&[T]>
pub fn get_buffer(&self, phase: u32) -> Option<&[T]>
Get buffer for a phase (for reading previous phase results)
Sourcepub fn get_buffer_mut(&mut self, phase: u32) -> Option<&mut [T]>
pub fn get_buffer_mut(&mut self, phase: u32) -> Option<&mut [T]>
Get mutable buffer for a phase (for writing current phase results)
Sourcepub fn buffer_size(&self, phase: u32) -> usize
pub fn buffer_size(&self, phase: u32) -> usize
Get buffer size for a phase
Sourcepub fn set_convergence(&self, value: f64)
pub fn set_convergence(&self, value: f64)
Set convergence value (as bits)
Sourcepub fn convergence(&self) -> f64
pub fn convergence(&self) -> f64
Get convergence value
Sourcepub fn is_converged(&self) -> bool
pub fn is_converged(&self) -> bool
Check if converged (if convergence checking enabled)
Auto Trait Implementations§
impl<T> !Freeze for InterPhaseReduction<T>
impl<T> RefUnwindSafe for InterPhaseReduction<T>where
T: RefUnwindSafe,
impl<T> Send for InterPhaseReduction<T>where
T: Send,
impl<T> Sync for InterPhaseReduction<T>where
T: Sync,
impl<T> Unpin for InterPhaseReduction<T>where
T: Unpin,
impl<T> UnwindSafe for InterPhaseReduction<T>where
T: UnwindSafe,
Blanket Implementations§
Source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
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<F, W, T, D> Deserialize<With<T, W>, D> for F
impl<F, W, T, D> Deserialize<With<T, W>, D> for F
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> LayoutRaw for T
impl<T> LayoutRaw for T
Source§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Gets the layout of the type.