13 #ifndef EIGEN_COMPLEX_MSA_H
14 #define EIGEN_COMPLEX_MSA_H
19 #include "../../InternalHeaderCheck.h"
45 v1 = (
Packet4f)__builtin_msa_ilvev_w((v4i32)
v, (v4i32)
v);
47 v2 = (
Packet4f)__builtin_msa_ilvod_w((v4i32)
v, (v4i32)
v);
82 os <<
"[ (" <<
value.v[0] <<
", " <<
value.v[1]
90 struct packet_traits<std::
complex<float> > : default_packet_traits {
113 struct unpacket_traits<Packet2cf> {
114 typedef std::complex<float>
type;
129 float f0 = from.real(),
f1 = from.imag();
160 return a.conjugate();
174 return Packet2cf(
pand(
a.v,
b.v));
181 return Packet2cf(
por(
a.v,
b.v));
188 return Packet2cf(
pxor(
a.v,
b.v));
220 EIGEN_STRONG_INLINE void pstore<std::complex<float> >(std::complex<float>* to,
const Packet2cf& from) {
227 EIGEN_STRONG_INLINE void pstoreu<std::complex<float> >(std::complex<float>* to,
const Packet2cf& from) {
234 EIGEN_DEVICE_FUNC inline Packet2cf pgather<std::complex<float>, Packet2cf>(
const std::complex<float>* from,
238 return Packet2cf(from[0 * stride], from[1 * stride]);
242 EIGEN_DEVICE_FUNC inline void pscatter<std::complex<float>, Packet2cf>(std::complex<float>* to,
const Packet2cf& from,
246 *to = std::complex<float>(from.v[0], from.v[1]);
248 *to = std::complex<float>(from.v[2], from.v[3]);
255 prefetch(
reinterpret_cast<const float*
>(addr));
262 return std::complex<float>(
a.v[0],
a.v[1]);
285 return std::complex<float>(
value[0],
value[1]);
292 return std::complex<float>((
a.v[0] *
a.v[2]) - (
a.v[1] *
a.v[3]), (
a.v[0] *
a.v[3]) + (
a.v[1] *
a.v[2]));
305 os <<
"[ " <<
value.packet[0] <<
", " << std::endl <<
" " <<
value.packet[1] <<
" ]";
312 Packet4f tmp = (
Packet4f)__builtin_msa_ilvl_d((v2i64)kernel.packet[1].v, (v2i64)kernel.packet[0].v);
313 kernel.
packet[0].v = (
Packet4f)__builtin_msa_ilvr_d((v2i64)kernel.packet[1].v, (v2i64)kernel.packet[0].v);
314 kernel.packet[1].v =
tmp;
338 static const v2u64 p2ul_CONJ_XOR = {0x0, 0x8000000000000000};
345 v1 = (
Packet2d)__builtin_msa_ilvev_d((v2i64)
v, (v2i64)
v);
347 v2 = (
Packet2d)__builtin_msa_ilvod_d((v2i64)
v, (v2i64)
v);
372 *
this *=
b.conjugate();
374 s =
padd(
s, preverse<Packet2d>(
s));
385 os <<
"[ (" <<
value.v[0] <<
", " <<
value.v[1] <<
"i) ]";
390 struct packet_traits<std::
complex<double> > : default_packet_traits {
412 struct unpacket_traits<Packet1cd> {
413 typedef std::complex<double>
type;
442 return Packet1cd(from);
470 return a.conjugate();
484 return Packet1cd(
pand(
a.v,
b.v));
491 return Packet1cd(
por(
a.v,
b.v));
498 return Packet1cd(
pxor(
a.v,
b.v));
516 EIGEN_STRONG_INLINE void pstore<std::complex<double> >(std::complex<double>* to,
const Packet1cd& from) {
523 EIGEN_STRONG_INLINE void pstoreu<std::complex<double> >(std::complex<double>* to,
const Packet1cd& from) {
530 EIGEN_STRONG_INLINE void prefetch<std::complex<double> >(
const std::complex<double>* addr) {
533 prefetch(
reinterpret_cast<const double*
>(addr));
559 return std::complex<double>(
a.v[0],
a.v[1]);
599 os <<
"[ " <<
value.packet[0] <<
", " << std::endl <<
" " <<
value.packet[1] <<
" ]";
608 v1 = (
Packet2d)__builtin_msa_ilvev_d((v2i64)kernel.packet[0].v, (v2i64)kernel.packet[1].v);
610 v2 = (
Packet2d)__builtin_msa_ilvod_d((v2i64)kernel.packet[0].v, (v2i64)kernel.packet[1].v);
612 kernel.packet[0].v =
v1;
613 kernel.packet[1].v =
v2;
AnnoyingScalar imag(const AnnoyingScalar &)
Definition: AnnoyingScalar.h:132
#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_MSA_SHF_I8(a, b, c, d)
Definition: MSA/PacketMath.h:51
#define EIGEN_MSA_DEBUG
Definition: MSA/PacketMath.h:48
#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
Map< RowVectorXf > v2(M2.data(), M2.size())
M1<< 1, 2, 3, 4, 5, 6, 7, 8, 9;Map< RowVectorXf > v1(M1.data(), M1.size())
Scalar * b
Definition: benchVecAdd.cpp:17
EIGEN_STRONG_INLINE PacketScalar packet(Index rowId, Index colId) const
Definition: PlainObjectBase.h:247
float real
Definition: datatypes.h:10
@ Aligned16
Definition: Constants.h:237
RealScalar s
Definition: level1_cplx_impl.h:130
const Scalar * a
Definition: level2_cplx_impl.h:32
Eigen::Matrix< Scalar, Dynamic, Dynamic, ColMajor > tmp
Definition: level3_impl.h:365
std::ostream & operator<<(std::ostream &s, const Packet16c &v)
Definition: AltiVec/PacketMath.h:427
__m128d Packet2d
Definition: LSX/PacketMath.h:36
EIGEN_STRONG_INLINE void pstoreu< double >(double *to, const Packet4d &from)
Definition: AVX/PacketMath.h:1628
EIGEN_STRONG_INLINE Packet2cf pconj(const Packet2cf &a)
Definition: AltiVec/Complex.h:268
EIGEN_STRONG_INLINE std::complex< float > predux_mul< Packet2cf >(const Packet2cf &a)
Definition: AltiVec/Complex.h:318
EIGEN_STRONG_INLINE std::complex< float > predux< Packet2cf >(const Packet2cf &a)
Definition: AltiVec/Complex.h:310
EIGEN_DEVICE_FUNC Packet padd(const Packet &a, const Packet &b)
Definition: GenericPacketMath.h:318
__vector int Packet4i
Definition: AltiVec/PacketMath.h:34
EIGEN_STRONG_INLINE std::complex< double > predux_mul< Packet1cd >(const Packet1cd &a)
Definition: LSX/Complex.h:420
EIGEN_STRONG_INLINE Packet2cf pandnot< Packet2cf >(const Packet2cf &a, const Packet2cf &b)
Definition: AltiVec/Complex.h:285
EIGEN_STRONG_INLINE void ptranspose(PacketBlock< Packet2cf, 2 > &kernel)
Definition: AltiVec/Complex.h:339
EIGEN_STRONG_INLINE Packet2cf ploaddup< Packet2cf >(const std::complex< float > *from)
Definition: AltiVec/Complex.h:162
EIGEN_DEVICE_FUNC Packet pdiv(const Packet &a, const Packet &b)
Definition: GenericPacketMath.h:368
EIGEN_STRONG_INLINE Packet2cf pmul< Packet2cf >(const Packet2cf &a, const Packet2cf &b)
Definition: LSX/Complex.h:95
EIGEN_DEVICE_FUNC void prefetch(const Scalar *addr)
Definition: GenericPacketMath.h:967
EIGEN_STRONG_INLINE Packet4i pblend(const Selector< 4 > &ifPacket, const Packet4i &thenPacket, const Packet4i &elsePacket)
Definition: AltiVec/PacketMath.h:3075
EIGEN_STRONG_INLINE Packet1cd pmul< Packet1cd >(const Packet1cd &a, const Packet1cd &b)
Definition: LSX/Complex.h:327
EIGEN_STRONG_INLINE std::complex< float > pfirst< Packet2cf >(const Packet2cf &a)
Definition: AltiVec/Complex.h:295
EIGEN_STRONG_INLINE Packet4f pload< Packet4f >(const float *from)
Definition: AltiVec/PacketMath.h:492
EIGEN_STRONG_INLINE Packet1cd ploadu< Packet1cd >(const std::complex< double > *from)
Definition: LSX/Complex.h:373
EIGEN_STRONG_INLINE Packet2cf por< Packet2cf >(const Packet2cf &a, const Packet2cf &b)
Definition: AltiVec/Complex.h:277
EIGEN_STRONG_INLINE Packet8h por(const Packet8h &a, const Packet8h &b)
Definition: AVX/PacketMath.h:2309
EIGEN_STRONG_INLINE Packet2cf pset1< Packet2cf >(const std::complex< float > &from)
Definition: AltiVec/Complex.h:125
EIGEN_STRONG_INLINE Packet2cf preverse(const Packet2cf &a)
Definition: AltiVec/Complex.h:303
EIGEN_STRONG_INLINE void pstore< double >(double *to, const Packet4d &from)
Definition: AVX/PacketMath.h:1611
EIGEN_STRONG_INLINE Packet2cf pcplxflip(const Packet2cf &x)
Definition: LSX/Complex.h:218
EIGEN_STRONG_INLINE Packet4cf pmul(const Packet4cf &a, const Packet4cf &b)
Definition: AVX/Complex.h:88
EIGEN_STRONG_INLINE Packet8h pandnot(const Packet8h &a, const Packet8h &b)
Definition: AVX/PacketMath.h:2323
EIGEN_STRONG_INLINE Packet2d pload< Packet2d >(const double *from)
Definition: LSX/PacketMath.h:1407
EIGEN_STRONG_INLINE Packet2d pmul< Packet2d >(const Packet2d &a, const Packet2d &b)
Definition: LSX/PacketMath.h:741
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 Packet1cd pxor< Packet1cd >(const Packet1cd &a, const Packet1cd &b)
Definition: LSX/Complex.h:355
EIGEN_STRONG_INLINE Packet2cf pdiv< Packet2cf >(const Packet2cf &a, const Packet2cf &b)
Definition: AltiVec/Complex.h:330
EIGEN_STRONG_INLINE Packet1cd padd< Packet1cd >(const Packet1cd &a, const Packet1cd &b)
Definition: LSX/Complex.h:305
EIGEN_STRONG_INLINE Packet2cf ploadu< Packet2cf >(const std::complex< float > *from)
Definition: AltiVec/Complex.h:148
EIGEN_STRONG_INLINE Packet1cd ploaddup< Packet1cd >(const std::complex< double > *from)
Definition: LSX/Complex.h:383
EIGEN_STRONG_INLINE void pstore< float >(float *to, const Packet4f &from)
Definition: AltiVec/PacketMath.h:642
EIGEN_STRONG_INLINE Packet2cf pload< Packet2cf >(const std::complex< float > *from)
Definition: AltiVec/Complex.h:144
EIGEN_STRONG_INLINE bfloat16 pfirst(const Packet8bf &a)
Definition: AltiVec/PacketMath.h:2418
EIGEN_STRONG_INLINE std::complex< double > predux< Packet1cd >(const Packet1cd &a)
Definition: LSX/Complex.h:415
EIGEN_DEVICE_FUNC void pstore(Scalar *to, const Packet &from)
Definition: GenericPacketMath.h:891
EIGEN_STRONG_INLINE Packet2d ploadu< Packet2d >(const double *from)
Definition: LSX/PacketMath.h:1448
EIGEN_STRONG_INLINE Packet1cd pload< Packet1cd >(const std::complex< double > *from)
Definition: LSX/Complex.h:369
EIGEN_STRONG_INLINE Packet2cf pcplxflip< Packet2cf >(const Packet2cf &x)
Definition: AltiVec/Complex.h:335
EIGEN_STRONG_INLINE Packet1cd pand< Packet1cd >(const Packet1cd &a, const Packet1cd &b)
Definition: LSX/Complex.h:343
EIGEN_STRONG_INLINE Packet2cf pand< Packet2cf >(const Packet2cf &a, const Packet2cf &b)
Definition: AltiVec/Complex.h:273
EIGEN_STRONG_INLINE Packet1cd pandnot< Packet1cd >(const Packet1cd &a, const Packet1cd &b)
Definition: LSX/Complex.h:361
EIGEN_STRONG_INLINE Packet8h pand(const Packet8h &a, const Packet8h &b)
Definition: AVX/PacketMath.h:2319
EIGEN_STRONG_INLINE Packet8h pxor(const Packet8h &a, const Packet8h &b)
Definition: AVX/PacketMath.h:2315
EIGEN_STRONG_INLINE Packet2cf pxor< Packet2cf >(const Packet2cf &a, const Packet2cf &b)
Definition: AltiVec/Complex.h:281
EIGEN_STRONG_INLINE Packet4f ploadu< Packet4f >(const float *from)
Definition: AltiVec/PacketMath.h:1533
EIGEN_STRONG_INLINE Packet2cf psub< Packet2cf >(const Packet2cf &a, const Packet2cf &b)
Definition: AltiVec/Complex.h:260
EIGEN_DEVICE_FUNC Packet psub(const Packet &a, const Packet &b)
Definition: GenericPacketMath.h:337
svint32_t PacketXi __attribute__((arm_sve_vector_bits(EIGEN_ARM64_SVE_VL)))
Definition: SVE/PacketMath.h:34
EIGEN_STRONG_INLINE Packet2cf padd< Packet2cf >(const Packet2cf &a, const Packet2cf &b)
Definition: AltiVec/Complex.h:256
EIGEN_STRONG_INLINE Packet1cd por< Packet1cd >(const Packet1cd &a, const Packet1cd &b)
Definition: LSX/Complex.h:349
__vector float Packet4f
Definition: AltiVec/PacketMath.h:33
EIGEN_STRONG_INLINE Packet1cd pset1< Packet1cd >(const std::complex< double > &from)
Definition: LSX/Complex.h:378
EIGEN_STRONG_INLINE std::complex< double > pfirst< Packet1cd >(const Packet1cd &a)
Definition: LSX/Complex.h:403
EIGEN_STRONG_INLINE void pstoreu< float >(float *to, const Packet4f &from)
Definition: AltiVec/PacketMath.h:1756
EIGEN_STRONG_INLINE Packet1cd pdiv< Packet1cd >(const Packet1cd &a, const Packet1cd &b)
Definition: LSX/Complex.h:427
EIGEN_STRONG_INLINE Packet1cd psub< Packet1cd >(const Packet1cd &a, const Packet1cd &b)
Definition: LSX/Complex.h:309
Namespace containing all symbols from the Eigen library.
Definition: bench_norm.cpp:70
squared absolute value
Definition: GlobalFunctions.h:87
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
Definition: Meta.h:83
double f1(const Vector< double > &coord)
f1 function, in front of the C1 unknown
Definition: poisson/poisson_with_singularity/two_d_poisson.cc:147
Definition: Eigen_Colamd.h:49
list x
Definition: plotDoE.py:28
t
Definition: plotPSD.py:36
Definition: LSX/Complex.h:260
EIGEN_STRONG_INLINE Packet1cd operator-(void) const
Definition: MSA/Complex.h:379
EIGEN_STRONG_INLINE Packet1cd & operator+=(const Packet1cd &b)
Definition: MSA/Complex.h:361
EIGEN_STRONG_INLINE Packet1cd operator+(const Packet1cd &b) const
Definition: MSA/Complex.h:365
EIGEN_STRONG_INLINE Packet1cd operator/(const Packet1cd &b) const
Definition: MSA/Complex.h:378
EIGEN_STRONG_INLINE Packet1cd(const Packet2d &a)
Definition: MSA/Complex.h:331
EIGEN_STRONG_INLINE Packet1cd & operator*=(const Packet1cd &b)
Definition: MSA/Complex.h:341
EIGEN_STRONG_INLINE Packet1cd operator-(const Packet1cd &b) const
Definition: MSA/Complex.h:370
EIGEN_STRONG_INLINE Packet1cd & operator/=(const Packet1cd &b)
Definition: MSA/Complex.h:371
EIGEN_STRONG_INLINE Packet1cd()
Definition: MSA/Complex.h:326
EIGEN_STRONG_INLINE Packet1cd(const Packet1cd &a)
Definition: MSA/Complex.h:332
Packet2d v
Definition: LSX/Complex.h:263
EIGEN_STRONG_INLINE Packet1cd & operator-=(const Packet1cd &b)
Definition: MSA/Complex.h:366
EIGEN_STRONG_INLINE Packet1cd & operator=(const Packet1cd &b)
Definition: MSA/Complex.h:333
EIGEN_STRONG_INLINE Packet1cd operator*(const Packet1cd &b) const
Definition: MSA/Complex.h:360
EIGEN_STRONG_INLINE Packet1cd(const std::complex< double > &a)
Definition: MSA/Complex.h:327
EIGEN_STRONG_INLINE Packet1cd conjugate(void) const
Definition: MSA/Complex.h:337
Definition: AltiVec/Complex.h:38
EIGEN_STRONG_INLINE Packet2cf & operator+=(const Packet2cf &b)
Definition: MSA/Complex.h:61
EIGEN_STRONG_INLINE Packet2cf & operator=(const Packet2cf &b)
Definition: MSA/Complex.h:34
EIGEN_STRONG_INLINE Packet2cf & operator*=(const Packet2cf &b)
Definition: MSA/Complex.h:41
Packet4f v
Definition: AltiVec/Complex.h:78
EIGEN_STRONG_INLINE Packet2cf(const Packet2cf &a)
Definition: MSA/Complex.h:33
EIGEN_STRONG_INLINE Packet2cf operator/(const Packet2cf &b) const
Definition: MSA/Complex.h:71
EIGEN_STRONG_INLINE Packet2cf & operator/=(const Packet2cf &b)
Definition: MSA/Complex.h:72
EIGEN_STRONG_INLINE Packet2cf operator*(const Packet2cf &b) const
Definition: MSA/Complex.h:60
EIGEN_STRONG_INLINE Packet2cf operator-(void) const
Definition: MSA/Complex.h:76
EIGEN_STRONG_INLINE Packet2cf()
Definition: MSA/Complex.h:27
EIGEN_STRONG_INLINE Packet2cf operator-(const Packet2cf &b) const
Definition: MSA/Complex.h:70
EIGEN_STRONG_INLINE Packet2cf(const Packet4f &a)
Definition: MSA/Complex.h:32
EIGEN_STRONG_INLINE Packet2cf & operator-=(const Packet2cf &b)
Definition: MSA/Complex.h:66
EIGEN_STRONG_INLINE Packet2cf pmul(const Packet2cf &a, const Packet2cf &b)
Definition: AltiVec/Complex.h:42
EIGEN_STRONG_INLINE Packet2cf conjugate(void) const
Definition: MSA/Complex.h:38
EIGEN_STRONG_INLINE Packet2cf(const std::complex< float > &a, const std::complex< float > &b)
Definition: MSA/Complex.h:28
EIGEN_STRONG_INLINE Packet2cf operator+(const Packet2cf &b) const
Definition: MSA/Complex.h:65
Definition: GenericPacketMath.h:1407
Definition: GenericPacketMath.h:1421
@ HasBlend
Definition: GenericPacketMath.h:66
@ HasDiv
Definition: GenericPacketMath.h:71
Packet1cd half
Definition: MSA/Complex.h:392
Packet1cd type
Definition: MSA/Complex.h:391
Packet2cf half
Definition: MSA/Complex.h:92
Packet2cf type
Definition: MSA/Complex.h:91
@ 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
Packet1cd half
Definition: MSA/Complex.h:421
std::complex< double > type
Definition: MSA/Complex.h:413
std::complex< float > type
Definition: MSA/Complex.h:114
Packet2cf half
Definition: MSA/Complex.h:122
@ 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