pub struct DeviceAffinityDomain { /* private fields */ }
Implementations§
Source§impl DeviceAffinityDomain
impl DeviceAffinityDomain
pub const NONE_SUPPORTED: DeviceAffinityDomain
pub const NUMA: DeviceAffinityDomain
pub const L4_CACHE: DeviceAffinityDomain
pub const L3_CACHE: DeviceAffinityDomain
pub const L2_CACHE: DeviceAffinityDomain
pub const L1_CACHE: DeviceAffinityDomain
pub const NEXT_PARTITIONABLE: DeviceAffinityDomain
Sourcepub const fn empty() -> DeviceAffinityDomain
pub const fn empty() -> DeviceAffinityDomain
Returns an empty set of flags
Sourcepub const fn all() -> DeviceAffinityDomain
pub const fn all() -> DeviceAffinityDomain
Returns the set containing all flags.
Sourcepub const fn bits(&self) -> cl_device_affinity_domain
pub const fn bits(&self) -> cl_device_affinity_domain
Returns the raw value of the flags currently stored.
Sourcepub fn from_bits(
bits: cl_device_affinity_domain,
) -> Option<DeviceAffinityDomain>
pub fn from_bits( bits: cl_device_affinity_domain, ) -> Option<DeviceAffinityDomain>
Convert from underlying bit representation, unless that representation contains bits that do not correspond to a flag.
Sourcepub const fn from_bits_truncate(
bits: cl_device_affinity_domain,
) -> DeviceAffinityDomain
pub const fn from_bits_truncate( bits: cl_device_affinity_domain, ) -> DeviceAffinityDomain
Convert from underlying bit representation, dropping any bits that do not correspond to flags.
Sourcepub const unsafe fn from_bits_unchecked(
bits: cl_device_affinity_domain,
) -> DeviceAffinityDomain
pub const unsafe fn from_bits_unchecked( bits: cl_device_affinity_domain, ) -> DeviceAffinityDomain
Convert from underlying bit representation, preserving all bits (even those not corresponding to a defined flag).
Sourcepub const fn intersects(&self, other: DeviceAffinityDomain) -> bool
pub const fn intersects(&self, other: DeviceAffinityDomain) -> bool
Returns true
if there are flags common to both self
and other
.
Sourcepub const fn contains(&self, other: DeviceAffinityDomain) -> bool
pub const fn contains(&self, other: DeviceAffinityDomain) -> bool
Returns true
all of the flags in other
are contained within self
.
Sourcepub fn insert(&mut self, other: DeviceAffinityDomain)
pub fn insert(&mut self, other: DeviceAffinityDomain)
Inserts the specified flags in-place.
Sourcepub fn remove(&mut self, other: DeviceAffinityDomain)
pub fn remove(&mut self, other: DeviceAffinityDomain)
Removes the specified flags in-place.
Sourcepub fn toggle(&mut self, other: DeviceAffinityDomain)
pub fn toggle(&mut self, other: DeviceAffinityDomain)
Toggles the specified flags in-place.
Sourcepub fn set(&mut self, other: DeviceAffinityDomain, value: bool)
pub fn set(&mut self, other: DeviceAffinityDomain, value: bool)
Inserts or removes the specified flags depending on the passed value.
Trait Implementations§
Source§impl Binary for DeviceAffinityDomain
impl Binary for DeviceAffinityDomain
Source§impl BitAnd for DeviceAffinityDomain
impl BitAnd for DeviceAffinityDomain
Source§fn bitand(self, other: DeviceAffinityDomain) -> DeviceAffinityDomain
fn bitand(self, other: DeviceAffinityDomain) -> DeviceAffinityDomain
Returns the intersection between the two sets of flags.
Source§type Output = DeviceAffinityDomain
type Output = DeviceAffinityDomain
&
operator.Source§impl BitAndAssign for DeviceAffinityDomain
impl BitAndAssign for DeviceAffinityDomain
Source§fn bitand_assign(&mut self, other: DeviceAffinityDomain)
fn bitand_assign(&mut self, other: DeviceAffinityDomain)
Disables all flags disabled in the set.
Source§impl BitOr for DeviceAffinityDomain
impl BitOr for DeviceAffinityDomain
Source§fn bitor(self, other: DeviceAffinityDomain) -> DeviceAffinityDomain
fn bitor(self, other: DeviceAffinityDomain) -> DeviceAffinityDomain
Returns the union of the two sets of flags.
Source§type Output = DeviceAffinityDomain
type Output = DeviceAffinityDomain
|
operator.Source§impl BitOrAssign for DeviceAffinityDomain
impl BitOrAssign for DeviceAffinityDomain
Source§fn bitor_assign(&mut self, other: DeviceAffinityDomain)
fn bitor_assign(&mut self, other: DeviceAffinityDomain)
Adds the set of flags.
Source§impl BitXor for DeviceAffinityDomain
impl BitXor for DeviceAffinityDomain
Source§fn bitxor(self, other: DeviceAffinityDomain) -> DeviceAffinityDomain
fn bitxor(self, other: DeviceAffinityDomain) -> DeviceAffinityDomain
Returns the left flags, but with all the right flags toggled.
Source§type Output = DeviceAffinityDomain
type Output = DeviceAffinityDomain
^
operator.Source§impl BitXorAssign for DeviceAffinityDomain
impl BitXorAssign for DeviceAffinityDomain
Source§fn bitxor_assign(&mut self, other: DeviceAffinityDomain)
fn bitxor_assign(&mut self, other: DeviceAffinityDomain)
Toggles the set of flags.
Source§impl Clone for DeviceAffinityDomain
impl Clone for DeviceAffinityDomain
Source§fn clone(&self) -> DeviceAffinityDomain
fn clone(&self) -> DeviceAffinityDomain
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for DeviceAffinityDomain
impl Debug for DeviceAffinityDomain
Source§impl Extend<DeviceAffinityDomain> for DeviceAffinityDomain
impl Extend<DeviceAffinityDomain> for DeviceAffinityDomain
Source§fn extend<T: IntoIterator<Item = DeviceAffinityDomain>>(&mut self, iterator: T)
fn extend<T: IntoIterator<Item = DeviceAffinityDomain>>(&mut self, iterator: T)
Source§fn extend_one(&mut self, item: A)
fn extend_one(&mut self, item: A)
extend_one
)Source§fn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
extend_one
)Source§impl From<DeviceAffinityDomain> for cl_device_affinity_domain
impl From<DeviceAffinityDomain> for cl_device_affinity_domain
Source§fn from(d: DeviceAffinityDomain) -> cl_device_affinity_domain
fn from(d: DeviceAffinityDomain) -> cl_device_affinity_domain
Source§impl FromIterator<DeviceAffinityDomain> for DeviceAffinityDomain
impl FromIterator<DeviceAffinityDomain> for DeviceAffinityDomain
Source§fn from_iter<T: IntoIterator<Item = DeviceAffinityDomain>>(
iterator: T,
) -> DeviceAffinityDomain
fn from_iter<T: IntoIterator<Item = DeviceAffinityDomain>>( iterator: T, ) -> DeviceAffinityDomain
Source§impl Hash for DeviceAffinityDomain
impl Hash for DeviceAffinityDomain
Source§impl LowerHex for DeviceAffinityDomain
impl LowerHex for DeviceAffinityDomain
Source§impl Not for DeviceAffinityDomain
impl Not for DeviceAffinityDomain
Source§fn not(self) -> DeviceAffinityDomain
fn not(self) -> DeviceAffinityDomain
Returns the complement of this set of flags.
Source§type Output = DeviceAffinityDomain
type Output = DeviceAffinityDomain
!
operator.Source§impl Octal for DeviceAffinityDomain
impl Octal for DeviceAffinityDomain
Source§impl Ord for DeviceAffinityDomain
impl Ord for DeviceAffinityDomain
Source§fn cmp(&self, other: &DeviceAffinityDomain) -> Ordering
fn cmp(&self, other: &DeviceAffinityDomain) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for DeviceAffinityDomain
impl PartialEq for DeviceAffinityDomain
Source§impl PartialOrd for DeviceAffinityDomain
impl PartialOrd for DeviceAffinityDomain
Source§impl Sub for DeviceAffinityDomain
impl Sub for DeviceAffinityDomain
Source§fn sub(self, other: DeviceAffinityDomain) -> DeviceAffinityDomain
fn sub(self, other: DeviceAffinityDomain) -> DeviceAffinityDomain
Returns the set difference of the two sets of flags.
Source§type Output = DeviceAffinityDomain
type Output = DeviceAffinityDomain
-
operator.Source§impl SubAssign for DeviceAffinityDomain
impl SubAssign for DeviceAffinityDomain
Source§fn sub_assign(&mut self, other: DeviceAffinityDomain)
fn sub_assign(&mut self, other: DeviceAffinityDomain)
Disables all flags enabled in the set.