meadow-dsp-essentials 0.1.4

Liberally-licensed essential audio DSP library used in the Meadowlark DAW project
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use std::simd::{Simd, StdFloat};

/// Produces a vector where every element has the exponential (base 10)
/// of the value in the equivalently-indexed element in `v`.
#[inline]
pub fn simd_exp10_f32<const N: usize>(v: Simd<f32, N>) -> Simd<f32, N> {
    (Simd::splat(std::f32::consts::LN_10) * v).exp()
}

/// Produces a vector where every element has the exponential (base 10)
/// of the value in the equivalently-indexed element in `v`.
#[inline]
pub fn simd_exp10_f64<const N: usize>(v: Simd<f64, N>) -> Simd<f64, N> {
    (Simd::splat(std::f64::consts::LN_10) * v).exp()
}