Expand description
CPUID interface for safe CPU feature detection
This module provides a safe, structured interface to the CPUID instruction for detecting CPU features and capabilities. It encapsulates the low-level x86/x86_64 intrinsics with proper error handling and abstraction.
Structs§
- Avx512
Features - CPU feature flags for AVX-512 detection
- Cpuid
Result - CPUID result structure containing the four registers returned by CPUID
Enums§
- CpuVendor
- CPU vendor information
Functions§
- cpuid
- Execute CPUID instruction with the specified leaf and subleaf
- cpuid_
supported - Check if CPUID is supported (for very old CPUs)
- get_
avx512_ features - Get AVX-512 feature support information
- get_
family_ model_ stepping - Get CPU family, model, and stepping information
- get_
max_ leaf - Get maximum supported CPUID leaf
- get_
vendor - Get CPU vendor as an enum
- get_
vendor_ string - Get CPU vendor string
- has_avx
- Check if AVX is supported
- has_
avx2 - Check if AVX2 is supported
- has_
avx512_ essential - Check if all essential AVX-512 features are supported
- is_
virtualized - Check if the system is likely running in a virtualized environment