diff options
| author | a1xd <[email protected]> | 2020-07-31 04:52:24 -0400 |
|---|---|---|
| committer | a1xd <[email protected]> | 2020-07-31 04:52:24 -0400 |
| commit | f7c88d689e924010f6f95b22894414f0b96c4aa0 (patch) | |
| tree | fe64110f7678607947d19c5ba0b46ea2b15d69c4 /common | |
| parent | add more tweaks for st-refactor (diff) | |
| download | rawaccel-f7c88d689e924010f6f95b22894414f0b96c4aa0.tar.xz rawaccel-f7c88d689e924010f6f95b22894414f0b96c4aa0.zip | |
update grapher/wrapper for st-refactor
Diffstat (limited to 'common')
| -rw-r--r-- | common/x64-util.hpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/common/x64-util.hpp b/common/x64-util.hpp index 2fb61bb..40bc7c4 100644 --- a/common/x64-util.hpp +++ b/common/x64-util.hpp @@ -1,7 +1,13 @@ #pragma once -#include <emmintrin.h> +#ifdef _MANAGED + +#include <math.h> +inline double sqrtsd(double val) { return sqrt(val); } + +#else +#include <emmintrin.h> inline double sqrtsd(double val) { __m128d src = _mm_load_sd(&val); __m128d dst = _mm_sqrt_sd(src, src); @@ -9,6 +15,8 @@ inline double sqrtsd(double val) { return val; } +#endif + inline constexpr double minsd(double a, double b) { return (a < b) ? a : b; } |