pub struct ParallelConfig { /* private fields */ }Expand description
Parallel build configuration.
Implementations§
Source§impl ParallelConfig
impl ParallelConfig
Sourcepub fn with_percentage(self, percentage: f32) -> Self
pub fn with_percentage(self, percentage: f32) -> Self
Set the percentage of available threads to use (clamped to 0.0..=1.0).
Sourcepub fn with_max_threads(self, max: usize) -> Self
pub fn with_max_threads(self, max: usize) -> Self
Set the maximum number of threads.
Sourcepub fn with_min_threads(self, min: usize) -> Self
pub fn with_min_threads(self, min: usize) -> Self
Set the minimum number of threads.
Sourcepub fn with_nvcc_thread_patterns<S: AsRef<str>>(
self,
patterns: &[S],
num_nvcc_threads: usize,
) -> Self
pub fn with_nvcc_thread_patterns<S: AsRef<str>>( self, patterns: &[S], num_nvcc_threads: usize, ) -> Self
Set patterns for files that should use nvcc’s internal --threads=N flag.
Replaces the default patterns ("flash_api", "cutlass").
Sourcepub fn should_use_nvcc_threads(&self, path_str: &str) -> bool
pub fn should_use_nvcc_threads(&self, path_str: &str) -> bool
Check if a file matches any of the thread patterns.
Supports glob patterns (e.g. "gemm_*.cu") and substring matching.
Sourcepub fn thread_count(&self) -> usize
pub fn thread_count(&self) -> usize
Calculate the number of threads to use.
Sourcepub fn init_thread_pool(&self) -> Result<(), ThreadPoolBuildError>
pub fn init_thread_pool(&self) -> Result<(), ThreadPoolBuildError>
Initialize the rayon thread pool with configured settings.
Sourcepub fn nvcc_threads(&self) -> Option<usize>
pub fn nvcc_threads(&self) -> Option<usize>
Get thread count for nvcc’s --threads argument.
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 (const: unstable) · 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 UnsafeUnpin 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> 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