15 #include "../config/tconfig.hpp"
18 #include "simd/auto.hpp"
21 #include "simd/vsx.hpp"
22 #elif defined (__bgq__)
23 #include "simd/qpx.hpp"
24 #elif defined(__x86_64__) || defined(_M_X64) || defined(_M_IX86)
25 #include "simd/x86.hpp"
26 #elif !defined(_MSC_VER)
27 #warning Unknown SIMD architecture
29 #pragma message("warning: Unknown SIMD architecture")
39 #if !defined(MFEM_USE_SIMD)
40 #define MFEM_SIMD_BYTES 8
41 #define MFEM_ALIGN_BYTES 32
42 #elif defined(__AVX512F__)
43 #define MFEM_SIMD_BYTES 64
44 #define MFEM_ALIGN_BYTES 64
45 #elif defined(__AVX__) || defined(__VECTOR4DOUBLE__)
46 #define MFEM_SIMD_BYTES 32
47 #define MFEM_ALIGN_BYTES 32
48 #elif defined(__SSE2__) || defined(__VSX__)
49 #define MFEM_SIMD_BYTES 16
50 #define MFEM_ALIGN_BYTES 32
52 #define MFEM_SIMD_BYTES 8
53 #define MFEM_ALIGN_BYTES 32
57 #define MFEM_ROUNDUP(val,base) ((((val)+(base)-1)/(base))*(base))
58 #define MFEM_ALIGN_SIZE(size,type) \
59 MFEM_ROUNDUP(size,(MFEM_ALIGN_BYTES)/sizeof(type))
64 template<
typename complex_t,
typename real_t>
74 static const int simd_size = MFEM_SIMD_BYTES/
sizeof(real_t);
76 typedef AutoSIMD<complex_t, simd_size, MFEM_SIMD_BYTES>
vcomplex_t;
77 typedef AutoSIMD<real_t, simd_size, MFEM_SIMD_BYTES>
vreal_t;
78 typedef AutoSIMD<int, simd_size, simd_size*sizeof(int)>
vint_t;
81 template<
typename complex_t,
typename real_t>
93 typedef AutoSIMD<complex_t, simd_size, align_bytes>
vcomplex_t;
94 typedef AutoSIMD<real_t, simd_size, align_bytes>
vreal_t;
95 typedef AutoSIMD<int, simd_size, simd_size*sizeof(int)>
vint_t;
100 #endif // MFEM_SIMD_HPP
static const int simd_size
AutoSIMD< complex_t, simd_size, align_bytes > vcomplex_t
static const int batch_size
static const int align_bytes
AutoSIMD< real_t, simd_size, align_bytes > vreal_t
static const int batch_size
static const int block_size
AutoSIMD< int, simd_size, simd_size *sizeof(int)> vint_t
AutoSIMD< int, simd_size, simd_size *sizeof(int)> vint_t
static const int block_size
static const int simd_size
AutoSIMD< real_t, simd_size, MFEM_SIMD_BYTES > vreal_t
static const int align_bytes
AutoSIMD< complex_t, simd_size, MFEM_SIMD_BYTES > vcomplex_t