Enum ObjectType

Source
#[repr(u32)]
pub enum ObjectType {
Show 13 variants System = 0, Machine = 1, NUMANode = 2, Package = 3, Cache = 4, Core = 5, PU = 6, Group = 7, Misc = 8, Bridge = 9, PCIDevice = 10, OSDevice = 11, TypeMax = 12,
}
Expand description

Represents the type of a topology object.

Note that (partial) ordering for object types is implemented as a call into the hwloc library which defines ordering as follows:

  • A == B if ObjectType::A and ObjectType::B are the same.
  • A < B if ObjectType::A includes objects of type ObjectType::B.
  • A > B if objects of ObjectType::A are included in type ObjectType::B.

It can also help to think of it as comparing the relative depths of each type, so a ObjectType::System will be smaller than a ObjectType::PU since the system contains processing units.

Variants§

§

System = 0

The whole system that is accessible to hwloc. That may comprise several machines in SSI systems like Kerrighed.

§

Machine = 1

The typical root object type. A set of processors and memory with cache coherency.

§

NUMANode = 2

A set of processors around memory which the processors can directly access.

§

Package = 3

Physical package, what goes into a socket. In the physical meaning, i.e. that you can add or remove physically.

§

Cache = 4

The Cache. Can be L1i, L1d, L2, L3,…

§

Core = 5

A computation unit (may be shared by several logical processors).

§

PU = 6

Processing Unit, or (Logical) Processor.

An execution unit (may share a core with some other logical processors, e.g. in the case of an SMT core). Objects of this kind are always reported and can thus be used as fallback when others are not.

§

Group = 7

Group objects.

Objects which do not fit in the above but are detected by hwloc and are useful to take into account for affinity. For instance, some operating systems expose their arbitrary processors aggregation this way. And hwloc may insert such objects to group NUMA nodes according to their distances.

These objects are ignored when they do not bring any structure.

§

Misc = 8

Miscellaneous objects.

Objects without particular meaning, that can e.g. be added by the application for its own use, or by hwloc for miscellaneous objects such as MemoryModule (DIMMs).

§

Bridge = 9

Any bridge that connects the host or an I/O bus, to another I/O bus.

Bridge objects have neither CPU sets nor node sets. They are not added to the topology unless I/O discovery is enabled through the custom flags.

§

PCIDevice = 10

PCI device.

These objects have neither CPU sets nor node sets. They are not added to the topology unless I/O discovery is enabled through the custom flags.

§

OSDevice = 11

Operating system device.

These objects have neither CPU sets nor node sets. They are not added to the topology unless I/O discovery is enabled through the custom flags.

§

TypeMax = 12

An internal sentinel value.

Trait Implementations§

Source§

impl Clone for ObjectType

Source§

fn clone(&self) -> ObjectType

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ObjectType

Source§

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

Formats the value using the given formatter. Read more
Source§

impl PartialEq for ObjectType

Source§

fn eq(&self, other: &Self) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialOrd for ObjectType

Source§

fn partial_cmp(&self, other: &Self) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. 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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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.