10 #ifndef EIGEN_COMPLEX_AVX512_H
11 #define EIGEN_COMPLEX_AVX512_H
14 #include "../../InternalHeaderCheck.h"
54 typedef std::complex<float>
type;
84 const __m512 mask = _mm512_castsi512_ps(_mm512_setr_epi32(
85 0x00000000, 0x80000000, 0x00000000, 0x80000000, 0x00000000, 0x80000000, 0x00000000, 0x80000000, 0x00000000,
86 0x80000000, 0x00000000, 0x80000000, 0x00000000, 0x80000000, 0x00000000, 0x80000000));
92 __m512 tmp2 = _mm512_mul_ps(_mm512_movehdup_ps(
a.v), _mm512_permute_ps(
b.v, _MM_SHUFFLE(2, 3, 0, 1)));
93 return Packet8cf(_mm512_fmaddsub_ps(_mm512_moveldup_ps(
a.v),
b.v, tmp2));
115 __m512 eq = pcmp_eq<Packet16f>(
a.v,
b.v);
132 return Packet8cf(_mm512_set_ps(im, re, im, re, im, re, im, re, im, re, im, re, im, re, im, re));
162 pscatter((
double*)(
void*)to, _mm512_castps_pd(from.v), stride);
172 return Packet8cf(_mm512_castsi512_ps(_mm512_permutexvar_epi64(
173 _mm512_set_epi32(0, 0, 0, 1, 0, 2, 0, 3, 0, 4, 0, 5, 0, 6, 0, 7), _mm512_castps_si512(
a.v))));
188 __m256 lane0 = extract256<0>(
a.v);
189 __m256 lane1 = extract256<1>(
a.v);
190 __m256
res = _mm256_add_ps(lane0, lane1);
203 return Packet8cf(_mm512_shuffle_ps(
x.v,
x.v, _MM_SHUFFLE(2, 3, 0, 1)));
239 typedef std::complex<double>
type;
265 const __m512d mask = _mm512_castsi512_pd(_mm512_set_epi32(0x80000000, 0x0, 0x0, 0x0, 0x80000000, 0x0, 0x0, 0x0,
266 0x80000000, 0x0, 0x0, 0x0, 0x80000000, 0x0, 0x0, 0x0));
272 __m512d tmp1 = _mm512_shuffle_pd(
a.v,
a.v, 0x0);
273 __m512d tmp2 = _mm512_shuffle_pd(
a.v,
a.v, 0xFF);
274 __m512d tmp3 = _mm512_shuffle_pd(
b.v,
b.v, 0x55);
275 __m512d odd = _mm512_mul_pd(tmp2, tmp3);
276 return Packet4cd(_mm512_fmaddsub_pd(tmp1,
b.v, odd));
302 __m512d eq = pcmp_eq<Packet8d>(
a.v,
b.v);
339 _mm512_castpd256_pd512(_mm256_insertf128_pd(_mm256_castpd128_pd256(
ploadu<Packet1cd>(from + 0 * stride).
v),
349 __m512i fromi = _mm512_castpd_si512(from.v);
350 double* tod = (
double*)(
void*)to;
351 _mm_storeu_pd(tod + 0 * stride, _mm_castsi128_pd(_mm512_extracti32x4_epi32(fromi, 0)));
352 _mm_storeu_pd(tod + 2 * stride, _mm_castsi128_pd(_mm512_extracti32x4_epi32(fromi, 1)));
353 _mm_storeu_pd(tod + 4 * stride, _mm_castsi128_pd(_mm512_extracti32x4_epi32(fromi, 2)));
354 _mm_storeu_pd(tod + 6 * stride, _mm_castsi128_pd(_mm512_extracti32x4_epi32(fromi, 3)));
359 __m128d low = extract128<0>(
a.v);
361 _mm_store_pd(
res, low);
362 return std::complex<double>(
res[0],
res[1]);
389 return Packet4cd(_mm512_permute_pd(
x.v, 0x55));
395 pb.packet[0] = _mm512_castps_pd(kernel.
packet[0].v);
396 pb.packet[1] = _mm512_castps_pd(kernel.
packet[1].v);
397 pb.packet[2] = _mm512_castps_pd(kernel.
packet[2].v);
398 pb.packet[3] = _mm512_castps_pd(kernel.
packet[3].v);
400 kernel.
packet[0].v = _mm512_castpd_ps(
pb.packet[0]);
401 kernel.
packet[1].v = _mm512_castpd_ps(
pb.packet[1]);
402 kernel.
packet[2].v = _mm512_castpd_ps(
pb.packet[2]);
403 kernel.
packet[3].v = _mm512_castpd_ps(
pb.packet[3]);
409 pb.packet[0] = _mm512_castps_pd(kernel.
packet[0].v);
410 pb.packet[1] = _mm512_castps_pd(kernel.
packet[1].v);
411 pb.packet[2] = _mm512_castps_pd(kernel.
packet[2].v);
412 pb.packet[3] = _mm512_castps_pd(kernel.
packet[3].v);
413 pb.packet[4] = _mm512_castps_pd(kernel.
packet[4].v);
414 pb.packet[5] = _mm512_castps_pd(kernel.
packet[5].v);
415 pb.packet[6] = _mm512_castps_pd(kernel.
packet[6].v);
416 pb.packet[7] = _mm512_castps_pd(kernel.
packet[7].v);
418 kernel.
packet[0].v = _mm512_castpd_ps(
pb.packet[0]);
419 kernel.
packet[1].v = _mm512_castpd_ps(
pb.packet[1]);
420 kernel.
packet[2].v = _mm512_castpd_ps(
pb.packet[2]);
421 kernel.
packet[3].v = _mm512_castpd_ps(
pb.packet[3]);
422 kernel.
packet[4].v = _mm512_castpd_ps(
pb.packet[4]);
423 kernel.
packet[5].v = _mm512_castpd_ps(
pb.packet[5]);
424 kernel.
packet[6].v = _mm512_castpd_ps(
pb.packet[6]);
425 kernel.
packet[7].v = _mm512_castpd_ps(
pb.packet[7]);
446 return psqrt_complex<Packet4cd>(
a);
451 return psqrt_complex<Packet8cf>(
a);
456 return plog_complex<Packet4cd>(
a);
461 return plog_complex<Packet8cf>(
a);
466 return pexp_complex<Packet8cf>(
a);
AnnoyingScalar imag(const AnnoyingScalar &)
Definition: AnnoyingScalar.h:132
Array< int, Dynamic, 1 > v
Definition: Array_initializer_list_vector_cxx11.cpp:1
#define EIGEN_MAKE_CONJ_HELPER_CPLX_REAL(PACKET_CPLX, PACKET_REAL)
Definition: ConjHelper.h:14
#define EIGEN_DEBUG_ALIGNED_STORE
Definition: GenericPacketMath.h:38
#define EIGEN_DEBUG_ALIGNED_LOAD
Definition: GenericPacketMath.h:30
#define EIGEN_DEBUG_UNALIGNED_STORE
Definition: GenericPacketMath.h:42
#define EIGEN_DEBUG_UNALIGNED_LOAD
Definition: GenericPacketMath.h:34
#define EIGEN_DEVICE_FUNC
Definition: Macros.h:892
#define EIGEN_STRONG_INLINE
Definition: Macros.h:834
cout<< "Here is the matrix m:"<< endl<< m<< endl;Matrix< ptrdiff_t, 3, 1 > res
Definition: PartialRedux_count.cpp:3
Scalar * b
Definition: benchVecAdd.cpp:17
float real
Definition: datatypes.h:10
const Scalar * a
Definition: level2_cplx_impl.h:32
const char const int const int const RealScalar const RealScalar const int const RealScalar * pb
Definition: level2_impl.h:28
EIGEN_STRONG_INLINE std::complex< float > pfirst< Packet8cf >(const Packet8cf &a)
Definition: AVX512/Complex.h:166
EIGEN_STRONG_INLINE Packet8cf ploaddup< Packet8cf >(const std::complex< float > *from)
Definition: AVX512/Complex.h:136
EIGEN_STRONG_INLINE Packet4cd plog< Packet4cd >(const Packet4cd &a)
Definition: AVX512/Complex.h:455
EIGEN_STRONG_INLINE Packet2cf pconj(const Packet2cf &a)
Definition: AltiVec/Complex.h:268
EIGEN_STRONG_INLINE Packet8d pload< Packet8d >(const double *from)
Definition: AVX512/PacketMath.h:973
EIGEN_STRONG_INLINE Packet8cf psqrt< Packet8cf >(const Packet8cf &a)
Definition: AVX512/Complex.h:450
EIGEN_STRONG_INLINE Packet8d ploadquad< Packet8d >(const double *from)
Definition: AVX512/PacketMath.h:1065
EIGEN_STRONG_INLINE Packet8d ploadu< Packet8d >(const double *from)
Definition: AVX512/PacketMath.h:990
EIGEN_DEVICE_FUNC Packet padd(const Packet &a, const Packet &b)
Definition: GenericPacketMath.h:318
EIGEN_STRONG_INLINE Packet8cf por< Packet8cf >(const Packet8cf &a, const Packet8cf &b)
Definition: AVX512/Complex.h:101
EIGEN_STRONG_INLINE Packet8cf pand< Packet8cf >(const Packet8cf &a, const Packet8cf &b)
Definition: AVX512/Complex.h:97
EIGEN_DEVICE_FUNC Packet8d pgather< double, Packet8d >(const Packet8d &src, const double *from, Index stride, uint8_t umask)
Definition: AVX512/PacketMath.h:1151
EIGEN_STRONG_INLINE std::complex< double > pfirst< Packet4cd >(const Packet4cd &a)
Definition: AVX512/Complex.h:358
EIGEN_STRONG_INLINE Packet8cf ploadquad< Packet8cf >(const std::complex< float > *from)
Definition: AVX512/Complex.h:140
EIGEN_STRONG_INLINE std::complex< double > predux< Packet4cd >(const Packet4cd &a)
Definition: AVX512/Complex.h:371
EIGEN_STRONG_INLINE Packet2cd ploaddup< Packet2cd >(const std::complex< double > *from)
Definition: AVX/Complex.h:345
EIGEN_STRONG_INLINE Packet4cd pcplxflip< Packet4cd >(const Packet4cd &x)
Definition: AVX512/Complex.h:388
EIGEN_STRONG_INLINE std::complex< double > predux_mul< Packet4cd >(const Packet4cd &a)
Definition: AVX512/Complex.h:376
EIGEN_STRONG_INLINE Packet8cf pmul< Packet8cf >(const Packet8cf &a, const Packet8cf &b)
Definition: AVX512/Complex.h:91
EIGEN_STRONG_INLINE void ptranspose(PacketBlock< Packet2cf, 2 > &kernel)
Definition: AltiVec/Complex.h:339
EIGEN_STRONG_INLINE Packet4cd pandnot< Packet4cd >(const Packet4cd &a, const Packet4cd &b)
Definition: AVX512/Complex.h:296
__m512d Packet8d
Definition: AVX512/PacketMath.h:36
EIGEN_STRONG_INLINE Packet16f ploadu< Packet16f >(const float *from)
Definition: AVX512/PacketMath.h:986
EIGEN_STRONG_INLINE Packet4cd pset1< Packet4cd >(const std::complex< double > &from)
Definition: AVX512/Complex.h:316
EIGEN_STRONG_INLINE Packet4cd por< Packet4cd >(const Packet4cd &a, const Packet4cd &b)
Definition: AVX512/Complex.h:288
EIGEN_STRONG_INLINE Packet8cf pandnot< Packet8cf >(const Packet8cf &a, const Packet8cf &b)
Definition: AVX512/Complex.h:109
EIGEN_STRONG_INLINE Packet1cd ploadu< Packet1cd >(const std::complex< double > *from)
Definition: LSX/Complex.h:373
EIGEN_STRONG_INLINE Packet8h por(const Packet8h &a, const Packet8h &b)
Definition: AVX/PacketMath.h:2309
EIGEN_STRONG_INLINE Packet2cf preverse(const Packet2cf &a)
Definition: AltiVec/Complex.h:303
EIGEN_STRONG_INLINE Packet4cd pand< Packet4cd >(const Packet4cd &a, const Packet4cd &b)
Definition: AVX512/Complex.h:284
EIGEN_STRONG_INLINE Packet4cf pmul(const Packet4cf &a, const Packet4cf &b)
Definition: AVX/Complex.h:88
EIGEN_STRONG_INLINE Packet8d ploaddup< Packet8d >(const double *from)
Definition: AVX512/PacketMath.h:1028
EIGEN_STRONG_INLINE std::complex< float > predux_mul< Packet8cf >(const Packet8cf &a)
Definition: AVX512/Complex.h:182
EIGEN_STRONG_INLINE Packet8h ptrue(const Packet8h &a)
Definition: AVX/PacketMath.h:2263
EIGEN_STRONG_INLINE Packet8h pandnot(const Packet8h &a, const Packet8h &b)
Definition: AVX/PacketMath.h:2323
EIGEN_DEFINE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS Packet pdiv_complex(const Packet &x, const Packet &y)
Definition: GenericPacketMathFunctions.h:1318
EIGEN_STRONG_INLINE Packet2cf pnegate(const Packet2cf &a)
Definition: AltiVec/Complex.h:264
EIGEN_STRONG_INLINE Packet8cf pdiv< Packet8cf >(const Packet8cf &a, const Packet8cf &b)
Definition: AVX512/Complex.h:197
EIGEN_STRONG_INLINE Packet4cd ptrue< Packet4cd >(const Packet4cd &a)
Definition: AVX512/Complex.h:280
EIGEN_STRONG_INLINE Packet4cd padd< Packet4cd >(const Packet4cd &a, const Packet4cd &b)
Definition: AVX512/Complex.h:252
EIGEN_STRONG_INLINE Packet8cf pxor< Packet8cf >(const Packet8cf &a, const Packet8cf &b)
Definition: AVX512/Complex.h:105
EIGEN_STRONG_INLINE Packet4cd ploadu< Packet4cd >(const std::complex< double > *from)
Definition: AVX512/Complex.h:311
EIGEN_STRONG_INLINE std::complex< float > predux< Packet8cf >(const Packet8cf &a)
Definition: AVX512/Complex.h:177
EIGEN_STRONG_INLINE Packet8cf pcplxflip< Packet8cf >(const Packet8cf &x)
Definition: AVX512/Complex.h:202
EIGEN_STRONG_INLINE Packet4cf predux_half_dowto4< Packet8cf >(const Packet8cf &a)
Definition: AVX512/Complex.h:187
EIGEN_STRONG_INLINE Packet8cf ptrue< Packet8cf >(const Packet8cf &a)
Definition: AVX512/Complex.h:67
EIGEN_STRONG_INLINE Packet16f pload< Packet16f >(const float *from)
Definition: AVX512/PacketMath.h:969
EIGEN_STRONG_INLINE bfloat16 pfirst(const Packet8bf &a)
Definition: AltiVec/PacketMath.h:2418
EIGEN_STRONG_INLINE Packet8cf pload< Packet8cf >(const std::complex< float > *from)
Definition: AVX512/Complex.h:120
EIGEN_STRONG_INLINE Packet8cf psub< Packet8cf >(const Packet8cf &a, const Packet8cf &b)
Definition: AVX512/Complex.h:75
EIGEN_STRONG_INLINE Packet4cd pload< Packet4cd >(const std::complex< double > *from)
Definition: AVX512/Complex.h:307
EIGEN_DEVICE_FUNC void pscatter(Scalar *to, const Packet &from, Index stride, typename unpacket_traits< Packet >::mask_t umask)
EIGEN_DEVICE_FUNC void pstore(Scalar *to, const Packet &from)
Definition: GenericPacketMath.h:891
EIGEN_DEVICE_FUNC unpacket_traits< Packet >::type predux(const Packet &a)
Definition: GenericPacketMath.h:1232
EIGEN_STRONG_INLINE Packet2cf pcmp_eq(const Packet2cf &a, const Packet2cf &b)
Definition: AltiVec/Complex.h:353
EIGEN_DEVICE_FUNC void pstoreu(Scalar *to, const Packet &from)
Definition: GenericPacketMath.h:911
EIGEN_STRONG_INLINE Packet8h pand(const Packet8h &a, const Packet8h &b)
Definition: AVX/PacketMath.h:2319
EIGEN_STRONG_INLINE Packet4cd pxor< Packet4cd >(const Packet4cd &a, const Packet4cd &b)
Definition: AVX512/Complex.h:292
EIGEN_STRONG_INLINE Packet8h pxor(const Packet8h &a, const Packet8h &b)
Definition: AVX/PacketMath.h:2315
EIGEN_STRONG_INLINE Packet8cf ploadu< Packet8cf >(const std::complex< float > *from)
Definition: AVX512/Complex.h:124
EIGEN_STRONG_INLINE Packet8cf pset1< Packet8cf >(const std::complex< float > &from)
Definition: AVX512/Complex.h:129
EIGEN_STRONG_INLINE Packet4cd psub< Packet4cd >(const Packet4cd &a, const Packet4cd &b)
Definition: AVX512/Complex.h:256
EIGEN_STRONG_INLINE Packet8cf pexp< Packet8cf >(const Packet8cf &a)
Definition: AVX512/Complex.h:465
EIGEN_STRONG_INLINE Packet8cf padd< Packet8cf >(const Packet8cf &a, const Packet8cf &b)
Definition: AVX512/Complex.h:71
EIGEN_STRONG_INLINE Packet8cf plog< Packet8cf >(const Packet8cf &a)
Definition: AVX512/Complex.h:460
EIGEN_STRONG_INLINE Packet1cd pset1< Packet1cd >(const std::complex< double > &from)
Definition: LSX/Complex.h:378
EIGEN_STRONG_INLINE Packet4cd pmul< Packet4cd >(const Packet4cd &a, const Packet4cd &b)
Definition: AVX512/Complex.h:271
EIGEN_STRONG_INLINE Packet4cd pdiv< Packet4cd >(const Packet4cd &a, const Packet4cd &b)
Definition: AVX512/Complex.h:383
EIGEN_STRONG_INLINE Packet4cd psqrt< Packet4cd >(const Packet4cd &a)
Definition: AVX512/Complex.h:445
__m512 Packet16f
Definition: AVX512/PacketMath.h:34
EIGEN_STRONG_INLINE Packet4cd ploaddup< Packet4cd >(const std::complex< double > *from)
Definition: AVX512/Complex.h:321
EIGEN_DEVICE_FUNC unpacket_traits< Packet >::type predux_mul(const Packet &a)
Definition: GenericPacketMath.h:1238
EIGEN_DEVICE_FUNC internal::add_const_on_value_type_t< EIGEN_MATHFUNC_RETVAL(real_ref, Scalar)> real_ref(const Scalar &x)
Definition: MathFunctions.h:1051
Namespace containing all symbols from the Eigen library.
Definition: bench_norm.cpp:70
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
Definition: Meta.h:83
Definition: Eigen_Colamd.h:49
list x
Definition: plotDoE.py:28
Definition: AVX/Complex.h:225
Definition: AltiVec/Complex.h:38
Definition: AVX512/Complex.h:207
__m512d v
Definition: AVX512/Complex.h:210
EIGEN_STRONG_INLINE Packet4cd()
Definition: AVX512/Complex.h:208
EIGEN_STRONG_INLINE Packet4cd(const __m512d &a)
Definition: AVX512/Complex.h:209
Definition: AVX/Complex.h:21
Definition: AVX512/Complex.h:21
__m512 v
Definition: AVX512/Complex.h:24
EIGEN_STRONG_INLINE Packet8cf()
Definition: AVX512/Complex.h:22
EIGEN_STRONG_INLINE Packet8cf(const __m512 &a)
Definition: AVX512/Complex.h:23
Definition: GenericPacketMath.h:1407
Packet packet[N]
Definition: GenericPacketMath.h:1408
Definition: GenericPacketMath.h:45
@ HasExp
Definition: GenericPacketMath.h:75
@ HasSqrt
Definition: GenericPacketMath.h:73
@ HasLog
Definition: GenericPacketMath.h:77
@ HasDiv
Definition: GenericPacketMath.h:71
Packet2cd half
Definition: AVX512/Complex.h:216
Packet4cd type
Definition: AVX512/Complex.h:215
Packet8cf type
Definition: AVX512/Complex.h:29
Packet4cf half
Definition: AVX512/Complex.h:30
Definition: GenericPacketMath.h:108
@ size
Definition: GenericPacketMath.h:113
@ AlignedOnScalar
Definition: GenericPacketMath.h:114
@ Vectorizable
Definition: GenericPacketMath.h:112
@ HasSub
Definition: GenericPacketMath.h:118
@ HasMax
Definition: GenericPacketMath.h:124
@ HasNegate
Definition: GenericPacketMath.h:120
@ HasMul
Definition: GenericPacketMath.h:119
@ HasAdd
Definition: GenericPacketMath.h:117
@ HasSetLinear
Definition: GenericPacketMath.h:126
@ HasMin
Definition: GenericPacketMath.h:123
@ HasAbs2
Definition: GenericPacketMath.h:122
@ HasAbs
Definition: GenericPacketMath.h:121
Definition: SSE/PacketMath.h:90
Packet8d as_real
Definition: AVX512/Complex.h:241
Packet2cd half
Definition: AVX512/Complex.h:240
std::complex< double > type
Definition: AVX512/Complex.h:239
Packet16f as_real
Definition: AVX512/Complex.h:56
std::complex< float > type
Definition: AVX512/Complex.h:54
Packet4cf half
Definition: AVX512/Complex.h:55
Definition: GenericPacketMath.h:134
@ masked_load_available
Definition: GenericPacketMath.h:142
@ size
Definition: GenericPacketMath.h:139
@ masked_store_available
Definition: GenericPacketMath.h:143
@ vectorizable
Definition: GenericPacketMath.h:141
@ alignment
Definition: GenericPacketMath.h:140
Definition: datatypes.h:12