[][src]Struct hwloc2::MemBindPolicy

#[repr(C)]pub struct MemBindPolicy { /* fields omitted */ }

Implementations

impl MemBindPolicy[src]

pub const MEMBIND_DEFAULT: MemBindPolicy[src]

Reset the memory allocation policy to the system default. Depending on the operating system, this may correspond to MEMBIND_FIRSTTOUCH (Linux), or MEMBIND_BIND (AIX, HP-UX, OSF, Solaris, Windows).

pub const MEMBIND_FIRSTTOUCH: MemBindPolicy[src]

Allocate memory but do not immediately bind it to a specific locality. Instead, each page in the allocation is bound only when it is first touched. Pages are individually bound to the local NUMA node of the first thread that touches it. If there is not enough memory on the node, allocation may be done in the specified cpuset before allocating on other nodes.

pub const MEMBIND_BIND: MemBindPolicy[src]

Allocate memory on the specified nodes.

pub const MEMBIND_INTERLEAVE: MemBindPolicy[src]

Allocate memory on the given nodes in an interleaved / round-robin manner. The precise layout of the memory across multiple NUMA nodes is OS/system specific. Interleaving can be useful when threads distributed across the specified NUMA nodes will all be accessing the whole memory range concurrently, since the interleave will then balance the memory references.

pub const MEMBIND_NEXTTOUCH: MemBindPolicy[src]

For each page bound with this policy, by next time it is touched (and next time only), it is moved from its current location to the local NUMA node of the thread where the memory reference occurred (if it needs to be moved at all).

pub const MEMBIND_MIXED: MemBindPolicy[src]

Returned by get_membind() functions when multiple threads or parts of a memory area have differing memory binding policies.

pub const fn empty() -> MemBindPolicy[src]

Returns an empty set of flags

pub const fn all() -> MemBindPolicy[src]

Returns the set containing all flags.

pub const fn bits(&self) -> i32[src]

Returns the raw value of the flags currently stored.

pub fn from_bits(bits: i32) -> Option<MemBindPolicy>[src]

Convert from underlying bit representation, unless that representation contains bits that do not correspond to a flag.

pub const fn from_bits_truncate(bits: i32) -> MemBindPolicy[src]

Convert from underlying bit representation, dropping any bits that do not correspond to flags.

pub const unsafe fn from_bits_unchecked(bits: i32) -> MemBindPolicy[src]

Convert from underlying bit representation, preserving all bits (even those not corresponding to a defined flag).

pub const fn is_empty(&self) -> bool[src]

Returns true if no flags are currently stored.

pub const fn is_all(&self) -> bool[src]

Returns true if all flags are currently set.

pub const fn intersects(&self, other: MemBindPolicy) -> bool[src]

Returns true if there are flags common to both self and other.

pub const fn contains(&self, other: MemBindPolicy) -> bool[src]

Returns true all of the flags in other are contained within self.

pub fn insert(&mut self, other: MemBindPolicy)[src]

Inserts the specified flags in-place.

pub fn remove(&mut self, other: MemBindPolicy)[src]

Removes the specified flags in-place.

pub fn toggle(&mut self, other: MemBindPolicy)[src]

Toggles the specified flags in-place.

pub fn set(&mut self, other: MemBindPolicy, value: bool)[src]

Inserts or removes the specified flags depending on the passed value.

Trait Implementations

impl Binary for MemBindPolicy[src]

impl BitAnd<MemBindPolicy> for MemBindPolicy[src]

type Output = MemBindPolicy

The resulting type after applying the & operator.

fn bitand(self, other: MemBindPolicy) -> MemBindPolicy[src]

Returns the intersection between the two sets of flags.

impl BitAndAssign<MemBindPolicy> for MemBindPolicy[src]

fn bitand_assign(&mut self, other: MemBindPolicy)[src]

Disables all flags disabled in the set.

impl BitOr<MemBindPolicy> for MemBindPolicy[src]

type Output = MemBindPolicy

The resulting type after applying the | operator.

fn bitor(self, other: MemBindPolicy) -> MemBindPolicy[src]

Returns the union of the two sets of flags.

impl BitOrAssign<MemBindPolicy> for MemBindPolicy[src]

fn bitor_assign(&mut self, other: MemBindPolicy)[src]

Adds the set of flags.

impl BitXor<MemBindPolicy> for MemBindPolicy[src]

type Output = MemBindPolicy

The resulting type after applying the ^ operator.

fn bitxor(self, other: MemBindPolicy) -> MemBindPolicy[src]

Returns the left flags, but with all the right flags toggled.

impl BitXorAssign<MemBindPolicy> for MemBindPolicy[src]

fn bitxor_assign(&mut self, other: MemBindPolicy)[src]

Toggles the set of flags.

impl Clone for MemBindPolicy[src]

impl Copy for MemBindPolicy[src]

impl Debug for MemBindPolicy[src]

impl Eq for MemBindPolicy[src]

impl Extend<MemBindPolicy> for MemBindPolicy[src]

impl FromIterator<MemBindPolicy> for MemBindPolicy[src]

impl Hash for MemBindPolicy[src]

impl LowerHex for MemBindPolicy[src]

impl Not for MemBindPolicy[src]

type Output = MemBindPolicy

The resulting type after applying the ! operator.

fn not(self) -> MemBindPolicy[src]

Returns the complement of this set of flags.

impl Octal for MemBindPolicy[src]

impl Ord for MemBindPolicy[src]

impl PartialEq<MemBindPolicy> for MemBindPolicy[src]

impl PartialOrd<MemBindPolicy> for MemBindPolicy[src]

impl StructuralEq for MemBindPolicy[src]

impl StructuralPartialEq for MemBindPolicy[src]

impl Sub<MemBindPolicy> for MemBindPolicy[src]

type Output = MemBindPolicy

The resulting type after applying the - operator.

fn sub(self, other: MemBindPolicy) -> MemBindPolicy[src]

Returns the set difference of the two sets of flags.

impl SubAssign<MemBindPolicy> for MemBindPolicy[src]

fn sub_assign(&mut self, other: MemBindPolicy)[src]

Disables all flags enabled in the set.

impl UpperHex for MemBindPolicy[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.