ZVector/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) 2016 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_COMPLEX32_ZVECTOR_H
12 #define EIGEN_COMPLEX32_ZVECTOR_H
13 
14 #include "../../InternalHeaderCheck.h"
15 
16 namespace Eigen {
17 
18 namespace internal {
19 
20 #if !defined(__ARCH__) || (defined(__ARCH__) && __ARCH__ >= 12)
21 static Packet4ui p4ui_CONJ_XOR = { 0x00000000, 0x80000000, 0x00000000, 0x80000000 }; //vec_mergeh((Packet4ui)p4i_ZERO, (Packet4ui)p4f_MZERO);
22 #endif
23 
24 static Packet2ul p2ul_CONJ_XOR1 = (Packet2ul) vec_sld((Packet4ui) p2d_ZERO_, (Packet4ui) p2l_ZERO, 8);//{ 0x8000000000000000, 0x0000000000000000 };
25 static Packet2ul p2ul_CONJ_XOR2 = (Packet2ul) vec_sld((Packet4ui) p2l_ZERO, (Packet4ui) p2d_ZERO_, 8);//{ 0x8000000000000000, 0x0000000000000000 };
26 
27 struct Packet1cd
28 {
29  EIGEN_STRONG_INLINE Packet1cd() {}
30  EIGEN_STRONG_INLINE explicit Packet1cd(const Packet2d& a) : v(a) {}
31  Packet2d v;
32 };
33 
34 struct Packet2cf
35 {
36  EIGEN_STRONG_INLINE Packet2cf() {}
37  EIGEN_STRONG_INLINE explicit Packet2cf(const Packet4f& a) : v(a) {}
38 #if !defined(__ARCH__) || (defined(__ARCH__) && __ARCH__ < 12)
39  union {
40  Packet4f v;
41  Packet1cd cd[2];
42  };
43 #else
44  Packet4f v;
45 #endif
46 };
47 
48 template<> struct packet_traits<std::complex<float> > : default_packet_traits
49 {
50  typedef Packet2cf type;
51  typedef Packet2cf half;
52  enum {
53  Vectorizable = 1,
54  AlignedOnScalar = 1,
55  size = 2,
56 
57  HasAdd = 1,
58  HasSub = 1,
59  HasMul = 1,
60  HasDiv = 1,
61  HasNegate = 1,
62  HasAbs = 0,
63  HasAbs2 = 0,
64  HasMin = 0,
65  HasMax = 0,
66  HasBlend = 1,
67  HasSetLinear = 0
68  };
69 };
70 
71 
72 template<> struct packet_traits<std::complex<double> > : default_packet_traits
73 {
74  typedef Packet1cd type;
75  typedef Packet1cd half;
76  enum {
77  Vectorizable = 1,
78  AlignedOnScalar = 1,
79  size = 1,
80 
81  HasAdd = 1,
82  HasSub = 1,
83  HasMul = 1,
84  HasDiv = 1,
85  HasNegate = 1,
86  HasAbs = 0,
87  HasAbs2 = 0,
88  HasMin = 0,
89  HasMax = 0,
90  HasSetLinear = 0
91  };
92 };
93 
94 template<> struct unpacket_traits<Packet2cf> {
95  typedef std::complex<float> type;
96  enum {size=2, alignment=Aligned16, vectorizable=true, masked_load_available=false, masked_store_available=false};
97  typedef Packet2cf half;
98  typedef Packet4f as_real;
99 };
100 template<> struct unpacket_traits<Packet1cd> {
101  typedef std::complex<double> type;
102  enum {size=1, alignment=Aligned16, vectorizable=true, masked_load_available=false, masked_store_available=false};
103  typedef Packet1cd half;
104  typedef Packet2d as_real;
105 };
106 
107 /* Forward declaration */
108 EIGEN_STRONG_INLINE void ptranspose(PacketBlock<Packet2cf,2>& kernel);
109 
110 /* complex<double> first */
111 template<> EIGEN_STRONG_INLINE Packet1cd pload <Packet1cd>(const std::complex<double>* from) { EIGEN_DEBUG_ALIGNED_LOAD return Packet1cd(pload<Packet2d>((const double*)from)); }
112 template<> EIGEN_STRONG_INLINE Packet1cd ploadu<Packet1cd>(const std::complex<double>* from) { EIGEN_DEBUG_UNALIGNED_LOAD return Packet1cd(ploadu<Packet2d>((const double*)from)); }
113 template<> EIGEN_STRONG_INLINE void pstore <std::complex<double> >(std::complex<double> * to, const Packet1cd& from) { EIGEN_DEBUG_ALIGNED_STORE pstore((double*)to, from.v); }
114 template<> EIGEN_STRONG_INLINE void pstoreu<std::complex<double> >(std::complex<double> * to, const Packet1cd& from) { EIGEN_DEBUG_UNALIGNED_STORE pstoreu((double*)to, from.v); }
115 
116 template<> EIGEN_STRONG_INLINE Packet1cd pset1<Packet1cd>(const std::complex<double>& from)
117 { /* here we really have to use unaligned loads :( */ return ploadu<Packet1cd>(&from); }
118 
119 template<> EIGEN_DEVICE_FUNC inline Packet1cd pgather<std::complex<double>, Packet1cd>(const std::complex<double>* from, Index stride EIGEN_UNUSED)
120 {
121  return pload<Packet1cd>(from);
122 }
123 template<> EIGEN_DEVICE_FUNC inline void pscatter<std::complex<double>, Packet1cd>(std::complex<double>* to, const Packet1cd& from, Index stride EIGEN_UNUSED)
124 {
125  pstore<std::complex<double> >(to, from);
126 }
127 template<> EIGEN_STRONG_INLINE Packet1cd padd<Packet1cd>(const Packet1cd& a, const Packet1cd& b) { return Packet1cd(a.v + b.v); }
128 template<> EIGEN_STRONG_INLINE Packet1cd psub<Packet1cd>(const Packet1cd& a, const Packet1cd& b) { return Packet1cd(a.v - b.v); }
129 template<> EIGEN_STRONG_INLINE Packet1cd pnegate(const Packet1cd& a) { return Packet1cd(pnegate(Packet2d(a.v))); }
130 template<> EIGEN_STRONG_INLINE Packet1cd pconj(const Packet1cd& a) { return Packet1cd((Packet2d)vec_xor((Packet2d)a.v, (Packet2d)p2ul_CONJ_XOR2)); }
131 template<> EIGEN_STRONG_INLINE Packet1cd pmul<Packet1cd>(const Packet1cd& a, const Packet1cd& b)
132 {
133  Packet2d a_re, a_im, v1, v2;
134 
135  // Permute and multiply the real parts of a and b
136  a_re = vec_perm(a.v, a.v, p16uc_PSET64_HI);
137  // Get the imaginary parts of a
138  a_im = vec_perm(a.v, a.v, p16uc_PSET64_LO);
139  // multiply a_re * b
140  v1 = vec_madd(a_re, b.v, p2d_ZERO);
141  // multiply a_im * b and get the conjugate result
142  v2 = vec_madd(a_im, b.v, p2d_ZERO);
143  v2 = (Packet2d) vec_sld((Packet4ui)v2, (Packet4ui)v2, 8);
144  v2 = (Packet2d) vec_xor((Packet2d)v2, (Packet2d) p2ul_CONJ_XOR1);
145 
146  return Packet1cd(v1 + v2);
147 }
148 template<> EIGEN_STRONG_INLINE Packet1cd pand <Packet1cd>(const Packet1cd& a, const Packet1cd& b) { return Packet1cd(vec_and(a.v,b.v)); }
149 template<> EIGEN_STRONG_INLINE Packet1cd por <Packet1cd>(const Packet1cd& a, const Packet1cd& b) { return Packet1cd(vec_or(a.v,b.v)); }
150 template<> EIGEN_STRONG_INLINE Packet1cd pxor <Packet1cd>(const Packet1cd& a, const Packet1cd& b) { return Packet1cd(vec_xor(a.v,b.v)); }
151 template<> EIGEN_STRONG_INLINE Packet1cd pandnot <Packet1cd>(const Packet1cd& a, const Packet1cd& b) { return Packet1cd(vec_and(a.v, vec_nor(b.v,b.v))); }
152 template<> EIGEN_STRONG_INLINE Packet1cd ploaddup<Packet1cd>(const std::complex<double>* from) { return pset1<Packet1cd>(*from); }
153 template<> EIGEN_STRONG_INLINE Packet1cd pcmp_eq(const Packet1cd& a, const Packet1cd& b) {
154  Packet2d eq = vec_cmpeq (a.v, b.v);
155  Packet2d tmp = { eq[1], eq[0] };
156  return (Packet1cd)pand<Packet2d>(eq, tmp);
157 }
158 
159 template<> EIGEN_STRONG_INLINE void prefetch<std::complex<double> >(const std::complex<double> * addr) { EIGEN_ZVECTOR_PREFETCH(addr); }
160 
161 template<> EIGEN_STRONG_INLINE std::complex<double> pfirst<Packet1cd>(const Packet1cd& a)
162 {
163  EIGEN_ALIGN16 std::complex<double> res;
164  pstore<std::complex<double> >(&res, a);
165 
166  return res;
167 }
168 
169 template<> EIGEN_STRONG_INLINE Packet1cd preverse(const Packet1cd& a) { return a; }
170 template<> EIGEN_STRONG_INLINE std::complex<double> predux<Packet1cd>(const Packet1cd& a)
171 {
172  return pfirst(a);
173 }
174 template<> EIGEN_STRONG_INLINE std::complex<double> predux_mul<Packet1cd>(const Packet1cd& a)
175 {
176  return pfirst(a);
177 }
179 
180 template<> EIGEN_STRONG_INLINE Packet1cd pdiv<Packet1cd>(const Packet1cd& a, const Packet1cd& b)
181 {
182  return pdiv_complex(a, b);
183 }
184 
185 EIGEN_STRONG_INLINE Packet1cd pcplxflip/*<Packet1cd>*/(const Packet1cd& x)
186 {
187  return Packet1cd(preverse(Packet2d(x.v)));
188 }
189 
190 EIGEN_STRONG_INLINE void ptranspose(PacketBlock<Packet1cd,2>& kernel)
191 {
192  Packet2d tmp = vec_perm(kernel.packet[0].v, kernel.packet[1].v, p16uc_TRANSPOSE64_HI);
193  kernel.packet[1].v = vec_perm(kernel.packet[0].v, kernel.packet[1].v, p16uc_TRANSPOSE64_LO);
194  kernel.packet[0].v = tmp;
195 }
196 
197 /* complex<float> follows */
198 template<> EIGEN_STRONG_INLINE Packet2cf pload <Packet2cf>(const std::complex<float>* from) { EIGEN_DEBUG_ALIGNED_LOAD return Packet2cf(pload<Packet4f>((const float*)from)); }
199 template<> EIGEN_STRONG_INLINE Packet2cf ploadu<Packet2cf>(const std::complex<float>* from) { EIGEN_DEBUG_UNALIGNED_LOAD return Packet2cf(ploadu<Packet4f>((const float*)from)); }
200 template<> EIGEN_STRONG_INLINE void pstore <std::complex<float> >(std::complex<float> * to, const Packet2cf& from) { EIGEN_DEBUG_ALIGNED_STORE pstore((float*)to, from.v); }
201 template<> EIGEN_STRONG_INLINE void pstoreu<std::complex<float> >(std::complex<float> * to, const Packet2cf& from) { EIGEN_DEBUG_UNALIGNED_STORE pstoreu((float*)to, from.v); }
202 
203 template<> EIGEN_STRONG_INLINE std::complex<float> pfirst<Packet2cf>(const Packet2cf& a)
204 {
205  EIGEN_ALIGN16 std::complex<float> res[2];
206  pstore<std::complex<float> >(res, a);
207 
208  return res[0];
209 }
210 
211 
212 #if !defined(__ARCH__) || (defined(__ARCH__) && __ARCH__ < 12)
213 template<> EIGEN_STRONG_INLINE Packet2cf pset1<Packet2cf>(const std::complex<float>& from)
214 {
215  Packet2cf res;
216  res.cd[0] = Packet1cd(vec_ld2f((const float *)&from));
217  res.cd[1] = res.cd[0];
218  return res;
219 }
220 #else
221 template<> EIGEN_STRONG_INLINE Packet2cf pset1<Packet2cf>(const std::complex<float>& from)
222 {
223  Packet2cf res;
224  if((std::ptrdiff_t(&from) % 16) == 0)
225  res.v = pload<Packet4f>((const float *)&from);
226  else
227  res.v = ploadu<Packet4f>((const float *)&from);
228  res.v = vec_perm(res.v, res.v, p16uc_PSET64_HI);
229  return res;
230 }
231 #endif
232 
233 template<> EIGEN_DEVICE_FUNC inline Packet2cf pgather<std::complex<float>, Packet2cf>(const std::complex<float>* from, Index stride)
234 {
235  EIGEN_ALIGN16 std::complex<float> af[2];
236  af[0] = from[0*stride];
237  af[1] = from[1*stride];
238  return pload<Packet2cf>(af);
239 }
240 template<> EIGEN_DEVICE_FUNC inline void pscatter<std::complex<float>, Packet2cf>(std::complex<float>* to, const Packet2cf& from, Index stride)
241 {
242  EIGEN_ALIGN16 std::complex<float> af[2];
243  pstore<std::complex<float> >((std::complex<float> *) af, from);
244  to[0*stride] = af[0];
245  to[1*stride] = af[1];
246 }
247 
248 template<> EIGEN_STRONG_INLINE Packet2cf padd<Packet2cf>(const Packet2cf& a, const Packet2cf& b) { return Packet2cf(padd<Packet4f>(a.v, b.v)); }
249 template<> EIGEN_STRONG_INLINE Packet2cf psub<Packet2cf>(const Packet2cf& a, const Packet2cf& b) { return Packet2cf(psub<Packet4f>(a.v, b.v)); }
250 template<> EIGEN_STRONG_INLINE Packet2cf pnegate(const Packet2cf& a) { return Packet2cf(pnegate(Packet4f(a.v))); }
251 
252 template<> EIGEN_STRONG_INLINE Packet2cf pand <Packet2cf>(const Packet2cf& a, const Packet2cf& b) { return Packet2cf(pand<Packet4f>(a.v,b.v)); }
253 template<> EIGEN_STRONG_INLINE Packet2cf por <Packet2cf>(const Packet2cf& a, const Packet2cf& b) { return Packet2cf(por<Packet4f>(a.v,b.v)); }
254 template<> EIGEN_STRONG_INLINE Packet2cf pxor <Packet2cf>(const Packet2cf& a, const Packet2cf& b) { return Packet2cf(pxor<Packet4f>(a.v,b.v)); }
255 template<> EIGEN_STRONG_INLINE Packet2cf pandnot<Packet2cf>(const Packet2cf& a, const Packet2cf& b) { return Packet2cf(pandnot<Packet4f>(a.v,b.v)); }
256 
257 template<> EIGEN_STRONG_INLINE Packet2cf ploaddup<Packet2cf>(const std::complex<float>* from) { return pset1<Packet2cf>(*from); }
258 
259 template<> EIGEN_STRONG_INLINE void prefetch<std::complex<float> >(const std::complex<float> * addr) { EIGEN_ZVECTOR_PREFETCH(addr); }
260 
261 
262 #if !defined(__ARCH__) || (defined(__ARCH__) && __ARCH__ < 12)
263 
264 template<> EIGEN_STRONG_INLINE Packet2cf pcmp_eq(const Packet2cf& a, const Packet2cf& b) {
265  Packet4f eq = pcmp_eq<Packet4f> (a.v, b.v);
266  Packet2cf res;
267  Packet2d tmp1 = { eq.v4f[0][1], eq.v4f[0][0] };
268  Packet2d tmp2 = { eq.v4f[1][1], eq.v4f[1][0] };
269  res.v.v4f[0] = pand<Packet2d>(eq.v4f[0], tmp1);
270  res.v.v4f[1] = pand<Packet2d>(eq.v4f[1], tmp2);
271  return res;
272 }
273 
274 template<> EIGEN_STRONG_INLINE Packet2cf pconj(const Packet2cf& a)
275 {
276  Packet2cf res;
277  res.v.v4f[0] = pconj(Packet1cd(reinterpret_cast<Packet2d>(a.v.v4f[0]))).v;
278  res.v.v4f[1] = pconj(Packet1cd(reinterpret_cast<Packet2d>(a.v.v4f[1]))).v;
279  return res;
280 }
281 
282 template<> EIGEN_STRONG_INLINE Packet2cf pmul<Packet2cf>(const Packet2cf& a, const Packet2cf& b)
283 {
284  Packet2cf res;
285  res.v.v4f[0] = pmul(Packet1cd(reinterpret_cast<Packet2d>(a.v.v4f[0])), Packet1cd(reinterpret_cast<Packet2d>(b.v.v4f[0]))).v;
286  res.v.v4f[1] = pmul(Packet1cd(reinterpret_cast<Packet2d>(a.v.v4f[1])), Packet1cd(reinterpret_cast<Packet2d>(b.v.v4f[1]))).v;
287  return res;
288 }
289 
290 template<> EIGEN_STRONG_INLINE Packet2cf preverse(const Packet2cf& a)
291 {
292  Packet2cf res;
293  res.cd[0] = a.cd[1];
294  res.cd[1] = a.cd[0];
295  return res;
296 }
297 
298 template<> EIGEN_STRONG_INLINE std::complex<float> predux<Packet2cf>(const Packet2cf& a)
299 {
300  std::complex<float> res;
301  Packet1cd b = padd<Packet1cd>(a.cd[0], a.cd[1]);
302  vec_st2f(b.v, (float*)&res);
303  return res;
304 }
305 
306 template<> EIGEN_STRONG_INLINE std::complex<float> predux_mul<Packet2cf>(const Packet2cf& a)
307 {
308  std::complex<float> res;
309  Packet1cd b = pmul<Packet1cd>(a.cd[0], a.cd[1]);
310  vec_st2f(b.v, (float*)&res);
311  return res;
312 }
313 
315 
316 template<> EIGEN_STRONG_INLINE Packet2cf pdiv<Packet2cf>(const Packet2cf& a, const Packet2cf& b)
317 {
318  return pdiv_complex(a, b);
319 }
320 
321 EIGEN_STRONG_INLINE Packet2cf pcplxflip/*<Packet2cf>*/(const Packet2cf& x)
322 {
323  Packet2cf res;
324  res.cd[0] = pcplxflip(x.cd[0]);
325  res.cd[1] = pcplxflip(x.cd[1]);
326  return res;
327 }
328 
329 EIGEN_STRONG_INLINE void ptranspose(PacketBlock<Packet2cf,2>& kernel)
330 {
331  Packet1cd tmp = kernel.packet[0].cd[1];
332  kernel.packet[0].cd[1] = kernel.packet[1].cd[0];
333  kernel.packet[1].cd[0] = tmp;
334 }
335 
336 template<> EIGEN_STRONG_INLINE Packet2cf pblend(const Selector<2>& ifPacket, const Packet2cf& thenPacket, const Packet2cf& elsePacket) {
337  Packet2cf result;
338  const Selector<4> ifPacket4 = { ifPacket.select[0], ifPacket.select[0], ifPacket.select[1], ifPacket.select[1] };
339  result.v = pblend<Packet4f>(ifPacket4, thenPacket.v, elsePacket.v);
340  return result;
341 }
342 #else
343 template<> EIGEN_STRONG_INLINE Packet2cf pcmp_eq(const Packet2cf& a, const Packet2cf& b) {
344  Packet4f eq = vec_cmpeq (a.v, b.v);
345  Packet4f tmp = { eq[1], eq[0], eq[3], eq[2] };
346  return (Packet2cf)pand<Packet4f>(eq, tmp);
347 }
348 template<> EIGEN_STRONG_INLINE Packet2cf pconj(const Packet2cf& a) { return Packet2cf(pxor<Packet4f>(a.v, reinterpret_cast<Packet4f>(p4ui_CONJ_XOR))); }
349 template<> EIGEN_STRONG_INLINE Packet2cf pmul<Packet2cf>(const Packet2cf& a, const Packet2cf& b)
350 {
351  Packet4f a_re, a_im, prod, prod_im;
352 
353  // Permute and multiply the real parts of a and b
354  a_re = vec_perm(a.v, a.v, p16uc_PSET32_WODD);
355 
356  // Get the imaginary parts of a
357  a_im = vec_perm(a.v, a.v, p16uc_PSET32_WEVEN);
358 
359  // multiply a_im * b and get the conjugate result
360  prod_im = a_im * b.v;
361  prod_im = pxor<Packet4f>(prod_im, reinterpret_cast<Packet4f>(p4ui_CONJ_XOR));
362  // permute back to a proper order
363  prod_im = vec_perm(prod_im, prod_im, p16uc_COMPLEX32_REV);
364 
365  // multiply a_re * b, add prod_im
366  prod = pmadd<Packet4f>(a_re, b.v, prod_im);
367 
368  return Packet2cf(prod);
369 }
370 
371 template<> EIGEN_STRONG_INLINE Packet2cf preverse(const Packet2cf& a)
372 {
373  Packet4f rev_a;
374  rev_a = vec_perm(a.v, a.v, p16uc_COMPLEX32_REV2);
375  return Packet2cf(rev_a);
376 }
377 
378 template<> EIGEN_STRONG_INLINE std::complex<float> predux<Packet2cf>(const Packet2cf& a)
379 {
380  Packet4f b;
381  b = vec_sld(a.v, a.v, 8);
382  b = padd<Packet4f>(a.v, b);
383  return pfirst<Packet2cf>(Packet2cf(b));
384 }
385 
386 template<> EIGEN_STRONG_INLINE std::complex<float> predux_mul<Packet2cf>(const Packet2cf& a)
387 {
388  Packet4f b;
389  Packet2cf prod;
390  b = vec_sld(a.v, a.v, 8);
391  prod = pmul<Packet2cf>(a, Packet2cf(b));
392 
393  return pfirst<Packet2cf>(prod);
394 }
395 
397 
398 template<> EIGEN_STRONG_INLINE Packet2cf pdiv<Packet2cf>(const Packet2cf& a, const Packet2cf& b)
399 {
400  return pdiv_complex(a, b);
401 }
402 
403 template<> EIGEN_STRONG_INLINE Packet2cf pcplxflip<Packet2cf>(const Packet2cf& x)
404 {
405  return Packet2cf(vec_perm(x.v, x.v, p16uc_COMPLEX32_REV));
406 }
407 
408 EIGEN_STRONG_INLINE void ptranspose(PacketBlock<Packet2cf,2>& kernel)
409 {
410  Packet4f tmp = vec_perm(kernel.packet[0].v, kernel.packet[1].v, p16uc_TRANSPOSE64_HI);
411  kernel.packet[1].v = vec_perm(kernel.packet[0].v, kernel.packet[1].v, p16uc_TRANSPOSE64_LO);
412  kernel.packet[0].v = tmp;
413 }
414 
415 template<> EIGEN_STRONG_INLINE Packet2cf pblend(const Selector<2>& ifPacket, const Packet2cf& thenPacket, const Packet2cf& elsePacket) {
416  Packet2cf result;
417  result.v = reinterpret_cast<Packet4f>(pblend<Packet2d>(ifPacket, reinterpret_cast<Packet2d>(thenPacket.v), reinterpret_cast<Packet2d>(elsePacket.v)));
418  return result;
419 }
420 #endif
421 
422 } // end namespace internal
423 
424 } // end namespace Eigen
425 
426 #endif // EIGEN_COMPLEX32_ZVECTOR_H
Array< int, Dynamic, 1 > v
Array< int, 3, 1 > b
#define EIGEN_ALIGN16
#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_UNUSED
Definition: Macros.h:932
#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())
#define EIGEN_ZVECTOR_PREFETCH(ADDR)
@ Aligned16
Definition: Constants.h:237
static Packet2ul p2ul_CONJ_XOR2
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)
std::complex< float > predux< Packet2cf >(const Packet2cf &a)
Packet1cd pload< Packet1cd >(const std::complex< double > *from)
Definition: MSA/Complex.h:446
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)
Packet4f pxor< Packet4f >(const Packet4f &a, const Packet4f &b)
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)
Packet4f por< Packet4f >(const Packet4f &a, const Packet4f &b)
static Packet16uc p16uc_TRANSPOSE64_LO
Packet4f pandnot< Packet4f >(const Packet4f &a, const Packet4f &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
Packet4f pand< Packet4f >(const Packet4f &a, const Packet4f &b)
Packet2cf por< Packet2cf >(const Packet2cf &a, const Packet2cf &b)
Packet1cd pcplxflip(const Packet1cd &x)
Definition: MSA/Complex.h:617
Packet4f pcmp_eq< Packet4f >(const Packet4f &a, const Packet4f &b)
Packet2d pand< Packet2d >(const Packet2d &a, const Packet2d &b)
static Packet16uc p16uc_PSET32_WEVEN
std::complex< double > pfirst< Packet1cd >(const Packet1cd &a)
Definition: MSA/Complex.h:581
void pstoreu(Scalar *to, const Packet &from)
Packet2cf pcmp_eq(const Packet2cf &a, const Packet2cf &b)
bfloat16 pfirst(const Packet8bf &a)
Packet2cf pmul< Packet2cf >(const Packet2cf &a, const Packet2cf &b)
Definition: MSA/Complex.h:171
__vector unsigned int Packet4ui
Packet pmul(const Packet &a, const Packet &b)
void ptranspose(PacketBlock< Packet2cf, 2 > &kernel)
static Packet4ui p4ui_CONJ_XOR
static Packet2ul p2ul_CONJ_XOR1
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 padd< Packet4f >(const Packet4f &a, const Packet4f &b)
Packet4f ploadu< Packet4f >(const float *from)
std::complex< double > predux_mul< Packet1cd >(const Packet1cd &a)
Definition: MSA/Complex.h:602
std::complex< double > predux< Packet1cd >(const Packet1cd &a)
Definition: MSA/Complex.h:595
static Packet2d p2d_ZERO_
Packet1cd por< Packet1cd >(const Packet1cd &a, const Packet1cd &b)
Definition: MSA/Complex.h:509
Packet2d ploadu< Packet2d >(const double *from)
Packet2cf pload< Packet2cf >(const std::complex< float > *from)
static Packet16uc p16uc_PSET64_HI
Packet2cf pand< Packet2cf >(const Packet2cf &a, const Packet2cf &b)
Packet1cd ploaddup< Packet1cd >(const std::complex< double > *from)
Definition: MSA/Complex.h:530
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)
Packet4f psub< Packet4f >(const Packet4f &a, const Packet4f &b)
static Packet16uc p16uc_PSET32_WODD
Packet2cf preverse(const Packet2cf &a)
static Packet16uc p16uc_PSET64_LO
Packet4f pload< Packet4f >(const float *from)
static Packet16uc p16uc_COMPLEX32_REV
__vector float Packet4f
static Packet16uc p16uc_COMPLEX32_REV2
Packet2cf psub< Packet2cf >(const Packet2cf &a, const Packet2cf &b)
Packet1cd psub< Packet1cd >(const Packet1cd &a, const Packet1cd &b)
Definition: MSA/Complex.h:474
std::complex< float > predux_mul< Packet2cf >(const Packet2cf &a)
static Packet16uc p16uc_TRANSPOSE64_HI
: InteropHeaders
Definition: Core:139
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
Definition: Meta.h:82
Definition: BFloat16.h:222