pub enum CpuProfile {
Generic,
Auto,
X86Zen4,
X86Avx2,
X86Avx512,
}Expand description
CPU Profile for performance optimizations
This enum allows application developers to choose CPU-specific optimizations while maintaining backwards compatibility. All profiles are safe and will gracefully degrade on unsupported hardware.
Variants§
Generic
Generic profile compatible with all CPUs Uses portable optimizations without CPU-specific instructions
Auto
Auto-detect and use optimal profile Runtime detection selects the best available profile
X86Zen4
Optimized for AMD Zen 4 (Ryzen 7000 series) Target: AMD Ryzen 7 7800X3D with AVX2, FMA, BMI2
X86Avx2
Optimized for Intel CPUs with AVX2 support Target: Intel Skylake+ with 256-bit vector instructions
X86Avx512
Optimized for Intel CPUs with AVX-512 support Target: Intel Xeon/Server with 512-bit vector instructions
Trait Implementations§
Source§impl Clone for CpuProfile
impl Clone for CpuProfile
Source§fn clone(&self) -> CpuProfile
fn clone(&self) -> CpuProfile
Returns a duplicate of the value. Read more
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CpuProfile
impl Debug for CpuProfile
Source§impl Default for CpuProfile
impl Default for CpuProfile
Source§impl<'de> Deserialize<'de> for CpuProfile
impl<'de> Deserialize<'de> for CpuProfile
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for CpuProfile
impl Display for CpuProfile
Source§impl FromStr for CpuProfile
impl FromStr for CpuProfile
Source§impl Hash for CpuProfile
impl Hash for CpuProfile
Source§impl PartialEq for CpuProfile
impl PartialEq for CpuProfile
Source§impl Serialize for CpuProfile
impl Serialize for CpuProfile
impl Copy for CpuProfile
impl Eq for CpuProfile
impl StructuralPartialEq for CpuProfile
Auto Trait Implementations§
impl Freeze for CpuProfile
impl RefUnwindSafe for CpuProfile
impl Send for CpuProfile
impl Sync for CpuProfile
impl Unpin for CpuProfile
impl UnwindSafe for CpuProfile
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)