bwa
This commit is contained in:
11
src/cpu.rs
11
src/cpu.rs
@@ -11,13 +11,16 @@ use std::thread;
|
|||||||
|
|
||||||
#[derive(Clone, Debug)]
|
#[derive(Clone, Debug)]
|
||||||
pub struct Cpu {
|
pub struct Cpu {
|
||||||
pub cores: HashMap<i32, CpuCore>,
|
pub cores: Vec<CpuCore>,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, Copy, Debug)]
|
#[derive(Clone, Copy, Debug)]
|
||||||
struct CpuCore {}
|
struct CpuCore {
|
||||||
|
id: i32,
|
||||||
|
core_type: CoreType,
|
||||||
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Clone, Copy)]
|
||||||
enum CoreType {
|
enum CoreType {
|
||||||
P, // Performence
|
P, // Performence
|
||||||
E, // Efficent
|
E, // Efficent
|
||||||
@@ -47,7 +50,7 @@ impl CpuCore {
|
|||||||
// If its not an intel cpu it can fail me thinks
|
// If its not an intel cpu it can fail me thinks
|
||||||
return Err(());
|
return Err(());
|
||||||
}
|
}
|
||||||
Ok(cpuid.eax == 536870914)
|
Ok(cpuid.eax == 0x20000002)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user