From 4c851ec91833bc67b9757a392f3de66c62622f00 Mon Sep 17 00:00:00 2001 From: Andrew Belt Date: Mon, 18 Feb 2019 17:06:02 -0500 Subject: [PATCH] Add pow to simd.hpp --- include/dsp/simd.hpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/include/dsp/simd.hpp b/include/dsp/simd.hpp index 3e3e7de4..0a28536a 100644 --- a/include/dsp/simd.hpp +++ b/include/dsp/simd.hpp @@ -1,5 +1,6 @@ #include "sse_mathfun.h" #include +#include #include @@ -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