12 #ifndef MFEM_SIMD_M512_HPP 13 #define MFEM_SIMD_M512_HPP 17 #include "../../config/tconfig.hpp" 18 #if defined(__x86_64__) 19 #include <x86intrin.h> 20 #else // assuming MSVC with _M_X64 or _M_IX86 28 template <
typename,
int,
int>
struct AutoSIMD;
33 static constexpr
int size = 8;
51 inline MFEM_ALWAYS_INLINE
const double &
operator[](
int i)
const 64 m512d = _mm512_set1_pd(e);
70 m512d = _mm512_add_pd(m512d,v.m512d);
76 m512d = _mm512_add_pd(m512d,_mm512_set1_pd(e));
82 m512d = _mm512_sub_pd(m512d,v.m512d);
88 m512d = _mm512_sub_pd(m512d,_mm512_set1_pd(e));
94 m512d = _mm512_mul_pd(m512d,v.m512d);
100 m512d = _mm512_mul_pd(m512d,_mm512_set1_pd(e));
106 m512d = _mm512_div_pd(m512d,v.m512d);
112 m512d = _mm512_div_pd(m512d,_mm512_set1_pd(e));
120 r.m512d = _mm512_xor_pd(_mm512_set1_pd(-0.0), m512d);
122 r.m512d = _mm512_sub_pd(_mm512_set1_pd(0.0), m512d);
135 r.m512d = _mm512_add_pd(m512d,v.m512d);
142 r.m512d = _mm512_add_pd(m512d, _mm512_set1_pd(e));
149 r.m512d = _mm512_sub_pd(m512d,v.m512d);
156 r.m512d = _mm512_sub_pd(m512d, _mm512_set1_pd(e));
163 r.m512d = _mm512_mul_pd(m512d,v.m512d);
170 r.m512d = _mm512_mul_pd(m512d, _mm512_set1_pd(e));
177 r.m512d = _mm512_div_pd(m512d,v.m512d);
184 r.m512d = _mm512_div_pd(m512d, _mm512_set1_pd(e));
190 m512d = _mm512_fmadd_pd(w.m512d,v.m512d,m512d);
196 m512d = _mm512_fmadd_pd(_mm512_set1_pd(e),v.m512d,m512d);
202 m512d = _mm512_fmadd_pd(v.m512d,_mm512_set1_pd(e),m512d);
208 m512d = _mm512_mul_pd(v.m512d,w.m512d);
214 m512d = _mm512_mul_pd(v.m512d,_mm512_set1_pd(e));
220 m512d = _mm512_mul_pd(_mm512_set1_pd(e),v.m512d);
225 inline MFEM_ALWAYS_INLINE
230 r.
m512d = _mm512_add_pd(_mm512_set1_pd(e),v.
m512d);
234 inline MFEM_ALWAYS_INLINE
239 r.
m512d = _mm512_sub_pd(_mm512_set1_pd(e),v.
m512d);
243 inline MFEM_ALWAYS_INLINE
248 r.
m512d = _mm512_mul_pd(_mm512_set1_pd(e),v.
m512d);
252 inline MFEM_ALWAYS_INLINE
257 r.
m512d = _mm512_div_pd(_mm512_set1_pd(e),v.
m512d);
263 #endif // __AVX512F__ 265 #endif // MFEM_SIMD_M512_HPP
MFEM_ALWAYS_INLINE AutoSIMD & fma(const double &e, const AutoSIMD &v)
MFEM_ALWAYS_INLINE AutoSIMD operator+() const
MFEM_ALWAYS_INLINE AutoSIMD operator*(const double &e) const
MFEM_ALWAYS_INLINE AutoSIMD & operator=(const double &e)
MFEM_ALWAYS_INLINE AutoSIMD & fma(const AutoSIMD &v, const double &e)
MFEM_ALWAYS_INLINE AutoSIMD< scalar_t, S, A > operator/(const scalar_t &e, const AutoSIMD< scalar_t, S, A > &v)
MFEM_ALWAYS_INLINE AutoSIMD operator-(const AutoSIMD &v) const
MFEM_ALWAYS_INLINE AutoSIMD & mul(const AutoSIMD &v, const AutoSIMD &w)
MFEM_ALWAYS_INLINE AutoSIMD & operator/=(const double &e)
MFEM_ALWAYS_INLINE AutoSIMD & operator+=(const AutoSIMD &v)
MFEM_ALWAYS_INLINE AutoSIMD & fma(const AutoSIMD &v, const AutoSIMD &w)
MFEM_ALWAYS_INLINE AutoSIMD< scalar_t, S, A > operator+(const scalar_t &e, const AutoSIMD< scalar_t, S, A > &v)
MFEM_ALWAYS_INLINE const double & operator[](int i) const
MFEM_ALWAYS_INLINE AutoSIMD operator+(const AutoSIMD &v) const
MFEM_ALWAYS_INLINE AutoSIMD & mul(const AutoSIMD &v, const double &e)
MFEM_ALWAYS_INLINE AutoSIMD & operator+=(const double &e)
static const int align_bytes
MFEM_ALWAYS_INLINE AutoSIMD operator+(const double &e) const
MFEM_ALWAYS_INLINE double & operator[](int i)
MFEM_ALWAYS_INLINE AutoSIMD & operator-=(const AutoSIMD &v)
MFEM_ALWAYS_INLINE AutoSIMD operator-(const double &e) const
MFEM_ALWAYS_INLINE AutoSIMD & operator/=(const AutoSIMD &v)
MFEM_ALWAYS_INLINE AutoSIMD & operator=(const AutoSIMD &v)
MFEM_ALWAYS_INLINE AutoSIMD operator-() const
MFEM_ALWAYS_INLINE AutoSIMD operator/(const AutoSIMD &v) const
MFEM_ALWAYS_INLINE AutoSIMD & operator*=(const AutoSIMD &v)
MFEM_ALWAYS_INLINE AutoSIMD & mul(const double &e, const AutoSIMD &v)
MFEM_ALWAYS_INLINE AutoSIMD operator*(const AutoSIMD &v) const
MFEM_ALWAYS_INLINE AutoSIMD & operator*=(const double &e)
MFEM_ALWAYS_INLINE AutoSIMD operator/(const double &e) const
MFEM_ALWAYS_INLINE AutoSIMD & operator-=(const double &e)
MemoryClass operator*(MemoryClass mc1, MemoryClass mc2)
Return a suitable MemoryClass from a pair of MemoryClasses.
MFEM_ALWAYS_INLINE AutoSIMD< scalar_t, S, A > operator-(const scalar_t &e, const AutoSIMD< scalar_t, S, A > &v)