From 48a340a9d1bc5d0e9b1641fff1c13a9c9195c395 Mon Sep 17 00:00:00 2001 From: nmeyer-ur Date: Fri, 8 May 2020 10:47:49 +0200 Subject: [PATCH] GEN seems to defined by default -> some fixes applied --- Grid/simd/Grid_a64fx-fixedsize.h | 3 +++ Grid/simd/Grid_vector_types.h | 36 ++++++++++++++++++-------------- 2 files changed, 23 insertions(+), 16 deletions(-) diff --git a/Grid/simd/Grid_a64fx-fixedsize.h b/Grid/simd/Grid_a64fx-fixedsize.h index 7e4972d0..e32014bf 100644 --- a/Grid/simd/Grid_a64fx-fixedsize.h +++ b/Grid/simd/Grid_a64fx-fixedsize.h @@ -43,6 +43,9 @@ #pragma error "Missing SVE feature" #endif /* __ARM_FEATURE_SVE */ +// safety definition, not sure if it's important +#define GEN_SIMD_WIDTH 64u + // low-level API NAMESPACE_BEGIN(Grid); NAMESPACE_BEGIN(Optimization); diff --git a/Grid/simd/Grid_vector_types.h b/Grid/simd/Grid_vector_types.h index 383f72bf..55d521b3 100644 --- a/Grid/simd/Grid_vector_types.h +++ b/Grid/simd/Grid_vector_types.h @@ -115,25 +115,29 @@ accelerator_inline Grid_half sfw_float_to_half(float ff) { #include "Grid_generic.h" #endif */ -#ifdef GEN - #if defined(A64FX) // breakout A64FX SVE ACLE here - #pragma message("building for A64FX / SVE ACLE VLA") - #if defined(ARMCLANGCOMPAT) - #pragma message("applying armclang fix") - //#else - // #pragma message("not applying armclang fix") - #endif - #include - #include "Grid_a64fx-2.h" - #else - #pragma message("building for A64FX / GEN") - #include "Grid_generic.h" - #endif -#endif // A64FX with gcc 10 #ifdef A64FXGCC -#include "Grid_a64fx-fixedsize.h" + #include "Grid_a64fx-fixedsize.h" +#else + #ifdef GEN + #if defined(A64FX) // breakout A64FX SVE ACLE here + #pragma message("building for A64FX / SVE ACLE VLA") + #if defined(ARMCLANGCOMPAT) + #pragma message("applying armclang fix") + //#else + // #pragma message("not applying armclang fix") + #endif + #include + #include "Grid_a64fx-2.h" + #else + #pragma message("building for A64FX / GEN") + #include "Grid_generic.h" + #endif + #else + #pragma error("Undefined architecture") + #endif #endif + #ifdef SSE4 #include "Grid_sse4.h" #endif