12 #ifndef MFEM_SIMD_QPX_256_HPP
13 #define MFEM_SIMD_QPX_256_HPP
17 #include "../../config/tconfig.hpp"
23 template <
typename,
int,
int>
struct AutoSIMD;
25 template <>
struct AutoSIMD<double,4,32>
28 static constexpr
int size = 4;
43 inline __ATTRS_ai
const double &
operator[](
int i)
const {
return vec[i]; }
59 vd = vec_add(vd,v.vd);
65 vd = vec_add(vd,vec_splats(e));
71 vd = vec_sub(vd,v.vd);
77 vd = vec_sub(vd,vec_splats(e));
83 vd = vec_mul(vd,v.vd);
89 vd = vec_mul(vd,vec_splats(e));
95 vd = vec_swdiv(vd,v.vd);
101 vd = vec_swdiv(vd,vec_splats(e));
120 r.vd = vec_add(vd,v.vd);
127 r.vd = vec_add(vd, vec_splats(e));
134 r.vd = vec_sub(vd,v.vd);
141 r.vd = vec_sub(vd, vec_splats(e));
148 r.vd = vec_mul(vd,v.vd);
155 r.vd = vec_mul(vd, vec_splats(e));
162 r.vd = vec_swdiv(vd,v.vd);
169 r.vd = vec_swdiv(vd, vec_splats(e));
175 vd = vec_madd(w.vd,vd,v.vd);
181 vd = vec_madd(v.vd,vec_splats(e),vd);
187 vd = vec_madd(vec_splats(e),v.vd,vd);
193 vd = vec_mul(v.vd,w.vd);
199 vd = vec_mul(v.vd,vec_splats(e));
205 vd = vec_mul(vec_splats(e),v.vd);
211 AutoSIMD<double,4,32>
operator+(
const double &e,
212 const AutoSIMD<double,4,32> &v)
214 AutoSIMD<double,4,32> r;
215 r.vd = vec_add(vec_splats(e),v.vd);
220 AutoSIMD<double,4,32>
operator-(
const double &e,
221 const AutoSIMD<double,4,32> &v)
223 AutoSIMD<double,4,32> r;
224 r.vd = vec_sub(vec_splats(e),v.vd);
229 AutoSIMD<double,4,32>
operator*(
const double &e,
230 const AutoSIMD<double,4,32> &v)
232 AutoSIMD<double,4,32> r;
233 r.vd = vec_mul(vec_splats(e),v.vd);
238 AutoSIMD<double,4,32>
operator/(
const double &e,
239 const AutoSIMD<double,4,32> &v)
241 AutoSIMD<double,4,32> r;
242 r.vd = vec_swdiv(vec_splats(e),v.vd);
250 #endif // MFEM_SIMD_QPX_256_HPP
__ATTRS_ai AutoSIMD & fma(const double &e, const AutoSIMD &v)
__ATTRS_ai AutoSIMD & operator*=(const AutoSIMD &v)
__ATTRS_ai double & operator[](int i)
__ATTRS_ai AutoSIMD operator-(const AutoSIMD &v) const
MFEM_ALWAYS_INLINE AutoSIMD< scalar_t, S, A > operator/(const scalar_t &e, const AutoSIMD< scalar_t, S, A > &v)
__ATTRS_ai AutoSIMD operator/(const double &e) const
__ATTRS_ai AutoSIMD operator-(const double &e) const
__ATTRS_ai AutoSIMD & operator/=(const AutoSIMD &v)
MFEM_ALWAYS_INLINE AutoSIMD< scalar_t, S, A > operator+(const scalar_t &e, const AutoSIMD< scalar_t, S, A > &v)
__ATTRS_ai AutoSIMD & operator/=(const double &e)
__ATTRS_ai AutoSIMD operator+() const
__ATTRS_ai AutoSIMD operator+(const AutoSIMD &v) const
__ATTRS_ai AutoSIMD operator-() const
__ATTRS_ai AutoSIMD operator/(const AutoSIMD &v) const
__ATTRS_ai AutoSIMD & operator=(const double &e)
__ATTRS_ai AutoSIMD & operator+=(const AutoSIMD &v)
static const int align_bytes
__ATTRS_ai AutoSIMD & operator+=(const double &e)
__ATTRS_ai AutoSIMD & mul(const AutoSIMD &v, const AutoSIMD &w)
__ATTRS_ai AutoSIMD & fma(const AutoSIMD &v, const AutoSIMD &w)
__ATTRS_ai AutoSIMD & operator-=(const AutoSIMD &v)
__ATTRS_ai AutoSIMD & fma(const AutoSIMD &v, const double &e)
__ATTRS_ai const double & operator[](int i) const
__ATTRS_ai AutoSIMD & operator-=(const double &e)
__ATTRS_ai AutoSIMD & operator*=(const double &e)
__ATTRS_ai AutoSIMD operator*(const AutoSIMD &v) const
__ATTRS_ai AutoSIMD operator+(const double &e) const
__ATTRS_ai AutoSIMD operator*(const double &e) const
__ATTRS_ai AutoSIMD & mul(const AutoSIMD &v, const double &e)
__ATTRS_ai AutoSIMD & operator=(const AutoSIMD &v)
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)
__ATTRS_ai AutoSIMD & mul(const double &e, const AutoSIMD &v)