Struct numa_gpu::runtime::linux_wrapper::MemPolicyModes
source · [−]pub struct MemPolicyModes { /* private fields */ }
Expand description
Memory policies
See numaif.h
and linux/mempolicy.h
for definition.
Implementations
sourceimpl MemPolicyModes
impl MemPolicyModes
sourcepub const DEFAULT: MemPolicyModes
pub const DEFAULT: MemPolicyModes
Restores default behavior by removing any previously requested policy.
sourcepub const PREFERRED: MemPolicyModes
pub const PREFERRED: MemPolicyModes
Specifies that pages should first try to be allocated on a node in the node mask. If free memory is low on these nodes, the pages will be allocated on another node.
sourcepub const BIND: MemPolicyModes
pub const BIND: MemPolicyModes
Specifies a strict policy that restricts memory allocation to the nodes specified in the node mask. Pages will not be allocated from any node not in the node mask.
sourcepub const INTERLEAVE: MemPolicyModes
pub const INTERLEAVE: MemPolicyModes
Specifies that page allocations should be interleaved over the nodes in the node mask. This often leads to higher bandwidth at the cost of higher latency.
sourcepub const LOCAL: MemPolicyModes
pub const LOCAL: MemPolicyModes
Specifies that pages should be allocated locally on the node that triggers the allocation. If free memory is low on the local node, pages will be allocated on another node.
sourcepub const STATIC_NODES: MemPolicyModes
pub const STATIC_NODES: MemPolicyModes
Specifies that the nodes should be interpreted as physical node IDs. Thus, the operating system does not reinterpret the node set when the thread moves to a different cpuset context.
Optional and cannot be combined with RELATIVE_NODES.
sourcepub const RELATIVE_NODES: MemPolicyModes
pub const RELATIVE_NODES: MemPolicyModes
Speficies that the nodes should be interpreted relative to the thread’s cpuset context.
Optional and cannot be combined with STATIC_NODES.
sourcepub const fn empty() -> MemPolicyModes
pub const fn empty() -> MemPolicyModes
Returns an empty set of flags
sourcepub const fn all() -> MemPolicyModes
pub const fn all() -> MemPolicyModes
Returns the set containing all flags.
sourcepub fn from_bits(bits: c_int) -> Option<MemPolicyModes>
pub fn from_bits(bits: c_int) -> Option<MemPolicyModes>
Convert from underlying bit representation, unless that representation contains bits that do not correspond to a flag.
sourcepub const fn from_bits_truncate(bits: c_int) -> MemPolicyModes
pub const fn from_bits_truncate(bits: c_int) -> MemPolicyModes
Convert from underlying bit representation, dropping any bits that do not correspond to flags.
sourcepub const unsafe fn from_bits_unchecked(bits: c_int) -> MemPolicyModes
pub const unsafe fn from_bits_unchecked(bits: c_int) -> MemPolicyModes
Convert from underlying bit representation, preserving all bits (even those not corresponding to a defined flag).
sourcepub const fn intersects(&self, other: MemPolicyModes) -> bool
pub const fn intersects(&self, other: MemPolicyModes) -> bool
Returns true
if there are flags common to both self
and other
.
sourcepub const fn contains(&self, other: MemPolicyModes) -> bool
pub const fn contains(&self, other: MemPolicyModes) -> bool
Returns true
all of the flags in other
are contained within self
.
sourcepub fn insert(&mut self, other: MemPolicyModes)
pub fn insert(&mut self, other: MemPolicyModes)
Inserts the specified flags in-place.
sourcepub fn remove(&mut self, other: MemPolicyModes)
pub fn remove(&mut self, other: MemPolicyModes)
Removes the specified flags in-place.
sourcepub fn toggle(&mut self, other: MemPolicyModes)
pub fn toggle(&mut self, other: MemPolicyModes)
Toggles the specified flags in-place.
sourcepub fn set(&mut self, other: MemPolicyModes, value: bool)
pub fn set(&mut self, other: MemPolicyModes, value: bool)
Inserts or removes the specified flags depending on the passed value.
Trait Implementations
sourceimpl Binary for MemPolicyModes
impl Binary for MemPolicyModes
sourceimpl BitAnd<MemPolicyModes> for MemPolicyModes
impl BitAnd<MemPolicyModes> for MemPolicyModes
sourcefn bitand(self, other: MemPolicyModes) -> MemPolicyModes
fn bitand(self, other: MemPolicyModes) -> MemPolicyModes
Returns the intersection between the two sets of flags.
type Output = MemPolicyModes
type Output = MemPolicyModes
The resulting type after applying the &
operator.
sourceimpl BitAndAssign<MemPolicyModes> for MemPolicyModes
impl BitAndAssign<MemPolicyModes> for MemPolicyModes
sourcefn bitand_assign(&mut self, other: MemPolicyModes)
fn bitand_assign(&mut self, other: MemPolicyModes)
Disables all flags disabled in the set.
sourceimpl BitOr<MemPolicyModes> for MemPolicyModes
impl BitOr<MemPolicyModes> for MemPolicyModes
sourcefn bitor(self, other: MemPolicyModes) -> MemPolicyModes
fn bitor(self, other: MemPolicyModes) -> MemPolicyModes
Returns the union of the two sets of flags.
type Output = MemPolicyModes
type Output = MemPolicyModes
The resulting type after applying the |
operator.
sourceimpl BitOrAssign<MemPolicyModes> for MemPolicyModes
impl BitOrAssign<MemPolicyModes> for MemPolicyModes
sourcefn bitor_assign(&mut self, other: MemPolicyModes)
fn bitor_assign(&mut self, other: MemPolicyModes)
Adds the set of flags.
sourceimpl BitXor<MemPolicyModes> for MemPolicyModes
impl BitXor<MemPolicyModes> for MemPolicyModes
sourcefn bitxor(self, other: MemPolicyModes) -> MemPolicyModes
fn bitxor(self, other: MemPolicyModes) -> MemPolicyModes
Returns the left flags, but with all the right flags toggled.
type Output = MemPolicyModes
type Output = MemPolicyModes
The resulting type after applying the ^
operator.
sourceimpl BitXorAssign<MemPolicyModes> for MemPolicyModes
impl BitXorAssign<MemPolicyModes> for MemPolicyModes
sourcefn bitxor_assign(&mut self, other: MemPolicyModes)
fn bitxor_assign(&mut self, other: MemPolicyModes)
Toggles the set of flags.
sourceimpl Clone for MemPolicyModes
impl Clone for MemPolicyModes
sourcefn clone(&self) -> MemPolicyModes
fn clone(&self) -> MemPolicyModes
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for MemPolicyModes
impl Debug for MemPolicyModes
sourceimpl Extend<MemPolicyModes> for MemPolicyModes
impl Extend<MemPolicyModes> for MemPolicyModes
sourcefn extend<T: IntoIterator<Item = MemPolicyModes>>(&mut self, iterator: T)
fn extend<T: IntoIterator<Item = MemPolicyModes>>(&mut self, iterator: T)
Extends a collection with the contents of an iterator. Read more
sourcefn extend_one(&mut self, item: A)
fn extend_one(&mut self, item: A)
extend_one
)Extends a collection with exactly one element.
sourcefn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
extend_one
)Reserves capacity in a collection for the given number of additional elements. Read more
sourceimpl FromIterator<MemPolicyModes> for MemPolicyModes
impl FromIterator<MemPolicyModes> for MemPolicyModes
sourcefn from_iter<T: IntoIterator<Item = MemPolicyModes>>(
iterator: T
) -> MemPolicyModes
fn from_iter<T: IntoIterator<Item = MemPolicyModes>>(
iterator: T
) -> MemPolicyModes
Creates a value from an iterator. Read more
sourceimpl Hash for MemPolicyModes
impl Hash for MemPolicyModes
sourceimpl LowerHex for MemPolicyModes
impl LowerHex for MemPolicyModes
sourceimpl Not for MemPolicyModes
impl Not for MemPolicyModes
sourcefn not(self) -> MemPolicyModes
fn not(self) -> MemPolicyModes
Returns the complement of this set of flags.
type Output = MemPolicyModes
type Output = MemPolicyModes
The resulting type after applying the !
operator.
sourceimpl Octal for MemPolicyModes
impl Octal for MemPolicyModes
sourceimpl Ord for MemPolicyModes
impl Ord for MemPolicyModes
sourceimpl PartialEq<MemPolicyModes> for MemPolicyModes
impl PartialEq<MemPolicyModes> for MemPolicyModes
sourcefn eq(&self, other: &MemPolicyModes) -> bool
fn eq(&self, other: &MemPolicyModes) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &MemPolicyModes) -> bool
fn ne(&self, other: &MemPolicyModes) -> bool
This method tests for !=
.
sourceimpl PartialOrd<MemPolicyModes> for MemPolicyModes
impl PartialOrd<MemPolicyModes> for MemPolicyModes
sourcefn partial_cmp(&self, other: &MemPolicyModes) -> Option<Ordering>
fn partial_cmp(&self, other: &MemPolicyModes) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
sourceimpl Sub<MemPolicyModes> for MemPolicyModes
impl Sub<MemPolicyModes> for MemPolicyModes
sourcefn sub(self, other: MemPolicyModes) -> MemPolicyModes
fn sub(self, other: MemPolicyModes) -> MemPolicyModes
Returns the set difference of the two sets of flags.
type Output = MemPolicyModes
type Output = MemPolicyModes
The resulting type after applying the -
operator.
sourceimpl SubAssign<MemPolicyModes> for MemPolicyModes
impl SubAssign<MemPolicyModes> for MemPolicyModes
sourcefn sub_assign(&mut self, other: MemPolicyModes)
fn sub_assign(&mut self, other: MemPolicyModes)
Disables all flags enabled in the set.
sourceimpl UpperHex for MemPolicyModes
impl UpperHex for MemPolicyModes
impl Copy for MemPolicyModes
impl Eq for MemPolicyModes
impl StructuralEq for MemPolicyModes
impl StructuralPartialEq for MemPolicyModes
Auto Trait Implementations
impl RefUnwindSafe for MemPolicyModes
impl Send for MemPolicyModes
impl Sync for MemPolicyModes
impl Unpin for MemPolicyModes
impl UnwindSafe for MemPolicyModes
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T> Pointable for T
impl<T> Pointable for T
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more