Struct cpuid::CpuInfo [] [src]

pub struct CpuInfo {
    pub vendor: String,
    pub brand: String,
    pub codename: String,
    pub num_cores: i32,
    pub num_logical_cpus: i32,
    pub total_logical_cpus: i32,
    pub l1_data_cache: Option<i32>,
    pub l1_instruction_cache: Option<i32>,
    pub l2_cache: Option<i32>,
    pub l3_cache: Option<i32>,
    // some fields omitted
}

A struct holding information about CPU features.

This data structure is returned by identify(). You can consult libcpuid docs for cpu_id_t for more detailed descriptions of these fields.

Fields

CPU vendor string, for example GenuineIntel.

Brand string, for example Intel(R) Core(TM) i5-2410M CPU @ 2.30GHz.

Brief CPU codename, such as Sandy Bridge (Core i5).

Number of physical cores of the current CPU.

Number of logical processors (may include HyperThreading or such).

Total number of logical processors.

L1 data cache size in kB. Some(0) if the CPU lacks cache, None if it couldn't be determined.

L1 instruction cache size in kB. Some(0) if the CPU lacks cache, None if it couldn't be determined.

L2 cache size in kB. Some(0) if the CPU lacks L2 cache, None if it couldn't be determined.

L3 cache size in kB. Some(0) if the CPU lacks L3 cache, None if it couldn't be determined.

Methods

impl CpuInfo
[src]

Checks if current CPU supports given feature.

See CpuFeature for a list of available feature identifiers.