diff options
| author | a1xd <[email protected]> | 2021-09-22 20:49:04 -0400 |
|---|---|---|
| committer | GitHub <[email protected]> | 2021-09-22 20:49:04 -0400 |
| commit | 8a4b6f57758338d5537d4671184099a4728a8cdd (patch) | |
| tree | df36529a344d5d21ff11f5ba021ec80afb4b68a4 /common/x64-util.hpp | |
| parent | Merge pull request #87 from matthewstrasiotto/streamer_mode (diff) | |
| parent | improve converter + docs (diff) | |
| download | rawaccel-8a4b6f57758338d5537d4671184099a4728a8cdd.tar.xz rawaccel-8a4b6f57758338d5537d4671184099a4728a8cdd.zip | |
Merge pull request #105 from a1xd/1.5.x
v1.5
Diffstat (limited to 'common/x64-util.hpp')
| -rw-r--r-- | common/x64-util.hpp | 30 |
1 files changed, 0 insertions, 30 deletions
diff --git a/common/x64-util.hpp b/common/x64-util.hpp deleted file mode 100644 index 40bc7c4..0000000 --- a/common/x64-util.hpp +++ /dev/null @@ -1,30 +0,0 @@ -#pragma once - -#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); - _mm_store_sd(&val, dst); - return val; -} - -#endif - -inline constexpr double minsd(double a, double b) { - return (a < b) ? a : b; -} - -inline constexpr double maxsd(double a, double b) { - return (b < a) ? a : b; -} - -inline constexpr double clampsd(double v, double lo, double hi) { - return minsd(maxsd(v, lo), hi); -} |