pub struct ParallelOptimizerState { /* private fields */ }Expand description
Thread-safe optimizer state with fine-grained locking.
Implementations§
Source§impl ParallelOptimizerState
impl ParallelOptimizerState
Sourcepub fn new(config: ParallelConfig) -> Self
pub fn new(config: ParallelConfig) -> Self
Creates a new parallel optimizer state.
Sourcepub fn get_or_create_state(
&self,
param_id: String,
size: usize,
) -> Arc<Mutex<ParameterState>>
pub fn get_or_create_state( &self, param_id: String, size: usize, ) -> Arc<Mutex<ParameterState>>
Gets or creates parameter state.
Sourcepub fn memory_usage(&self) -> StateMemoryStats
pub fn memory_usage(&self) -> StateMemoryStats
Gets memory usage statistics.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for ParallelOptimizerState
impl RefUnwindSafe for ParallelOptimizerState
impl Send for ParallelOptimizerState
impl Sync for ParallelOptimizerState
impl Unpin for ParallelOptimizerState
impl UnwindSafe for ParallelOptimizerState
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