aboutsummaryrefslogtreecommitdiff
path: root/src/vectors-4-default.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/vectors-4-default.h')
-rw-r--r--src/vectors-4-default.h12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/vectors-4-default.h b/src/vectors-4-default.h
index ac1f1a4..76e96b9 100644
--- a/src/vectors-4-default.h
+++ b/src/vectors-4-default.h
@@ -1,13 +1,16 @@
// Fallback vectorisation implementation: Do not vectorise
-
-
// We use macros here, so that we are not surprised by compilers which
// don't like to inline functions. This should also make debug builds
// (which may not inline) more efficient.
+#include <assert.h>
+#include <math.h>
+
+
+
#define vec4_architecture "scalar (no vectorisation, 32-bit precision)"
// Use CCTK_REAL4
@@ -81,11 +84,10 @@
#define k4pow(x,a) (powf(x,a))
#define k4sqrt(x) (sqrtf(x))
-#include <math.h>
#ifdef __cplusplus
-#define SGN(x) std::signbit(x)
+# define SGN(x) std::signbit(x)
#else
-#define SGN(x) signbit(x)
+# define SGN(x) signbit(x)
#endif
#define k4ifpos(x,y,z) (SGN(x)?(z):(y))