Enum hwlocality::topology::builder::TypeFilter
source · #[repr(i32)]pub enum TypeFilter {
KeepAll = 0,
KeepNone = 1,
KeepStructure = 2,
KeepImportant = 3,
}
Expand description
Type filtering flags
By default…
- Most objects are kept (
KeepAll
) - Instruction caches, I/O and Misc objects are ignored (
KeepNone
). - Die and Group levels are ignored unless they bring structure (
KeepStructure
).
Note that group objects are also ignored individually (without the entire level) when they do not bring structure.
Variants§
KeepAll = 0
Keep all objects of this type
Cannot be set for ObjectType::Group
(groups are designed only to add
more structure to the topology).
KeepNone = 1
Ignore all objects of this type
The bottom-level type ObjectType::PU
, the ObjectType::NUMANode
type, and the top-level type ObjectType::Machine
may not be ignored.
KeepStructure = 2
Only ignore objects if their entire level does not bring any structure
Keep the entire level of objects if at least one of these objects adds structure to the topology. An object brings structure when it has multiple children and it is not the only child of its parent.
If all objects in the level are the only child of their parent, and if none of them has multiple children, the entire level is removed.
Cannot be set for I/O and Misc objects since the topology structure does not matter there.
KeepImportant = 3
Only keep likely-important objects of the given type.
This is only useful for I/O object types.
For ObjectType::PCIDevice
and ObjectType::OSDevice
, it means that
only objects of major/common kinds are kept (storage, network,
OpenFabrics, CUDA, OpenCL, RSMI, NVML, and displays).
Also, only OS devices directly attached on PCI (e.g. no USB) are reported.
For ObjectType::Bridge
, it means that bridges are kept only if they
have children.
This flag is equivalent to KeepAll
for Normal, Memory and Misc types
since they are likely important.
Trait Implementations§
source§impl Arbitrary for TypeFilter
Available on crate feature proptest
only.
impl Arbitrary for TypeFilter
proptest
only.§type Parameters = ()
type Parameters = ()
arbitrary_with
accepts for configuration
of the generated Strategy
. Parameters must implement Default
.§type Strategy = Map<Range<usize>, fn(_: usize) -> TypeFilter>
type Strategy = Map<Range<usize>, fn(_: usize) -> TypeFilter>
Strategy
used to generate values of type Self
.source§fn arbitrary_with(_args: Self::Parameters) -> Self::Strategy
fn arbitrary_with(_args: Self::Parameters) -> Self::Strategy
source§impl Clone for TypeFilter
impl Clone for TypeFilter
source§fn clone(&self) -> TypeFilter
fn clone(&self) -> TypeFilter
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for TypeFilter
impl Debug for TypeFilter
source§impl From<TypeFilter> for i32
impl From<TypeFilter> for i32
source§fn from(enum_value: TypeFilter) -> Self
fn from(enum_value: TypeFilter) -> Self
source§impl Hash for TypeFilter
impl Hash for TypeFilter
source§impl PartialEq for TypeFilter
impl PartialEq for TypeFilter
source§fn eq(&self, other: &TypeFilter) -> bool
fn eq(&self, other: &TypeFilter) -> bool
self
and other
values to be equal, and is used
by ==
.