40 const m256d exponentPart = _mm256_and_pd(v.
data(), exponentBits);
41 e->
data() = _mm256_sub_epi32(_mm256_srli_epi64(avx_cast<m256i>(exponentPart), 52),
_mm256_set1_epi32(0x3fe));
42 const m256d exponentMaximized = _mm256_or_pd(v.
data(), exponentBits);
43 double_v ret = _mm256_and_pd(exponentMaximized, _mm256_broadcast_sd(reinterpret_cast<const double *>(&c_general::frexpMask)));
51 const m256 exponentPart = _mm256_and_ps(v.data(), exponentBits);
52 e->data() = _mm256_sub_epi32(_mm256_srli_epi32(avx_cast<m256i>(exponentPart), 23),
_mm256_set1_epi32(0x7e));
53 const m256 exponentMaximized = _mm256_or_ps(v.data(), exponentBits);
61 const m256 exponentPart = _mm256_and_ps(v.
data(), exponentBits);
62 e->
data() = _mm_sub_epi16(_mm_packs_epi32(_mm_srli_epi32(avx_cast<m128i>(exponentPart), 23),
63 _mm_srli_epi32(avx_cast<m128i>(
hi128(exponentPart)), 23)), _mm_set1_epi16(0x7e));
64 const m256 exponentMaximized = _mm256_or_ps(v.
data(), exponentBits);
78 const m256i exponentBits = _mm256_slli_epi64(e.
data(), 52);
79 return avx_cast<
m256d>(_mm256_add_epi64(avx_cast<m256i>(v.
data()), exponentBits));
84 return (v.reinterpretCast<
int_v>() + (e << 23)).reinterpretCast<
float_v>();
90 const m256i exponentBits =
concat(_mm_unpacklo_epi16(_mm_setzero_si128(), e.data()),
91 _mm_unpackhi_epi16(_mm_setzero_si128(), e.data()));
111 #define VC__USE_NAMESPACE AVX
112 #include "../common/trigonometric.h"
113 #define VC__USE_NAMESPACE AVX
114 #include "../common/logarithm.h"
115 #define VC__USE_NAMESPACE AVX
116 #include "../common/exponential.h"
117 #undef VC__USE_NAMESPACE
119 #endif // VC_AVX_MATH_H
Vector< sfloat > sfloat_v
VECTOR_NAMESPACE::sfloat_v sfloat_v
double_v ldexp(double_v::AsArg v, int_v::AsArg _e)
static Vc_ALWAYS_INLINE float_v trunc(float_v::AsArg v)
static Vc_INTRINSIC_L T avx_cast(param128 v) Vc_INTRINSIC_R
Vc_INTRINSIC Vc_CONST m128 hi128(param256 v)
static Vc_ALWAYS_INLINE Vector< T >::Mask isfinite(const Vector< T > &x)
Vc_INTRINSIC_L void setZero() Vc_INTRINSIC_R
double_v frexp(double_v::AsArg v, int_v *e)
splits v into exponent and mantissa, the sign is kept with the mantissa
Vc_INTRINSIC Vc_CONST m256 concat(param128 a, param128 b)
static Vc_ALWAYS_INLINE float_v floor(float_v::AsArg v)
static Vc_ALWAYS_INLINE float_v ceil(float_v::AsArg v)
static Vc_INTRINSIC_L Vc_CONST_L Vector Zero() Vc_INTRINSIC_R Vc_CONST_R
VECTOR_NAMESPACE::int_v int_v
Vector< double > double_v
static Vc_ALWAYS_INLINE Vector< T >::Mask isnan(const Vector< T > &x)
static Vc_INTRINSIC m256i Vc_CONST _mm256_set1_epi32(int a)
VECTOR_NAMESPACE::float_v float_v
static Vc_ALWAYS_INLINE Vc_CONST M exponentMask()
Vc_ALWAYS_INLINE VectorType & data()