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_ALTIVEC_H
12 #define EIGEN_COMPLEX32_ALTIVEC_H
13 
14 namespace Eigen {
15 
16 namespace internal {
17 
18 #if !defined(__ARCH__) || (defined(__ARCH__) && __ARCH__ >= 12)
19 static Packet4ui p4ui_CONJ_XOR = { 0x00000000, 0x80000000, 0x00000000, 0x80000000 }; //vec_mergeh((Packet4ui)p4i_ZERO, (Packet4ui)p4f_MZERO);
20 #endif
21 
22 static Packet2ul p2ul_CONJ_XOR1 = (Packet2ul) vec_sld((Packet4ui) p2d_ZERO_, (Packet4ui) p2l_ZERO, 8);//{ 0x8000000000000000, 0x0000000000000000 };
23 static Packet2ul p2ul_CONJ_XOR2 = (Packet2ul) vec_sld((Packet4ui) p2l_ZERO, (Packet4ui) p2d_ZERO_, 8);//{ 0x8000000000000000, 0x0000000000000000 };
24 
25 struct Packet1cd
26 {
28  EIGEN_STRONG_INLINE explicit Packet1cd(const Packet2d& a) : v(a) {}
29  Packet2d v;
30 };
31 
32 struct Packet2cf
33 {
35  EIGEN_STRONG_INLINE explicit Packet2cf(const Packet4f& a) : v(a) {}
36 #if !defined(__ARCH__) || (defined(__ARCH__) && __ARCH__ < 12)
37  union {
38  Packet4f v;
40  };
41 #else
42  Packet4f v;
43 #endif
44 };
45 
46 template<> struct packet_traits<std::complex<float> > : default_packet_traits
47 {
48  typedef Packet2cf type;
49  typedef Packet2cf half;
50  enum {
51  Vectorizable = 1,
52  AlignedOnScalar = 1,
53  size = 2,
54  HasHalfPacket = 0,
55 
56  HasAdd = 1,
57  HasSub = 1,
58  HasMul = 1,
59  HasDiv = 1,
60  HasNegate = 1,
61  HasAbs = 0,
62  HasAbs2 = 0,
63  HasMin = 0,
64  HasMax = 0,
65  HasBlend = 1,
66  HasSetLinear = 0
67  };
68 };
69 
70 
71 template<> struct packet_traits<std::complex<double> > : default_packet_traits
72 {
73  typedef Packet1cd type;
74  typedef Packet1cd half;
75  enum {
76  Vectorizable = 1,
77  AlignedOnScalar = 1,
78  size = 1,
79  HasHalfPacket = 0,
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> { typedef std::complex<float> type; enum {size=2, alignment=Aligned16, vectorizable=true, masked_load_available=false, masked_store_available=false}; typedef Packet2cf half; };
95 template<> struct unpacket_traits<Packet1cd> { typedef std::complex<double> type; enum {size=1, alignment=Aligned16, vectorizable=true, masked_load_available=false, masked_store_available=false}; typedef Packet1cd half; };
96 
97 /* Forward declaration */
99 
100 /* complex<double> first */
101 template<> EIGEN_STRONG_INLINE Packet1cd pload <Packet1cd>(const std::complex<double>* from) { EIGEN_DEBUG_ALIGNED_LOAD return Packet1cd(pload<Packet2d>((const double*)from)); }
102 template<> EIGEN_STRONG_INLINE Packet1cd ploadu<Packet1cd>(const std::complex<double>* from) { EIGEN_DEBUG_UNALIGNED_LOAD return Packet1cd(ploadu<Packet2d>((const double*)from)); }
103 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); }
104 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); }
105 
106 template<> EIGEN_STRONG_INLINE Packet1cd pset1<Packet1cd>(const std::complex<double>& from)
107 { /* here we really have to use unaligned loads :( */ return ploadu<Packet1cd>(&from); }
108 
109 template<> EIGEN_DEVICE_FUNC inline Packet1cd pgather<std::complex<double>, Packet1cd>(const std::complex<double>* from, Index stride EIGEN_UNUSED)
110 {
111  return pload<Packet1cd>(from);
112 }
113 template<> EIGEN_DEVICE_FUNC inline void pscatter<std::complex<double>, Packet1cd>(std::complex<double>* to, const Packet1cd& from, Index stride EIGEN_UNUSED)
114 {
115  pstore<std::complex<double> >(to, from);
116 }
117 template<> EIGEN_STRONG_INLINE Packet1cd padd<Packet1cd>(const Packet1cd& a, const Packet1cd& b) { return Packet1cd(a.v + b.v); }
118 template<> EIGEN_STRONG_INLINE Packet1cd psub<Packet1cd>(const Packet1cd& a, const Packet1cd& b) { return Packet1cd(a.v - b.v); }
119 template<> EIGEN_STRONG_INLINE Packet1cd pnegate(const Packet1cd& a) { return Packet1cd(pnegate(Packet2d(a.v))); }
120 template<> EIGEN_STRONG_INLINE Packet1cd pconj(const Packet1cd& a) { return Packet1cd((Packet2d)vec_xor((Packet2d)a.v, (Packet2d)p2ul_CONJ_XOR2)); }
121 template<> EIGEN_STRONG_INLINE Packet1cd pmul<Packet1cd>(const Packet1cd& a, const Packet1cd& b)
122 {
123  Packet2d a_re, a_im, v1, v2;
124 
125  // Permute and multiply the real parts of a and b
126  a_re = vec_perm(a.v, a.v, p16uc_PSET64_HI);
127  // Get the imaginary parts of a
128  a_im = vec_perm(a.v, a.v, p16uc_PSET64_LO);
129  // multiply a_re * b
130  v1 = vec_madd(a_re, b.v, p2d_ZERO);
131  // multiply a_im * b and get the conjugate result
132  v2 = vec_madd(a_im, b.v, p2d_ZERO);
133  v2 = (Packet2d) vec_sld((Packet4ui)v2, (Packet4ui)v2, 8);
134  v2 = (Packet2d) vec_xor((Packet2d)v2, (Packet2d) p2ul_CONJ_XOR1);
135 
136  return Packet1cd(v1 + v2);
137 }
138 template<> EIGEN_STRONG_INLINE Packet1cd pand <Packet1cd>(const Packet1cd& a, const Packet1cd& b) { return Packet1cd(vec_and(a.v,b.v)); }
139 template<> EIGEN_STRONG_INLINE Packet1cd por <Packet1cd>(const Packet1cd& a, const Packet1cd& b) { return Packet1cd(vec_or(a.v,b.v)); }
140 template<> EIGEN_STRONG_INLINE Packet1cd pxor <Packet1cd>(const Packet1cd& a, const Packet1cd& b) { return Packet1cd(vec_xor(a.v,b.v)); }
141 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))); }
142 template<> EIGEN_STRONG_INLINE Packet1cd ploaddup<Packet1cd>(const std::complex<double>* from) { return pset1<Packet1cd>(*from); }
143 template<> EIGEN_STRONG_INLINE Packet1cd pcmp_eq(const Packet1cd& a, const Packet1cd& b) {
144  Packet2d eq = vec_cmpeq (a.v, b.v);
145  Packet2d tmp = { eq[1], eq[0] };
146  return (Packet1cd)pand<Packet2d>(eq, tmp);
147 }
148 
149 template<> EIGEN_STRONG_INLINE void prefetch<std::complex<double> >(const std::complex<double> * addr) { EIGEN_ZVECTOR_PREFETCH(addr); }
150 
151 template<> EIGEN_STRONG_INLINE std::complex<double> pfirst<Packet1cd>(const Packet1cd& a)
152 {
153  std::complex<double> EIGEN_ALIGN16 res;
154  pstore<std::complex<double> >(&res, a);
155 
156  return res;
157 }
158 
159 template<> EIGEN_STRONG_INLINE Packet1cd preverse(const Packet1cd& a) { return a; }
160 template<> EIGEN_STRONG_INLINE std::complex<double> predux<Packet1cd>(const Packet1cd& a)
161 {
162  return pfirst(a);
163 }
164 template<> EIGEN_STRONG_INLINE std::complex<double> predux_mul<Packet1cd>(const Packet1cd& a)
165 {
166  return pfirst(a);
167 }
169 
170 template<> EIGEN_STRONG_INLINE Packet1cd pdiv<Packet1cd>(const Packet1cd& a, const Packet1cd& b)
171 {
172  // TODO optimize it for AltiVec
173  Packet1cd res = pmul(a,pconj(b));
174  Packet2d s = vec_madd(b.v, b.v, p2d_ZERO_);
175  return Packet1cd(pdiv(res.v, s + vec_perm(s, s, p16uc_REVERSE64)));
176 }
177 
178 EIGEN_STRONG_INLINE Packet1cd pcplxflip/*<Packet1cd>*/(const Packet1cd& x)
179 {
180  return Packet1cd(preverse(Packet2d(x.v)));
181 }
182 
183 EIGEN_STRONG_INLINE void ptranspose(PacketBlock<Packet1cd,2>& kernel)
184 {
185  Packet2d tmp = vec_perm(kernel.packet[0].v, kernel.packet[1].v, p16uc_TRANSPOSE64_HI);
186  kernel.packet[1].v = vec_perm(kernel.packet[0].v, kernel.packet[1].v, p16uc_TRANSPOSE64_LO);
187  kernel.packet[0].v = tmp;
188 }
189 
190 /* complex<float> follows */
191 template<> EIGEN_STRONG_INLINE Packet2cf pload <Packet2cf>(const std::complex<float>* from) { EIGEN_DEBUG_ALIGNED_LOAD return Packet2cf(pload<Packet4f>((const float*)from)); }
192 template<> EIGEN_STRONG_INLINE Packet2cf ploadu<Packet2cf>(const std::complex<float>* from) { EIGEN_DEBUG_UNALIGNED_LOAD return Packet2cf(ploadu<Packet4f>((const float*)from)); }
193 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); }
194 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); }
195 
196 template<> EIGEN_STRONG_INLINE std::complex<float> pfirst<Packet2cf>(const Packet2cf& a)
197 {
198  std::complex<float> EIGEN_ALIGN16 res[2];
199  pstore<std::complex<float> >(res, a);
200 
201  return res[0];
202 }
203 
204 
205 #if !defined(__ARCH__) || (defined(__ARCH__) && __ARCH__ < 12)
206 template<> EIGEN_STRONG_INLINE Packet2cf pset1<Packet2cf>(const std::complex<float>& from)
207 {
208  Packet2cf res;
209  res.cd[0] = Packet1cd(vec_ld2f((const float *)&from));
210  res.cd[1] = res.cd[0];
211  return res;
212 }
213 #else
214 template<> EIGEN_STRONG_INLINE Packet2cf pset1<Packet2cf>(const std::complex<float>& from)
215 {
216  Packet2cf res;
217  if((std::ptrdiff_t(&from) % 16) == 0)
218  res.v = pload<Packet4f>((const float *)&from);
219  else
220  res.v = ploadu<Packet4f>((const float *)&from);
221  res.v = vec_perm(res.v, res.v, p16uc_PSET64_HI);
222  return res;
223 }
224 #endif
225 
226 template<> EIGEN_DEVICE_FUNC inline Packet2cf pgather<std::complex<float>, Packet2cf>(const std::complex<float>* from, Index stride)
227 {
228  std::complex<float> EIGEN_ALIGN16 af[2];
229  af[0] = from[0*stride];
230  af[1] = from[1*stride];
231  return pload<Packet2cf>(af);
232 }
233 template<> EIGEN_DEVICE_FUNC inline void pscatter<std::complex<float>, Packet2cf>(std::complex<float>* to, const Packet2cf& from, Index stride)
234 {
235  std::complex<float> EIGEN_ALIGN16 af[2];
236  pstore<std::complex<float> >((std::complex<float> *) af, from);
237  to[0*stride] = af[0];
238  to[1*stride] = af[1];
239 }
240 
241 template<> EIGEN_STRONG_INLINE Packet2cf padd<Packet2cf>(const Packet2cf& a, const Packet2cf& b) { return Packet2cf(padd<Packet4f>(a.v, b.v)); }
242 template<> EIGEN_STRONG_INLINE Packet2cf psub<Packet2cf>(const Packet2cf& a, const Packet2cf& b) { return Packet2cf(psub<Packet4f>(a.v, b.v)); }
243 template<> EIGEN_STRONG_INLINE Packet2cf pnegate(const Packet2cf& a) { return Packet2cf(pnegate(Packet4f(a.v))); }
244 
245 template<> EIGEN_STRONG_INLINE Packet2cf pand <Packet2cf>(const Packet2cf& a, const Packet2cf& b) { return Packet2cf(pand<Packet4f>(a.v,b.v)); }
246 template<> EIGEN_STRONG_INLINE Packet2cf por <Packet2cf>(const Packet2cf& a, const Packet2cf& b) { return Packet2cf(por<Packet4f>(a.v,b.v)); }
247 template<> EIGEN_STRONG_INLINE Packet2cf pxor <Packet2cf>(const Packet2cf& a, const Packet2cf& b) { return Packet2cf(pxor<Packet4f>(a.v,b.v)); }
248 template<> EIGEN_STRONG_INLINE Packet2cf pandnot<Packet2cf>(const Packet2cf& a, const Packet2cf& b) { return Packet2cf(pandnot<Packet4f>(a.v,b.v)); }
249 
250 template<> EIGEN_STRONG_INLINE Packet2cf ploaddup<Packet2cf>(const std::complex<float>* from) { return pset1<Packet2cf>(*from); }
251 
252 template<> EIGEN_STRONG_INLINE void prefetch<std::complex<float> >(const std::complex<float> * addr) { EIGEN_ZVECTOR_PREFETCH(addr); }
253 
254 
255 #if !defined(__ARCH__) || (defined(__ARCH__) && __ARCH__ < 12)
256 
257 template<> EIGEN_STRONG_INLINE Packet2cf pcmp_eq(const Packet2cf& a, const Packet2cf& b) {
258  Packet4f eq = pcmp_eq<Packet4f> (a.v, b.v);
259  Packet2cf res;
260  Packet2d tmp1 = { eq.v4f[0][1], eq.v4f[0][0] };
261  Packet2d tmp2 = { eq.v4f[1][1], eq.v4f[1][0] };
262  res.v.v4f[0] = pand<Packet2d>(eq.v4f[0], tmp1);
263  res.v.v4f[1] = pand<Packet2d>(eq.v4f[1], tmp2);
264  return res;
265 }
266 
267 template<> EIGEN_STRONG_INLINE Packet2cf pconj(const Packet2cf& a)
268 {
269  Packet2cf res;
270  res.v.v4f[0] = pconj(Packet1cd(reinterpret_cast<Packet2d>(a.v.v4f[0]))).v;
271  res.v.v4f[1] = pconj(Packet1cd(reinterpret_cast<Packet2d>(a.v.v4f[1]))).v;
272  return res;
273 }
274 
275 template<> EIGEN_STRONG_INLINE Packet2cf pmul<Packet2cf>(const Packet2cf& a, const Packet2cf& b)
276 {
277  Packet2cf res;
278  res.v.v4f[0] = pmul(Packet1cd(reinterpret_cast<Packet2d>(a.v.v4f[0])), Packet1cd(reinterpret_cast<Packet2d>(b.v.v4f[0]))).v;
279  res.v.v4f[1] = pmul(Packet1cd(reinterpret_cast<Packet2d>(a.v.v4f[1])), Packet1cd(reinterpret_cast<Packet2d>(b.v.v4f[1]))).v;
280  return res;
281 }
282 
283 template<> EIGEN_STRONG_INLINE Packet2cf preverse(const Packet2cf& a)
284 {
285  Packet2cf res;
286  res.cd[0] = a.cd[1];
287  res.cd[1] = a.cd[0];
288  return res;
289 }
290 
291 template<> EIGEN_STRONG_INLINE std::complex<float> predux<Packet2cf>(const Packet2cf& a)
292 {
293  std::complex<float> res;
294  Packet1cd b = padd<Packet1cd>(a.cd[0], a.cd[1]);
295  vec_st2f(b.v, (float*)&res);
296  return res;
297 }
298 
299 template<> EIGEN_STRONG_INLINE std::complex<float> predux_mul<Packet2cf>(const Packet2cf& a)
300 {
301  std::complex<float> res;
302  Packet1cd b = pmul<Packet1cd>(a.cd[0], a.cd[1]);
303  vec_st2f(b.v, (float*)&res);
304  return res;
305 }
306 
308 
309 template<> EIGEN_STRONG_INLINE Packet2cf pdiv<Packet2cf>(const Packet2cf& a, const Packet2cf& b)
310 {
311  // TODO optimize it for AltiVec
312  Packet2cf res;
313  res.cd[0] = pdiv<Packet1cd>(a.cd[0], b.cd[0]);
314  res.cd[1] = pdiv<Packet1cd>(a.cd[1], b.cd[1]);
315  return res;
316 }
317 
318 EIGEN_STRONG_INLINE Packet2cf pcplxflip/*<Packet2cf>*/(const Packet2cf& x)
319 {
320  Packet2cf res;
321  res.cd[0] = pcplxflip(x.cd[0]);
322  res.cd[1] = pcplxflip(x.cd[1]);
323  return res;
324 }
325 
326 EIGEN_STRONG_INLINE void ptranspose(PacketBlock<Packet2cf,2>& kernel)
327 {
328  Packet1cd tmp = kernel.packet[0].cd[1];
329  kernel.packet[0].cd[1] = kernel.packet[1].cd[0];
330  kernel.packet[1].cd[0] = tmp;
331 }
332 
333 template<> EIGEN_STRONG_INLINE Packet2cf pblend(const Selector<2>& ifPacket, const Packet2cf& thenPacket, const Packet2cf& elsePacket) {
334  Packet2cf result;
335  const Selector<4> ifPacket4 = { ifPacket.select[0], ifPacket.select[0], ifPacket.select[1], ifPacket.select[1] };
336  result.v = pblend<Packet4f>(ifPacket4, thenPacket.v, elsePacket.v);
337  return result;
338 }
339 #else
340 template<> EIGEN_STRONG_INLINE Packet2cf pcmp_eq(const Packet2cf& a, const Packet2cf& b) {
341  Packet4f eq = vec_cmpeq (a.v, b.v);
342  Packet4f tmp = { eq[1], eq[0], eq[3], eq[2] };
343  return (Packet2cf)pand<Packet4f>(eq, tmp);
344 }
345 template<> EIGEN_STRONG_INLINE Packet2cf pconj(const Packet2cf& a) { return Packet2cf(pxor<Packet4f>(a.v, reinterpret_cast<Packet4f>(p4ui_CONJ_XOR))); }
346 template<> EIGEN_STRONG_INLINE Packet2cf pmul<Packet2cf>(const Packet2cf& a, const Packet2cf& b)
347 {
348  Packet4f a_re, a_im, prod, prod_im;
349 
350  // Permute and multiply the real parts of a and b
351  a_re = vec_perm(a.v, a.v, p16uc_PSET32_WODD);
352 
353  // Get the imaginary parts of a
354  a_im = vec_perm(a.v, a.v, p16uc_PSET32_WEVEN);
355 
356  // multiply a_im * b and get the conjugate result
357  prod_im = a_im * b.v;
358  prod_im = pxor<Packet4f>(prod_im, reinterpret_cast<Packet4f>(p4ui_CONJ_XOR));
359  // permute back to a proper order
360  prod_im = vec_perm(prod_im, prod_im, p16uc_COMPLEX32_REV);
361 
362  // multiply a_re * b, add prod_im
363  prod = pmadd<Packet4f>(a_re, b.v, prod_im);
364 
365  return Packet2cf(prod);
366 }
367 
368 template<> EIGEN_STRONG_INLINE Packet2cf preverse(const Packet2cf& a)
369 {
370  Packet4f rev_a;
371  rev_a = vec_perm(a.v, a.v, p16uc_COMPLEX32_REV2);
372  return Packet2cf(rev_a);
373 }
374 
375 template<> EIGEN_STRONG_INLINE std::complex<float> predux<Packet2cf>(const Packet2cf& a)
376 {
377  Packet4f b;
378  b = vec_sld(a.v, a.v, 8);
379  b = padd<Packet4f>(a.v, b);
380  return pfirst<Packet2cf>(Packet2cf(b));
381 }
382 
383 template<> EIGEN_STRONG_INLINE std::complex<float> predux_mul<Packet2cf>(const Packet2cf& a)
384 {
385  Packet4f b;
386  Packet2cf prod;
387  b = vec_sld(a.v, a.v, 8);
388  prod = pmul<Packet2cf>(a, Packet2cf(b));
389 
390  return pfirst<Packet2cf>(prod);
391 }
392 
394 
395 template<> EIGEN_STRONG_INLINE Packet2cf pdiv<Packet2cf>(const Packet2cf& a, const Packet2cf& b)
396 {
397  // TODO optimize it for AltiVec
398  Packet2cf res = pmul(a, pconj(b));
399  Packet4f s = pmul<Packet4f>(b.v, b.v);
400  return Packet2cf(pdiv(res.v, padd<Packet4f>(s, vec_perm(s, s, p16uc_COMPLEX32_REV))));
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_ALTIVEC_H
Eigen::internal::Packet2cf::v
Packet4f v
Definition: AltiVec/Complex.h:80
Eigen::internal::ploadu< Packet2cf >
EIGEN_STRONG_INLINE Packet2cf ploadu< Packet2cf >(const std::complex< float > *from)
Definition: AltiVec/Complex.h:124
Eigen::internal::pcmp_eq
EIGEN_STRONG_INLINE Packet2cf pcmp_eq(const Packet2cf &a, const Packet2cf &b)
Definition: AltiVec/Complex.h:231
EIGEN_DEVICE_FUNC
#define EIGEN_DEVICE_FUNC
Definition: Macros.h:976
Eigen::internal::packet_traits::HasAbs
@ HasAbs
Definition: GenericPacketMath.h:121
Eigen
Namespace containing all symbols from the Eigen library.
Definition: jet.h:637
EIGEN_MAKE_CONJ_HELPER_CPLX_REAL
#define EIGEN_MAKE_CONJ_HELPER_CPLX_REAL(PACKET_CPLX, PACKET_REAL)
Definition: ConjHelper.h:14
Eigen::internal::packet_traits< std::complex< float > >::half
Packet2cf half
Definition: ZVector/Complex.h:49
Eigen::internal::packet_traits::HasSub
@ HasSub
Definition: GenericPacketMath.h:118
Eigen::internal::pstoreu
EIGEN_DEVICE_FUNC void pstoreu(Scalar *to, const Packet &from)
Definition: GenericPacketMath.h:700
Eigen::internal::packet_traits::size
@ size
Definition: GenericPacketMath.h:112
Eigen::internal::Packet4f
__vector float Packet4f
Definition: AltiVec/PacketMath.h:30
s
RealScalar s
Definition: level1_cplx_impl.h:126
Eigen::internal::pmul< Packet1cd >
EIGEN_STRONG_INLINE Packet1cd pmul< Packet1cd >(const Packet1cd &a, const Packet1cd &b)
Definition: MSA/Complex.h:498
Eigen::internal::PacketBlock
Definition: GenericPacketMath.h:1014
Eigen::internal::p2d_ZERO_
static Packet2d p2d_ZERO_
Definition: ZVector/PacketMath.h:94
b
Scalar * b
Definition: benchVecAdd.cpp:17
Eigen::internal::pand< Packet2cf >
EIGEN_STRONG_INLINE Packet2cf pand< Packet2cf >(const Packet2cf &a, const Packet2cf &b)
Definition: AltiVec/Complex.h:169
Eigen::internal::predux_mul< Packet1cd >
EIGEN_STRONG_INLINE std::complex< double > predux_mul< Packet1cd >(const Packet1cd &a)
Definition: MSA/Complex.h:605
Eigen::internal::ploaddup< Packet2cf >
EIGEN_STRONG_INLINE Packet2cf ploaddup< Packet2cf >(const std::complex< float > *from)
Definition: AltiVec/Complex.h:125
Eigen::internal::unpacket_traits< Packet1cd >::type
std::complex< double > type
Definition: ZVector/Complex.h:95
Eigen::internal::pfirst
EIGEN_STRONG_INLINE bfloat16 pfirst(const Packet8bf &a)
Definition: AltiVec/PacketMath.h:1429
Eigen::internal::psub< Packet4f >
EIGEN_STRONG_INLINE Packet4f psub< Packet4f >(const Packet4f &a, const Packet4f &b)
Definition: AltiVec/PacketMath.h:782
x
set noclip points set clip one set noclip two set bar set border lt lw set xdata set ydata set zdata set x2data set y2data set boxwidth set dummy x
Definition: gnuplot_common_settings.hh:12
Eigen::internal::pcplxflip< Packet2cf >
EIGEN_STRONG_INLINE Packet2cf pcplxflip< Packet2cf >(const Packet2cf &x)
Definition: AltiVec/Complex.h:219
Eigen::internal::predux< Packet2cf >
EIGEN_STRONG_INLINE std::complex< float > predux< Packet2cf >(const Packet2cf &a)
Definition: AltiVec/Complex.h:191
Eigen::internal::pandnot< Packet1cd >
EIGEN_STRONG_INLINE Packet1cd pandnot< Packet1cd >(const Packet1cd &a, const Packet1cd &b)
Definition: MSA/Complex.h:526
Eigen::internal::Packet2cf::Packet2cf
EIGEN_STRONG_INLINE Packet2cf(const Packet4f &a)
Definition: ZVector/Complex.h:35
Eigen::internal::preverse
EIGEN_STRONG_INLINE Packet2cf preverse(const Packet2cf &a)
Definition: AltiVec/Complex.h:184
Eigen::internal::packet_traits::HasMin
@ HasMin
Definition: GenericPacketMath.h:123
Eigen::internal::Packet2cf::cd
Packet1cd cd[2]
Definition: ZVector/Complex.h:39
Eigen::internal::packet_traits< std::complex< double > >::type
Packet1cd type
Definition: ZVector/Complex.h:73
Eigen::internal::pdiv
EIGEN_DEVICE_FUNC Packet pdiv(const Packet &a, const Packet &b)
Definition: GenericPacketMath.h:244
Eigen::internal::ploadu< Packet2d >
EIGEN_STRONG_INLINE Packet2d ploadu< Packet2d >(const double *from)
Definition: MSA/PacketMath.h:1004
Eigen::internal::pconj
EIGEN_STRONG_INLINE Packet2cf pconj(const Packet2cf &a)
Definition: AltiVec/Complex.h:167
res
cout<< "Here is the matrix m:"<< endl<< m<< endl;Matrix< ptrdiff_t, 3, 1 > res
Definition: PartialRedux_count.cpp:3
Eigen::internal::ploadu< Packet4f >
EIGEN_STRONG_INLINE Packet4f ploadu< Packet4f >(const float *from)
Definition: AltiVec/PacketMath.h:968
Eigen::internal::unpacket_traits::vectorizable
@ vectorizable
Definition: GenericPacketMath.h:140
Eigen::internal::default_packet_traits::HasBlend
@ HasBlend
Definition: GenericPacketMath.h:60
Eigen::internal::p2ul_CONJ_XOR1
static Packet2ul p2ul_CONJ_XOR1
Definition: ZVector/Complex.h:22
result
Values result
Definition: OdometryOptimize.cpp:8
Eigen::internal::pload< Packet4f >
EIGEN_STRONG_INLINE Packet4f pload< Packet4f >(const float *from)
Definition: AltiVec/PacketMath.h:443
Eigen::internal::ploadu< Packet1cd >
EIGEN_STRONG_INLINE Packet1cd ploadu< Packet1cd >(const std::complex< double > *from)
Definition: MSA/Complex.h:456
Eigen::internal::unpacket_traits< Packet2cf >::type
std::complex< float > type
Definition: ZVector/Complex.h:94
Eigen::internal::p16uc_PSET32_WEVEN
static Packet16uc p16uc_PSET32_WEVEN
Definition: AltiVec/PacketMath.h:127
Eigen::internal::packet_traits::HasHalfPacket
@ HasHalfPacket
Definition: GenericPacketMath.h:114
Eigen::internal::padd< Packet4f >
EIGEN_STRONG_INLINE Packet4f padd< Packet4f >(const Packet4f &a, const Packet4f &b)
Definition: AltiVec/PacketMath.h:774
Eigen::internal::Packet1cd::Packet1cd
EIGEN_STRONG_INLINE Packet1cd(const Packet2d &a)
Definition: ZVector/Complex.h:28
EIGEN_DEBUG_UNALIGNED_STORE
#define EIGEN_DEBUG_UNALIGNED_STORE
Definition: GenericPacketMath.h:39
Eigen::internal::p16uc_REVERSE64
static Packet16uc p16uc_REVERSE64
Definition: AltiVec/PacketMath.h:125
Eigen::internal::unpacket_traits::masked_store_available
@ masked_store_available
Definition: GenericPacketMath.h:142
Eigen::internal::pload< Packet1cd >
EIGEN_STRONG_INLINE Packet1cd pload< Packet1cd >(const std::complex< double > *from)
Definition: MSA/Complex.h:449
Eigen::internal::pand< Packet2d >
EIGEN_STRONG_INLINE Packet2d pand< Packet2d >(const Packet2d &a, const Packet2d &b)
Definition: MSA/PacketMath.h:939
Eigen::internal::padd< Packet1cd >
EIGEN_STRONG_INLINE Packet1cd padd< Packet1cd >(const Packet1cd &a, const Packet1cd &b)
Definition: MSA/Complex.h:470
Eigen::internal::pandnot< Packet4f >
EIGEN_STRONG_INLINE Packet4f pandnot< Packet4f >(const Packet4f &a, const Packet4f &b)
Definition: AltiVec/PacketMath.h:914
Eigen::internal::pcmp_eq< Packet4f >
EIGEN_STRONG_INLINE Packet4f pcmp_eq< Packet4f >(const Packet4f &a, const Packet4f &b)
Definition: NEON/PacketMath.h:1400
Eigen::internal::por< Packet1cd >
EIGEN_STRONG_INLINE Packet1cd por< Packet1cd >(const Packet1cd &a, const Packet1cd &b)
Definition: MSA/Complex.h:512
Eigen::internal::unpacket_traits::size
@ size
Definition: GenericPacketMath.h:138
Eigen::internal::unpacket_traits::alignment
@ alignment
Definition: GenericPacketMath.h:139
Eigen::internal::unpacket_traits::half
T half
Definition: GenericPacketMath.h:135
Eigen::internal::Packet1cd::Packet1cd
EIGEN_STRONG_INLINE Packet1cd()
Definition: ZVector/Complex.h:27
Eigen::internal::pfirst< Packet1cd >
EIGEN_STRONG_INLINE std::complex< double > pfirst< Packet1cd >(const Packet1cd &a)
Definition: MSA/Complex.h:584
EIGEN_ZVECTOR_PREFETCH
#define EIGEN_ZVECTOR_PREFETCH(ADDR)
Definition: ZVector/PacketMath.h:150
Eigen::internal::Packet4ui
__vector unsigned int Packet4ui
Definition: AltiVec/PacketMath.h:32
Eigen::internal::packet_traits< std::complex< float > >::type
Packet2cf type
Definition: ZVector/Complex.h:48
Eigen::internal::pmul< Packet4f >
EIGEN_STRONG_INLINE Packet4f pmul< Packet4f >(const Packet4f &a, const Packet4f &b)
Definition: AltiVec/PacketMath.h:795
Eigen::internal::packet_traits::AlignedOnScalar
@ AlignedOnScalar
Definition: GenericPacketMath.h:113
Eigen::internal::pdiv< Packet1cd >
EIGEN_STRONG_INLINE Packet1cd pdiv< Packet1cd >(const Packet1cd &a, const Packet1cd &b)
Definition: MSA/Complex.h:614
Eigen::internal::psub< Packet1cd >
EIGEN_STRONG_INLINE Packet1cd psub< Packet1cd >(const Packet1cd &a, const Packet1cd &b)
Definition: MSA/Complex.h:477
Eigen::internal::padd< Packet2cf >
EIGEN_STRONG_INLINE Packet2cf padd< Packet2cf >(const Packet2cf &a, const Packet2cf &b)
Definition: AltiVec/Complex.h:164
Eigen::internal::pload< Packet2cf >
EIGEN_STRONG_INLINE Packet2cf pload< Packet2cf >(const std::complex< float > *from)
Definition: AltiVec/Complex.h:123
Eigen::internal::pnegate
EIGEN_STRONG_INLINE Packet2cf pnegate(const Packet2cf &a)
Definition: AltiVec/Complex.h:166
Eigen::internal::p16uc_TRANSPOSE64_HI
static Packet16uc p16uc_TRANSPOSE64_HI
Definition: AltiVec/PacketMath.h:133
Eigen::internal::pset1< Packet2cf >
EIGEN_STRONG_INLINE Packet2cf pset1< Packet2cf >(const std::complex< float > &from)
Definition: AltiVec/Complex.h:112
Eigen::internal::unpacket_traits
Definition: GenericPacketMath.h:132
Eigen::internal::ptranspose
EIGEN_STRONG_INLINE void ptranspose(PacketBlock< Packet2cf, 2 > &kernel)
Definition: AltiVec/Complex.h:224
Eigen::internal::Packet2cf
Definition: AltiVec/Complex.h:30
Eigen::internal::pfirst< Packet2cf >
EIGEN_STRONG_INLINE std::complex< float > pfirst< Packet2cf >(const Packet2cf &a)
Definition: AltiVec/Complex.h:176
EIGEN_DEBUG_ALIGNED_LOAD
#define EIGEN_DEBUG_ALIGNED_LOAD
Definition: GenericPacketMath.h:27
EIGEN_STRONG_INLINE
#define EIGEN_STRONG_INLINE
Definition: Macros.h:917
Eigen::internal::pmul< Packet2cf >
EIGEN_STRONG_INLINE Packet2cf pmul< Packet2cf >(const Packet2cf &a, const Packet2cf &b)
Definition: MSA/Complex.h:173
Eigen::internal::pblend
EIGEN_STRONG_INLINE Packet4i pblend(const Selector< 4 > &ifPacket, const Packet4i &thenPacket, const Packet4i &elsePacket)
Definition: AltiVec/PacketMath.h:2107
Eigen::internal::pset1< Packet1cd >
EIGEN_STRONG_INLINE Packet1cd pset1< Packet1cd >(const std::complex< double > &from)
Definition: MSA/Complex.h:463
Eigen::internal::Packet2cf::Packet2cf
EIGEN_STRONG_INLINE Packet2cf()
Definition: ZVector/Complex.h:34
Eigen::internal::p4ui_CONJ_XOR
static Packet4ui p4ui_CONJ_XOR
Definition: AltiVec/Complex.h:18
Eigen::internal::Packet1cd::v
Packet2d v
Definition: MSA/Complex.h:410
Eigen::internal::pstore
EIGEN_DEVICE_FUNC void pstore(Scalar *to, const Packet &from)
Definition: GenericPacketMath.h:696
Eigen::internal::por< Packet2cf >
EIGEN_STRONG_INLINE Packet2cf por< Packet2cf >(const Packet2cf &a, const Packet2cf &b)
Definition: AltiVec/Complex.h:170
Eigen::internal::unpacket_traits::masked_load_available
@ masked_load_available
Definition: GenericPacketMath.h:141
Eigen::internal::p16uc_COMPLEX32_REV2
static Packet16uc p16uc_COMPLEX32_REV2
Definition: AltiVec/PacketMath.h:141
Eigen::Aligned16
@ Aligned16
Definition: Constants.h:235
Eigen::internal::p16uc_PSET32_WODD
static Packet16uc p16uc_PSET32_WODD
Definition: AltiVec/PacketMath.h:126
a
ArrayXXi a
Definition: Array_initializer_list_23_cxx11.cpp:1
Eigen::internal::p16uc_PSET64_HI
static Packet16uc p16uc_PSET64_HI
Definition: AltiVec/PacketMath.h:131
Eigen::internal::packet_traits::HasAbs2
@ HasAbs2
Definition: GenericPacketMath.h:122
Eigen::internal::packet_traits< std::complex< double > >::half
Packet1cd half
Definition: ZVector/Complex.h:74
Eigen::internal::pmul
EIGEN_DEVICE_FUNC Packet pmul(const Packet &a, const Packet &b)
Definition: GenericPacketMath.h:237
Eigen::internal::Packet2d
v2f64 Packet2d
Definition: MSA/PacketMath.h:820
EIGEN_DEBUG_UNALIGNED_LOAD
#define EIGEN_DEBUG_UNALIGNED_LOAD
Definition: GenericPacketMath.h:31
Eigen::internal::por< Packet4f >
EIGEN_STRONG_INLINE Packet4f por< Packet4f >(const Packet4f &a, const Packet4f &b)
Definition: AltiVec/PacketMath.h:900
std
Definition: BFloat16.h:88
Eigen::internal::p2ul_CONJ_XOR2
static Packet2ul p2ul_CONJ_XOR2
Definition: ZVector/Complex.h:23
Eigen::internal::pandnot< Packet2cf >
EIGEN_STRONG_INLINE Packet2cf pandnot< Packet2cf >(const Packet2cf &a, const Packet2cf &b)
Definition: AltiVec/Complex.h:172
Eigen::internal::pand< Packet4f >
EIGEN_STRONG_INLINE Packet4f pand< Packet4f >(const Packet4f &a, const Packet4f &b)
Definition: AltiVec/PacketMath.h:891
v2
Vector v2
Definition: testSerializationBase.cpp:39
Eigen::internal::packet_traits::HasAdd
@ HasAdd
Definition: GenericPacketMath.h:117
Eigen::internal::pcplxflip
EIGEN_STRONG_INLINE Packet1cd pcplxflip(const Packet1cd &x)
Definition: MSA/Complex.h:620
Eigen::internal::packet_traits::HasMax
@ HasMax
Definition: GenericPacketMath.h:124
Eigen::internal::pxor< Packet1cd >
EIGEN_STRONG_INLINE Packet1cd pxor< Packet1cd >(const Packet1cd &a, const Packet1cd &b)
Definition: MSA/Complex.h:519
Eigen::internal::psub< Packet2cf >
EIGEN_STRONG_INLINE Packet2cf psub< Packet2cf >(const Packet2cf &a, const Packet2cf &b)
Definition: AltiVec/Complex.h:165
Eigen::internal::ploaddup< Packet1cd >
EIGEN_STRONG_INLINE Packet1cd ploaddup< Packet1cd >(const std::complex< double > *from)
Definition: MSA/Complex.h:533
Eigen::internal::packet_traits::HasNegate
@ HasNegate
Definition: GenericPacketMath.h:120
Eigen::internal::default_packet_traits::HasDiv
@ HasDiv
Definition: GenericPacketMath.h:65
Eigen::internal::Packet2ul
v2u64 Packet2ul
Definition: MSA/PacketMath.h:822
EIGEN_UNUSED
#define EIGEN_UNUSED
Definition: Macros.h:1067
Eigen::internal::pxor< Packet4f >
EIGEN_STRONG_INLINE Packet4f pxor< Packet4f >(const Packet4f &a, const Packet4f &b)
Definition: AltiVec/PacketMath.h:908
EIGEN_ALIGN16
#define EIGEN_ALIGN16
Definition: ConfigureVectorization.h:153
Eigen::internal::pxor< Packet2cf >
EIGEN_STRONG_INLINE Packet2cf pxor< Packet2cf >(const Packet2cf &a, const Packet2cf &b)
Definition: AltiVec/Complex.h:171
internal
Definition: BandTriangularSolver.h:13
Eigen::internal::pand< Packet1cd >
EIGEN_STRONG_INLINE Packet1cd pand< Packet1cd >(const Packet1cd &a, const Packet1cd &b)
Definition: MSA/Complex.h:505
Eigen::internal::predux_mul< Packet2cf >
EIGEN_STRONG_INLINE std::complex< float > predux_mul< Packet2cf >(const Packet2cf &a)
Definition: AltiVec/Complex.h:199
Eigen::internal::Packet1cd
Definition: MSA/Complex.h:341
Eigen::internal::packet_traits::HasMul
@ HasMul
Definition: GenericPacketMath.h:119
Eigen::internal::packet_traits::Vectorizable
@ Vectorizable
Definition: GenericPacketMath.h:111
Eigen::prod
const Product< Lhs, Rhs > prod(const Lhs &lhs, const Rhs &rhs)
Definition: evaluators.cpp:8
Eigen::internal::p16uc_PSET64_LO
static Packet16uc p16uc_PSET64_LO
Definition: AltiVec/PacketMath.h:132
Eigen::internal::p16uc_TRANSPOSE64_LO
static Packet16uc p16uc_TRANSPOSE64_LO
Definition: AltiVec/PacketMath.h:134
Eigen::internal::pload< Packet2d >
EIGEN_STRONG_INLINE Packet2d pload< Packet2d >(const double *from)
Definition: MSA/PacketMath.h:967
EIGEN_DEBUG_ALIGNED_STORE
#define EIGEN_DEBUG_ALIGNED_STORE
Definition: GenericPacketMath.h:35
v1
Vector v1
Definition: testSerializationBase.cpp:38
complex
Definition: datatypes.h:12
Eigen::internal::packet_traits::HasSetLinear
@ HasSetLinear
Definition: GenericPacketMath.h:126
Eigen::internal::predux< Packet1cd >
EIGEN_STRONG_INLINE std::complex< double > predux< Packet1cd >(const Packet1cd &a)
Definition: MSA/Complex.h:598
Eigen::internal::pdiv< Packet2cf >
EIGEN_STRONG_INLINE Packet2cf pdiv< Packet2cf >(const Packet2cf &a, const Packet2cf &b)
Definition: AltiVec/Complex.h:211
Eigen::internal::p16uc_COMPLEX32_REV
static Packet16uc p16uc_COMPLEX32_REV
Definition: AltiVec/PacketMath.h:136
Eigen::Index
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
Definition: Meta.h:74


gtsam
Author(s):
autogenerated on Thu Dec 19 2024 04:00:50