Browse Source

Add pow to simd.hpp

tags/v1.0.0
Andrew Belt 5 years ago
parent
commit
4c851ec918
1 changed files with 9 additions and 0 deletions
  1. +9
    -0
      include/dsp/simd.hpp

+ 9
- 0
include/dsp/simd.hpp View File

@@ -1,5 +1,6 @@
#include "sse_mathfun.h"
#include <cstring>
#include <cmath>
#include <emmintrin.h>


@@ -253,6 +254,14 @@ inline f32_4 trunc(f32_4 a) {
return f32_4(sse_mathfun_trunc_ps(a.v));
}

inline f32_4 pow(f32_4 a, f32_4 b) {
return exp(b * log(a));
}

inline f32_4 pow(float a, f32_4 b) {
return exp(b * std::log(a));
}


} // namespace dsp
} // namespace rack

Loading…
Cancel
Save