#[repr(C)]pub struct TopologyCpuBindSupport { /* private fields */ }Expand description
Flags describing actual PU binding support for this topology.
Implementations§
Source§impl TopologyCpuBindSupport
impl TopologyCpuBindSupport
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 11)
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.
Examples found in repository?
examples/support.rs (line 13)
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_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.
Examples found in repository?
examples/support.rs (line 17)
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_thread(&self) -> bool
pub fn get_current_thread(&self) -> bool
Getting the binding of the current thread only is supported.
Sourcepub fn set_thread(&self) -> bool
pub fn set_thread(&self) -> bool
Binding a given thread only is supported.
Examples found in repository?
examples/support.rs (line 19)
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_thread(&self) -> bool
pub fn get_thread(&self) -> bool
Getting the binding of a given thread only is supported.
Sourcepub fn get_current_process_last_cpu_location(&self) -> bool
pub fn get_current_process_last_cpu_location(&self) -> bool
Getting the last processors where the whole current process ran is supported.
Sourcepub fn get_process_last_cpu_location(&self) -> bool
pub fn get_process_last_cpu_location(&self) -> bool
Getting the last processors where a whole process ran is supported.
Sourcepub fn get_current_thread_last_cpu_location(&self) -> bool
pub fn get_current_thread_last_cpu_location(&self) -> bool
Getting the last processors where the current thread ran is supported.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for TopologyCpuBindSupport
impl RefUnwindSafe for TopologyCpuBindSupport
impl Send for TopologyCpuBindSupport
impl Sync for TopologyCpuBindSupport
impl Unpin for TopologyCpuBindSupport
impl UnwindSafe for TopologyCpuBindSupport
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