From eb2a20c1f75a6de636a4d2c3ff3c3ae5064f5b3f Mon Sep 17 00:00:00 2001 From: svn_bwardell Date: Mon, 8 Aug 2011 14:21:32 +0000 Subject: Use a macro name which is less likely to conflict with an existing macro. This macro is only used internally anyway. git-svn-id: https://svn.cct.lsu.edu/repos/numrel/LSUThorns/Vectors/trunk@28 105869f7-3296-0410-a4ea-f4349344b45a --- src/vectors-4-SSE.h | 28 ++++++++++++++-------------- src/vectors-4-default.h | 6 +++--- src/vectors-8-SSE2.h | 24 ++++++++++++------------ src/vectors-8-default.h | 6 +++--- 4 files changed, 32 insertions(+), 32 deletions(-) diff --git a/src/vectors-4-SSE.h b/src/vectors-4-SSE.h index 49925c1..9547b03 100644 --- a/src/vectors-4-SSE.h +++ b/src/vectors-4-SSE.h @@ -313,21 +313,21 @@ static const union { # define k4ifpos(x,y,z) (_mm_blendv_ps(y,z,x)) #else # ifdef __cplusplus -# define SGN(x) std::signbit(x) +# define Vectors_SGN(x) std::signbit(x) # else -# define SGN(x) signbit(x) +# define Vectors_SGN(x) signbit(x) # endif -# define k4ifpos(x,y,z) \ - ({ \ - CCTK_REAL4_VEC const xx=(x_); \ - CCTK_REAL4_VEC const x=xx; \ - CCTK_REAL4_VEC const yy=(y_); \ - CCTK_REAL4_VEC const y=yy; \ - CCTK_REAL4_VEC const zz=(z_); \ - CCTK_REAL4_VEC const z=zz; \ - vec4_set(SGN(vec4_elt0(x)) ? vec4_elt0(z) : vec4_elt0(y), \ - SGN(vec4_elt1(x)) ? vec4_elt1(z) : vec4_elt1(y), \ - SGN(vec4_elt2(x)) ? vec4_elt2(z) : vec4_elt2(y), \ - SGN(vec4_elt3(x)) ? vec4_elt3(z) : vec4_elt3(y)); \ +# define k4ifpos(x,y,z) \ + ({ \ + CCTK_REAL4_VEC const xx=(x_); \ + CCTK_REAL4_VEC const x=xx; \ + CCTK_REAL4_VEC const yy=(y_); \ + CCTK_REAL4_VEC const y=yy; \ + CCTK_REAL4_VEC const zz=(z_); \ + CCTK_REAL4_VEC const z=zz; \ + vec4_set(Vectors_SGN(vec4_elt0(x)) ? vec4_elt0(z) : vec4_elt0(y), \ + Vectors_SGN(vec4_elt1(x)) ? vec4_elt1(z) : vec4_elt1(y), \ + Vectors_SGN(vec4_elt2(x)) ? vec4_elt2(z) : vec4_elt2(y), \ + Vectors_SGN(vec4_elt3(x)) ? vec4_elt3(z) : vec4_elt3(y)); \ }) #endif diff --git a/src/vectors-4-default.h b/src/vectors-4-default.h index 76e96b9..76bdc7d 100644 --- a/src/vectors-4-default.h +++ b/src/vectors-4-default.h @@ -85,9 +85,9 @@ #define k4sqrt(x) (sqrtf(x)) #ifdef __cplusplus -# define SGN(x) std::signbit(x) +# define Vectors_SGN(x) std::signbit(x) #else -# define SGN(x) signbit(x) +# define Vectors_SGN(x) signbit(x) #endif -#define k4ifpos(x,y,z) (SGN(x)?(z):(y)) +#define k4ifpos(x,y,z) (Vectors_SGN(x)?(z):(y)) diff --git a/src/vectors-8-SSE2.h b/src/vectors-8-SSE2.h index 426a8a5..b530d10 100644 --- a/src/vectors-8-SSE2.h +++ b/src/vectors-8-SSE2.h @@ -235,19 +235,19 @@ static const union { }) #else # ifdef __cplusplus -# define SGN(x) std::signbit(x) +# define Vectors_SGN(x) std::signbit(x) # else -# define SGN(x) signbit(x) +# define Vectors_SGN(x) signbit(x) # endif -# define k8ifpos(x_,y_,z_) \ - ({ \ - CCTK_REAL8_VEC const xx=(x_); \ - CCTK_REAL8_VEC const x=xx; \ - CCTK_REAL8_VEC const yy=(y_); \ - CCTK_REAL8_VEC const y=yy; \ - CCTK_REAL8_VEC const zz=(z_); \ - CCTK_REAL8_VEC const z=zz; \ - vec8_set(SGN(vec8_elt0(x)) ? vec8_elt0(z) : vec8_elt0(y), \ - SGN(vec8_elt1(x)) ? vec8_elt1(z) : vec8_elt1(y)); \ +# define k8ifpos(x_,y_,z_) \ + ({ \ + CCTK_REAL8_VEC const xx=(x_); \ + CCTK_REAL8_VEC const x=xx; \ + CCTK_REAL8_VEC const yy=(y_); \ + CCTK_REAL8_VEC const y=yy; \ + CCTK_REAL8_VEC const zz=(z_); \ + CCTK_REAL8_VEC const z=zz; \ + vec8_set(Vectors_SGN(vec8_elt0(x)) ? vec8_elt0(z) : vec8_elt0(y), \ + Vectors_SGN(vec8_elt1(x)) ? vec8_elt1(z) : vec8_elt1(y)); \ }) #endif diff --git a/src/vectors-8-default.h b/src/vectors-8-default.h index aaed7d9..f24c0d3 100644 --- a/src/vectors-8-default.h +++ b/src/vectors-8-default.h @@ -85,9 +85,9 @@ #define k8sqrt(x) (sqrt(x)) #ifdef __cplusplus -# define SGN(x) std::signbit(x) +# define Vectors_SGN(x) std::signbit(x) #else -# define SGN(x) signbit(x) +# define Vectors_SGN(x) signbit(x) #endif -#define k8ifpos(x,y,z) (SGN(x)?(z):(y)) +#define k8ifpos(x,y,z) (Vectors_SGN(x)?(z):(y)) -- cgit v1.2.3