mirror of
https://github.com/paboyle/Grid.git
synced 2025-04-27 14:15:55 +01:00
some changes in breaking out A64FX: use -DA64FXFIXEDSIZE for fixed size, but also define GEN
This commit is contained in:
parent
39f3ae5b1d
commit
fbed02690d
@ -36,6 +36,7 @@
|
|||||||
|
|
||||||
//static_assert(GEN_SIMD_WIDTH % 64u == 0, "A64FX SIMD vector size is 64 bytes");
|
//static_assert(GEN_SIMD_WIDTH % 64u == 0, "A64FX SIMD vector size is 64 bytes");
|
||||||
|
|
||||||
|
/*
|
||||||
#ifdef __ARM_FEATURE_SVE
|
#ifdef __ARM_FEATURE_SVE
|
||||||
#pragma message("Yes, we have SVE feature")
|
#pragma message("Yes, we have SVE feature")
|
||||||
#include <arm_sve.h>
|
#include <arm_sve.h>
|
||||||
@ -43,6 +44,7 @@
|
|||||||
#pragma error "Missing SVE feature"
|
#pragma error "Missing SVE feature"
|
||||||
#endif /* __ARM_FEATURE_SVE */
|
#endif /* __ARM_FEATURE_SVE */
|
||||||
|
|
||||||
|
|
||||||
// gcc 10 features
|
// gcc 10 features
|
||||||
#if __ARM_FEATURE_SVE_BITS==512
|
#if __ARM_FEATURE_SVE_BITS==512
|
||||||
#pragma message("Fixed-size SVE ACLE")
|
#pragma message("Fixed-size SVE ACLE")
|
||||||
@ -58,7 +60,7 @@ typedef svuint64_t lutd __attribute__((arm_sve_vector_bits(512))); // LUTs for
|
|||||||
#endif /* __ARM_FEATURE_SVE_BITS */
|
#endif /* __ARM_FEATURE_SVE_BITS */
|
||||||
|
|
||||||
// safety definition, not sure if it's necessary
|
// safety definition, not sure if it's necessary
|
||||||
#define GEN_SIMD_WIDTH 64u
|
//#define GEN_SIMD_WIDTH 64u
|
||||||
|
|
||||||
// low-level API
|
// low-level API
|
||||||
NAMESPACE_BEGIN(Grid);
|
NAMESPACE_BEGIN(Grid);
|
||||||
|
@ -119,25 +119,29 @@ accelerator_inline Grid_half sfw_float_to_half(float ff) {
|
|||||||
#ifdef A64FXGCC
|
#ifdef A64FXGCC
|
||||||
#include "Grid_a64fx-fixedsize.h"
|
#include "Grid_a64fx-fixedsize.h"
|
||||||
#else
|
#else
|
||||||
#ifdef GEN
|
|
||||||
#if defined(A64FX) // breakout A64FX SVE ACLE here
|
#ifdef GEN
|
||||||
|
#if defined(A64FX) || defined(A64FXGCC) // breakout A64FX SVE ACLE here
|
||||||
|
#include <arm_sve.h>
|
||||||
|
if defined(A64FX) // VLA
|
||||||
#pragma message("building for A64FX / SVE ACLE VLA")
|
#pragma message("building for A64FX / SVE ACLE VLA")
|
||||||
#if defined(ARMCLANGCOMPAT)
|
#if defined(ARMCLANGCOMPAT)
|
||||||
#pragma message("applying armclang fix")
|
#pragma message("applying armclang fix")
|
||||||
//#else
|
//#else
|
||||||
// #pragma message("not applying armclang fix")
|
//#pragma message("not applying armclang fix")
|
||||||
#endif
|
#endif
|
||||||
#include <arm_sve.h>
|
|
||||||
#include "Grid_a64fx-2.h"
|
#include "Grid_a64fx-2.h"
|
||||||
|
#endif
|
||||||
|
#if defined(A64FXFIXEDSIZE) // fixed size data types
|
||||||
|
#include "Grid_a64fx-fixedsize.h"
|
||||||
|
#endif
|
||||||
#else
|
#else
|
||||||
#pragma message("building for A64FX / GEN")
|
#pragma message("building for GEN") // generic
|
||||||
#include "Grid_generic.h"
|
#include "Grid_generic.h"
|
||||||
#endif
|
#endif
|
||||||
#else
|
|
||||||
#pragma error("Undefined architecture")
|
|
||||||
#endif
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#ifdef SSE4
|
#ifdef SSE4
|
||||||
#include "Grid_sse4.h"
|
#include "Grid_sse4.h"
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user