13 #ifndef EIGEN_COMPLEX_MSA_H
14 #define EIGEN_COMPLEX_MSA_H
27 const std::complex<float>& b) {
46 v1 = (
Packet4f)__builtin_msa_ilvev_w((v4i32)
v, (v4i32)
v);
48 v2 = (
Packet4f)__builtin_msa_ilvod_w((v4i32)
v, (v4i32)
v);
96 os <<
"[ (" <<
value.v[0] <<
", " <<
value.v[1]
104 struct packet_traits<
std::complex<float> > : default_packet_traits {
128 struct unpacket_traits<Packet2cf> {
129 typedef std::complex<float>
type;
138 float f0 = from.real(), f1 = from.imag();
169 return a.conjugate();
183 return Packet2cf(
pand(
a.v, b.v));
190 return Packet2cf(
por(
a.v, b.v));
197 return Packet2cf(
pxor(
a.v, b.v));
204 return Packet2cf(
pandnot(
a.v, b.v));
230 const Packet2cf& from) {
238 const Packet2cf& from) {
246 const std::complex<float>* from,
Index stride) {
249 return Packet2cf(from[0 * stride], from[1 * stride]);
253 EIGEN_DEVICE_FUNC inline void pscatter<std::complex<float>, Packet2cf>(std::complex<float>* to,
254 const Packet2cf& from,
258 *to = std::complex<float>(from.v[0], from.v[1]);
260 *to = std::complex<float>(from.v[2], from.v[3]);
267 prefetch(
reinterpret_cast<const float*
>(addr));
274 return std::complex<float>(
a.v[0],
a.v[1]);
297 return std::complex<float>(value[0], value[1]);
304 return std::complex<float>((
a.v[0] *
a.v[2]) - (
a.v[1] *
a.v[3]),
305 (
a.v[0] *
a.v[3]) + (
a.v[1] *
a.v[2]));
318 os <<
"[ " <<
value.packet[0] <<
", " << std::endl <<
" " <<
value.packet[1] <<
" ]";
326 (
Packet4f)__builtin_msa_ilvl_d((v2i64)kernel.packet[1].v, (v2i64)kernel.packet[0].v);
328 (
Packet4f)__builtin_msa_ilvr_d((v2i64)kernel.packet[1].v, (v2i64)kernel.packet[0].v);
329 kernel.packet[1].v = tmp;
357 static const v2u64 p2ul_CONJ_XOR = { 0x0, 0x8000000000000000 };
364 v1 = (
Packet2d)__builtin_msa_ilvev_d((v2i64)
v, (v2i64)
v);
366 v2 = (
Packet2d)__builtin_msa_ilvod_d((v2i64)
v, (v2i64)
v);
399 s =
padd(s, preverse<Packet2d>(s));
414 os <<
"[ (" <<
value.v[0] <<
", " <<
value.v[1] <<
"i) ]";
419 struct packet_traits<
std::complex<double> > : default_packet_traits {
443 typedef std::complex<double>
type;
494 return a.conjugate();
559 prefetch(
reinterpret_cast<const double*
>(addr));
587 return std::complex<double>(
a.v[0],
a.v[1]);
627 os <<
"[ " <<
value.packet[0] <<
", " << std::endl <<
" " <<
value.packet[1] <<
" ]";
EIGEN_DEVICE_FUNC RealReturnType real() const
Definition: CommonCwiseUnaryOps.h:100
EIGEN_DEVICE_FUNC const ImagReturnType imag() const
Definition: CommonCwiseUnaryOps.h:109
#define EIGEN_MAKE_CONJ_HELPER_CPLX_REAL(PACKET_CPLX, PACKET_REAL)
Definition: ConjHelper.h:14
#define EIGEN_DEBUG_ALIGNED_STORE
Definition: GenericPacketMath.h:35
#define EIGEN_DEBUG_ALIGNED_LOAD
Definition: GenericPacketMath.h:27
#define EIGEN_DEBUG_UNALIGNED_STORE
Definition: GenericPacketMath.h:39
#define EIGEN_DEBUG_UNALIGNED_LOAD
Definition: GenericPacketMath.h:31
#define EIGEN_MSA_SHF_I8(a, b, c, d)
Definition: PacketMath.h:48
#define EIGEN_MSA_DEBUG
Definition: PacketMath.h:45
#define EIGEN_DEVICE_FUNC
Definition: Macros.h:976
#define EIGEN_STRONG_INLINE
Definition: Macros.h:917
@ Aligned16
Definition: Constants.h:235
std::ostream & operator<<(std::ostream &s, const Packet16c &v)
Definition: PacketMath.h:371
v2f64 Packet2d
Definition: PacketMath.h:820
EIGEN_STRONG_INLINE void pstoreu< double >(double *to, const Packet4d &from)
Definition: PacketMath.h:627
EIGEN_STRONG_INLINE Packet2cf pconj(const Packet2cf &a)
Definition: Complex.h:167
EIGEN_STRONG_INLINE std::complex< float > predux_mul< Packet2cf >(const Packet2cf &a)
Definition: Complex.h:199
EIGEN_STRONG_INLINE std::complex< float > predux< Packet2cf >(const Packet2cf &a)
Definition: Complex.h:191
EIGEN_DEVICE_FUNC Packet padd(const Packet &a, const Packet &b)
Definition: GenericPacketMath.h:215
__vector int Packet4i
Definition: PacketMath.h:31
EIGEN_STRONG_INLINE std::complex< double > predux_mul< Packet1cd >(const Packet1cd &a)
Definition: Complex.h:605
EIGEN_STRONG_INLINE Packet2cf pandnot< Packet2cf >(const Packet2cf &a, const Packet2cf &b)
Definition: Complex.h:172
EIGEN_STRONG_INLINE void ptranspose(PacketBlock< Packet2cf, 2 > &kernel)
Definition: Complex.h:224
EIGEN_STRONG_INLINE Packet2cf ploaddup< Packet2cf >(const std::complex< float > *from)
Definition: Complex.h:125
EIGEN_DEVICE_FUNC Packet pdiv(const Packet &a, const Packet &b)
Definition: GenericPacketMath.h:244
EIGEN_STRONG_INLINE Packet2cf pmul< Packet2cf >(const Packet2cf &a, const Packet2cf &b)
Definition: Complex.h:173
EIGEN_DEVICE_FUNC void prefetch(const Scalar *addr)
Definition: GenericPacketMath.h:719
EIGEN_STRONG_INLINE Packet4f pmul< Packet4f >(const Packet4f &a, const Packet4f &b)
Definition: PacketMath.h:795
EIGEN_STRONG_INLINE Packet4i pblend(const Selector< 4 > &ifPacket, const Packet4i &thenPacket, const Packet4i &elsePacket)
Definition: PacketMath.h:2107
EIGEN_STRONG_INLINE Packet1cd pmul< Packet1cd >(const Packet1cd &a, const Packet1cd &b)
Definition: Complex.h:498
EIGEN_STRONG_INLINE std::complex< float > pfirst< Packet2cf >(const Packet2cf &a)
Definition: Complex.h:176
EIGEN_STRONG_INLINE Packet4f pload< Packet4f >(const float *from)
Definition: PacketMath.h:443
EIGEN_STRONG_INLINE Packet1cd ploadu< Packet1cd >(const std::complex< double > *from)
Definition: Complex.h:456
EIGEN_STRONG_INLINE Packet2cf por< Packet2cf >(const Packet2cf &a, const Packet2cf &b)
Definition: Complex.h:170
EIGEN_STRONG_INLINE Packet8h por(const Packet8h &a, const Packet8h &b)
Definition: PacketMath.h:1042
EIGEN_STRONG_INLINE Packet2cf pset1< Packet2cf >(const std::complex< float > &from)
Definition: Complex.h:112
EIGEN_STRONG_INLINE Packet2cf preverse(const Packet2cf &a)
Definition: Complex.h:184
EIGEN_STRONG_INLINE void pstore< double >(double *to, const Packet4d &from)
Definition: PacketMath.h:623
EIGEN_DEVICE_FUNC Packet pmul(const Packet &a, const Packet &b)
Definition: GenericPacketMath.h:237
EIGEN_STRONG_INLINE Packet1cd pcplxflip(const Packet1cd &x)
Definition: Complex.h:620
EIGEN_STRONG_INLINE Packet8h pandnot(const Packet8h &a, const Packet8h &b)
Definition: PacketMath.h:1053
EIGEN_STRONG_INLINE Packet2d pload< Packet2d >(const double *from)
Definition: PacketMath.h:967
EIGEN_STRONG_INLINE Packet2d pmul< Packet2d >(const Packet2d &a, const Packet2d &b)
Definition: PacketMath.h:916
EIGEN_STRONG_INLINE Packet2cf pnegate(const Packet2cf &a)
Definition: Complex.h:166
EIGEN_STRONG_INLINE Packet1cd pxor< Packet1cd >(const Packet1cd &a, const Packet1cd &b)
Definition: Complex.h:519
EIGEN_STRONG_INLINE Packet2cf pdiv< Packet2cf >(const Packet2cf &a, const Packet2cf &b)
Definition: Complex.h:211
EIGEN_STRONG_INLINE Packet1cd padd< Packet1cd >(const Packet1cd &a, const Packet1cd &b)
Definition: Complex.h:470
EIGEN_STRONG_INLINE Packet2cf ploadu< Packet2cf >(const std::complex< float > *from)
Definition: Complex.h:124
EIGEN_STRONG_INLINE Packet1cd ploaddup< Packet1cd >(const std::complex< double > *from)
Definition: Complex.h:533
EIGEN_STRONG_INLINE void pstore< float >(float *to, const Packet4f &from)
Definition: PacketMath.h:491
EIGEN_STRONG_INLINE Packet2cf pload< Packet2cf >(const std::complex< float > *from)
Definition: Complex.h:123
EIGEN_STRONG_INLINE bfloat16 pfirst(const Packet8bf &a)
Definition: PacketMath.h:1429
EIGEN_STRONG_INLINE std::complex< double > predux< Packet1cd >(const Packet1cd &a)
Definition: Complex.h:598
EIGEN_DEVICE_FUNC void pstore(Scalar *to, const Packet &from)
Definition: GenericPacketMath.h:696
EIGEN_STRONG_INLINE Packet2d ploadu< Packet2d >(const double *from)
Definition: PacketMath.h:1004
EIGEN_STRONG_INLINE Packet1cd pload< Packet1cd >(const std::complex< double > *from)
Definition: Complex.h:449
EIGEN_STRONG_INLINE Packet2cf pcplxflip< Packet2cf >(const Packet2cf &x)
Definition: Complex.h:219
EIGEN_STRONG_INLINE Packet1cd pand< Packet1cd >(const Packet1cd &a, const Packet1cd &b)
Definition: Complex.h:505
EIGEN_STRONG_INLINE Packet2cf pand< Packet2cf >(const Packet2cf &a, const Packet2cf &b)
Definition: Complex.h:169
EIGEN_STRONG_INLINE Packet1cd pandnot< Packet1cd >(const Packet1cd &a, const Packet1cd &b)
Definition: Complex.h:526
EIGEN_STRONG_INLINE Packet8h pand(const Packet8h &a, const Packet8h &b)
Definition: PacketMath.h:1050
EIGEN_STRONG_INLINE Packet8h pxor(const Packet8h &a, const Packet8h &b)
Definition: PacketMath.h:1047
EIGEN_STRONG_INLINE Packet2cf pxor< Packet2cf >(const Packet2cf &a, const Packet2cf &b)
Definition: Complex.h:171
EIGEN_STRONG_INLINE Packet4f ploadu< Packet4f >(const float *from)
Definition: PacketMath.h:968
EIGEN_STRONG_INLINE Packet2cf psub< Packet2cf >(const Packet2cf &a, const Packet2cf &b)
Definition: Complex.h:165
EIGEN_DEVICE_FUNC Packet psub(const Packet &a, const Packet &b)
Definition: GenericPacketMath.h:222
svint32_t PacketXi __attribute__((arm_sve_vector_bits(EIGEN_ARM64_SVE_VL)))
Definition: PacketMath.h:33
EIGEN_STRONG_INLINE Packet2cf padd< Packet2cf >(const Packet2cf &a, const Packet2cf &b)
Definition: Complex.h:164
EIGEN_STRONG_INLINE Packet1cd por< Packet1cd >(const Packet1cd &a, const Packet1cd &b)
Definition: Complex.h:512
__vector float Packet4f
Definition: PacketMath.h:30
EIGEN_STRONG_INLINE Packet1cd pset1< Packet1cd >(const std::complex< double > &from)
Definition: Complex.h:463
EIGEN_STRONG_INLINE std::complex< double > pfirst< Packet1cd >(const Packet1cd &a)
Definition: Complex.h:584
EIGEN_STRONG_INLINE void pstoreu< float >(float *to, const Packet4f &from)
Definition: PacketMath.h:1088
EIGEN_STRONG_INLINE Packet1cd pdiv< Packet1cd >(const Packet1cd &a, const Packet1cd &b)
Definition: Complex.h:614
EIGEN_STRONG_INLINE Packet1cd psub< Packet1cd >(const Packet1cd &a, const Packet1cd &b)
Definition: Complex.h:477
Namespace containing all symbols from the Eigen library.
Definition: LDLT.h:16
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
Definition: Meta.h:74
Definition: document.h:416
Definition: json.hpp:5678
const GenericPointer< typename T::ValueType > T2 value
Definition: pointer.h:1282
const GenericPointer< typename T::ValueType > T2 T::AllocatorType & a
Definition: pointer.h:1181
Definition: Complex.h:341
EIGEN_STRONG_INLINE Packet1cd operator-(void) const
Definition: Complex.h:406
EIGEN_STRONG_INLINE Packet1cd & operator+=(const Packet1cd &b)
Definition: Complex.h:382
EIGEN_STRONG_INLINE Packet1cd operator+(const Packet1cd &b) const
Definition: Complex.h:386
EIGEN_STRONG_INLINE Packet1cd operator/(const Packet1cd &b) const
Definition: Complex.h:403
EIGEN_STRONG_INLINE Packet1cd(const Packet2d &a)
Definition: Complex.h:348
EIGEN_STRONG_INLINE Packet1cd & operator*=(const Packet1cd &b)
Definition: Complex.h:360
EIGEN_STRONG_INLINE Packet1cd operator-(const Packet1cd &b) const
Definition: Complex.h:393
EIGEN_STRONG_INLINE Packet1cd & operator/=(const Packet1cd &b)
Definition: Complex.h:396
EIGEN_STRONG_INLINE Packet1cd()
Definition: Complex.h:342
EIGEN_STRONG_INLINE Packet1cd(const Packet1cd &a)
Definition: Complex.h:350
Packet2d v
Definition: Complex.h:410
EIGEN_STRONG_INLINE Packet1cd & operator-=(const Packet1cd &b)
Definition: Complex.h:389
EIGEN_STRONG_INLINE Packet1cd & operator=(const Packet1cd &b)
Definition: Complex.h:352
EIGEN_STRONG_INLINE Packet1cd operator*(const Packet1cd &b) const
Definition: Complex.h:379
EIGEN_STRONG_INLINE Packet1cd(const std::complex< double > &a)
Definition: Complex.h:344
EIGEN_STRONG_INLINE Packet1cd conjugate(void) const
Definition: Complex.h:356
EIGEN_STRONG_INLINE Packet2cf & operator+=(const Packet2cf &b)
Definition: Complex.h:64
EIGEN_STRONG_INLINE Packet2cf & operator=(const Packet2cf &b)
Definition: Complex.h:35
EIGEN_STRONG_INLINE Packet2cf & operator*=(const Packet2cf &b)
Definition: Complex.h:42
Packet4f v
Definition: Complex.h:80
EIGEN_STRONG_INLINE Packet2cf(const Packet2cf &a)
Definition: Complex.h:33
EIGEN_STRONG_INLINE Packet2cf operator/(const Packet2cf &b) const
Definition: Complex.h:85
EIGEN_STRONG_INLINE Packet2cf & operator/=(const Packet2cf &b)
Definition: Complex.h:78
EIGEN_STRONG_INLINE Packet2cf operator*(const Packet2cf &b) const
Definition: Complex.h:61
EIGEN_STRONG_INLINE Packet2cf operator-(void) const
Definition: Complex.h:88
EIGEN_STRONG_INLINE Packet2cf()
Definition: Complex.h:24
EIGEN_STRONG_INLINE Packet2cf operator-(const Packet2cf &b) const
Definition: Complex.h:75
EIGEN_STRONG_INLINE Packet2cf(const Packet4f &a)
Definition: Complex.h:31
EIGEN_STRONG_INLINE Packet2cf & operator-=(const Packet2cf &b)
Definition: Complex.h:71
EIGEN_STRONG_INLINE Packet2cf pmul(const Packet2cf &a, const Packet2cf &b)
Definition: Complex.h:35
EIGEN_STRONG_INLINE Packet2cf conjugate(void) const
Definition: Complex.h:39
EIGEN_STRONG_INLINE Packet2cf(const std::complex< float > &a, const std::complex< float > &b)
Definition: Complex.h:26
EIGEN_STRONG_INLINE Packet2cf operator+(const Packet2cf &b) const
Definition: Complex.h:68
Definition: GenericPacketMath.h:1014
Packet packet[N]
Definition: GenericPacketMath.h:1015
Definition: GenericPacketMath.h:1027
@ HasBlend
Definition: GenericPacketMath.h:60
@ HasDiv
Definition: GenericPacketMath.h:65
Packet1cd half
Definition: Complex.h:421
Packet1cd type
Definition: Complex.h:420
Packet2cf half
Definition: Complex.h:106
Packet2cf type
Definition: Complex.h:105
@ 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
@ HasHalfPacket
Definition: GenericPacketMath.h:114
@ size
Definition: GenericPacketMath.h:112
@ AlignedOnScalar
Definition: GenericPacketMath.h:113
@ Vectorizable
Definition: GenericPacketMath.h:111
Packet1cd half
Definition: Complex.h:445
std::complex< double > type
Definition: Complex.h:443
std::complex< float > type
Definition: Complex.h:129
Packet2cf half
Definition: Complex.h:131
Definition: GenericPacketMath.h:133
@ masked_load_available
Definition: GenericPacketMath.h:141
@ size
Definition: GenericPacketMath.h:138
@ masked_store_available
Definition: GenericPacketMath.h:142
@ vectorizable
Definition: GenericPacketMath.h:140
@ alignment
Definition: GenericPacketMath.h:139