pub struct CpuCoreSet { /* private fields */ }Expand description
Abstraction for CPU core set
Implementations§
Source§impl CpuCoreSet
impl CpuCoreSet
Sourcepub fn truncate(&mut self, num_cores: usize)
pub fn truncate(&mut self, num_cores: usize)
Will truncate list of CPU cores to this number.
Truncation will take into account L2 and L3 cache topology in order to use half of the actual physical cores and half of each core type in case of heterogeneous CPUs.
If cores is zero, call will do nothing since zero number of cores is not allowed.
Sourcepub fn pin_current_thread(&self)
pub fn pin_current_thread(&self)
Pin current thread to this NUMA node (not just one CPU core)
Trait Implementations§
Source§impl Clone for CpuCoreSet
impl Clone for CpuCoreSet
Source§fn clone(&self) -> CpuCoreSet
fn clone(&self) -> CpuCoreSet
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 moreAuto Trait Implementations§
impl Freeze for CpuCoreSet
impl RefUnwindSafe for CpuCoreSet
impl Send for CpuCoreSet
impl Sync for CpuCoreSet
impl Unpin for CpuCoreSet
impl UnwindSafe for CpuCoreSet
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