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 #include "../../InternalHeaderCheck.h"
19 
20 namespace Eigen {
21 
22 namespace internal {
23 
24 //---------- float ----------
25 struct Packet2cf {
26  EIGEN_STRONG_INLINE Packet2cf() {
27  }
28  EIGEN_STRONG_INLINE explicit Packet2cf(const std::complex<float>& a,
29  const std::complex<float>& b) {
31  v = t;
32  }
33  EIGEN_STRONG_INLINE explicit Packet2cf(const Packet4f& a) : v(a) {
34  }
35  EIGEN_STRONG_INLINE Packet2cf(const Packet2cf& a) : v(a.v) {
36  }
37  EIGEN_STRONG_INLINE Packet2cf& operator=(const Packet2cf& b) {
38  v = b.v;
39  return *this;
40  }
41  EIGEN_STRONG_INLINE Packet2cf conjugate(void) const {
42  return Packet2cf((Packet4f)__builtin_msa_bnegi_d((v2u64)v, 63));
43  }
44  EIGEN_STRONG_INLINE Packet2cf& operator*=(const Packet2cf& b) {
45  Packet4f v1, v2;
46 
47  // Get the real values of a | a1_re | a1_re | a2_re | a2_re |
48  v1 = (Packet4f)__builtin_msa_ilvev_w((v4i32)v, (v4i32)v);
49  // Get the imag values of a | a1_im | a1_im | a2_im | a2_im |
50  v2 = (Packet4f)__builtin_msa_ilvod_w((v4i32)v, (v4i32)v);
51  // Multiply the real a with b
52  v1 = pmul(v1, b.v);
53  // Multiply the imag a with b
54  v2 = pmul(v2, b.v);
55  // Conjugate v2
56  v2 = Packet2cf(v2).conjugate().v;
57  // Swap real/imag elements in v2.
58  v2 = (Packet4f)__builtin_msa_shf_w((v4i32)v2, EIGEN_MSA_SHF_I8(1, 0, 3, 2));
59  // Add and return the result
60  v = padd(v1, v2);
61  return *this;
62  }
63  EIGEN_STRONG_INLINE Packet2cf operator*(const Packet2cf& b) const {
64  return Packet2cf(*this) *= b;
65  }
66  EIGEN_STRONG_INLINE Packet2cf& operator+=(const Packet2cf& b) {
67  v = padd(v, b.v);
68  return *this;
69  }
70  EIGEN_STRONG_INLINE Packet2cf operator+(const Packet2cf& b) const {
71  return Packet2cf(*this) += b;
72  }
73  EIGEN_STRONG_INLINE Packet2cf& operator-=(const Packet2cf& b) {
74  v = psub(v, b.v);
75  return *this;
76  }
77  EIGEN_STRONG_INLINE Packet2cf operator-(const Packet2cf& b) const {
78  return Packet2cf(*this) -= b;
79  }
80  EIGEN_STRONG_INLINE Packet2cf operator/(const Packet2cf& b) const {
81  return pdiv_complex(Packet2cf(*this), b);
82  }
83  EIGEN_STRONG_INLINE Packet2cf& operator/=(const Packet2cf& b) {
84  *this = Packet2cf(*this) / b;
85  return *this;
86  }
87  EIGEN_STRONG_INLINE Packet2cf operator-(void) const {
88  return Packet2cf(pnegate(v));
89  }
90 
91  Packet4f v;
92 };
93 
94 inline std::ostream& operator<<(std::ostream& os, const Packet2cf& value) {
95  os << "[ (" << value.v[0] << ", " << value.v[1]
96  << "i),"
97  " ("
98  << value.v[2] << ", " << value.v[3] << "i) ]";
99  return os;
100 }
101 
102 template <>
103 struct packet_traits<std::complex<float> > : default_packet_traits {
104  typedef Packet2cf type;
105  typedef Packet2cf half;
106  enum {
107  Vectorizable = 1,
108  AlignedOnScalar = 1,
109  size = 2,
110 
111  HasAdd = 1,
112  HasSub = 1,
113  HasMul = 1,
114  HasDiv = 1,
115  HasNegate = 1,
116  HasAbs = 0,
117  HasAbs2 = 0,
118  HasMin = 0,
119  HasMax = 0,
120  HasSetLinear = 0,
121  HasBlend = 1
122  };
123 };
124 
125 template <>
126 struct unpacket_traits<Packet2cf> {
127  typedef std::complex<float> type;
128  enum { size = 2, alignment = Aligned16, vectorizable=true, masked_load_available=false, masked_store_available=false };
129  typedef Packet2cf half;
130 };
131 
132 template <>
133 EIGEN_STRONG_INLINE Packet2cf pset1<Packet2cf>(const std::complex<float>& from) {
135 
136  float f0 = from.real(), f1 = from.imag();
137  Packet4f v0 = { f0, f0, f0, f0 };
138  Packet4f v1 = { f1, f1, f1, f1 };
139  return Packet2cf((Packet4f)__builtin_msa_ilvr_w((Packet4i)v1, (Packet4i)v0));
140 }
141 
142 template <>
143 EIGEN_STRONG_INLINE Packet2cf padd<Packet2cf>(const Packet2cf& a, const Packet2cf& b) {
145 
146  return a + b;
147 }
148 
149 template <>
150 EIGEN_STRONG_INLINE Packet2cf psub<Packet2cf>(const Packet2cf& a, const Packet2cf& b) {
152 
153  return a - b;
154 }
155 
156 template <>
157 EIGEN_STRONG_INLINE Packet2cf pnegate(const Packet2cf& a) {
159 
160  return -a;
161 }
162 
163 template <>
164 EIGEN_STRONG_INLINE Packet2cf pconj(const Packet2cf& a) {
166 
167  return a.conjugate();
168 }
169 
170 template <>
171 EIGEN_STRONG_INLINE Packet2cf pmul<Packet2cf>(const Packet2cf& a, const Packet2cf& b) {
173 
174  return a * b;
175 }
176 
177 template <>
178 EIGEN_STRONG_INLINE Packet2cf pand<Packet2cf>(const Packet2cf& a, const Packet2cf& b) {
180 
181  return Packet2cf(pand(a.v, b.v));
182 }
183 
184 template <>
185 EIGEN_STRONG_INLINE Packet2cf por<Packet2cf>(const Packet2cf& a, const Packet2cf& b) {
187 
188  return Packet2cf(por(a.v, b.v));
189 }
190 
191 template <>
192 EIGEN_STRONG_INLINE Packet2cf pxor<Packet2cf>(const Packet2cf& a, const Packet2cf& b) {
194 
195  return Packet2cf(pxor(a.v, b.v));
196 }
197 
198 template <>
199 EIGEN_STRONG_INLINE Packet2cf pandnot<Packet2cf>(const Packet2cf& a, const Packet2cf& b) {
201 
202  return Packet2cf(pandnot(a.v, b.v));
203 }
204 
205 template <>
206 EIGEN_STRONG_INLINE Packet2cf pload<Packet2cf>(const std::complex<float>* from) {
208 
209  EIGEN_DEBUG_ALIGNED_LOAD return Packet2cf(pload<Packet4f>((const float*)from));
210 }
211 
212 template <>
213 EIGEN_STRONG_INLINE Packet2cf ploadu<Packet2cf>(const std::complex<float>* from) {
215 
216  EIGEN_DEBUG_UNALIGNED_LOAD return Packet2cf(ploadu<Packet4f>((const float*)from));
217 }
218 
219 template <>
220 EIGEN_STRONG_INLINE Packet2cf ploaddup<Packet2cf>(const std::complex<float>* from) {
222 
223  return pset1<Packet2cf>(*from);
224 }
225 
226 template <>
227 EIGEN_STRONG_INLINE void pstore<std::complex<float> >(std::complex<float>* to,
228  const Packet2cf& from) {
230 
231  EIGEN_DEBUG_ALIGNED_STORE pstore<float>((float*)to, from.v);
232 }
233 
234 template <>
235 EIGEN_STRONG_INLINE void pstoreu<std::complex<float> >(std::complex<float>* to,
236  const Packet2cf& from) {
238 
239  EIGEN_DEBUG_UNALIGNED_STORE pstoreu<float>((float*)to, from.v);
240 }
241 
242 template <>
243 EIGEN_DEVICE_FUNC inline Packet2cf pgather<std::complex<float>, Packet2cf>(
244  const std::complex<float>* from, Index stride) {
246 
247  return Packet2cf(from[0 * stride], from[1 * stride]);
248 }
249 
250 template <>
251 EIGEN_DEVICE_FUNC inline void pscatter<std::complex<float>, Packet2cf>(std::complex<float>* to,
252  const Packet2cf& from,
253  Index stride) {
255 
256  *to = std::complex<float>(from.v[0], from.v[1]);
257  to += stride;
258  *to = std::complex<float>(from.v[2], from.v[3]);
259 }
260 
261 template <>
262 EIGEN_STRONG_INLINE void prefetch<std::complex<float> >(const std::complex<float>* addr) {
264 
265  prefetch(reinterpret_cast<const float*>(addr));
266 }
267 
268 template <>
269 EIGEN_STRONG_INLINE std::complex<float> pfirst<Packet2cf>(const Packet2cf& a) {
271 
272  return std::complex<float>(a.v[0], a.v[1]);
273 }
274 
275 template <>
276 EIGEN_STRONG_INLINE Packet2cf preverse(const Packet2cf& a) {
278 
279  return Packet2cf((Packet4f)__builtin_msa_shf_w((v4i32)a.v, EIGEN_MSA_SHF_I8(2, 3, 0, 1)));
280 }
281 
282 template <>
283 EIGEN_STRONG_INLINE Packet2cf pcplxflip<Packet2cf>(const Packet2cf& a) {
285 
286  return Packet2cf((Packet4f)__builtin_msa_shf_w((v4i32)a.v, EIGEN_MSA_SHF_I8(1, 0, 3, 2)));
287 }
288 
289 template <>
290 EIGEN_STRONG_INLINE std::complex<float> predux<Packet2cf>(const Packet2cf& a) {
292 
293  Packet4f value = (Packet4f)preverse((Packet2d)a.v);
294  value += a.v;
295  return std::complex<float>(value[0], value[1]);
296 }
297 
298 template <>
299 EIGEN_STRONG_INLINE std::complex<float> predux_mul<Packet2cf>(const Packet2cf& a) {
301 
302  return std::complex<float>((a.v[0] * a.v[2]) - (a.v[1] * a.v[3]),
303  (a.v[0] * a.v[3]) + (a.v[1] * a.v[2]));
304 }
305 
307 
308 template <>
309 EIGEN_STRONG_INLINE Packet2cf pdiv<Packet2cf>(const Packet2cf& a, const Packet2cf& b) {
311 
312  return a / b;
313 }
314 
315 inline std::ostream& operator<<(std::ostream& os, const PacketBlock<Packet2cf, 2>& value) {
316  os << "[ " << value.packet[0] << ", " << std::endl << " " << value.packet[1] << " ]";
317  return os;
318 }
319 
320 EIGEN_DEVICE_FUNC inline void ptranspose(PacketBlock<Packet2cf, 2>& kernel) {
322 
323  Packet4f tmp =
324  (Packet4f)__builtin_msa_ilvl_d((v2i64)kernel.packet[1].v, (v2i64)kernel.packet[0].v);
325  kernel.packet[0].v =
326  (Packet4f)__builtin_msa_ilvr_d((v2i64)kernel.packet[1].v, (v2i64)kernel.packet[0].v);
327  kernel.packet[1].v = tmp;
328 }
329 
330 template <>
331 EIGEN_STRONG_INLINE Packet2cf pblend(const Selector<2>& ifPacket, const Packet2cf& thenPacket,
332  const Packet2cf& elsePacket) {
333  return (Packet2cf)(Packet4f)pblend<Packet2d>(ifPacket, (Packet2d)thenPacket.v,
334  (Packet2d)elsePacket.v);
335 }
336 
337 //---------- double ----------
338 
339 struct Packet1cd {
340  EIGEN_STRONG_INLINE Packet1cd() {
341  }
342  EIGEN_STRONG_INLINE explicit Packet1cd(const std::complex<double>& a) {
343  v[0] = std::real(a);
344  v[1] = std::imag(a);
345  }
346  EIGEN_STRONG_INLINE explicit Packet1cd(const Packet2d& a) : v(a) {
347  }
348  EIGEN_STRONG_INLINE Packet1cd(const Packet1cd& a) : v(a.v) {
349  }
350  EIGEN_STRONG_INLINE Packet1cd& operator=(const Packet1cd& b) {
351  v = b.v;
352  return *this;
353  }
354  EIGEN_STRONG_INLINE Packet1cd conjugate(void) const {
355  static const v2u64 p2ul_CONJ_XOR = { 0x0, 0x8000000000000000 };
356  return (Packet1cd)pxor(v, (Packet2d)p2ul_CONJ_XOR);
357  }
358  EIGEN_STRONG_INLINE Packet1cd& operator*=(const Packet1cd& b) {
359  Packet2d v1, v2;
360 
361  // Get the real values of a | a1_re | a1_re
362  v1 = (Packet2d)__builtin_msa_ilvev_d((v2i64)v, (v2i64)v);
363  // Get the imag values of a | a1_im | a1_im
364  v2 = (Packet2d)__builtin_msa_ilvod_d((v2i64)v, (v2i64)v);
365  // Multiply the real a with b
366  v1 = pmul(v1, b.v);
367  // Multiply the imag a with b
368  v2 = pmul(v2, b.v);
369  // Conjugate v2
370  v2 = Packet1cd(v2).conjugate().v;
371  // Swap real/imag elements in v2.
372  v2 = (Packet2d)__builtin_msa_shf_w((v4i32)v2, EIGEN_MSA_SHF_I8(2, 3, 0, 1));
373  // Add and return the result
374  v = padd(v1, v2);
375  return *this;
376  }
377  EIGEN_STRONG_INLINE Packet1cd operator*(const Packet1cd& b) const {
378  return Packet1cd(*this) *= b;
379  }
380  EIGEN_STRONG_INLINE Packet1cd& operator+=(const Packet1cd& b) {
381  v = padd(v, b.v);
382  return *this;
383  }
384  EIGEN_STRONG_INLINE Packet1cd operator+(const Packet1cd& b) const {
385  return Packet1cd(*this) += b;
386  }
387  EIGEN_STRONG_INLINE Packet1cd& operator-=(const Packet1cd& b) {
388  v = psub(v, b.v);
389  return *this;
390  }
391  EIGEN_STRONG_INLINE Packet1cd operator-(const Packet1cd& b) const {
392  return Packet1cd(*this) -= b;
393  }
394  EIGEN_STRONG_INLINE Packet1cd& operator/=(const Packet1cd& b) {
395  *this *= b.conjugate();
396  Packet2d s = pmul<Packet2d>(b.v, b.v);
397  s = padd(s, preverse<Packet2d>(s));
398  v = pdiv(v, s);
399  return *this;
400  }
401  EIGEN_STRONG_INLINE Packet1cd operator/(const Packet1cd& b) const {
402  return Packet1cd(*this) /= b;
403  }
404  EIGEN_STRONG_INLINE Packet1cd operator-(void) const {
405  return Packet1cd(pnegate(v));
406  }
407 
408  Packet2d v;
409 };
410 
411 inline std::ostream& operator<<(std::ostream& os, const Packet1cd& value) {
412  os << "[ (" << value.v[0] << ", " << value.v[1] << "i) ]";
413  return os;
414 }
415 
416 template <>
417 struct packet_traits<std::complex<double> > : default_packet_traits {
418  typedef Packet1cd type;
419  typedef Packet1cd half;
420  enum {
421  Vectorizable = 1,
422  AlignedOnScalar = 0,
423  size = 1,
424 
425  HasAdd = 1,
426  HasSub = 1,
427  HasMul = 1,
428  HasDiv = 1,
429  HasNegate = 1,
430  HasAbs = 0,
431  HasAbs2 = 0,
432  HasMin = 0,
433  HasMax = 0,
434  HasSetLinear = 0
435  };
436 };
437 
438 template <>
439 struct unpacket_traits<Packet1cd> {
440  typedef std::complex<double> type;
441  enum { size = 1, alignment = Aligned16, vectorizable=true, masked_load_available=false, masked_store_available=false };
442  typedef Packet1cd half;
443 };
444 
445 template <>
446 EIGEN_STRONG_INLINE Packet1cd pload<Packet1cd>(const std::complex<double>* from) {
448 
449  EIGEN_DEBUG_ALIGNED_LOAD return Packet1cd(pload<Packet2d>((const double*)from));
450 }
451 
452 template <>
453 EIGEN_STRONG_INLINE Packet1cd ploadu<Packet1cd>(const std::complex<double>* from) {
455 
456  EIGEN_DEBUG_UNALIGNED_LOAD return Packet1cd(ploadu<Packet2d>((const double*)from));
457 }
458 
459 template <>
460 EIGEN_STRONG_INLINE Packet1cd pset1<Packet1cd>(const std::complex<double>& from) {
462 
463  return Packet1cd(from);
464 }
465 
466 template <>
467 EIGEN_STRONG_INLINE Packet1cd padd<Packet1cd>(const Packet1cd& a, const Packet1cd& b) {
469 
470  return a + b;
471 }
472 
473 template <>
474 EIGEN_STRONG_INLINE Packet1cd psub<Packet1cd>(const Packet1cd& a, const Packet1cd& b) {
476 
477  return a - b;
478 }
479 
480 template <>
481 EIGEN_STRONG_INLINE Packet1cd pnegate(const Packet1cd& a) {
483 
484  return -a;
485 }
486 
487 template <>
488 EIGEN_STRONG_INLINE Packet1cd pconj(const Packet1cd& a) {
490 
491  return a.conjugate();
492 }
493 
494 template <>
495 EIGEN_STRONG_INLINE Packet1cd pmul<Packet1cd>(const Packet1cd& a, const Packet1cd& b) {
497 
498  return a * b;
499 }
500 
501 template <>
502 EIGEN_STRONG_INLINE Packet1cd pand<Packet1cd>(const Packet1cd& a, const Packet1cd& b) {
504 
505  return Packet1cd(pand(a.v, b.v));
506 }
507 
508 template <>
509 EIGEN_STRONG_INLINE Packet1cd por<Packet1cd>(const Packet1cd& a, const Packet1cd& b) {
511 
512  return Packet1cd(por(a.v, b.v));
513 }
514 
515 template <>
516 EIGEN_STRONG_INLINE Packet1cd pxor<Packet1cd>(const Packet1cd& a, const Packet1cd& b) {
518 
519  return Packet1cd(pxor(a.v, b.v));
520 }
521 
522 template <>
523 EIGEN_STRONG_INLINE Packet1cd pandnot<Packet1cd>(const Packet1cd& a, const Packet1cd& b) {
525 
526  return Packet1cd(pandnot(a.v, b.v));
527 }
528 
529 template <>
530 EIGEN_STRONG_INLINE Packet1cd ploaddup<Packet1cd>(const std::complex<double>* from) {
532 
533  return pset1<Packet1cd>(*from);
534 }
535 
536 template <>
537 EIGEN_STRONG_INLINE void pstore<std::complex<double> >(std::complex<double>* to,
538  const Packet1cd& from) {
540 
541  EIGEN_DEBUG_ALIGNED_STORE pstore<double>((double*)to, from.v);
542 }
543 
544 template <>
545 EIGEN_STRONG_INLINE void pstoreu<std::complex<double> >(std::complex<double>* to,
546  const Packet1cd& from) {
548 
549  EIGEN_DEBUG_UNALIGNED_STORE pstoreu<double>((double*)to, from.v);
550 }
551 
552 template <>
553 EIGEN_STRONG_INLINE void prefetch<std::complex<double> >(const std::complex<double>* addr) {
555 
556  prefetch(reinterpret_cast<const double*>(addr));
557 }
558 
559 template <>
560 EIGEN_DEVICE_FUNC inline Packet1cd pgather<std::complex<double>, Packet1cd>(
561  const std::complex<double>* from, Index stride __attribute__((unused))) {
563 
564  Packet1cd res;
565  res.v[0] = std::real(from[0]);
566  res.v[1] = std::imag(from[0]);
567  return res;
568 }
569 
570 template <>
571 EIGEN_DEVICE_FUNC inline void pscatter<std::complex<double>, Packet1cd>(std::complex<double>* to,
572  const Packet1cd& from,
573  Index stride
574  __attribute__((unused))) {
576 
577  pstore(to, from);
578 }
579 
580 template <>
581 EIGEN_STRONG_INLINE std::complex<double> pfirst<Packet1cd>(const Packet1cd& a) {
583 
584  return std::complex<double>(a.v[0], a.v[1]);
585 }
586 
587 template <>
588 EIGEN_STRONG_INLINE Packet1cd preverse(const Packet1cd& a) {
590 
591  return a;
592 }
593 
594 template <>
595 EIGEN_STRONG_INLINE std::complex<double> predux<Packet1cd>(const Packet1cd& a) {
597 
598  return pfirst(a);
599 }
600 
601 template <>
602 EIGEN_STRONG_INLINE std::complex<double> predux_mul<Packet1cd>(const Packet1cd& a) {
604 
605  return pfirst(a);
606 }
607 
609 
610 template <>
611 EIGEN_STRONG_INLINE Packet1cd pdiv<Packet1cd>(const Packet1cd& a, const Packet1cd& b) {
613 
614  return a / b;
615 }
616 
617 EIGEN_STRONG_INLINE Packet1cd pcplxflip /*<Packet1cd>*/ (const Packet1cd& x) {
619 
620  return Packet1cd(preverse(Packet2d(x.v)));
621 }
622 
623 inline std::ostream& operator<<(std::ostream& os, const PacketBlock<Packet1cd, 2>& value) {
624  os << "[ " << value.packet[0] << ", " << std::endl << " " << value.packet[1] << " ]";
625  return os;
626 }
627 
628 EIGEN_STRONG_INLINE void ptranspose(PacketBlock<Packet1cd, 2>& kernel) {
630 
631  Packet2d v1, v2;
632 
633  v1 = (Packet2d)__builtin_msa_ilvev_d((v2i64)kernel.packet[0].v, (v2i64)kernel.packet[1].v);
634  // Get the imag values of a
635  v2 = (Packet2d)__builtin_msa_ilvod_d((v2i64)kernel.packet[0].v, (v2i64)kernel.packet[1].v);
636 
637  kernel.packet[0].v = v1;
638  kernel.packet[1].v = v2;
639 }
640 
641 } // end namespace internal
642 
643 } // end namespace Eigen
644 
645 #endif // EIGEN_COMPLEX_MSA_H
Array< int, Dynamic, 1 > v
Array< int, 3, 1 > b
const ImagReturnType imag() const
RealReturnType real() const
ConjugateReturnType conjugate() const
#define EIGEN_MAKE_CONJ_HELPER_CPLX_REAL(PACKET_CPLX, PACKET_REAL)
Definition: ConjHelper.h:14
#define EIGEN_DEBUG_ALIGNED_STORE
#define EIGEN_DEBUG_ALIGNED_LOAD
#define EIGEN_DEBUG_UNALIGNED_STORE
#define EIGEN_DEBUG_UNALIGNED_LOAD
#define EIGEN_MSA_SHF_I8(a, b, c, d)
#define EIGEN_MSA_DEBUG
#define EIGEN_DEVICE_FUNC
Definition: Macros.h:883
cout<< "Here is the matrix m:"<< endl<< m<< endl;Matrix< ptrdiff_t, 3, 1 > res
Map< RowVectorXf > v2(M2.data(), M2.size())
M1<< 1, 2, 3, 4, 5, 6, 7, 8, 9;Map< RowVectorXf > v1(M1.data(), M1.size())
@ Aligned16
Definition: Constants.h:237
bfloat16 & operator/=(bfloat16 &a, const bfloat16 &b)
Definition: BFloat16.h:294
bfloat16 & operator*=(bfloat16 &a, const bfloat16 &b)
Definition: BFloat16.h:286
bfloat16 & operator+=(bfloat16 &a, const bfloat16 &b)
Definition: BFloat16.h:282
bfloat16 & operator-=(bfloat16 &a, const bfloat16 &b)
Definition: BFloat16.h:290
bfloat16 operator/(const bfloat16 &a, const bfloat16 &b)
Definition: BFloat16.h:275
std::ostream & operator<<(std::ostream &s, const Packet16c &v)
Packet padd(const Packet &a, const Packet &b)
Packet1cd pxor< Packet1cd >(const Packet1cd &a, const Packet1cd &b)
Definition: MSA/Complex.h:516
Packet2cf pandnot< Packet2cf >(const Packet2cf &a, const Packet2cf &b)
void pstore(Scalar *to, const Packet &from)
void pstore< float >(float *to, const Packet4f &from)
std::complex< float > predux< Packet2cf >(const Packet2cf &a)
__vector int Packet4i
Packet1cd pload< Packet1cd >(const std::complex< double > *from)
Definition: MSA/Complex.h:446
Packet2d pmul< Packet2d >(const Packet2d &a, const Packet2d &b)
Packet2cf padd< Packet2cf >(const Packet2cf &a, const Packet2cf &b)
Packet2cf ploaddup< Packet2cf >(const std::complex< float > *from)
std::complex< float > pfirst< Packet2cf >(const Packet2cf &a)
Packet2cf pset1< Packet2cf >(const std::complex< float > &from)
Packet1cd pmul< Packet1cd >(const Packet1cd &a, const Packet1cd &b)
Definition: MSA/Complex.h:495
Packet1cd pdiv< Packet1cd >(const Packet1cd &a, const Packet1cd &b)
Definition: MSA/Complex.h:611
Packet1cd pandnot< Packet1cd >(const Packet1cd &a, const Packet1cd &b)
Definition: MSA/Complex.h:523
Packet2cf ploadu< Packet2cf >(const std::complex< float > *from)
Packet8h pandnot(const Packet8h &a, const Packet8h &b)
Packet1cd padd< Packet1cd >(const Packet1cd &a, const Packet1cd &b)
Definition: MSA/Complex.h:467
Packet2cf pnegate(const Packet2cf &a)
Packet1cd ploadu< Packet1cd >(const std::complex< double > *from)
Definition: MSA/Complex.h:453
Packet2cf por< Packet2cf >(const Packet2cf &a, const Packet2cf &b)
Packet1cd pcplxflip(const Packet1cd &x)
Definition: MSA/Complex.h:617
std::complex< double > pfirst< Packet1cd >(const Packet1cd &a)
Definition: MSA/Complex.h:581
bfloat16 pfirst(const Packet8bf &a)
void pstoreu< double >(double *to, const Packet4d &from)
Packet2cf pmul< Packet2cf >(const Packet2cf &a, const Packet2cf &b)
Definition: MSA/Complex.h:171
Packet pmul(const Packet &a, const Packet &b)
void ptranspose(PacketBlock< Packet2cf, 2 > &kernel)
EIGEN_DEFINE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS Packet pdiv_complex(const Packet &x, const Packet &y)
Packet2cf pcplxflip< Packet2cf >(const Packet2cf &x)
Packet1cd pand< Packet1cd >(const Packet1cd &a, const Packet1cd &b)
Definition: MSA/Complex.h:502
Packet2cf pxor< Packet2cf >(const Packet2cf &a, const Packet2cf &b)
Packet4f ploadu< Packet4f >(const float *from)
std::complex< double > predux_mul< Packet1cd >(const Packet1cd &a)
Definition: MSA/Complex.h:602
Packet psub(const Packet &a, const Packet &b)
void prefetch(const Scalar *addr)
std::complex< double > predux< Packet1cd >(const Packet1cd &a)
Definition: MSA/Complex.h:595
Packet1cd por< Packet1cd >(const Packet1cd &a, const Packet1cd &b)
Definition: MSA/Complex.h:509
Packet8h pand(const Packet8h &a, const Packet8h &b)
Packet2d ploadu< Packet2d >(const double *from)
void pstoreu< float >(float *to, const Packet4f &from)
Packet2cf pload< Packet2cf >(const std::complex< float > *from)
Packet2cf pand< Packet2cf >(const Packet2cf &a, const Packet2cf &b)
Packet8h pxor(const Packet8h &a, const Packet8h &b)
Packet1cd ploaddup< Packet1cd >(const std::complex< double > *from)
Definition: MSA/Complex.h:530
Packet pdiv(const Packet &a, const Packet &b)
Packet4i pblend(const Selector< 4 > &ifPacket, const Packet4i &thenPacket, const Packet4i &elsePacket)
Packet1cd pset1< Packet1cd >(const std::complex< double > &from)
Definition: MSA/Complex.h:460
Packet2cf pconj(const Packet2cf &a)
Packet2cf pdiv< Packet2cf >(const Packet2cf &a, const Packet2cf &b)
Packet2d pload< Packet2d >(const double *from)
Packet2cf preverse(const Packet2cf &a)
Packet4f pload< Packet4f >(const float *from)
Packet8h por(const Packet8h &a, const Packet8h &b)
svint32_t PacketXi __attribute__((arm_sve_vector_bits(EIGEN_ARM64_SVE_VL)))
__vector float Packet4f
Packet2cf psub< Packet2cf >(const Packet2cf &a, const Packet2cf &b)
Packet1cd psub< Packet1cd >(const Packet1cd &a, const Packet1cd &b)
Definition: MSA/Complex.h:474
void pstore< double >(double *to, const Packet4d &from)
std::complex< float > predux_mul< Packet2cf >(const Packet2cf &a)
: InteropHeaders
Definition: Core:139
const CwiseBinaryOp< internal::scalar_difference_op< typename DenseDerived::Scalar, typename SparseDerived::Scalar >, const DenseDerived, const SparseDerived > operator-(const MatrixBase< DenseDerived > &a, const SparseMatrixBase< SparseDerived > &b)
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
Definition: Meta.h:82
const Product< MatrixDerived, PermutationDerived, AliasFreeProduct > operator*(const MatrixBase< MatrixDerived > &matrix, const PermutationBase< PermutationDerived > &permutation)
const CwiseBinaryOp< internal::scalar_sum_op< typename DenseDerived::Scalar, typename SparseDerived::Scalar >, const DenseDerived, const SparseDerived > operator+(const MatrixBase< DenseDerived > &a, const SparseMatrixBase< SparseDerived > &b)
Definition: BFloat16.h:222