#[repr(C)]pub struct TopologyMemBindSupport { /* private fields */ }Expand description
Flags describing actual memory binding support for this topology.
Implementations§
Source§impl TopologyMemBindSupport
impl TopologyMemBindSupport
Sourcepub fn set_current_process(&self) -> bool
pub fn set_current_process(&self) -> bool
Binding the whole current process is supported.
Examples found in repository?
examples/support.rs (line 23)
6fn main() {
7 let topo = Topology::new();
8
9 // Check if Process Binding for CPUs is supported
10 println!("CPU Binding (current process) supported: {}",
11 topo.support().cpu().set_current_process());
12 println!("CPU Binding (any process) supported: {}",
13 topo.support().cpu().set_process());
14
15 // Check if Thread Binding for CPUs is supported
16 println!("CPU Binding (current thread) supported: {}",
17 topo.support().cpu().set_current_thread());
18 println!("CPU Binding (any thread) supported: {}",
19 topo.support().cpu().set_thread());
20
21 // Check if Memory Binding is supported
22 println!("Memory Binding supported: {}",
23 topo.support().memory().set_current_process());
24
25 // Debug Print all the Support Flags
26 println!("All Flags:\n{:?}", topo.support());
27}Sourcepub fn get_current_process(&self) -> bool
pub fn get_current_process(&self) -> bool
Getting the binding of the whole current process is supported.
Sourcepub fn set_process(&self) -> bool
pub fn set_process(&self) -> bool
Binding a whole given process is supported.
Sourcepub fn get_process(&self) -> bool
pub fn get_process(&self) -> bool
Getting the binding of a whole given process is supported.
Sourcepub fn set_current_thread(&self) -> bool
pub fn set_current_thread(&self) -> bool
Binding the current thread only is supported.
Sourcepub fn get_current_thread(&self) -> bool
pub fn get_current_thread(&self) -> bool
Getting the binding of the current thread only is supported.
Sourcepub fn first_touch(&self) -> bool
pub fn first_touch(&self) -> bool
First-touch policy is supported.
Sourcepub fn interleave(&self) -> bool
pub fn interleave(&self) -> bool
Interleave policy is supported.
Sourcepub fn next_touch(&self) -> bool
pub fn next_touch(&self) -> bool
Next-touch migration policy is supported.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for TopologyMemBindSupport
impl RefUnwindSafe for TopologyMemBindSupport
impl Send for TopologyMemBindSupport
impl Sync for TopologyMemBindSupport
impl Unpin for TopologyMemBindSupport
impl UnwindSafe for TopologyMemBindSupport
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