2#ifndef VECCORE_UMESIMDCOMMON_H
3#define VECCORE_UMESIMDCOMMON_H
11 using MaskType =
typename UME::SIMD::SIMDVecMask<N>;
14 static constexpr size_t Size = N;
17template <
typename T, u
int32_t N>
20 using MaskType =
typename UME::SIMD::SIMDVecMask<N>;
21 using IndexType =
typename UME::SIMD::SIMDVec_u<uint32_t, N>;
22 static constexpr size_t Size = N;
25template <
typename T, u
int32_t N>
28 using MaskType =
typename UME::SIMD::SIMDVecMask<N>;
29 using IndexType =
typename UME::SIMD::SIMDVec_u<uint32_t, N>;
30 static constexpr size_t Size = N;
33template <
typename T, u
int32_t N>
36 using MaskType =
typename UME::SIMD::SIMDVecMask<N>;
37 using IndexType =
typename UME::SIMD::SIMDVec_u<uint32_t, N>;
38 static constexpr size_t Size = N;
45bool MaskFull(
const UME::SIMD::SIMDVecMask<N> &cond)
52bool MaskEmpty(
const UME::SIMD::SIMDVecMask<N> &cond)
59 using M = UME::SIMD::SIMDVecMask<N>;
69template <
typename T, u
int32_t N>
71 using V = UME::SIMD::SIMDVec_f<T, N>;
73 template <
typename S = Scalar<V>>
74 static inline void Load(
V &v, S
const *ptr)
79 template <
typename S = Scalar<V>>
80 static inline void Store(
V const &v, S *ptr)
86template <
typename T, u
int32_t N>
88 using V = UME::SIMD::SIMDVec_i<T, N>;
90 template <
typename S = Scalar<V>>
91 static inline void Load(
V &v, S
const *ptr)
96 template <
typename S = Scalar<V>>
97 static inline void Store(
V const &v, S *ptr)
103template <
typename T, u
int32_t N>
105 using V = UME::SIMD::SIMDVec_u<T, N>;
107 template <
typename S = Scalar<V>>
108 static inline void Load(
V &v, S
const *ptr)
113 template <
typename S = Scalar<V>>
114 static inline void Store(
V const &v, S *ptr)
122 using M = UME::SIMD::SIMDVecMask<N>;
124 template <
typename S = Scalar<M>>
125 static inline void Load(
M &mask, S
const *ptr)
130 template <
typename S = Scalar<M>>
131 static inline void Store(
M const &mask, S *ptr)
137template <
typename T, u
int32_t N>
139 using V = UME::SIMD::SIMDVec_f<T, N>;
140 using M = UME::SIMD::SIMDVecMask<N>;
142 static inline void Assign(
V &dst,
M const &mask,
V const &src) { dst.assign(mask, src); }
144 static inline void Blend(
V &dst,
M const &mask,
V const &src1,
V const &src2) { dst = src2.blend(mask, src1); }
147template <
typename T, u
int32_t N>
149 using V = UME::SIMD::SIMDVec_i<T, N>;
150 using M = UME::SIMD::SIMDVecMask<N>;
152 static inline void Assign(
V &dst,
M const &mask,
V const &src) { dst.assign(mask, src); }
154 static inline void Blend(
V &dst,
M const &mask,
V const &src1,
V const &src2) { dst = src2.blend(mask, src1); }
157template <
typename T, u
int32_t N>
159 using V = UME::SIMD::SIMDVec_u<T, N>;
160 using M = UME::SIMD::SIMDVecMask<N>;
162 static inline void Assign(
V &dst,
M const &mask,
V const &src) { dst.assign(mask, src); }
164 static inline void Blend(
V &dst,
M const &mask,
V const &src1,
V const &src2) { dst = src2.blend(mask, src1); }
167inline namespace math {
169template <
typename T, u
int32_t N>
171void SinCos(
const UME::SIMD::SIMDVec_f<T, N> &x, UME::SIMD::SIMDVec_f<T, N> *s, UME::SIMD::SIMDVec_f<T, N> *c)
177#define UMESIMD_MATH_UNARY_FUNCTION(F, f) \
178template <typename T, uint32_t N> \
179VECCORE_FORCE_INLINE \
180typename UME::SIMD::SIMDVec_f<T, N> \
181F(const UME::SIMD::SIMDVec_f<T, N> &x) \
200#undef UMESIMD_MATH_UNARY_FUNCTION
202template <
typename T, u
int32_t N>
204UME::SIMD::SIMDVecMask<N>
IsInf(
const UME::SIMD::SIMDVec_f<T, N> &x)
#define VECCORE_ATT_HOST_DEVICE
#define VECCORE_FORCE_INLINE
#define UMESIMD_MATH_UNARY_FUNCTION(F, f)
VECCORE_FORCE_INLINE void SinCos(const UME::SIMD::SIMDVec_f< T, N > &x, UME::SIMD::SIMDVec_f< T, N > *s, UME::SIMD::SIMDVec_f< T, N > *c)
VECCORE_FORCE_INLINE UME::SIMD::SIMDVecMask< N > IsInf(const UME::SIMD::SIMDVec_f< T, N > &x)
VECCORE_FORCE_INLINE Vc::SimdArray< T, N > Tan(const Vc::SimdArray< T, N > &x)
VECCORE_ATT_HOST_DEVICE bool MaskEmpty(const M &mask)
VECCORE_ATT_HOST_DEVICE bool MaskFull(const M &mask)
VECCORE_FORCE_INLINE static VECCORE_ATT_HOST_DEVICE void Set(M &mask, int i, const bool val)
VECCORE_FORCE_INLINE static VECCORE_ATT_HOST_DEVICE bool Get(const M &mask, int i)
UME::SIMD::SIMDVecMask< N > M
UME::SIMD::SIMDVecMask< N > M
static void Load(M &mask, S const *ptr)
static void Store(M const &mask, S *ptr)
UME::SIMD::SIMDVec_f< T, N > V
static void Load(V &v, S const *ptr)
static void Store(V const &v, S *ptr)
UME::SIMD::SIMDVec_i< T, N > V
static void Store(V const &v, S *ptr)
static void Load(V &v, S const *ptr)
UME::SIMD::SIMDVec_u< T, N > V
static void Store(V const &v, S *ptr)
static void Load(V &v, S const *ptr)
UME::SIMD::SIMDVec_f< T, N > V
UME::SIMD::SIMDVecMask< N > M
static void Assign(V &dst, M const &mask, V const &src)
static void Blend(V &dst, M const &mask, V const &src1, V const &src2)
static void Assign(V &dst, M const &mask, V const &src)
UME::SIMD::SIMDVec_i< T, N > V
static void Blend(V &dst, M const &mask, V const &src1, V const &src2)
UME::SIMD::SIMDVecMask< N > M
static void Assign(V &dst, M const &mask, V const &src)
static void Blend(V &dst, M const &mask, V const &src1, V const &src2)
UME::SIMD::SIMDVec_u< T, N > V
UME::SIMD::SIMDVecMask< N > M
typename UME::SIMD::SIMDVecMask< N > MaskType
typename UME::SIMD::SIMDVec_u< uint32_t, N > IndexType
typename UME::SIMD::SIMDVecMask< N > MaskType
typename UME::SIMD::SIMDVecMask< N > MaskType
typename UME::SIMD::SIMDVec_u< uint32_t, N > IndexType
typename UME::SIMD::SIMDVec_u< uint32_t, N > IndexType
typename UME::SIMD::SIMDVecMask< N > MaskType
static constexpr size_t Size