diff options
author | eschnett <eschnett@105869f7-3296-0410-a4ea-f4349344b45a> | 2011-08-08 01:40:29 +0000 |
---|---|---|
committer | eschnett <eschnett@105869f7-3296-0410-a4ea-f4349344b45a> | 2011-08-08 01:40:29 +0000 |
commit | cc49cae66d85758463d43ca1166da59e0eef8bb3 (patch) | |
tree | c645cdad984f17a8fdfab72eb0f4593fe714d870 /src/vectors-4-SSE.h | |
parent | ced921c204699a6827162d211b238ea0bc1dafb5 (diff) |
Add more vectorisation tests. Add test case.
Add vectorisation test for vector creation, load, and store
statements.
Convert C to C++ since vectorisation requires C++.
Add test case.
Beautify vectorsation templates.
git-svn-id: https://svn.cct.lsu.edu/repos/numrel/LSUThorns/Vectors/trunk@26 105869f7-3296-0410-a4ea-f4349344b45a
Diffstat (limited to 'src/vectors-4-SSE.h')
-rw-r--r-- | src/vectors-4-SSE.h | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/vectors-4-SSE.h b/src/vectors-4-SSE.h index d04d0b7..49925c1 100644 --- a/src/vectors-4-SSE.h +++ b/src/vectors-4-SSE.h @@ -5,6 +5,9 @@ +#include <assert.h> +#include <math.h> + #include <xmmintrin.h> #ifdef __SSE4_1__ // Intel's SSE 4.1 @@ -309,12 +312,11 @@ static const union { #ifdef __SSE4_1__ # define k4ifpos(x,y,z) (_mm_blendv_ps(y,z,x)) #else -#include <math.h> -#ifdef __cplusplus -#define SGN(x) std::signbit(x) -#else -#define SGN(x) signbit(x) -#endif +# ifdef __cplusplus +# define SGN(x) std::signbit(x) +# else +# define SGN(x) signbit(x) +# endif # define k4ifpos(x,y,z) \ ({ \ CCTK_REAL4_VEC const xx=(x_); \ |