|
Gin
|
SIMD-accelerated math utilities for audio DSP. More...
Functions | |
| float | pow2 (float v) |
| Computes the square of a value (v²). | |
| float | pow4 (float v) |
| Computes the fourth power of a value (v⁴). | |
| float | pow8 (float v) |
| Computes the eighth power of a value (v⁸). | |
| float | lerp (float a, float b, float t) |
| Linear interpolation between two values. | |
| float | min (float a, float b) |
| Returns the minimum of two values. | |
| float | max (float a, float b) |
| Returns the maximum of two values. | |
| float | minVal (float a) |
| Returns the minimum value (scalar version just returns the input). | |
| float | maxVal (float a) |
| Returns the maximum value (scalar version just returns the input). | |
SIMD-accelerated math utilities for audio DSP.
The math namespace provides optimized mathematical functions with both scalar (single float) and SIMD (vectorized) implementations. When SIMD is available (GIN_HAS_SIMD), the same function names work with both float and mipp::Reg<float> types, automatically selecting the appropriate implementation.
Available Functions:
All functions are inlined for maximum performance. SIMD versions process 4 floats simultaneously on SSE/AVX systems.
| float math::pow2 | ( | float | v | ) |
Computes the square of a value (v²).
| v | Input value |
Referenced by WTOscillator::postProcess().
| float math::pow4 | ( | float | v | ) |
Computes the fourth power of a value (v⁴).
| v | Input value |
Referenced by WTOscillator::postProcess().
| float math::pow8 | ( | float | v | ) |
Computes the eighth power of a value (v⁸).
| v | Input value |
| float math::lerp | ( | float | a, |
| float | b, | ||
| float | t | ||
| ) |
Linear interpolation between two values.
| a | Start value (when t=0) |
| b | End value (when t=1) |
| t | Interpolation factor (typically 0.0 to 1.0) |
Referenced by WTOscillator::postProcess().
| float math::min | ( | float | a, |
| float | b | ||
| ) |
Returns the minimum of two values.
| a | First value |
| b | Second value |
Referenced by WTOscillator::postProcess(), WTOscillator::processAddingComplex(), WTOscillator::processAddingCrossfadeComplex(), and WTOscillator::processAddingSimple().
| float math::max | ( | float | a, |
| float | b | ||
| ) |
Returns the maximum of two values.
| a | First value |
| b | Second value |
Referenced by WTOscillator::postProcess().
| float math::minVal | ( | float | a | ) |
Returns the minimum value (scalar version just returns the input).
| a | Input value |
| float math::maxVal | ( | float | a | ) |
Returns the maximum value (scalar version just returns the input).
| a | Input value |