47#define FOREACH SU2_OMP_SIMD for (size_t k = 0; k < Size; ++k)
48 template <
class F,
class S>
89#define MAKE_COMPOUND(OP, IMPL) \
90 FORCEINLINE Array& operator OP(Scalar x) { \
91 reg = IMPL(reg, set1_p(SIZE_TAG, x)); \
94 FORCEINLINE Array& operator OP(const Array& other) noexcept { \
95 reg = IMPL(reg, other.reg); \
112#define MAKE_UNARY_FUN(NAME, IMPL) \
113 FORCEINLINE ARRAY_T NAME(const ARRAY_T& x) { return IMPL(x.reg); }
122#define MAKE_BINARY_FUN(NAME, IMPL) \
123 FORCEINLINE ARRAY_T NAME(const ARRAY_T& a, const ARRAY_T& b) { return IMPL(a.reg, b.reg); } \
124 FORCEINLINE ARRAY_T NAME(const ARRAY_T& a, SCALAR_T b) { return IMPL(a.reg, set1_p(SIZE_TAG, b)); } \
125 FORCEINLINE ARRAY_T NAME(SCALAR_T b, const ARRAY_T& a) { return IMPL(set1_p(SIZE_TAG, b), a.reg); }
140#undef MAKE_BINARY_FUN
145#define FOREACH SU2_OMP_SIMD for (size_t k = 0; k < ARRAY_T::Size; ++k)
149#define MAKE_UNARY_FUN(NAME, IMPL) \
150 FORCEINLINE ARRAY_T NAME(const ARRAY_T& x) { \
152 FOREACH { res[k] = IMPL(x[k]); } \
162#define MAKE_BINARY_FUN(NAME, IMPL) \
163 FORCEINLINE ARRAY_T NAME(const ARRAY_T& a, const ARRAY_T& b) { \
165 FOREACH { res[k] = IMPL(a[k], b[k]); } \
168 FORCEINLINE ARRAY_T NAME(const ARRAY_T& a, SCALAR_T b) { \
170 FOREACH { res[k] = IMPL(a[k], b); } \
173 FORCEINLINE ARRAY_T NAME(SCALAR_T b, const ARRAY_T& a) { \
175 FOREACH { res[k] = IMPL(b, a[k]); } \
181#undef MAKE_BINARY_FUN
#define MAKE_COMPOUND(OP, ASSIGN_OP)
Compound assignement operations with scalars and expressions.
Definition CSysVector.hpp:488
Symbols that need to be defined before including this header:
Definition special_vectorization.hpp:46
SCALAR_T Scalar
Definition special_vectorization.hpp:54
@ Size
Definition special_vectorization.hpp:57
ARRAY_BOILERPLATE FORCEINLINE Array(Register y)
Definition special_vectorization.hpp:71
Scalar x_[Size]
Definition special_vectorization.hpp:62
FORCEINLINE void bcast(Scalar x)
Definition special_vectorization.hpp:76
FORCEINLINE void gather(const Scalar *begin, const T &offsets)
Definition special_vectorization.hpp:83
FORCEINLINE void stream(Scalar *ptr) const
Definition special_vectorization.hpp:81
Register reg
Definition special_vectorization.hpp:61
FORCEINLINE void loada(const Scalar *ptr)
Definition special_vectorization.hpp:78
FORCEINLINE Array(const Array &other) noexcept
Definition special_vectorization.hpp:72
@ Align
Definition special_vectorization.hpp:56
FORCEINLINE void load(const Scalar *ptr)
Definition special_vectorization.hpp:77
REGISTER_T Register
Definition special_vectorization.hpp:55
FORCEINLINE void storea(Scalar *ptr) const
Definition special_vectorization.hpp:80
FORCEINLINE void store(Scalar *ptr) const
Definition special_vectorization.hpp:79
#define FORCEINLINE
Definition code_config.hpp:44
#define SIZE_TAG
Definition vectorization.hpp:219
FORCEINLINE ARRAY_T exp(const ARRAY_T &x)
Definition special_vectorization.hpp:156
FORCEINLINE ARRAY_T sqrt(const ARRAY_T &x)
Definition special_vectorization.hpp:116
#define MAKE_UNARY_FUN(NAME, IMPL)
Definition special_vectorization.hpp:112
#define FOREACH
Definition special_vectorization.hpp:47
FORCEINLINE ARRAY_T pow(const ARRAY_T &a, const ARRAY_T &b)
Definition special_vectorization.hpp:179
#define MAKE_BINARY_FUN(NAME, IMPL)
Definition special_vectorization.hpp:122
#define SCALAR_T
Definition vectorization.hpp:217
FORCEINLINE ARRAY_T sign(const ARRAY_T &x)
Definition special_vectorization.hpp:118
#define REGISTER_T
Definition vectorization.hpp:218
FORCEINLINE ARRAY_T abs(const ARRAY_T &x)
Definition special_vectorization.hpp:117
#define ARRAY_BOILERPLATE
Definition vectorization.hpp:103