LSX/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) 2023 zang ruochen <zangruochen@loongson.cn>
5 // copyright (c) 2024 XiWei Gu <guxiwei-hf@loongson.cn>
6 //
7 // This Source Code Form is subject to the terms of the Mozilla
8 // Public License v. 2.0. If a copy of the MPL was not distributed
9 // with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
10 
11 #ifndef EIGEN_COMPLEX_LSX_H
12 #define EIGEN_COMPLEX_LSX_H
13 
14 // IWYU pragma: private
15 #include "../../InternalHeaderCheck.h"
16 
17 namespace Eigen {
18 
19 namespace internal {
20 
21 //---------- float ----------
22 struct Packet2cf {
24  EIGEN_STRONG_INLINE explicit Packet2cf(const __m128& a) : v(a) {}
25  Packet4f v;
26 };
27 
28 template <>
29 struct packet_traits<std::complex<float> > : default_packet_traits {
30  typedef Packet2cf type;
31  typedef Packet2cf half;
32  enum {
33  Vectorizable = 1,
34  AlignedOnScalar = 1,
35  size = 2,
36 
37  HasAdd = 1,
38  HasSub = 1,
39  HasMul = 1,
40  HasDiv = 1,
41  HasNegate = 1,
42  HasSqrt = 1,
43  HasExp = 1,
44  HasAbs = 0,
45  HasLog = 1,
46  HasAbs2 = 0,
47  HasMin = 0,
48  HasMax = 0,
49  HasSetLinear = 0
50  };
51 };
52 
53 template <>
54 struct unpacket_traits<Packet2cf> {
55  typedef std::complex<float> type;
56  typedef Packet2cf half;
57  typedef Packet4f as_real;
58  enum {
59  size = 2,
61  vectorizable = true,
62  masked_load_available = false,
64  };
65 };
66 
67 template <>
68 EIGEN_STRONG_INLINE Packet2cf padd<Packet2cf>(const Packet2cf& a, const Packet2cf& b) {
69  return Packet2cf(__lsx_vfadd_s(a.v, b.v));
70 }
71 template <>
72 EIGEN_STRONG_INLINE Packet2cf psub<Packet2cf>(const Packet2cf& a, const Packet2cf& b) {
73  return Packet2cf(__lsx_vfsub_s(a.v, b.v));
74 }
75 
76 template <>
77 EIGEN_STRONG_INLINE Packet2cf pnegate(const Packet2cf& a) {
78  const uint32_t b[4] = {0x80000000u, 0x80000000u, 0x80000000u, 0x80000000u};
79  Packet4i mask = (Packet4i)__lsx_vld(b, 0);
80  Packet2cf res;
81  res.v = (Packet4f)__lsx_vxor_v((__m128i)a.v, mask);
82  return res;
83 }
84 
85 template <>
86 EIGEN_STRONG_INLINE Packet2cf pconj(const Packet2cf& a) {
87  const uint32_t b[4] = {0x00000000u, 0x80000000u, 0x00000000u, 0x80000000u};
88  Packet4i mask = (__m128i)__lsx_vld(b, 0);
89  Packet2cf res;
90  res.v = (Packet4f)__lsx_vxor_v((__m128i)a.v, mask);
91  return res;
92 }
93 
94 template <>
96  Packet4f part0_tmp = (Packet4f)__lsx_vfmul_s(a.v, b.v);
97  Packet4f part0 = __lsx_vfsub_s(part0_tmp, (__m128)__lsx_vshuf4i_w(part0_tmp, 0x31));
98  Packet4f part1_tmp = __lsx_vfmul_s((__m128)__lsx_vshuf4i_w(a.v, 0xb1), b.v);
99  Packet4f part1 = __lsx_vfadd_s(part1_tmp, (__m128)__lsx_vshuf4i_w(part1_tmp, 0x31));
100  Packet2cf res;
101  res.v = (Packet4f)__lsx_vpackev_w((__m128i)part1, (__m128i)part0);
102  return res;
103 }
104 
105 template <>
107  return Packet2cf(ptrue(Packet4f(a.v)));
108 }
109 
110 template <>
111 EIGEN_STRONG_INLINE Packet2cf pand<Packet2cf>(const Packet2cf& a, const Packet2cf& b) {
112  Packet2cf res;
113  res.v = (Packet4f)__lsx_vand_v((__m128i)a.v, (__m128i)b.v);
114  return res;
115 }
116 
117 template <>
118 EIGEN_STRONG_INLINE Packet2cf por<Packet2cf>(const Packet2cf& a, const Packet2cf& b) {
119  Packet2cf res;
120  res.v = (Packet4f)__lsx_vor_v((__m128i)a.v, (__m128i)b.v);
121  return res;
122 }
123 
124 template <>
125 EIGEN_STRONG_INLINE Packet2cf pxor<Packet2cf>(const Packet2cf& a, const Packet2cf& b) {
126  Packet2cf res;
127  res.v = (Packet4f)__lsx_vxor_v((__m128i)a.v, (__m128i)b.v);
128  return res;
129 }
130 
131 template <>
132 EIGEN_STRONG_INLINE Packet2cf pandnot<Packet2cf>(const Packet2cf& a, const Packet2cf& b) {
133  Packet2cf res;
134  res.v = (Packet4f)__lsx_vandn_v((__m128i)b.v, (__m128i)a.v);
135  return res;
136 }
137 
138 template <>
139 EIGEN_STRONG_INLINE Packet2cf pload<Packet2cf>(const std::complex<float>* from) {
140  EIGEN_DEBUG_ALIGNED_LOAD return Packet2cf(pload<Packet4f>(&numext::real_ref(*from)));
141 }
142 
143 template <>
144 EIGEN_STRONG_INLINE Packet2cf ploadu<Packet2cf>(const std::complex<float>* from) {
146 }
147 
148 template <>
149 EIGEN_STRONG_INLINE Packet2cf pset1<Packet2cf>(const std::complex<float>& from) {
150  float f0 = from.real(), f1 = from.imag();
151  Packet4f re = {f0, f0, f0, f0};
152  Packet4f im = {f1, f1, f1, f1};
153  return Packet2cf((Packet4f)__lsx_vilvl_w((__m128i)im, (__m128i)re));
154 }
155 
156 template <>
157 EIGEN_STRONG_INLINE Packet2cf ploaddup<Packet2cf>(const std::complex<float>* from) {
158  return pset1<Packet2cf>(*from);
159 }
160 
161 template <>
162 EIGEN_STRONG_INLINE void pstore<std::complex<float> >(std::complex<float>* to, const Packet2cf& from) {
164 }
165 
166 template <>
167 EIGEN_STRONG_INLINE void pstoreu<std::complex<float> >(std::complex<float>* to, const Packet2cf& from) {
169 }
170 
171 template <>
172 EIGEN_DEVICE_FUNC inline Packet2cf pgather<std::complex<float>, Packet2cf>(const std::complex<float>* from,
173  Index stride) {
174  Packet2cf res;
175  __m128i tmp = __lsx_vldrepl_d(from, 0);
176  __m128i tmp1 = __lsx_vldrepl_d(from + stride, 0);
177  tmp = __lsx_vilvl_d(tmp1, tmp);
178  res.v = (__m128)tmp;
179  return res;
180 }
181 
182 template <>
183 EIGEN_DEVICE_FUNC inline void pscatter<std::complex<float>, Packet2cf>(std::complex<float>* to, const Packet2cf& from,
184  Index stride) {
185  __lsx_vstelm_d((__m128i)from.v, to, 0, 0);
186  __lsx_vstelm_d((__m128i)from.v, to + stride, 0, 1);
187 }
188 
189 template <>
190 EIGEN_STRONG_INLINE void prefetch<std::complex<float> >(const std::complex<float>* addr) {
191  __builtin_prefetch(addr);
192 }
193 
194 template <>
195 EIGEN_STRONG_INLINE std::complex<float> pfirst<Packet2cf>(const Packet2cf& a) {
196  EIGEN_ALIGN16 std::complex<float> res[2];
197  __lsx_vst(a.v, res, 0);
198  return res[0];
199 }
200 
201 template <>
202 EIGEN_STRONG_INLINE Packet2cf preverse(const Packet2cf& a) {
203  Packet2cf res;
204  res.v = (Packet4f)__lsx_vshuf4i_w(a.v, 0x4e);
205  return res;
206 }
207 
208 template <>
209 EIGEN_STRONG_INLINE std::complex<float> predux<Packet2cf>(const Packet2cf& a) {
210  return pfirst(Packet2cf(__lsx_vfadd_s(a.v, vec4f_movehl(a.v, a.v))));
211 }
212 
213 template <>
214 EIGEN_STRONG_INLINE std::complex<float> predux_mul<Packet2cf>(const Packet2cf& a) {
215  return pfirst(pmul(a, Packet2cf(vec4f_movehl(a.v, a.v))));
216 }
217 
218 EIGEN_STRONG_INLINE Packet2cf pcplxflip /* <Packet2cf> */ (const Packet2cf& x) {
219  return Packet2cf(vec4f_swizzle1(x.v, 1, 0, 3, 2));
220 }
221 
223 
224 template <>
225 EIGEN_STRONG_INLINE Packet2cf pdiv<Packet2cf>(const Packet2cf& a, const Packet2cf& b) {
226  return pdiv_complex(a, b);
227 }
228 
229 template <>
230 EIGEN_STRONG_INLINE Packet2cf plog<Packet2cf>(const Packet2cf& a) {
231  return plog_complex(a);
232 }
233 
234 template <>
236  __m128 v = {0.0f, 0.0f, 0.0f, 0.0f};
237  return (Packet2cf)v;
238 }
239 
240 template <>
242  Packet2cf result, t0, t1, t2;
243  t1 = pzero(t1);
244  t0.v = (__m128)__lsx_vpackev_w((__m128i)a.v, (__m128i)a.v);
245  t2.v = __lsx_vfmadd_s(t0.v, b.v, c.v);
246  result.v = __lsx_vfadd_s(t2.v, t1.v);
247  t1.v = __lsx_vfsub_s(t1.v, a.v);
248  t1.v = (__m128)__lsx_vpackod_w((__m128i)a.v, (__m128i)t1.v);
249  t2.v = (__m128)__lsx_vshuf4i_w((__m128i)b.v, 0xb1);
250  result.v = __lsx_vfmadd_s(t1.v, t2.v, result.v);
251  return result;
252 }
253 
254 template <>
255 EIGEN_STRONG_INLINE Packet2cf pexp<Packet2cf>(const Packet2cf& a) {
256  return pexp_complex(a);
257 }
258 
259 //---------- double ----------
260 struct Packet1cd {
262  EIGEN_STRONG_INLINE explicit Packet1cd(const __m128d& a) : v(a) {}
264 };
265 
266 template <>
267 struct packet_traits<std::complex<double> > : default_packet_traits {
268  typedef Packet1cd type;
269  typedef Packet1cd half;
270  enum {
271  Vectorizable = 1,
272  AlignedOnScalar = 0,
273  size = 1,
274 
275  HasAdd = 1,
276  HasSub = 1,
277  HasMul = 1,
278  HasDiv = 1,
279  HasNegate = 1,
280  HasSqrt = 1,
281  HasAbs = 0,
282  HasLog = 1,
283  HasAbs2 = 0,
284  HasMin = 0,
285  HasMax = 0,
286  HasSetLinear = 0
287  };
288 };
289 
290 template <>
292  typedef std::complex<double> type;
293  typedef Packet1cd half;
294  typedef Packet2d as_real;
295  enum {
296  size = 1,
298  vectorizable = true,
300  masked_store_available = false
301  };
302 };
303 
304 template <>
306  return Packet1cd(__lsx_vfadd_d(a.v, b.v));
307 }
308 template <>
310  return Packet1cd(__lsx_vfsub_d(a.v, b.v));
311 }
312 template <>
314  return Packet1cd(pnegate(Packet2d(a.v)));
315 }
316 
317 template <>
319  const uint64_t tmp[2] = {0x0000000000000000u, 0x8000000000000000u};
320  __m128i mask = __lsx_vld(tmp, 0);
321  Packet1cd res;
322  res.v = (Packet2d)__lsx_vxor_v((__m128i)a.v, mask);
323  return res;
324 }
325 
326 template <>
328  Packet2d tmp_real = __lsx_vfmul_d(a.v, b.v);
329  Packet2d real = __lsx_vfsub_d(tmp_real, preverse(tmp_real));
330 
331  Packet2d tmp_imag = __lsx_vfmul_d(preverse(a.v), b.v);
332  Packet2d imag = (__m128d)__lsx_vfadd_d((__m128d)tmp_imag, preverse(tmp_imag));
333  Packet1cd res;
334  res.v = (__m128d)__lsx_vilvl_d((__m128i)imag, (__m128i)real);
335  return res;
336 }
337 
338 template <>
340  return Packet1cd(ptrue(Packet2d(a.v)));
341 }
342 template <>
344  Packet1cd res;
345  res.v = (Packet2d)__lsx_vand_v((__m128i)a.v, (__m128i)b.v);
346  return res;
347 }
348 template <>
350  Packet1cd res;
351  res.v = (Packet2d)__lsx_vor_v((__m128i)a.v, (__m128i)b.v);
352  return res;
353 }
354 template <>
356  Packet1cd res;
357  res.v = (Packet2d)__lsx_vxor_v((__m128i)a.v, (__m128i)b.v);
358  return res;
359 }
360 template <>
362  Packet1cd res;
363  res.v = (Packet2d)__lsx_vandn_v((__m128i)b.v, (__m128i)a.v);
364  return res;
365 }
366 
367 // FIXME force unaligned load, this is a temporary fix
368 template <>
369 EIGEN_STRONG_INLINE Packet1cd pload<Packet1cd>(const std::complex<double>* from) {
370  EIGEN_DEBUG_ALIGNED_LOAD return Packet1cd(pload<Packet2d>((const double*)from));
371 }
372 template <>
373 EIGEN_STRONG_INLINE Packet1cd ploadu<Packet1cd>(const std::complex<double>* from) {
374  EIGEN_DEBUG_UNALIGNED_LOAD return Packet1cd(ploadu<Packet2d>((const double*)from));
375 }
376 template <>
378 pset1<Packet1cd>(const std::complex<double>& from) { /* here we really have to use unaligned loads :( */
379  return ploadu<Packet1cd>(&from);
380 }
381 
382 template <>
383 EIGEN_STRONG_INLINE Packet1cd ploaddup<Packet1cd>(const std::complex<double>* from) {
384  return pset1<Packet1cd>(*from);
385 }
386 
387 // FIXME force unaligned store, this is a temporary fix
388 template <>
389 EIGEN_STRONG_INLINE void pstore<std::complex<double> >(std::complex<double>* to, const Packet1cd& from) {
390  EIGEN_DEBUG_ALIGNED_STORE pstore((double*)to, Packet2d(from.v));
391 }
392 template <>
393 EIGEN_STRONG_INLINE void pstoreu<std::complex<double> >(std::complex<double>* to, const Packet1cd& from) {
394  EIGEN_DEBUG_UNALIGNED_STORE pstoreu((double*)to, Packet2d(from.v));
395 }
396 
397 template <>
398 EIGEN_STRONG_INLINE void prefetch<std::complex<double> >(const std::complex<double>* addr) {
399  __builtin_prefetch(addr);
400 }
401 
402 template <>
403 EIGEN_STRONG_INLINE std::complex<double> pfirst<Packet1cd>(const Packet1cd& a) {
404  EIGEN_ALIGN16 double res[2];
405  __lsx_vst(a.v, res, 0);
406  return std::complex<double>(res[0], res[1]);
407 }
408 
409 template <>
411  return a;
412 }
413 
414 template <>
415 EIGEN_STRONG_INLINE std::complex<double> predux<Packet1cd>(const Packet1cd& a) {
416  return pfirst(a);
417 }
418 
419 template <>
420 EIGEN_STRONG_INLINE std::complex<double> predux_mul<Packet1cd>(const Packet1cd& a) {
421  return pfirst(a);
422 }
423 
425 
426 template <>
428  return pdiv_complex(a, b);
429 }
430 
431 EIGEN_STRONG_INLINE Packet1cd pcplxflip /* <Packet1cd> */ (const Packet1cd& x) {
432  return Packet1cd(preverse(Packet2d(x.v)));
433 }
434 
435 EIGEN_DEVICE_FUNC inline void ptranspose(PacketBlock<Packet2cf, 2>& kernel) {
436  Packet4f tmp1 = (Packet4f)__lsx_vilvl_w((__m128i)kernel.packet[1].v, (__m128i)kernel.packet[0].v);
437  Packet4f tmp2 = (Packet4f)__lsx_vilvh_w((__m128i)kernel.packet[1].v, (__m128i)kernel.packet[0].v);
438  kernel.packet[0].v = (Packet4f)__lsx_vshuf4i_w(tmp1, 0xd8);
439  kernel.packet[1].v = (Packet4f)__lsx_vshuf4i_w(tmp2, 0xd8);
440 }
441 
442 template <>
443 EIGEN_STRONG_INLINE Packet2cf pcmp_eq(const Packet2cf& a, const Packet2cf& b) {
444  Packet4f eq = (Packet4f)__lsx_vfcmp_ceq_s(a.v, b.v);
445  return Packet2cf(pand<Packet4f>(eq, vec4f_swizzle1(eq, 1, 0, 3, 2)));
446 }
447 
448 template <>
450  Packet2d eq = (Packet2d)__lsx_vfcmp_ceq_d(a.v, b.v);
451  return Packet1cd(pand<Packet2d>(eq, preverse(eq)));
452 }
453 
454 template <>
455 EIGEN_DEVICE_FUNC inline Packet2cf pselect(const Packet2cf& mask, const Packet2cf& a, const Packet2cf& b) {
456  Packet2cf res;
457  res.v = (Packet4f)__lsx_vbitsel_v((__m128i)b.v, (__m128i)a.v, (__m128i)mask.v);
458  return res;
459 }
460 
461 template <>
463  return psqrt_complex<Packet1cd>(a);
464 }
465 
466 template <>
467 EIGEN_STRONG_INLINE Packet2cf psqrt<Packet2cf>(const Packet2cf& a) {
468  return psqrt_complex<Packet2cf>(a);
469 }
470 
471 template <>
473  return plog_complex(a);
474 }
475 
476 template <>
478  __m128d v = {0.0, 0.0};
479  return (Packet1cd)v;
480 }
481 
482 template <>
484  Packet1cd result, t0, t1, t2;
485  t1 = pzero(t1);
486  t0.v = (__m128d)__lsx_vpackev_d((__m128i)a.v, (__m128i)a.v);
487  t2.v = __lsx_vfmadd_d(t0.v, b.v, c.v);
488  result.v = __lsx_vfadd_d(t2.v, t1.v);
489  t1.v = __lsx_vfsub_d(t1.v, a.v);
490  t1.v = (__m128d)__lsx_vpackod_d((__m128i)a.v, (__m128i)t1.v);
491  t2.v = (__m128d)__lsx_vshuf4i_d((__m128i)t2.v, (__m128i)b.v, 0xb);
492  result.v = __lsx_vfmadd_d(t1.v, t2.v, result.v);
493  return result;
494 }
495 
496 template <>
497 EIGEN_DEVICE_FUNC inline Packet1cd pgather<std::complex<double>, Packet1cd>(const std::complex<double>* from,
498  Index /* stride */) {
499  Packet1cd res;
500  __m128i tmp = __lsx_vld((void*)from, 0);
501  res.v = (__m128d)tmp;
502  return res;
503 }
504 
505 template <>
506 EIGEN_DEVICE_FUNC inline void pscatter<std::complex<double>, Packet1cd>(std::complex<double>* to, const Packet1cd& from,
507  Index /* stride */) {
508  __lsx_vst((__m128i)from.v, (void*)to, 0);
509 }
510 
512  Packet2d tmp = (__m128d)__lsx_vilvl_d((__m128i)kernel.packet[1].v, (__m128i)kernel.packet[0].v);
513  kernel.packet[1].v = (__m128d)__lsx_vilvh_d((__m128i)kernel.packet[1].v, (__m128i)kernel.packet[0].v);
514  kernel.packet[0].v = tmp;
515 }
516 
517 } // end namespace internal
518 } // end namespace Eigen
519 
520 #endif // EIGEN_COMPLEX_LSX_H
Array< int, Dynamic, 1 > v
Definition: Array_initializer_list_vector_cxx11.cpp:1
#define EIGEN_ALIGN16
Definition: ConfigureVectorization.h:142
#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
@ Aligned16
Definition: Constants.h:237
const Scalar * a
Definition: level2_cplx_impl.h:32
Eigen::Matrix< Scalar, Dynamic, Dynamic, ColMajor > tmp
Definition: level3_impl.h:365
__m128d Packet2d
Definition: LSX/PacketMath.h:36
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_STRONG_INLINE Packet8f pzero(const Packet8f &)
Definition: AVX/PacketMath.h:774
EIGEN_STRONG_INLINE Packet2cf psqrt< Packet2cf >(const Packet2cf &a)
Definition: AltiVec/Complex.h:370
__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 ptrue< Packet2cf >(const Packet2cf &a)
Definition: LSX/Complex.h:106
EIGEN_STRONG_INLINE Packet2cf pandnot< Packet2cf >(const Packet2cf &a, const Packet2cf &b)
Definition: AltiVec/Complex.h:285
EIGEN_STRONG_INLINE Packet2d pand< Packet2d >(const Packet2d &a, const Packet2d &b)
Definition: LSX/PacketMath.h:880
EIGEN_STRONG_INLINE Packet1cd psqrt< Packet1cd >(const Packet1cd &a)
Definition: LSX/Complex.h:462
EIGEN_STRONG_INLINE void ptranspose(PacketBlock< Packet2cf, 2 > &kernel)
Definition: AltiVec/Complex.h:339
EIGEN_STRONG_INLINE Packet1cd plog< Packet1cd >(const Packet1cd &a)
Definition: LSX/Complex.h:472
EIGEN_STRONG_INLINE Packet2cf ploaddup< Packet2cf >(const std::complex< float > *from)
Definition: AltiVec/Complex.h:162
EIGEN_STRONG_INLINE Packet4f vec4f_movehl(const Packet4f &a, const Packet4f &b)
Definition: LSX/PacketMath.h:135
EIGEN_STRONG_INLINE Packet2cf pmul< Packet2cf >(const Packet2cf &a, const Packet2cf &b)
Definition: LSX/Complex.h:95
EIGEN_STRONG_INLINE Packet1cd pzero< Packet1cd >(const Packet1cd &)
Definition: LSX/Complex.h:477
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 Packet2cf pset1< Packet2cf >(const std::complex< float > &from)
Definition: AltiVec/Complex.h:125
EIGEN_DEFINE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS Packet plog_complex(const Packet &x)
Definition: GenericPacketMathFunctions.h:1338
EIGEN_STRONG_INLINE Packet2cf preverse(const Packet2cf &a)
Definition: AltiVec/Complex.h:303
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 ptrue(const Packet8h &a)
Definition: AVX/PacketMath.h:2263
EIGEN_DEFINE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS Packet pexp_complex(const Packet &a)
Definition: GenericPacketMathFunctions.h:1366
EIGEN_STRONG_INLINE Packet2d pload< Packet2d >(const double *from)
Definition: LSX/PacketMath.h:1407
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 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 pmadd< Packet1cd >(const Packet1cd &a, const Packet1cd &b, const Packet1cd &c)
Definition: LSX/Complex.h:483
EIGEN_STRONG_INLINE Packet1cd pload< Packet1cd >(const std::complex< double > *from)
Definition: LSX/Complex.h:369
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 Packet2cf pmadd< Packet2cf >(const Packet2cf &a, const Packet2cf &b, const Packet2cf &c)
Definition: LSX/Complex.h:241
EIGEN_STRONG_INLINE Packet2cf pcmp_eq(const Packet2cf &a, const Packet2cf &b)
Definition: AltiVec/Complex.h:353
EIGEN_STRONG_INLINE Packet4f vec4f_swizzle1(const Packet4f &a, int p, int q, int r, int s)
Definition: LSX/PacketMath.h:126
EIGEN_STRONG_INLINE Packet2cf pexp< Packet2cf >(const Packet2cf &a)
Definition: AltiVec/Complex.h:380
EIGEN_STRONG_INLINE Packet1cd pandnot< Packet1cd >(const Packet1cd &a, const Packet1cd &b)
Definition: LSX/Complex.h:361
EIGEN_DEVICE_FUNC void pstoreu(Scalar *to, const Packet &from)
Definition: GenericPacketMath.h:911
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_STRONG_INLINE Packet4f pselect(const Packet4f &mask, const Packet4f &a, const Packet4f &b)
Definition: AltiVec/PacketMath.h:1474
EIGEN_STRONG_INLINE Packet1cd ptrue< Packet1cd >(const Packet1cd &a)
Definition: LSX/Complex.h:339
EIGEN_STRONG_INLINE Packet4f pand< Packet4f >(const Packet4f &a, const Packet4f &b)
Definition: AltiVec/PacketMath.h:1406
EIGEN_STRONG_INLINE Packet2cf plog< Packet2cf >(const Packet2cf &a)
Definition: AltiVec/Complex.h:375
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 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
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
std::uint32_t uint32_t
Definition: Meta.h:40
std::uint64_t uint64_t
Definition: Meta.h:42
Namespace containing all symbols from the Eigen library.
Definition: bench_norm.cpp:70
DerType::Scalar imag(const AutoDiffScalar< DerType > &)
Definition: AutoDiffScalar.h:490
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
int c
Definition: calibrate.py:100
Definition: Eigen_Colamd.h:49
list x
Definition: plotDoE.py:28
Definition: LSX/Complex.h:260
EIGEN_STRONG_INLINE Packet1cd()
Definition: LSX/Complex.h:261
Packet2d v
Definition: LSX/Complex.h:263
EIGEN_STRONG_INLINE Packet1cd(const __m128d &a)
Definition: LSX/Complex.h:262
Definition: AltiVec/Complex.h:38
Packet4f v
Definition: AltiVec/Complex.h:78
EIGEN_STRONG_INLINE Packet2cf(const __m128 &a)
Definition: LSX/Complex.h:24
EIGEN_STRONG_INLINE Packet2cf()
Definition: LSX/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
Packet1cd half
Definition: LSX/Complex.h:269
Packet1cd type
Definition: LSX/Complex.h:268
Packet2cf half
Definition: LSX/Complex.h:31
Packet2cf type
Definition: LSX/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
Packet2d as_real
Definition: LSX/Complex.h:294
Packet1cd half
Definition: LSX/Complex.h:293
std::complex< double > type
Definition: LSX/Complex.h:292
std::complex< float > type
Definition: LSX/Complex.h:55
Packet4f as_real
Definition: LSX/Complex.h:57
Packet2cf half
Definition: LSX/Complex.h:56
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
Definition: main.h:116
Definition: main.h:115