pub struct ParallelConfig {
pub num_threads: usize,
pub min_params_per_thread: usize,
pub enable_work_stealing: bool,
pub numa_aware: bool,
pub chunk_size: usize,
pub lock_free: bool,
}Expand description
Configuration for parallel optimization.
Fields§
§num_threads: usizeNumber of worker threads (0 = auto-detect)
min_params_per_thread: usizeMinimum parameters per thread to justify parallelization
enable_work_stealing: boolEnable work stealing for load balancing
numa_aware: boolEnable NUMA-aware thread pinning
chunk_size: usizeChunk size for parameter processing
lock_free: boolEnable lock-free optimizations where possible
Implementations§
Source§impl ParallelConfig
impl ParallelConfig
Sourcepub fn cpu_optimized() -> Self
pub fn cpu_optimized() -> Self
Creates configuration optimized for CPU-bound workloads.
Sourcepub fn large_model() -> Self
pub fn large_model() -> Self
Creates configuration for large model training.
Sourcepub fn memory_bound() -> Self
pub fn memory_bound() -> Self
Creates configuration for memory-bound workloads.
Sourcepub fn effective_num_threads(&self) -> usize
pub fn effective_num_threads(&self) -> usize
Gets the effective number of threads.
Trait Implementations§
Source§impl Clone for ParallelConfig
impl Clone for ParallelConfig
Source§fn clone(&self) -> ParallelConfig
fn clone(&self) -> ParallelConfig
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 Debug for ParallelConfig
impl Debug for ParallelConfig
Auto Trait Implementations§
impl Freeze for ParallelConfig
impl RefUnwindSafe for ParallelConfig
impl Send for ParallelConfig
impl Sync for ParallelConfig
impl Unpin for ParallelConfig
impl UnwindSafe for ParallelConfig
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,
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