NEON/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) 2010 Gael Guennebaud <gael.guennebaud@inria.fr>
5 // Copyright (C) 2010 Konstantinos Margaritis <markos@freevec.org>
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_NEON_H
12 #define EIGEN_COMPLEX_NEON_H
13 
14 // IWYU pragma: private
15 #include "../../InternalHeaderCheck.h"
16 
17 namespace Eigen {
18 
19 namespace internal {
20 
21 inline uint32x4_t p4ui_CONJ_XOR() {
22 // See bug 1325, clang fails to call vld1q_u64.
23 #if EIGEN_COMP_CLANG || EIGEN_COMP_CASTXML
24  uint32x4_t ret = {0x00000000, 0x80000000, 0x00000000, 0x80000000};
25  return ret;
26 #else
27  static const uint32_t conj_XOR_DATA[] = {0x00000000, 0x80000000, 0x00000000, 0x80000000};
28  return vld1q_u32(conj_XOR_DATA);
29 #endif
30 }
31 
32 inline uint32x2_t p2ui_CONJ_XOR() {
33  static const uint32_t conj_XOR_DATA[] = {0x00000000, 0x80000000};
34  return vld1_u32(conj_XOR_DATA);
35 }
36 
37 //---------- float ----------
38 
39 struct Packet1cf {
41  EIGEN_STRONG_INLINE explicit Packet1cf(const Packet2f& a) : v(a) {}
43 };
44 struct Packet2cf {
46  EIGEN_STRONG_INLINE explicit Packet2cf(const Packet4f& a) : v(a) {}
47  Packet4f v;
48 };
49 
50 template <>
51 struct packet_traits<std::complex<float> > : default_packet_traits {
52  typedef Packet2cf type;
53  typedef Packet1cf half;
54  enum {
55  Vectorizable = 1,
56  AlignedOnScalar = 1,
57  size = 2,
58 
59  HasAdd = 1,
60  HasSub = 1,
61  HasMul = 1,
62  HasDiv = 1,
63  HasNegate = 1,
64  HasSqrt = 1,
65  HasLog = 1,
66  HasExp = 1,
67  HasAbs = 0,
68  HasAbs2 = 0,
69  HasMin = 0,
70  HasMax = 0,
71  HasSetLinear = 0
72  };
73 };
74 
75 template <>
77  typedef std::complex<float> type;
78  typedef Packet1cf half;
79  typedef Packet2f as_real;
80  enum {
81  size = 1,
83  vectorizable = true,
86  };
87 };
88 template <>
89 struct unpacket_traits<Packet2cf> {
90  typedef std::complex<float> type;
91  typedef Packet1cf half;
92  typedef Packet4f as_real;
93  enum {
94  size = 2,
96  vectorizable = true,
97  masked_load_available = false,
99  };
100 };
101 
102 template <>
104  return Packet1cf(vset_lane_f32(a, vdup_n_f32(0.f), 0));
105 }
106 template <>
108  return Packet2cf(vreinterpretq_f32_u64(vmovl_u32(vreinterpret_u32_f32(a))));
109 }
110 
111 template <>
113  return Packet1cf(vdup_n_f32(0.0f));
114 }
115 
116 template <>
117 EIGEN_STRONG_INLINE Packet2cf pzero(const Packet2cf& /*a*/) {
118  return Packet2cf(vdupq_n_f32(0.0f));
119 }
120 
121 template <>
122 EIGEN_STRONG_INLINE Packet1cf pset1<Packet1cf>(const std::complex<float>& from) {
123  return Packet1cf(vld1_f32(reinterpret_cast<const float*>(&from)));
124 }
125 template <>
126 EIGEN_STRONG_INLINE Packet2cf pset1<Packet2cf>(const std::complex<float>& from) {
127  const float32x2_t r64 = vld1_f32(reinterpret_cast<const float*>(&from));
128  return Packet2cf(vcombine_f32(r64, r64));
129 }
130 
131 template <>
133  return Packet1cf(padd<Packet2f>(a.v, b.v));
134 }
135 template <>
136 EIGEN_STRONG_INLINE Packet2cf padd<Packet2cf>(const Packet2cf& a, const Packet2cf& b) {
137  return Packet2cf(padd<Packet4f>(a.v, b.v));
138 }
139 
140 template <>
142  return Packet1cf(psub<Packet2f>(a.v, b.v));
143 }
144 template <>
145 EIGEN_STRONG_INLINE Packet2cf psub<Packet2cf>(const Packet2cf& a, const Packet2cf& b) {
146  return Packet2cf(psub<Packet4f>(a.v, b.v));
147 }
148 
149 template <>
151  return Packet1cf(pnegate<Packet2f>(a.v));
152 }
153 template <>
154 EIGEN_STRONG_INLINE Packet2cf pnegate(const Packet2cf& a) {
155  return Packet2cf(pnegate<Packet4f>(a.v));
156 }
157 
158 template <>
160  const Packet2ui b = Packet2ui(vreinterpret_u32_f32(a.v));
161  return Packet1cf(vreinterpret_f32_u32(veor_u32(b, p2ui_CONJ_XOR())));
162 }
163 template <>
164 EIGEN_STRONG_INLINE Packet2cf pconj(const Packet2cf& a) {
165  const Packet4ui b = Packet4ui(vreinterpretq_u32_f32(a.v));
166  return Packet2cf(vreinterpretq_f32_u32(veorq_u32(b, p4ui_CONJ_XOR())));
167 }
168 
169 #ifdef __ARM_FEATURE_COMPLEX
170 template <>
171 EIGEN_STRONG_INLINE Packet1cf pmadd<Packet1cf>(const Packet1cf& a, const Packet1cf& b, const Packet1cf& c) {
172  Packet1cf result;
173  result.v = vcmla_f32(c.v, a.v, b.v);
174  result.v = vcmla_rot90_f32(result.v, a.v, b.v);
175  return result;
176 }
177 
178 template <>
179 EIGEN_STRONG_INLINE Packet1cf pmul<Packet1cf>(const Packet1cf& a, const Packet1cf& b) {
180  return pmadd(a, b, pzero(a));
181 }
182 #else
183 template <>
185  Packet2f v1, v2;
186 
187  // Get the real values of a | a1_re | a1_re |
188  v1 = vdup_lane_f32(a.v, 0);
189  // Get the imag values of a | a1_im | a1_im |
190  v2 = vdup_lane_f32(a.v, 1);
191  // Multiply the real a with b
192  v1 = vmul_f32(v1, b.v);
193  // Multiply the imag a with b
194  v2 = vmul_f32(v2, b.v);
195  // Conjugate v2
196  v2 = vreinterpret_f32_u32(veor_u32(vreinterpret_u32_f32(v2), p2ui_CONJ_XOR()));
197  // Swap real/imag elements in v2.
198  v2 = vrev64_f32(v2);
199  // Add and return the result
200  return Packet1cf(vadd_f32(v1, v2));
201 }
202 #endif
203 
204 #ifdef __ARM_FEATURE_COMPLEX
205 template <>
206 EIGEN_STRONG_INLINE Packet2cf pmadd<Packet2cf>(const Packet2cf& a, const Packet2cf& b, const Packet2cf& c) {
207  Packet2cf result;
208  result.v = vcmlaq_f32(c.v, a.v, b.v);
209  result.v = vcmlaq_rot90_f32(result.v, a.v, b.v);
210  return result;
211 }
212 
213 template <>
214 EIGEN_STRONG_INLINE Packet2cf pmul<Packet2cf>(const Packet2cf& a, const Packet2cf& b) {
215  return pmadd(a, b, pzero(a));
216 }
217 #else
218 template <>
219 EIGEN_STRONG_INLINE Packet2cf pmul<Packet2cf>(const Packet2cf& a, const Packet2cf& b) {
220  Packet4f v1, v2;
221 
222  // Get the real values of a | a1_re | a1_re | a2_re | a2_re |
223  v1 = vcombine_f32(vdup_lane_f32(vget_low_f32(a.v), 0), vdup_lane_f32(vget_high_f32(a.v), 0));
224  // Get the imag values of a | a1_im | a1_im | a2_im | a2_im |
225  v2 = vcombine_f32(vdup_lane_f32(vget_low_f32(a.v), 1), vdup_lane_f32(vget_high_f32(a.v), 1));
226  // Multiply the real a with b
227  v1 = vmulq_f32(v1, b.v);
228  // Multiply the imag a with b
229  v2 = vmulq_f32(v2, b.v);
230  // Conjugate v2
231  v2 = vreinterpretq_f32_u32(veorq_u32(vreinterpretq_u32_f32(v2), p4ui_CONJ_XOR()));
232  // Swap real/imag elements in v2.
233  v2 = vrev64q_f32(v2);
234  // Add and return the result
235  return Packet2cf(vaddq_f32(v1, v2));
236 }
237 #endif
238 
239 template <>
241  // Compare real and imaginary parts of a and b to get the mask vector:
242  // [re(a[0])==re(b[0]), im(a[0])==im(b[0])]
243  Packet2f eq = pcmp_eq<Packet2f>(a.v, b.v);
244  // Swap real/imag elements in the mask in to get:
245  // [im(a[0])==im(b[0]), re(a[0])==re(b[0])]
246  Packet2f eq_swapped = vrev64_f32(eq);
247  // Return re(a)==re(b) && im(a)==im(b) by computing bitwise AND of eq and eq_swapped
248  return Packet1cf(pand<Packet2f>(eq, eq_swapped));
249 }
250 template <>
251 EIGEN_STRONG_INLINE Packet2cf pcmp_eq(const Packet2cf& a, const Packet2cf& b) {
252  // Compare real and imaginary parts of a and b to get the mask vector:
253  // [re(a[0])==re(b[0]), im(a[0])==im(b[0]), re(a[1])==re(b[1]), im(a[1])==im(b[1])]
254  Packet4f eq = pcmp_eq<Packet4f>(a.v, b.v);
255  // Swap real/imag elements in the mask in to get:
256  // [im(a[0])==im(b[0]), re(a[0])==re(b[0]), im(a[1])==im(b[1]), re(a[1])==re(b[1])]
257  Packet4f eq_swapped = vrev64q_f32(eq);
258  // Return re(a)==re(b) && im(a)==im(b) by computing bitwise AND of eq and eq_swapped
259  return Packet2cf(pand<Packet4f>(eq, eq_swapped));
260 }
261 
262 template <>
264  return Packet1cf(vreinterpret_f32_u32(vand_u32(vreinterpret_u32_f32(a.v), vreinterpret_u32_f32(b.v))));
265 }
266 template <>
267 EIGEN_STRONG_INLINE Packet2cf pand<Packet2cf>(const Packet2cf& a, const Packet2cf& b) {
268  return Packet2cf(vreinterpretq_f32_u32(vandq_u32(vreinterpretq_u32_f32(a.v), vreinterpretq_u32_f32(b.v))));
269 }
270 
271 template <>
273  return Packet1cf(vreinterpret_f32_u32(vorr_u32(vreinterpret_u32_f32(a.v), vreinterpret_u32_f32(b.v))));
274 }
275 template <>
276 EIGEN_STRONG_INLINE Packet2cf por<Packet2cf>(const Packet2cf& a, const Packet2cf& b) {
277  return Packet2cf(vreinterpretq_f32_u32(vorrq_u32(vreinterpretq_u32_f32(a.v), vreinterpretq_u32_f32(b.v))));
278 }
279 
280 template <>
282  return Packet1cf(vreinterpret_f32_u32(veor_u32(vreinterpret_u32_f32(a.v), vreinterpret_u32_f32(b.v))));
283 }
284 template <>
285 EIGEN_STRONG_INLINE Packet2cf pxor<Packet2cf>(const Packet2cf& a, const Packet2cf& b) {
286  return Packet2cf(vreinterpretq_f32_u32(veorq_u32(vreinterpretq_u32_f32(a.v), vreinterpretq_u32_f32(b.v))));
287 }
288 
289 template <>
291  return Packet1cf(vreinterpret_f32_u32(vbic_u32(vreinterpret_u32_f32(a.v), vreinterpret_u32_f32(b.v))));
292 }
293 template <>
294 EIGEN_STRONG_INLINE Packet2cf pandnot<Packet2cf>(const Packet2cf& a, const Packet2cf& b) {
295  return Packet2cf(vreinterpretq_f32_u32(vbicq_u32(vreinterpretq_u32_f32(a.v), vreinterpretq_u32_f32(b.v))));
296 }
297 
298 template <>
299 EIGEN_STRONG_INLINE Packet1cf pload<Packet1cf>(const std::complex<float>* from) {
300  EIGEN_DEBUG_ALIGNED_LOAD return Packet1cf(pload<Packet2f>((const float*)from));
301 }
302 template <>
303 EIGEN_STRONG_INLINE Packet2cf pload<Packet2cf>(const std::complex<float>* from) {
304  EIGEN_DEBUG_ALIGNED_LOAD return Packet2cf(pload<Packet4f>(reinterpret_cast<const float*>(from)));
305 }
306 
307 template <>
308 EIGEN_STRONG_INLINE Packet1cf ploadu<Packet1cf>(const std::complex<float>* from) {
309  EIGEN_DEBUG_UNALIGNED_LOAD return Packet1cf(ploadu<Packet2f>((const float*)from));
310 }
311 template <>
312 EIGEN_STRONG_INLINE Packet2cf ploadu<Packet2cf>(const std::complex<float>* from) {
313  EIGEN_DEBUG_UNALIGNED_LOAD return Packet2cf(ploadu<Packet4f>(reinterpret_cast<const float*>(from)));
314 }
315 
316 template <>
317 EIGEN_STRONG_INLINE Packet1cf ploaddup<Packet1cf>(const std::complex<float>* from) {
318  return pset1<Packet1cf>(*from);
319 }
320 template <>
321 EIGEN_STRONG_INLINE Packet2cf ploaddup<Packet2cf>(const std::complex<float>* from) {
322  return pset1<Packet2cf>(*from);
323 }
324 
325 template <>
326 EIGEN_STRONG_INLINE void pstore<std::complex<float> >(std::complex<float>* to, const Packet1cf& from) {
327  EIGEN_DEBUG_ALIGNED_STORE pstore((float*)to, from.v);
328 }
329 template <>
330 EIGEN_STRONG_INLINE void pstore<std::complex<float> >(std::complex<float>* to, const Packet2cf& from) {
331  EIGEN_DEBUG_ALIGNED_STORE pstore(reinterpret_cast<float*>(to), from.v);
332 }
333 
334 template <>
335 EIGEN_STRONG_INLINE void pstoreu<std::complex<float> >(std::complex<float>* to, const Packet1cf& from) {
336  EIGEN_DEBUG_UNALIGNED_STORE pstoreu((float*)to, from.v);
337 }
338 template <>
339 EIGEN_STRONG_INLINE void pstoreu<std::complex<float> >(std::complex<float>* to, const Packet2cf& from) {
340  EIGEN_DEBUG_UNALIGNED_STORE pstoreu(reinterpret_cast<float*>(to), from.v);
341 }
342 
343 template <>
344 EIGEN_DEVICE_FUNC inline Packet1cf pgather<std::complex<float>, Packet1cf>(const std::complex<float>* from,
345  Index stride) {
346  const Packet2f tmp = vdup_n_f32(std::real(from[0 * stride]));
347  return Packet1cf(vset_lane_f32(std::imag(from[0 * stride]), tmp, 1));
348 }
349 template <>
350 EIGEN_DEVICE_FUNC inline Packet2cf pgather<std::complex<float>, Packet2cf>(const std::complex<float>* from,
351  Index stride) {
352  Packet4f res = vdupq_n_f32(std::real(from[0 * stride]));
353  res = vsetq_lane_f32(std::imag(from[0 * stride]), res, 1);
354  res = vsetq_lane_f32(std::real(from[1 * stride]), res, 2);
355  res = vsetq_lane_f32(std::imag(from[1 * stride]), res, 3);
356  return Packet2cf(res);
357 }
358 
359 template <>
360 EIGEN_DEVICE_FUNC inline void pscatter<std::complex<float>, Packet1cf>(std::complex<float>* to, const Packet1cf& from,
361  Index stride) {
362  to[stride * 0] = std::complex<float>(vget_lane_f32(from.v, 0), vget_lane_f32(from.v, 1));
363 }
364 template <>
365 EIGEN_DEVICE_FUNC inline void pscatter<std::complex<float>, Packet2cf>(std::complex<float>* to, const Packet2cf& from,
366  Index stride) {
367  to[stride * 0] = std::complex<float>(vgetq_lane_f32(from.v, 0), vgetq_lane_f32(from.v, 1));
368  to[stride * 1] = std::complex<float>(vgetq_lane_f32(from.v, 2), vgetq_lane_f32(from.v, 3));
369 }
370 
371 template <>
372 EIGEN_STRONG_INLINE void prefetch<std::complex<float> >(const std::complex<float>* addr) {
373  EIGEN_ARM_PREFETCH(reinterpret_cast<const float*>(addr));
374 }
375 
376 template <>
377 EIGEN_STRONG_INLINE std::complex<float> pfirst<Packet1cf>(const Packet1cf& a) {
378  EIGEN_ALIGN16 std::complex<float> x;
379  vst1_f32(reinterpret_cast<float*>(&x), a.v);
380  return x;
381 }
382 template <>
383 EIGEN_STRONG_INLINE std::complex<float> pfirst<Packet2cf>(const Packet2cf& a) {
384  EIGEN_ALIGN16 std::complex<float> x[2];
385  vst1q_f32(reinterpret_cast<float*>(x), a.v);
386  return x[0];
387 }
388 
389 template <>
391  return a;
392 }
393 template <>
394 EIGEN_STRONG_INLINE Packet2cf preverse(const Packet2cf& a) {
395  return Packet2cf(vcombine_f32(vget_high_f32(a.v), vget_low_f32(a.v)));
396 }
397 
398 template <>
400  return Packet1cf(vrev64_f32(a.v));
401 }
402 template <>
403 EIGEN_STRONG_INLINE Packet2cf pcplxflip<Packet2cf>(const Packet2cf& a) {
404  return Packet2cf(vrev64q_f32(a.v));
405 }
406 
407 template <>
408 EIGEN_STRONG_INLINE std::complex<float> predux<Packet1cf>(const Packet1cf& a) {
409  std::complex<float> s;
410  vst1_f32((float*)&s, a.v);
411  return s;
412 }
413 template <>
414 EIGEN_STRONG_INLINE std::complex<float> predux<Packet2cf>(const Packet2cf& a) {
415  std::complex<float> s;
416  vst1_f32(reinterpret_cast<float*>(&s), vadd_f32(vget_low_f32(a.v), vget_high_f32(a.v)));
417  return s;
418 }
419 
420 template <>
422  std::complex<float> s;
423  vst1_f32((float*)&s, a.v);
424  return s;
425 }
426 template <>
427 EIGEN_STRONG_INLINE std::complex<float> predux_mul<Packet2cf>(const Packet2cf& a) {
428  float32x2_t a1, a2, v1, v2, prod;
429  std::complex<float> s;
430 
431  a1 = vget_low_f32(a.v);
432  a2 = vget_high_f32(a.v);
433  // Get the real values of a | a1_re | a1_re | a2_re | a2_re |
434  v1 = vdup_lane_f32(a1, 0);
435  // Get the real values of a | a1_im | a1_im | a2_im | a2_im |
436  v2 = vdup_lane_f32(a1, 1);
437  // Multiply the real a with b
438  v1 = vmul_f32(v1, a2);
439  // Multiply the imag a with b
440  v2 = vmul_f32(v2, a2);
441  // Conjugate v2
442  v2 = vreinterpret_f32_u32(veor_u32(vreinterpret_u32_f32(v2), p2ui_CONJ_XOR()));
443  // Swap real/imag elements in v2.
444  v2 = vrev64_f32(v2);
445  // Add v1, v2
446  prod = vadd_f32(v1, v2);
447 
448  vst1_f32(reinterpret_cast<float*>(&s), prod);
449 
450  return s;
451 }
452 
455 
456 template <>
458  return pdiv_complex(a, b);
459 }
460 template <>
461 EIGEN_STRONG_INLINE Packet2cf pdiv<Packet2cf>(const Packet2cf& a, const Packet2cf& b) {
462  return pdiv_complex(a, b);
463 }
464 
466 EIGEN_DEVICE_FUNC inline void ptranspose(PacketBlock<Packet2cf, 2>& kernel) {
467  Packet4f tmp = vcombine_f32(vget_high_f32(kernel.packet[0].v), vget_high_f32(kernel.packet[1].v));
468  kernel.packet[0].v = vcombine_f32(vget_low_f32(kernel.packet[0].v), vget_low_f32(kernel.packet[1].v));
469  kernel.packet[1].v = tmp;
470 }
471 
472 template <>
474  return psqrt_complex<Packet1cf>(a);
475 }
476 
477 template <>
478 EIGEN_STRONG_INLINE Packet2cf psqrt<Packet2cf>(const Packet2cf& a) {
479  return psqrt_complex<Packet2cf>(a);
480 }
481 
482 template <>
484  return plog_complex(a);
485 }
486 
487 template <>
488 EIGEN_STRONG_INLINE Packet2cf plog<Packet2cf>(const Packet2cf& a) {
489  return plog_complex(a);
490 }
491 
492 template <>
494  return pexp_complex(a);
495 }
496 
497 template <>
498 EIGEN_STRONG_INLINE Packet2cf pexp<Packet2cf>(const Packet2cf& a) {
499  return pexp_complex(a);
500 }
501 
502 //---------- double ----------
503 #if EIGEN_ARCH_ARM64 && !EIGEN_APPLE_DOUBLE_NEON_BUG
504 
505 inline uint64x2_t p2ul_CONJ_XOR() {
506  static const uint64_t p2ul_conj_XOR_DATA[] = {0x0, 0x8000000000000000};
507  return vld1q_u64(p2ul_conj_XOR_DATA);
508 }
509 
510 struct Packet1cd {
512  EIGEN_STRONG_INLINE explicit Packet1cd(const Packet2d& a) : v(a) {}
513  Packet2d v;
514 };
515 
516 template <>
517 struct packet_traits<std::complex<double> > : default_packet_traits {
518  typedef Packet1cd type;
519  typedef Packet1cd half;
520  enum {
521  Vectorizable = 1,
522  AlignedOnScalar = 0,
523  size = 1,
524 
525  HasAdd = 1,
526  HasSub = 1,
527  HasMul = 1,
528  HasDiv = 1,
529  HasNegate = 1,
530  HasSqrt = 1,
531  HasLog = 1,
532  HasAbs = 0,
533  HasAbs2 = 0,
534  HasMin = 0,
535  HasMax = 0,
536  HasSetLinear = 0
537  };
538 };
539 
540 template <>
541 struct unpacket_traits<Packet1cd> {
542  typedef std::complex<double> type;
543  typedef Packet1cd half;
544  typedef Packet2d as_real;
545  enum {
546  size = 1,
548  vectorizable = true,
549  masked_load_available = false,
550  masked_store_available = false
551  };
552 };
553 
554 template <>
555 EIGEN_STRONG_INLINE Packet1cd pload<Packet1cd>(const std::complex<double>* from) {
556  EIGEN_DEBUG_ALIGNED_LOAD return Packet1cd(pload<Packet2d>(reinterpret_cast<const double*>(from)));
557 }
558 
559 template <>
560 EIGEN_STRONG_INLINE Packet1cd ploadu<Packet1cd>(const std::complex<double>* from) {
561  EIGEN_DEBUG_UNALIGNED_LOAD return Packet1cd(ploadu<Packet2d>(reinterpret_cast<const double*>(from)));
562 }
563 
564 template <>
565 EIGEN_STRONG_INLINE Packet1cd pzero<Packet1cd>(const Packet1cd& /*a*/) {
566  return Packet1cd(vdupq_n_f64(0.0));
567 }
568 
569 template <>
570 EIGEN_STRONG_INLINE Packet1cd pset1<Packet1cd>(const std::complex<double>& from) {
571  /* here we really have to use unaligned loads :( */
572  return ploadu<Packet1cd>(&from);
573 }
574 
575 template <>
576 EIGEN_STRONG_INLINE Packet1cd padd<Packet1cd>(const Packet1cd& a, const Packet1cd& b) {
577  return Packet1cd(padd<Packet2d>(a.v, b.v));
578 }
579 
580 template <>
581 EIGEN_STRONG_INLINE Packet1cd psub<Packet1cd>(const Packet1cd& a, const Packet1cd& b) {
582  return Packet1cd(psub<Packet2d>(a.v, b.v));
583 }
584 
585 template <>
586 EIGEN_STRONG_INLINE Packet1cd pnegate(const Packet1cd& a) {
587  return Packet1cd(pnegate<Packet2d>(a.v));
588 }
589 
590 template <>
591 EIGEN_STRONG_INLINE Packet1cd pconj(const Packet1cd& a) {
592  return Packet1cd(vreinterpretq_f64_u64(veorq_u64(vreinterpretq_u64_f64(a.v), p2ul_CONJ_XOR())));
593 }
594 
595 #ifdef __ARM_FEATURE_COMPLEX
596 template <>
597 EIGEN_STRONG_INLINE Packet1cd pmadd<Packet1cd>(const Packet1cd& a, const Packet1cd& b, const Packet1cd& c) {
598  Packet1cd result;
599  result.v = vcmlaq_f64(c.v, a.v, b.v);
600  result.v = vcmlaq_rot90_f64(result.v, a.v, b.v);
601  return result;
602 }
603 
604 template <>
605 EIGEN_STRONG_INLINE Packet1cd pmul<Packet1cd>(const Packet1cd& a, const Packet1cd& b) {
606  return pmadd(a, b, pzero(a));
607 }
608 #else
609 template <>
610 EIGEN_STRONG_INLINE Packet1cd pmul<Packet1cd>(const Packet1cd& a, const Packet1cd& b) {
611  Packet2d v1, v2;
612 
613  // Get the real values of a
614  v1 = vdupq_lane_f64(vget_low_f64(a.v), 0);
615  // Get the imag values of a
616  v2 = vdupq_lane_f64(vget_high_f64(a.v), 0);
617  // Multiply the real a with b
618  v1 = vmulq_f64(v1, b.v);
619  // Multiply the imag a with b
620  v2 = vmulq_f64(v2, b.v);
621  // Conjugate v2
622  v2 = vreinterpretq_f64_u64(veorq_u64(vreinterpretq_u64_f64(v2), p2ul_CONJ_XOR()));
623  // Swap real/imag elements in v2.
624  v2 = preverse<Packet2d>(v2);
625  // Add and return the result
626  return Packet1cd(vaddq_f64(v1, v2));
627 }
628 #endif
629 
630 template <>
631 EIGEN_STRONG_INLINE Packet1cd pcmp_eq(const Packet1cd& a, const Packet1cd& b) {
632  // Compare real and imaginary parts of a and b to get the mask vector:
633  // [re(a)==re(b), im(a)==im(b)]
634  Packet2d eq = pcmp_eq<Packet2d>(a.v, b.v);
635  // Swap real/imag elements in the mask in to get:
636  // [im(a)==im(b), re(a)==re(b)]
637  Packet2d eq_swapped = vreinterpretq_f64_u32(vrev64q_u32(vreinterpretq_u32_f64(eq)));
638  // Return re(a)==re(b) & im(a)==im(b) by computing bitwise AND of eq and eq_swapped
639  return Packet1cd(pand<Packet2d>(eq, eq_swapped));
640 }
641 
642 template <>
643 EIGEN_STRONG_INLINE Packet1cd pand<Packet1cd>(const Packet1cd& a, const Packet1cd& b) {
644  return Packet1cd(vreinterpretq_f64_u64(vandq_u64(vreinterpretq_u64_f64(a.v), vreinterpretq_u64_f64(b.v))));
645 }
646 
647 template <>
648 EIGEN_STRONG_INLINE Packet1cd por<Packet1cd>(const Packet1cd& a, const Packet1cd& b) {
649  return Packet1cd(vreinterpretq_f64_u64(vorrq_u64(vreinterpretq_u64_f64(a.v), vreinterpretq_u64_f64(b.v))));
650 }
651 
652 template <>
653 EIGEN_STRONG_INLINE Packet1cd pxor<Packet1cd>(const Packet1cd& a, const Packet1cd& b) {
654  return Packet1cd(vreinterpretq_f64_u64(veorq_u64(vreinterpretq_u64_f64(a.v), vreinterpretq_u64_f64(b.v))));
655 }
656 
657 template <>
658 EIGEN_STRONG_INLINE Packet1cd pandnot<Packet1cd>(const Packet1cd& a, const Packet1cd& b) {
659  return Packet1cd(vreinterpretq_f64_u64(vbicq_u64(vreinterpretq_u64_f64(a.v), vreinterpretq_u64_f64(b.v))));
660 }
661 
662 template <>
663 EIGEN_STRONG_INLINE Packet1cd ploaddup<Packet1cd>(const std::complex<double>* from) {
664  return pset1<Packet1cd>(*from);
665 }
666 
667 template <>
668 EIGEN_STRONG_INLINE void pstore<std::complex<double> >(std::complex<double>* to, const Packet1cd& from) {
669  EIGEN_DEBUG_ALIGNED_STORE pstore(reinterpret_cast<double*>(to), from.v);
670 }
671 
672 template <>
673 EIGEN_STRONG_INLINE void pstoreu<std::complex<double> >(std::complex<double>* to, const Packet1cd& from) {
674  EIGEN_DEBUG_UNALIGNED_STORE pstoreu(reinterpret_cast<double*>(to), from.v);
675 }
676 
677 template <>
678 EIGEN_STRONG_INLINE void prefetch<std::complex<double> >(const std::complex<double>* addr) {
679  EIGEN_ARM_PREFETCH(reinterpret_cast<const double*>(addr));
680 }
681 
682 template <>
683 EIGEN_DEVICE_FUNC inline Packet1cd pgather<std::complex<double>, Packet1cd>(const std::complex<double>* from,
684  Index stride) {
686  res = vsetq_lane_f64(std::real(from[0 * stride]), res, 0);
687  res = vsetq_lane_f64(std::imag(from[0 * stride]), res, 1);
688  return Packet1cd(res);
689 }
690 
691 template <>
692 EIGEN_DEVICE_FUNC inline void pscatter<std::complex<double>, Packet1cd>(std::complex<double>* to, const Packet1cd& from,
693  Index stride) {
694  to[stride * 0] = std::complex<double>(vgetq_lane_f64(from.v, 0), vgetq_lane_f64(from.v, 1));
695 }
696 
697 template <>
698 EIGEN_STRONG_INLINE std::complex<double> pfirst<Packet1cd>(const Packet1cd& a) {
699  EIGEN_ALIGN16 std::complex<double> res;
700  pstore<std::complex<double> >(&res, a);
701  return res;
702 }
703 
704 template <>
705 EIGEN_STRONG_INLINE Packet1cd preverse(const Packet1cd& a) {
706  return a;
707 }
708 
709 template <>
710 EIGEN_STRONG_INLINE std::complex<double> predux<Packet1cd>(const Packet1cd& a) {
711  return pfirst(a);
712 }
713 
714 template <>
715 EIGEN_STRONG_INLINE std::complex<double> predux_mul<Packet1cd>(const Packet1cd& a) {
716  return pfirst(a);
717 }
718 
720 
721 template <>
722 EIGEN_STRONG_INLINE Packet1cd pdiv<Packet1cd>(const Packet1cd& a, const Packet1cd& b) {
723  return pdiv_complex(a, b);
724 }
725 
726 EIGEN_STRONG_INLINE Packet1cd pcplxflip /*<Packet1cd>*/ (const Packet1cd& x) {
727  return Packet1cd(preverse(Packet2d(x.v)));
728 }
729 
730 EIGEN_STRONG_INLINE void ptranspose(PacketBlock<Packet1cd, 2>& kernel) {
731  Packet2d tmp = vcombine_f64(vget_high_f64(kernel.packet[0].v), vget_high_f64(kernel.packet[1].v));
732  kernel.packet[0].v = vcombine_f64(vget_low_f64(kernel.packet[0].v), vget_low_f64(kernel.packet[1].v));
733  kernel.packet[1].v = tmp;
734 }
735 
736 template <>
737 EIGEN_STRONG_INLINE Packet1cd psqrt<Packet1cd>(const Packet1cd& a) {
738  return psqrt_complex<Packet1cd>(a);
739 }
740 
741 template <>
742 EIGEN_STRONG_INLINE Packet1cd plog<Packet1cd>(const Packet1cd& a) {
743  return plog_complex(a);
744 }
745 
746 #endif // EIGEN_ARCH_ARM64
747 
748 } // end namespace internal
749 
750 } // end namespace Eigen
751 
752 #endif // EIGEN_COMPLEX_NEON_H
AnnoyingScalar imag(const AnnoyingScalar &)
Definition: AnnoyingScalar.h:132
#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
#define EIGEN_ARM_PREFETCH(ADDR)
Definition: NEON/PacketMath.h:172
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
float real
Definition: datatypes.h:10
@ Aligned16
Definition: Constants.h:237
RealScalar s
Definition: level1_cplx_impl.h:130
Eigen::DenseIndex ret
Definition: level1_cplx_impl.h:43
const Scalar * a
Definition: level2_cplx_impl.h:32
Eigen::Matrix< Scalar, Dynamic, Dynamic, ColMajor > tmp
Definition: level3_impl.h:365
uint32x2_t p2ui_CONJ_XOR()
Definition: NEON/Complex.h:32
__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 Packet2d pcmp_eq< Packet2d >(const Packet2d &a, const Packet2d &b)
Definition: LSX/PacketMath.h:1135
EIGEN_STRONG_INLINE Packet2d padd< Packet2d >(const Packet2d &a, const Packet2d &b)
Definition: LSX/PacketMath.h:605
uint32x2_t Packet2ui
Definition: NEON/PacketMath.h:89
EIGEN_STRONG_INLINE Packet8f pzero(const Packet8f &)
Definition: AVX/PacketMath.h:774
EIGEN_STRONG_INLINE Packet2f pand< Packet2f >(const Packet2f &a, const Packet2f &b)
Definition: NEON/PacketMath.h:1899
EIGEN_STRONG_INLINE Packet2cf psqrt< Packet2cf >(const Packet2cf &a)
Definition: AltiVec/Complex.h:370
EIGEN_STRONG_INLINE Packet4f padd< Packet4f >(const Packet4f &a, const Packet4f &b)
Definition: AltiVec/PacketMath.h:1066
EIGEN_STRONG_INLINE Packet4f pcmp_eq< Packet4f >(const Packet4f &a, const Packet4f &b)
Definition: LSX/PacketMath.h:1131
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 Packet1cf psqrt< Packet1cf >(const Packet1cf &a)
Definition: NEON/Complex.h:473
EIGEN_STRONG_INLINE Packet1cf padd< Packet1cf >(const Packet1cf &a, const Packet1cf &b)
Definition: NEON/Complex.h:132
EIGEN_STRONG_INLINE Packet2d pand< Packet2d >(const Packet2d &a, const Packet2d &b)
Definition: LSX/PacketMath.h:880
EIGEN_STRONG_INLINE Packet2f pcmp_eq< Packet2f >(const Packet2f &a, const Packet2f &b)
Definition: NEON/PacketMath.h:1804
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 Packet1cf por< Packet1cf >(const Packet1cf &a, const Packet1cf &b)
Definition: NEON/Complex.h:272
EIGEN_STRONG_INLINE Packet2cf ploaddup< Packet2cf >(const std::complex< float > *from)
Definition: AltiVec/Complex.h:162
EIGEN_STRONG_INLINE Packet1cf pand< Packet1cf >(const Packet1cf &a, const Packet1cf &b)
Definition: NEON/Complex.h:263
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 std::complex< float > predux_mul< Packet1cf >(const Packet1cf &a)
Definition: NEON/Complex.h:421
EIGEN_STRONG_INLINE Packet1cd pmul< Packet1cd >(const Packet1cd &a, const Packet1cd &b)
Definition: LSX/Complex.h:327
EIGEN_STRONG_INLINE Packet2d pset1< Packet2d >(const double &from)
Definition: LSX/PacketMath.h:503
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_STRONG_INLINE Packet1cf pcast< float, Packet1cf >(const float &a)
Definition: NEON/Complex.h:103
__vector unsigned int Packet4ui
Definition: AltiVec/PacketMath.h:35
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
static Packet4ui p4ui_CONJ_XOR
Definition: AltiVec/Complex.h:21
EIGEN_STRONG_INLINE Packet4f pmadd(const Packet4f &a, const Packet4f &b, const Packet4f &c)
Definition: AltiVec/PacketMath.h:1218
EIGEN_STRONG_INLINE Packet2cf pcplxflip(const Packet2cf &x)
Definition: LSX/Complex.h:218
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_STRONG_INLINE Packet1cf pload< Packet1cf >(const std::complex< float > *from)
Definition: NEON/Complex.h:299
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 Packet1cf ploaddup< Packet1cf >(const std::complex< float > *from)
Definition: NEON/Complex.h:317
EIGEN_STRONG_INLINE Packet1cf ploadu< Packet1cf >(const std::complex< float > *from)
Definition: NEON/Complex.h:308
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 Packet1cf pset1< Packet1cf >(const std::complex< float > &from)
Definition: NEON/Complex.h:122
EIGEN_STRONG_INLINE Packet1cf pcplxflip< Packet1cf >(const Packet1cf &a)
Definition: NEON/Complex.h:399
EIGEN_STRONG_INLINE Packet1cf pmul< Packet1cf >(const Packet1cf &a, const Packet1cf &b)
Definition: NEON/Complex.h:184
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 Packet1cf pandnot< Packet1cf >(const Packet1cf &a, const Packet1cf &b)
Definition: NEON/Complex.h:290
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
float32x2_t Packet2f
Definition: NEON/PacketMath.h:75
EIGEN_STRONG_INLINE Packet1cf pexp< Packet1cf >(const Packet1cf &a)
Definition: NEON/Complex.h:493
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 Packet2cf pcast< Packet2f, Packet2cf >(const Packet2f &a)
Definition: NEON/Complex.h:107
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 Packet2f ploadu< Packet2f >(const float *from)
Definition: NEON/PacketMath.h:2463
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 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 Packet2f padd< Packet2f >(const Packet2f &a, const Packet2f &b)
Definition: NEON/PacketMath.h:840
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 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 Packet1cf plog< Packet1cf >(const Packet1cf &a)
Definition: NEON/Complex.h:483
EIGEN_STRONG_INLINE Packet1cf pxor< Packet1cf >(const Packet1cf &a, const Packet1cf &b)
Definition: NEON/Complex.h:281
EIGEN_STRONG_INLINE std::complex< float > predux< Packet1cf >(const Packet1cf &a)
Definition: NEON/Complex.h:408
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 Packet2d psub< Packet2d >(const Packet2d &a, const Packet2d &b)
Definition: LSX/PacketMath.h:646
EIGEN_STRONG_INLINE Packet4f psub< Packet4f >(const Packet4f &a, const Packet4f &b)
Definition: AltiVec/PacketMath.h:1095
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 std::complex< float > pfirst< Packet1cf >(const Packet1cf &a)
Definition: NEON/Complex.h:377
EIGEN_STRONG_INLINE Packet1cf pdiv< Packet1cf >(const Packet1cf &a, const Packet1cf &b)
Definition: NEON/Complex.h:457
EIGEN_STRONG_INLINE Packet1cf psub< Packet1cf >(const Packet1cf &a, const Packet1cf &b)
Definition: NEON/Complex.h:141
EIGEN_STRONG_INLINE Packet2f pload< Packet2f >(const float *from)
Definition: NEON/PacketMath.h:2386
EIGEN_STRONG_INLINE Packet2f psub< Packet2f >(const Packet2f &a, const Packet2f &b)
Definition: NEON/PacketMath.h:915
EIGEN_STRONG_INLINE Packet1cd psub< Packet1cd >(const Packet1cd &a, const Packet1cd &b)
Definition: LSX/Complex.h:309
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
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
Definition: Meta.h:83
const Product< Lhs, Rhs > prod(const Lhs &lhs, const Rhs &rhs)
Definition: evaluators.cpp:7
int c
Definition: calibrate.py:100
Definition: Eigen_Colamd.h:49
list x
Definition: plotDoE.py:28
EIGEN_STRONG_INLINE Packet1cd()
Definition: LSX/Complex.h:261
Packet2d v
Definition: LSX/Complex.h:263
Definition: NEON/Complex.h:39
EIGEN_STRONG_INLINE Packet1cf()
Definition: NEON/Complex.h:40
Packet2f v
Definition: NEON/Complex.h:42
EIGEN_STRONG_INLINE Packet1cf(const Packet2f &a)
Definition: NEON/Complex.h:41
Definition: AltiVec/Complex.h:38
Packet4f v
Definition: AltiVec/Complex.h:78
EIGEN_STRONG_INLINE Packet2cf()
Definition: NEON/Complex.h:45
EIGEN_STRONG_INLINE Packet2cf(const Packet4f &a)
Definition: NEON/Complex.h:46
Definition: GenericPacketMath.h:1407
@ HasExp
Definition: GenericPacketMath.h:75
@ HasSqrt
Definition: GenericPacketMath.h:73
@ HasLog
Definition: GenericPacketMath.h:77
@ HasDiv
Definition: GenericPacketMath.h:71
Packet2cf type
Definition: NEON/Complex.h:52
Packet1cf half
Definition: NEON/Complex.h:53
T type
Definition: GenericPacketMath.h:109
@ size
Definition: GenericPacketMath.h:113
@ AlignedOnScalar
Definition: GenericPacketMath.h:114
@ Vectorizable
Definition: GenericPacketMath.h:112
T half
Definition: GenericPacketMath.h:110
@ 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
Packet2f as_real
Definition: NEON/Complex.h:79
Packet1cf half
Definition: NEON/Complex.h:78
std::complex< float > type
Definition: NEON/Complex.h:77
std::complex< float > type
Definition: NEON/Complex.h:90
Packet4f as_real
Definition: NEON/Complex.h:92
Packet1cf half
Definition: NEON/Complex.h:91
Definition: GenericPacketMath.h:134
T type
Definition: GenericPacketMath.h:135
T half
Definition: GenericPacketMath.h:136
@ 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