Struct TopologyMemBindSupport

Source
#[repr(C)]
pub struct TopologyMemBindSupport { /* private fields */ }
Expand description

Flags describing actual memory binding support for this topology.

Implementations§

Source§

impl TopologyMemBindSupport

Source

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}
Source

pub fn get_current_process(&self) -> bool

Getting the binding of the whole current process is supported.

Source

pub fn set_process(&self) -> bool

Binding a whole given process is supported.

Source

pub fn get_process(&self) -> bool

Getting the binding of a whole given process is supported.

Source

pub fn set_current_thread(&self) -> bool

Binding the current thread only is supported.

Source

pub fn get_current_thread(&self) -> bool

Getting the binding of the current thread only is supported.

Source

pub fn set_area(&self) -> bool

Binding a given memory area is supported.

Source

pub fn get_area(&self) -> bool

Getting the binding of a given memory area is supported.

Source

pub fn alloc(&self) -> bool

Allocating a bound memory area is supported.

Source

pub fn first_touch(&self) -> bool

First-touch policy is supported.

Source

pub fn bind(&self) -> bool

Bind policy is supported.

Source

pub fn interleave(&self) -> bool

Interleave policy is supported.

Source

pub fn replicate(&self) -> bool

Replication policy is supported.

Source

pub fn next_touch(&self) -> bool

Next-touch migration policy is supported.

Source

pub fn migrate(&self) -> bool

Migration flags is supported.

Trait Implementations§

Source§

impl Debug for TopologyMemBindSupport

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.