MSA/Complex.h
Go to the documentation of this file.
1 // This file is part of Eigen, a lightweight C++ template library
2 // for linear algebra.
3 //
4 // Copyright (C) 2018 Wave Computing, Inc.
5 // Written by:
6 // Chris Larsen
7 // Alexey Frunze (afrunze@wavecomp.com)
8 //
9 // This Source Code Form is subject to the terms of the Mozilla
10 // Public License v. 2.0. If a copy of the MPL was not distributed
11 // with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
12 
13 #ifndef EIGEN_COMPLEX_MSA_H
14 #define EIGEN_COMPLEX_MSA_H
15 
16 #include <iostream>
17 
18 // IWYU pragma: private
19 #include "../../InternalHeaderCheck.h"
20 
21 namespace Eigen {
22 
23 namespace internal {
24 
25 //---------- float ----------
26 struct Packet2cf {
28  EIGEN_STRONG_INLINE explicit Packet2cf(const std::complex<float>& a, const std::complex<float>& b) {
30  v = t;
31  }
32  EIGEN_STRONG_INLINE explicit Packet2cf(const Packet4f& a) : v(a) {}
35  v = b.v;
36  return *this;
37  }
39  return Packet2cf((Packet4f)__builtin_msa_bnegi_d((v2u64)v, 63));
40  }
42  Packet4f v1, v2;
43 
44  // Get the real values of a | a1_re | a1_re | a2_re | a2_re |
45  v1 = (Packet4f)__builtin_msa_ilvev_w((v4i32)v, (v4i32)v);
46  // Get the imag values of a | a1_im | a1_im | a2_im | a2_im |
47  v2 = (Packet4f)__builtin_msa_ilvod_w((v4i32)v, (v4i32)v);
48  // Multiply the real a with b
49  v1 = pmul(v1, b.v);
50  // Multiply the imag a with b
51  v2 = pmul(v2, b.v);
52  // Conjugate v2
53  v2 = Packet2cf(v2).conjugate().v;
54  // Swap real/imag elements in v2.
55  v2 = (Packet4f)__builtin_msa_shf_w((v4i32)v2, EIGEN_MSA_SHF_I8(1, 0, 3, 2));
56  // Add and return the result
57  v = padd(v1, v2);
58  return *this;
59  }
60  EIGEN_STRONG_INLINE Packet2cf operator*(const Packet2cf& b) const { return Packet2cf(*this) *= b; }
62  v = padd(v, b.v);
63  return *this;
64  }
65  EIGEN_STRONG_INLINE Packet2cf operator+(const Packet2cf& b) const { return Packet2cf(*this) += b; }
67  v = psub(v, b.v);
68  return *this;
69  }
70  EIGEN_STRONG_INLINE Packet2cf operator-(const Packet2cf& b) const { return Packet2cf(*this) -= b; }
73  *this = Packet2cf(*this) / b;
74  return *this;
75  }
77 
78  Packet4f v;
79 };
80 
81 inline std::ostream& operator<<(std::ostream& os, const Packet2cf& value) {
82  os << "[ (" << value.v[0] << ", " << value.v[1]
83  << "i),"
84  " ("
85  << value.v[2] << ", " << value.v[3] << "i) ]";
86  return os;
87 }
88 
89 template <>
90 struct packet_traits<std::complex<float> > : default_packet_traits {
91  typedef Packet2cf type;
92  typedef Packet2cf half;
93  enum {
94  Vectorizable = 1,
95  AlignedOnScalar = 1,
96  size = 2,
97 
98  HasAdd = 1,
99  HasSub = 1,
100  HasMul = 1,
101  HasDiv = 1,
102  HasNegate = 1,
103  HasAbs = 0,
104  HasAbs2 = 0,
105  HasMin = 0,
106  HasMax = 0,
107  HasSetLinear = 0,
108  HasBlend = 1
109  };
110 };
111 
112 template <>
113 struct unpacket_traits<Packet2cf> {
114  typedef std::complex<float> type;
115  enum {
116  size = 2,
118  vectorizable = true,
119  masked_load_available = false,
120  masked_store_available = false
121  };
122  typedef Packet2cf half;
123 };
124 
125 template <>
126 EIGEN_STRONG_INLINE Packet2cf pset1<Packet2cf>(const std::complex<float>& from) {
128 
129  float f0 = from.real(), f1 = from.imag();
130  Packet4f v0 = {f0, f0, f0, f0};
131  Packet4f v1 = {f1, f1, f1, f1};
132  return Packet2cf((Packet4f)__builtin_msa_ilvr_w((Packet4i)v1, (Packet4i)v0));
133 }
134 
135 template <>
136 EIGEN_STRONG_INLINE Packet2cf padd<Packet2cf>(const Packet2cf& a, const Packet2cf& b) {
138 
139  return a + b;
140 }
141 
142 template <>
143 EIGEN_STRONG_INLINE Packet2cf psub<Packet2cf>(const Packet2cf& a, const Packet2cf& b) {
145 
146  return a - b;
147 }
148 
149 template <>
150 EIGEN_STRONG_INLINE Packet2cf pnegate(const Packet2cf& a) {
152 
153  return -a;
154 }
155 
156 template <>
157 EIGEN_STRONG_INLINE Packet2cf pconj(const Packet2cf& a) {
159 
160  return a.conjugate();
161 }
162 
163 template <>
164 EIGEN_STRONG_INLINE Packet2cf pmul<Packet2cf>(const Packet2cf& a, const Packet2cf& b) {
166 
167  return a * b;
168 }
169 
170 template <>
171 EIGEN_STRONG_INLINE Packet2cf pand<Packet2cf>(const Packet2cf& a, const Packet2cf& b) {
173 
174  return Packet2cf(pand(a.v, b.v));
175 }
176 
177 template <>
178 EIGEN_STRONG_INLINE Packet2cf por<Packet2cf>(const Packet2cf& a, const Packet2cf& b) {
180 
181  return Packet2cf(por(a.v, b.v));
182 }
183 
184 template <>
185 EIGEN_STRONG_INLINE Packet2cf pxor<Packet2cf>(const Packet2cf& a, const Packet2cf& b) {
187 
188  return Packet2cf(pxor(a.v, b.v));
189 }
190 
191 template <>
192 EIGEN_STRONG_INLINE Packet2cf pandnot<Packet2cf>(const Packet2cf& a, const Packet2cf& b) {
194 
195  return Packet2cf(pandnot(a.v, b.v));
196 }
197 
198 template <>
199 EIGEN_STRONG_INLINE Packet2cf pload<Packet2cf>(const std::complex<float>* from) {
201 
202  EIGEN_DEBUG_ALIGNED_LOAD return Packet2cf(pload<Packet4f>((const float*)from));
203 }
204 
205 template <>
206 EIGEN_STRONG_INLINE Packet2cf ploadu<Packet2cf>(const std::complex<float>* from) {
208 
209  EIGEN_DEBUG_UNALIGNED_LOAD return Packet2cf(ploadu<Packet4f>((const float*)from));
210 }
211 
212 template <>
213 EIGEN_STRONG_INLINE Packet2cf ploaddup<Packet2cf>(const std::complex<float>* from) {
215 
216  return pset1<Packet2cf>(*from);
217 }
218 
219 template <>
220 EIGEN_STRONG_INLINE void pstore<std::complex<float> >(std::complex<float>* to, const Packet2cf& from) {
222 
223  EIGEN_DEBUG_ALIGNED_STORE pstore<float>((float*)to, from.v);
224 }
225 
226 template <>
227 EIGEN_STRONG_INLINE void pstoreu<std::complex<float> >(std::complex<float>* to, const Packet2cf& from) {
229 
230  EIGEN_DEBUG_UNALIGNED_STORE pstoreu<float>((float*)to, from.v);
231 }
232 
233 template <>
234 EIGEN_DEVICE_FUNC inline Packet2cf pgather<std::complex<float>, Packet2cf>(const std::complex<float>* from,
235  Index stride) {
237 
238  return Packet2cf(from[0 * stride], from[1 * stride]);
239 }
240 
241 template <>
242 EIGEN_DEVICE_FUNC inline void pscatter<std::complex<float>, Packet2cf>(std::complex<float>* to, const Packet2cf& from,
243  Index stride) {
245 
246  *to = std::complex<float>(from.v[0], from.v[1]);
247  to += stride;
248  *to = std::complex<float>(from.v[2], from.v[3]);
249 }
250 
251 template <>
252 EIGEN_STRONG_INLINE void prefetch<std::complex<float> >(const std::complex<float>* addr) {
254 
255  prefetch(reinterpret_cast<const float*>(addr));
256 }
257 
258 template <>
259 EIGEN_STRONG_INLINE std::complex<float> pfirst<Packet2cf>(const Packet2cf& a) {
261 
262  return std::complex<float>(a.v[0], a.v[1]);
263 }
264 
265 template <>
266 EIGEN_STRONG_INLINE Packet2cf preverse(const Packet2cf& a) {
268 
269  return Packet2cf((Packet4f)__builtin_msa_shf_w((v4i32)a.v, EIGEN_MSA_SHF_I8(2, 3, 0, 1)));
270 }
271 
272 template <>
273 EIGEN_STRONG_INLINE Packet2cf pcplxflip<Packet2cf>(const Packet2cf& a) {
275 
276  return Packet2cf((Packet4f)__builtin_msa_shf_w((v4i32)a.v, EIGEN_MSA_SHF_I8(1, 0, 3, 2)));
277 }
278 
279 template <>
280 EIGEN_STRONG_INLINE std::complex<float> predux<Packet2cf>(const Packet2cf& a) {
282 
284  value += a.v;
285  return std::complex<float>(value[0], value[1]);
286 }
287 
288 template <>
289 EIGEN_STRONG_INLINE std::complex<float> predux_mul<Packet2cf>(const Packet2cf& a) {
291 
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]));
293 }
294 
296 
297 template <>
298 EIGEN_STRONG_INLINE Packet2cf pdiv<Packet2cf>(const Packet2cf& a, const Packet2cf& b) {
300 
301  return a / b;
302 }
303 
304 inline std::ostream& operator<<(std::ostream& os, const PacketBlock<Packet2cf, 2>& value) {
305  os << "[ " << value.packet[0] << ", " << std::endl << " " << value.packet[1] << " ]";
306  return os;
307 }
308 
309 EIGEN_DEVICE_FUNC inline void ptranspose(PacketBlock<Packet2cf, 2>& kernel) {
311 
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;
315 }
316 
317 template <>
318 EIGEN_STRONG_INLINE Packet2cf pblend(const Selector<2>& ifPacket, const Packet2cf& thenPacket,
319  const Packet2cf& elsePacket) {
320  return (Packet2cf)(Packet4f)pblend<Packet2d>(ifPacket, (Packet2d)thenPacket.v, (Packet2d)elsePacket.v);
321 }
322 
323 //---------- double ----------
324 
325 struct Packet1cd {
327  EIGEN_STRONG_INLINE explicit Packet1cd(const std::complex<double>& a) {
328  v[0] = std::real(a);
329  v[1] = std::imag(a);
330  }
331  EIGEN_STRONG_INLINE explicit Packet1cd(const Packet2d& a) : v(a) {}
334  v = b.v;
335  return *this;
336  }
338  static const v2u64 p2ul_CONJ_XOR = {0x0, 0x8000000000000000};
339  return (Packet1cd)pxor(v, (Packet2d)p2ul_CONJ_XOR);
340  }
342  Packet2d v1, v2;
343 
344  // Get the real values of a | a1_re | a1_re
345  v1 = (Packet2d)__builtin_msa_ilvev_d((v2i64)v, (v2i64)v);
346  // Get the imag values of a | a1_im | a1_im
347  v2 = (Packet2d)__builtin_msa_ilvod_d((v2i64)v, (v2i64)v);
348  // Multiply the real a with b
349  v1 = pmul(v1, b.v);
350  // Multiply the imag a with b
351  v2 = pmul(v2, b.v);
352  // Conjugate v2
353  v2 = Packet1cd(v2).conjugate().v;
354  // Swap real/imag elements in v2.
355  v2 = (Packet2d)__builtin_msa_shf_w((v4i32)v2, EIGEN_MSA_SHF_I8(2, 3, 0, 1));
356  // Add and return the result
357  v = padd(v1, v2);
358  return *this;
359  }
360  EIGEN_STRONG_INLINE Packet1cd operator*(const Packet1cd& b) const { return Packet1cd(*this) *= b; }
362  v = padd(v, b.v);
363  return *this;
364  }
365  EIGEN_STRONG_INLINE Packet1cd operator+(const Packet1cd& b) const { return Packet1cd(*this) += b; }
367  v = psub(v, b.v);
368  return *this;
369  }
370  EIGEN_STRONG_INLINE Packet1cd operator-(const Packet1cd& b) const { return Packet1cd(*this) -= b; }
372  *this *= b.conjugate();
373  Packet2d s = pmul<Packet2d>(b.v, b.v);
374  s = padd(s, preverse<Packet2d>(s));
375  v = pdiv(v, s);
376  return *this;
377  }
378  EIGEN_STRONG_INLINE Packet1cd operator/(const Packet1cd& b) const { return Packet1cd(*this) /= b; }
380 
381  Packet2d v;
382 };
383 
384 inline std::ostream& operator<<(std::ostream& os, const Packet1cd& value) {
385  os << "[ (" << value.v[0] << ", " << value.v[1] << "i) ]";
386  return os;
387 }
388 
389 template <>
390 struct packet_traits<std::complex<double> > : default_packet_traits {
391  typedef Packet1cd type;
392  typedef Packet1cd half;
393  enum {
394  Vectorizable = 1,
395  AlignedOnScalar = 0,
396  size = 1,
397 
398  HasAdd = 1,
399  HasSub = 1,
400  HasMul = 1,
401  HasDiv = 1,
402  HasNegate = 1,
403  HasAbs = 0,
404  HasAbs2 = 0,
405  HasMin = 0,
406  HasMax = 0,
407  HasSetLinear = 0
408  };
409 };
410 
411 template <>
412 struct unpacket_traits<Packet1cd> {
413  typedef std::complex<double> type;
414  enum {
415  size = 1,
417  vectorizable = true,
418  masked_load_available = false,
419  masked_store_available = false
420  };
421  typedef Packet1cd half;
422 };
423 
424 template <>
425 EIGEN_STRONG_INLINE Packet1cd pload<Packet1cd>(const std::complex<double>* from) {
427 
428  EIGEN_DEBUG_ALIGNED_LOAD return Packet1cd(pload<Packet2d>((const double*)from));
429 }
430 
431 template <>
432 EIGEN_STRONG_INLINE Packet1cd ploadu<Packet1cd>(const std::complex<double>* from) {
434 
435  EIGEN_DEBUG_UNALIGNED_LOAD return Packet1cd(ploadu<Packet2d>((const double*)from));
436 }
437 
438 template <>
439 EIGEN_STRONG_INLINE Packet1cd pset1<Packet1cd>(const std::complex<double>& from) {
441 
442  return Packet1cd(from);
443 }
444 
445 template <>
446 EIGEN_STRONG_INLINE Packet1cd padd<Packet1cd>(const Packet1cd& a, const Packet1cd& b) {
448 
449  return a + b;
450 }
451 
452 template <>
453 EIGEN_STRONG_INLINE Packet1cd psub<Packet1cd>(const Packet1cd& a, const Packet1cd& b) {
455 
456  return a - b;
457 }
458 
459 template <>
460 EIGEN_STRONG_INLINE Packet1cd pnegate(const Packet1cd& a) {
462 
463  return -a;
464 }
465 
466 template <>
467 EIGEN_STRONG_INLINE Packet1cd pconj(const Packet1cd& a) {
469 
470  return a.conjugate();
471 }
472 
473 template <>
474 EIGEN_STRONG_INLINE Packet1cd pmul<Packet1cd>(const Packet1cd& a, const Packet1cd& b) {
476 
477  return a * b;
478 }
479 
480 template <>
481 EIGEN_STRONG_INLINE Packet1cd pand<Packet1cd>(const Packet1cd& a, const Packet1cd& b) {
483 
484  return Packet1cd(pand(a.v, b.v));
485 }
486 
487 template <>
488 EIGEN_STRONG_INLINE Packet1cd por<Packet1cd>(const Packet1cd& a, const Packet1cd& b) {
490 
491  return Packet1cd(por(a.v, b.v));
492 }
493 
494 template <>
495 EIGEN_STRONG_INLINE Packet1cd pxor<Packet1cd>(const Packet1cd& a, const Packet1cd& b) {
497 
498  return Packet1cd(pxor(a.v, b.v));
499 }
500 
501 template <>
502 EIGEN_STRONG_INLINE Packet1cd pandnot<Packet1cd>(const Packet1cd& a, const Packet1cd& b) {
504 
505  return Packet1cd(pandnot(a.v, b.v));
506 }
507 
508 template <>
509 EIGEN_STRONG_INLINE Packet1cd ploaddup<Packet1cd>(const std::complex<double>* from) {
511 
512  return pset1<Packet1cd>(*from);
513 }
514 
515 template <>
516 EIGEN_STRONG_INLINE void pstore<std::complex<double> >(std::complex<double>* to, const Packet1cd& from) {
518 
519  EIGEN_DEBUG_ALIGNED_STORE pstore<double>((double*)to, from.v);
520 }
521 
522 template <>
523 EIGEN_STRONG_INLINE void pstoreu<std::complex<double> >(std::complex<double>* to, const Packet1cd& from) {
525 
526  EIGEN_DEBUG_UNALIGNED_STORE pstoreu<double>((double*)to, from.v);
527 }
528 
529 template <>
530 EIGEN_STRONG_INLINE void prefetch<std::complex<double> >(const std::complex<double>* addr) {
532 
533  prefetch(reinterpret_cast<const double*>(addr));
534 }
535 
536 template <>
537 EIGEN_DEVICE_FUNC inline Packet1cd pgather<std::complex<double>, Packet1cd>(const std::complex<double>* from,
538  Index stride __attribute__((unused))) {
540 
541  Packet1cd res;
542  res.v[0] = std::real(from[0]);
543  res.v[1] = std::imag(from[0]);
544  return res;
545 }
546 
547 template <>
548 EIGEN_DEVICE_FUNC inline void pscatter<std::complex<double>, Packet1cd>(std::complex<double>* to, const Packet1cd& from,
549  Index stride __attribute__((unused))) {
551 
552  pstore(to, from);
553 }
554 
555 template <>
556 EIGEN_STRONG_INLINE std::complex<double> pfirst<Packet1cd>(const Packet1cd& a) {
558 
559  return std::complex<double>(a.v[0], a.v[1]);
560 }
561 
562 template <>
563 EIGEN_STRONG_INLINE Packet1cd preverse(const Packet1cd& a) {
565 
566  return a;
567 }
568 
569 template <>
570 EIGEN_STRONG_INLINE std::complex<double> predux<Packet1cd>(const Packet1cd& a) {
572 
573  return pfirst(a);
574 }
575 
576 template <>
577 EIGEN_STRONG_INLINE std::complex<double> predux_mul<Packet1cd>(const Packet1cd& a) {
579 
580  return pfirst(a);
581 }
582 
584 
585 template <>
586 EIGEN_STRONG_INLINE Packet1cd pdiv<Packet1cd>(const Packet1cd& a, const Packet1cd& b) {
588 
589  return a / b;
590 }
591 
592 EIGEN_STRONG_INLINE Packet1cd pcplxflip /*<Packet1cd>*/ (const Packet1cd& x) {
594 
595  return Packet1cd(preverse(Packet2d(x.v)));
596 }
597 
598 inline std::ostream& operator<<(std::ostream& os, const PacketBlock<Packet1cd, 2>& value) {
599  os << "[ " << value.packet[0] << ", " << std::endl << " " << value.packet[1] << " ]";
600  return os;
601 }
602 
603 EIGEN_STRONG_INLINE void ptranspose(PacketBlock<Packet1cd, 2>& kernel) {
605 
606  Packet2d v1, v2;
607 
608  v1 = (Packet2d)__builtin_msa_ilvev_d((v2i64)kernel.packet[0].v, (v2i64)kernel.packet[1].v);
609  // Get the imag values of a
610  v2 = (Packet2d)__builtin_msa_ilvod_d((v2i64)kernel.packet[0].v, (v2i64)kernel.packet[1].v);
611 
612  kernel.packet[0].v = v1;
613  kernel.packet[1].v = v2;
614 }
615 
616 } // end namespace internal
617 
618 } // end namespace Eigen
619 
620 #endif // EIGEN_COMPLEX_MSA_H
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