Skip to content

Commit

Permalink
power: limit 64-bit floating point support to POWER7+
Browse files Browse the repository at this point in the history
Hopefully fixes #185.
  • Loading branch information
nemequ committed May 6, 2020
1 parent a12c67d commit 489ef68
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 12 deletions.
6 changes: 3 additions & 3 deletions simde/simde-features.h
Expand Up @@ -257,11 +257,11 @@

#if !defined(SIMDE_POWER_ALTIVEC_P7_NATIVE) && !defined(SIMDE_POWER_ALTIVEC_P7_NO_NATIVE) && !defined(SIMDE_NO_NATIVE)
#if SIMDE_ARCH_POWER_ALTIVEC_CHECK(700)
#define SIMDE_POWER_ALTIVEC_P6_NATIVE
#define SIMDE_POWER_ALTIVEC_P7_NATIVE
#endif
#endif
#if defined(SIMDE_POWER_ALTIVEC_P7_NATIVE) && !defined(SIMDE_POWER_ALTIVEC_P6)
#define SIMDE_POWER_ALTIVEC_P8_NATIVE
#define SIMDE_POWER_ALTIVEC_P6_NATIVE
#endif

#if !defined(SIMDE_POWER_ALTIVEC_P6_NATIVE) && !defined(SIMDE_POWER_ALTIVEC_P6_NO_NATIVE) && !defined(SIMDE_NO_NATIVE)
Expand All @@ -278,7 +278,7 @@
#define SIMDE_POWER_ALTIVEC_P5_NATIVE
#endif
#endif
#if defined(SIMDE_POWER_ALTIVEC_P5)
#if defined(SIMDE_POWER_ALTIVEC_P5_NATIVE)
#include <altivec.h>
#endif

Expand Down
12 changes: 9 additions & 3 deletions simde/x86/avx.h
Expand Up @@ -89,7 +89,9 @@ typedef union {
SIMDE_ALIGN(16) vector signed int altivec_i32[2];
SIMDE_ALIGN(16) vector signed long long altivec_i64[2];
SIMDE_ALIGN(16) vector float altivec_f32[2];
SIMDE_ALIGN(16) vector double altivec_f64[2];
#if defined(SIMDE_POWER_ALTIVEC_P7_NATIVE)
SIMDE_ALIGN(16) vector double altivec_f64[2];
#endif
#endif
} simde__m256_private;

Expand Down Expand Up @@ -145,7 +147,9 @@ typedef union {
SIMDE_ALIGN(16) vector signed int altivec_i32[2];
SIMDE_ALIGN(16) vector signed long long altivec_i64[2];
SIMDE_ALIGN(16) vector float altivec_f32[2];
SIMDE_ALIGN(16) vector double altivec_f64[2];
#if defined(SIMDE_POWER_ALTIVEC_P7_NATIVE)
SIMDE_ALIGN(16) vector double altivec_f64[2];
#endif
#endif
} simde__m256d_private;

Expand Down Expand Up @@ -201,7 +205,9 @@ typedef union {
SIMDE_ALIGN(16) vector signed int altivec_i32[2];
SIMDE_ALIGN(16) vector signed long long altivec_i64[2];
SIMDE_ALIGN(16) vector float altivec_f32[2];
SIMDE_ALIGN(16) vector double altivec_f64[2];
#if defined(SIMDE_POWER_ALTIVEC_P7_NATIVE)
SIMDE_ALIGN(16) vector double altivec_f64[2];
#endif
#endif
} simde__m256i_private;

Expand Down
12 changes: 9 additions & 3 deletions simde/x86/avx512f.h
Expand Up @@ -117,7 +117,9 @@ typedef union {
SIMDE_ALIGN(16) vector signed int altivec_i32[4];
SIMDE_ALIGN(16) vector signed long long altivec_i64[4];
SIMDE_ALIGN(16) vector float altivec_f32[4];
SIMDE_ALIGN(16) vector double altivec_f64[4];
#if defined(SIMDE_POWER_ALTIVEC_P7_NATIVE)
SIMDE_ALIGN(16) vector double altivec_f64[4];
#endif
#endif
} simde__m512_private;

Expand Down Expand Up @@ -175,7 +177,9 @@ typedef union {
SIMDE_ALIGN(16) vector signed int altivec_i32[4];
SIMDE_ALIGN(16) vector signed long long altivec_i64[4];
SIMDE_ALIGN(16) vector float altivec_f32[4];
SIMDE_ALIGN(16) vector double altivec_f64[4];
#if defined(SIMDE_POWER_ALTIVEC_P7_NATIVE)
SIMDE_ALIGN(16) vector double altivec_f64[4];
#endif
#endif
} simde__m512d_private;

Expand Down Expand Up @@ -233,7 +237,9 @@ typedef union {
SIMDE_ALIGN(16) vector signed int altivec_i32[4];
SIMDE_ALIGN(16) vector signed long long altivec_i64[4];
SIMDE_ALIGN(16) vector float altivec_f32[4];
SIMDE_ALIGN(16) vector double altivec_f64[4];
#if defined(SIMDE_POWER_ALTIVEC_P7_NATIVE)
SIMDE_ALIGN(16) vector double altivec_f64[4];
#endif
#endif
} simde__m512i_private;

Expand Down
4 changes: 3 additions & 1 deletion simde/x86/sse.h
Expand Up @@ -109,7 +109,9 @@ typedef union {
SIMDE_ALIGN(16) vector signed int altivec_i32;
SIMDE_ALIGN(16) vector signed long long altivec_i64;
SIMDE_ALIGN(16) vector float altivec_f32;
SIMDE_ALIGN(16) vector double altivec_f64;
#if defined(SIMDE_POWER_ALTIVEC_P7_NATIVE)
SIMDE_ALIGN(16) vector double altivec_f64;
#endif
#endif
} simde__m128_private;

Expand Down
8 changes: 6 additions & 2 deletions simde/x86/sse2.h
Expand Up @@ -121,7 +121,9 @@ typedef union {
#endif
SIMDE_ALIGN(16) vector unsigned long long altivec_u64;
SIMDE_ALIGN(16) vector float altivec_f32;
SIMDE_ALIGN(16) vector double altivec_f64;
#if defined(SIMDE_POWER_ALTIVEC_P7_NATIVE)
SIMDE_ALIGN(16) vector double altivec_f64;
#endif
#endif
} simde__m128i_private;

Expand Down Expand Up @@ -194,7 +196,9 @@ typedef union {
#endif
SIMDE_ALIGN(16) vector unsigned long long altivec_u64;
SIMDE_ALIGN(16) vector float altivec_f32;
SIMDE_ALIGN(16) vector double altivec_f64;
#if defined(SIMDE_POWER_ALTIVEC_P7_NATIVE)
SIMDE_ALIGN(16) vector double altivec_f64;
#endif
#endif
} simde__m128d_private;

Expand Down

0 comments on commit 489ef68

Please sign in to comment.