Expand description
Denormal (subnormal) float handling utilities.
Denormalized floating-point numbers are very small values that can cause significant CPU slowdowns (10-100x) on x86 processors due to microcode fallback handling. This module provides utilities to flush these values to zero, preventing performance degradation in audio processing.
When the ftz-daz feature is enabled, this module also provides CPU-level
FTZ (Flush-To-Zero) and DAZ (Denormals-Are-Zero) mode configuration for
x86/x86_64 and AArch64 processors.
Constants§
- DENORMAL_
THRESHOLD_ F32 - DENORMAL_
THRESHOLD_ F64 - Threshold below which values are considered denormal. This is slightly above the actual denormal threshold to catch values that will become denormal after further processing.
Functions§
- enable_
ftz_ daz - Enable FTZ (Flush-To-Zero) and DAZ (Denormals-Are-Zero) modes on x86/x86_64.
- flush_
denormal_ f32 - Flush a denormal f32 value to zero.
- flush_
denormal_ f64 - Flush a denormal f64 value to zero.
- flush_
denormals_ f32_ batch - Batch flush denormals in a slice of f32 values using SIMD.
- flush_
denormals_ f64_ batch - Batch flush denormals in a slice of f64 values using SIMD.