AltiVec/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-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 static Packet4ui p4ui_CONJ_XOR = vec_mergeh((Packet4ui)p4i_ZERO, (Packet4ui)p4f_MZERO);//{ 0x00000000, 0x80000000, 0x00000000, 0x80000000 };
19 #ifdef __VSX__
20 #if defined(_BIG_ENDIAN)
21 static Packet2ul p2ul_CONJ_XOR1 = (Packet2ul) vec_sld((Packet4ui) p2d_MZERO, (Packet4ui) p2l_ZERO, 8);//{ 0x8000000000000000, 0x0000000000000000 };
22 static Packet2ul p2ul_CONJ_XOR2 = (Packet2ul) vec_sld((Packet4ui) p2l_ZERO, (Packet4ui) p2d_MZERO, 8);//{ 0x8000000000000000, 0x0000000000000000 };
23 #else
24 static Packet2ul p2ul_CONJ_XOR1 = (Packet2ul) vec_sld((Packet4ui) p2l_ZERO, (Packet4ui) p2d_MZERO, 8);//{ 0x8000000000000000, 0x0000000000000000 };
25 static Packet2ul p2ul_CONJ_XOR2 = (Packet2ul) vec_sld((Packet4ui) p2d_MZERO, (Packet4ui) p2l_ZERO, 8);//{ 0x8000000000000000, 0x0000000000000000 };
26 #endif
27 #endif
28 
29 //---------- float ----------
30 struct Packet2cf
31 {
32  EIGEN_STRONG_INLINE explicit Packet2cf() : v(p4f_ZERO) {}
33  EIGEN_STRONG_INLINE explicit Packet2cf(const Packet4f& a) : v(a) {}
35 };
36 
37 template<> struct packet_traits<std::complex<float> > : default_packet_traits
38 {
39  typedef Packet2cf type;
40  typedef Packet2cf half;
41  enum {
42  Vectorizable = 1,
43  AlignedOnScalar = 1,
44  size = 2,
45  HasHalfPacket = 0,
46 
47  HasAdd = 1,
48  HasSub = 1,
49  HasMul = 1,
50  HasDiv = 1,
51  HasNegate = 1,
52  HasAbs = 0,
53  HasAbs2 = 0,
54  HasMin = 0,
55  HasMax = 0,
56 #ifdef __VSX__
57  HasBlend = 1,
58 #endif
59  HasSetLinear = 0
60  };
61 };
62 
63 template<> struct unpacket_traits<Packet2cf> { typedef std::complex<float> type; enum {size=2, alignment=Aligned16}; typedef Packet2cf half; };
64 
65 template<> EIGEN_STRONG_INLINE Packet2cf pset1<Packet2cf>(const std::complex<float>& from)
66 {
67  Packet2cf res;
68  if((std::ptrdiff_t(&from) % 16) == 0)
69  res.v = pload<Packet4f>((const float *)&from);
70  else
71  res.v = ploadu<Packet4f>((const float *)&from);
72  res.v = vec_perm(res.v, res.v, p16uc_PSET64_HI);
73  return res;
74 }
75 
76 template<> EIGEN_STRONG_INLINE Packet2cf pload<Packet2cf>(const std::complex<float>* from) { return Packet2cf(pload<Packet4f>((const float *) from)); }
77 template<> EIGEN_STRONG_INLINE Packet2cf ploadu<Packet2cf>(const std::complex<float>* from) { return Packet2cf(ploadu<Packet4f>((const float*) from)); }
78 template<> EIGEN_STRONG_INLINE Packet2cf ploaddup<Packet2cf>(const std::complex<float>* from) { return pset1<Packet2cf>(*from); }
79 
80 template<> EIGEN_STRONG_INLINE void pstore <std::complex<float> >(std::complex<float> * to, const Packet2cf& from) { pstore((float*)to, from.v); }
81 template<> EIGEN_STRONG_INLINE void pstoreu<std::complex<float> >(std::complex<float> * to, const Packet2cf& from) { pstoreu((float*)to, from.v); }
82 
83 template<> EIGEN_DEVICE_FUNC inline Packet2cf pgather<std::complex<float>, Packet2cf>(const std::complex<float>* from, Index stride)
84 {
85  std::complex<float> EIGEN_ALIGN16 af[2];
86  af[0] = from[0*stride];
87  af[1] = from[1*stride];
88  return pload<Packet2cf>(af);
89 }
90 template<> EIGEN_DEVICE_FUNC inline void pscatter<std::complex<float>, Packet2cf>(std::complex<float>* to, const Packet2cf& from, Index stride)
91 {
92  std::complex<float> EIGEN_ALIGN16 af[2];
93  pstore<std::complex<float> >((std::complex<float> *) af, from);
94  to[0*stride] = af[0];
95  to[1*stride] = af[1];
96 }
97 
98 template<> EIGEN_STRONG_INLINE Packet2cf padd<Packet2cf>(const Packet2cf& a, const Packet2cf& b) { return Packet2cf(a.v + b.v); }
99 template<> EIGEN_STRONG_INLINE Packet2cf psub<Packet2cf>(const Packet2cf& a, const Packet2cf& b) { return Packet2cf(a.v - b.v); }
100 template<> EIGEN_STRONG_INLINE Packet2cf pnegate(const Packet2cf& a) { return Packet2cf(pnegate(a.v)); }
101 template<> EIGEN_STRONG_INLINE Packet2cf pconj(const Packet2cf& a) { return Packet2cf(pxor<Packet4f>(a.v, reinterpret_cast<Packet4f>(p4ui_CONJ_XOR))); }
102 
104 {
105  Packet4f v1, v2;
106 
107  // Permute and multiply the real parts of a and b
108  v1 = vec_perm(a.v, a.v, p16uc_PSET32_WODD);
109  // Get the imaginary parts of a
110  v2 = vec_perm(a.v, a.v, p16uc_PSET32_WEVEN);
111  // multiply a_re * b
112  v1 = vec_madd(v1, b.v, p4f_ZERO);
113  // multiply a_im * b and get the conjugate result
114  v2 = vec_madd(v2, b.v, p4f_ZERO);
115  v2 = reinterpret_cast<Packet4f>(pxor(v2, reinterpret_cast<Packet4f>(p4ui_CONJ_XOR)));
116  // permute back to a proper order
117  v2 = vec_perm(v2, v2, p16uc_COMPLEX32_REV);
118 
119  return Packet2cf(padd<Packet4f>(v1, v2));
120 }
121 
126 
127 template<> EIGEN_STRONG_INLINE void prefetch<std::complex<float> >(const std::complex<float> * addr) { EIGEN_PPC_PREFETCH(addr); }
128 
129 template<> EIGEN_STRONG_INLINE std::complex<float> pfirst<Packet2cf>(const Packet2cf& a)
130 {
131  std::complex<float> EIGEN_ALIGN16 res[2];
132  pstore((float *)&res, a.v);
133 
134  return res[0];
135 }
136 
138 {
139  Packet4f rev_a;
140  rev_a = vec_perm(a.v, a.v, p16uc_COMPLEX32_REV2);
141  return Packet2cf(rev_a);
142 }
143 
144 template<> EIGEN_STRONG_INLINE std::complex<float> predux<Packet2cf>(const Packet2cf& a)
145 {
146  Packet4f b;
147  b = vec_sld(a.v, a.v, 8);
148  b = padd<Packet4f>(a.v, b);
149  return pfirst<Packet2cf>(Packet2cf(b));
150 }
151 
153 {
154  Packet4f b1, b2;
155 #ifdef _BIG_ENDIAN
156  b1 = vec_sld(vecs[0].v, vecs[1].v, 8);
157  b2 = vec_sld(vecs[1].v, vecs[0].v, 8);
158 #else
159  b1 = vec_sld(vecs[1].v, vecs[0].v, 8);
160  b2 = vec_sld(vecs[0].v, vecs[1].v, 8);
161 #endif
162  b2 = vec_sld(b2, b2, 8);
163  b2 = padd<Packet4f>(b1, b2);
164 
165  return Packet2cf(b2);
166 }
167 
168 template<> EIGEN_STRONG_INLINE std::complex<float> predux_mul<Packet2cf>(const Packet2cf& a)
169 {
170  Packet4f b;
171  Packet2cf prod;
172  b = vec_sld(a.v, a.v, 8);
173  prod = pmul<Packet2cf>(a, Packet2cf(b));
174 
175  return pfirst<Packet2cf>(prod);
176 }
177 
178 template<int Offset>
179 struct palign_impl<Offset,Packet2cf>
180 {
181  static EIGEN_STRONG_INLINE void run(Packet2cf& first, const Packet2cf& second)
182  {
183  if (Offset==1)
184  {
185 #ifdef _BIG_ENDIAN
186  first.v = vec_sld(first.v, second.v, 8);
187 #else
188  first.v = vec_sld(second.v, first.v, 8);
189 #endif
190  }
191  }
192 };
193 
194 template<> struct conj_helper<Packet2cf, Packet2cf, false,true>
195 {
197  { return padd(pmul(x,y),c); }
198 
200  {
201  return internal::pmul(a, pconj(b));
202  }
203 };
204 
205 template<> struct conj_helper<Packet2cf, Packet2cf, true,false>
206 {
208  { return padd(pmul(x,y),c); }
209 
211  {
212  return internal::pmul(pconj(a), b);
213  }
214 };
215 
216 template<> struct conj_helper<Packet2cf, Packet2cf, true,true>
217 {
219  { return padd(pmul(x,y),c); }
220 
222  {
223  return pconj(internal::pmul(a, b));
224  }
225 };
226 
228 
230 {
231  // TODO optimize it for AltiVec
233  Packet4f s = pmul<Packet4f>(b.v, b.v);
234  return Packet2cf(pdiv(res.v, padd<Packet4f>(s, vec_perm(s, s, p16uc_COMPLEX32_REV))));
235 }
236 
238 {
239  return Packet2cf(vec_perm(x.v, x.v, p16uc_COMPLEX32_REV));
240 }
241 
243 {
244  Packet4f tmp = vec_perm(kernel.packet[0].v, kernel.packet[1].v, p16uc_TRANSPOSE64_HI);
245  kernel.packet[1].v = vec_perm(kernel.packet[0].v, kernel.packet[1].v, p16uc_TRANSPOSE64_LO);
246  kernel.packet[0].v = tmp;
247 }
248 
249 #ifdef __VSX__
250 template<> EIGEN_STRONG_INLINE Packet2cf pblend(const Selector<2>& ifPacket, const Packet2cf& thenPacket, const Packet2cf& elsePacket) {
252  result.v = reinterpret_cast<Packet4f>(pblend<Packet2d>(ifPacket, reinterpret_cast<Packet2d>(thenPacket.v), reinterpret_cast<Packet2d>(elsePacket.v)));
253  return result;
254 }
255 #endif
256 
257 //---------- double ----------
258 #ifdef __VSX__
259 struct Packet1cd
260 {
262  EIGEN_STRONG_INLINE explicit Packet1cd(const Packet2d& a) : v(a) {}
263  Packet2d v;
264 };
265 
266 template<> struct packet_traits<std::complex<double> > : default_packet_traits
267 {
268  typedef Packet1cd type;
269  typedef Packet1cd half;
270  enum {
271  Vectorizable = 1,
272  AlignedOnScalar = 0,
273  size = 1,
274  HasHalfPacket = 0,
275 
276  HasAdd = 1,
277  HasSub = 1,
278  HasMul = 1,
279  HasDiv = 1,
280  HasNegate = 1,
281  HasAbs = 0,
282  HasAbs2 = 0,
283  HasMin = 0,
284  HasMax = 0,
285  HasSetLinear = 0
286  };
287 };
288 
289 template<> struct unpacket_traits<Packet1cd> { typedef std::complex<double> type; enum {size=1, alignment=Aligned16}; typedef Packet1cd half; };
290 
291 template<> EIGEN_STRONG_INLINE Packet1cd pload <Packet1cd>(const std::complex<double>* from) { return Packet1cd(pload<Packet2d>((const double*)from)); }
292 template<> EIGEN_STRONG_INLINE Packet1cd ploadu<Packet1cd>(const std::complex<double>* from) { return Packet1cd(ploadu<Packet2d>((const double*)from)); }
293 template<> EIGEN_STRONG_INLINE void pstore <std::complex<double> >(std::complex<double> * to, const Packet1cd& from) { pstore((double*)to, from.v); }
294 template<> EIGEN_STRONG_INLINE void pstoreu<std::complex<double> >(std::complex<double> * to, const Packet1cd& from) { pstoreu((double*)to, from.v); }
295 
296 template<> EIGEN_STRONG_INLINE Packet1cd pset1<Packet1cd>(const std::complex<double>& from)
297 { /* here we really have to use unaligned loads :( */ return ploadu<Packet1cd>(&from); }
298 
299 template<> EIGEN_DEVICE_FUNC inline Packet1cd pgather<std::complex<double>, Packet1cd>(const std::complex<double>* from, Index stride)
300 {
301  std::complex<double> EIGEN_ALIGN16 af[2];
302  af[0] = from[0*stride];
303  af[1] = from[1*stride];
304  return pload<Packet1cd>(af);
305 }
306 template<> EIGEN_DEVICE_FUNC inline void pscatter<std::complex<double>, Packet1cd>(std::complex<double>* to, const Packet1cd& from, Index stride)
307 {
308  std::complex<double> EIGEN_ALIGN16 af[2];
309  pstore<std::complex<double> >(af, from);
310  to[0*stride] = af[0];
311  to[1*stride] = af[1];
312 }
313 
314 template<> EIGEN_STRONG_INLINE Packet1cd padd<Packet1cd>(const Packet1cd& a, const Packet1cd& b) { return Packet1cd(a.v + b.v); }
315 template<> EIGEN_STRONG_INLINE Packet1cd psub<Packet1cd>(const Packet1cd& a, const Packet1cd& b) { return Packet1cd(a.v - b.v); }
316 template<> EIGEN_STRONG_INLINE Packet1cd pnegate(const Packet1cd& a) { return Packet1cd(pnegate(Packet2d(a.v))); }
317 template<> EIGEN_STRONG_INLINE Packet1cd pconj(const Packet1cd& a) { return Packet1cd(pxor(a.v, reinterpret_cast<Packet2d>(p2ul_CONJ_XOR2))); }
318 
319 template<> EIGEN_STRONG_INLINE Packet1cd pmul<Packet1cd>(const Packet1cd& a, const Packet1cd& b)
320 {
321  Packet2d a_re, a_im, v1, v2;
322 
323  // Permute and multiply the real parts of a and b
324  a_re = vec_perm(a.v, a.v, p16uc_PSET64_HI);
325  // Get the imaginary parts of a
326  a_im = vec_perm(a.v, a.v, p16uc_PSET64_LO);
327  // multiply a_re * b
328  v1 = vec_madd(a_re, b.v, p2d_ZERO);
329  // multiply a_im * b and get the conjugate result
330  v2 = vec_madd(a_im, b.v, p2d_ZERO);
331  v2 = reinterpret_cast<Packet2d>(vec_sld(reinterpret_cast<Packet4ui>(v2), reinterpret_cast<Packet4ui>(v2), 8));
332  v2 = pxor(v2, reinterpret_cast<Packet2d>(p2ul_CONJ_XOR1));
333 
334  return Packet1cd(padd<Packet2d>(v1, v2));
335 }
336 
337 template<> EIGEN_STRONG_INLINE Packet1cd pand <Packet1cd>(const Packet1cd& a, const Packet1cd& b) { return Packet1cd(pand(a.v,b.v)); }
338 template<> EIGEN_STRONG_INLINE Packet1cd por <Packet1cd>(const Packet1cd& a, const Packet1cd& b) { return Packet1cd(por(a.v,b.v)); }
339 template<> EIGEN_STRONG_INLINE Packet1cd pxor <Packet1cd>(const Packet1cd& a, const Packet1cd& b) { return Packet1cd(pxor(a.v,b.v)); }
340 template<> EIGEN_STRONG_INLINE Packet1cd pandnot<Packet1cd>(const Packet1cd& a, const Packet1cd& b) { return Packet1cd(pandnot(a.v, b.v)); }
341 
342 template<> EIGEN_STRONG_INLINE Packet1cd ploaddup<Packet1cd>(const std::complex<double>* from) { return pset1<Packet1cd>(*from); }
343 
344 template<> EIGEN_STRONG_INLINE void prefetch<std::complex<double> >(const std::complex<double> * addr) { EIGEN_PPC_PREFETCH(addr); }
345 
346 template<> EIGEN_STRONG_INLINE std::complex<double> pfirst<Packet1cd>(const Packet1cd& a)
347 {
348  std::complex<double> EIGEN_ALIGN16 res[2];
349  pstore<std::complex<double> >(res, a);
350 
351  return res[0];
352 }
353 
354 template<> EIGEN_STRONG_INLINE Packet1cd preverse(const Packet1cd& a) { return a; }
355 
356 template<> EIGEN_STRONG_INLINE std::complex<double> predux<Packet1cd>(const Packet1cd& a) { return pfirst(a); }
357 template<> EIGEN_STRONG_INLINE Packet1cd preduxp<Packet1cd>(const Packet1cd* vecs) { return vecs[0]; }
358 
359 template<> EIGEN_STRONG_INLINE std::complex<double> predux_mul<Packet1cd>(const Packet1cd& a) { return pfirst(a); }
360 
361 template<int Offset>
362 struct palign_impl<Offset,Packet1cd>
363 {
364  static EIGEN_STRONG_INLINE void run(Packet1cd& /*first*/, const Packet1cd& /*second*/)
365  {
366  // FIXME is it sure we never have to align a Packet1cd?
367  // Even though a std::complex<double> has 16 bytes, it is not necessarily aligned on a 16 bytes boundary...
368  }
369 };
370 
371 template<> struct conj_helper<Packet1cd, Packet1cd, false,true>
372 {
373  EIGEN_STRONG_INLINE Packet1cd pmadd(const Packet1cd& x, const Packet1cd& y, const Packet1cd& c) const
374  { return padd(pmul(x,y),c); }
375 
376  EIGEN_STRONG_INLINE Packet1cd pmul(const Packet1cd& a, const Packet1cd& b) const
377  {
378  return internal::pmul(a, pconj(b));
379  }
380 };
381 
382 template<> struct conj_helper<Packet1cd, Packet1cd, true,false>
383 {
384  EIGEN_STRONG_INLINE Packet1cd pmadd(const Packet1cd& x, const Packet1cd& y, const Packet1cd& c) const
385  { return padd(pmul(x,y),c); }
386 
387  EIGEN_STRONG_INLINE Packet1cd pmul(const Packet1cd& a, const Packet1cd& b) const
388  {
389  return internal::pmul(pconj(a), b);
390  }
391 };
392 
393 template<> struct conj_helper<Packet1cd, Packet1cd, true,true>
394 {
395  EIGEN_STRONG_INLINE Packet1cd pmadd(const Packet1cd& x, const Packet1cd& y, const Packet1cd& c) const
396  { return padd(pmul(x,y),c); }
397 
398  EIGEN_STRONG_INLINE Packet1cd pmul(const Packet1cd& a, const Packet1cd& b) const
399  {
400  return pconj(internal::pmul(a, b));
401  }
402 };
403 
405 
406 template<> EIGEN_STRONG_INLINE Packet1cd pdiv<Packet1cd>(const Packet1cd& a, const Packet1cd& b)
407 {
408  // TODO optimize it for AltiVec
410  Packet2d s = pmul<Packet2d>(b.v, b.v);
411  return Packet1cd(pdiv(res.v, padd<Packet2d>(s, vec_perm(s, s, p16uc_REVERSE64))));
412 }
413 
414 EIGEN_STRONG_INLINE Packet1cd pcplxflip/*<Packet1cd>*/(const Packet1cd& x)
415 {
416  return Packet1cd(preverse(Packet2d(x.v)));
417 }
418 
420 {
421  Packet2d tmp = vec_perm(kernel.packet[0].v, kernel.packet[1].v, p16uc_TRANSPOSE64_HI);
422  kernel.packet[1].v = vec_perm(kernel.packet[0].v, kernel.packet[1].v, p16uc_TRANSPOSE64_LO);
423  kernel.packet[0].v = tmp;
424 }
425 #endif // __VSX__
426 } // end namespace internal
427 
428 } // end namespace Eigen
429 
430 #endif // EIGEN_COMPLEX32_ALTIVEC_H
static Packet16uc p16uc_REVERSE64
EIGEN_STRONG_INLINE Packet2cf pmul(const Packet2cf &a, const Packet2cf &b) const
EIGEN_STRONG_INLINE Packet1cd ploaddup< Packet1cd >(const std::complex< double > *from)
Definition: SSE/Complex.h:321
EIGEN_STRONG_INLINE Packet4f pxor< Packet4f >(const Packet4f &a, const Packet4f &b)
#define EIGEN_STRONG_INLINE
Definition: Macros.h:494
EIGEN_DEVICE_FUNC Packet por(const Packet &a, const Packet &b)
Vector v2
Scalar * b
Definition: benchVecAdd.cpp:17
static Packet16uc p16uc_PSET32_WODD
EIGEN_STRONG_INLINE Packet2cf por< Packet2cf >(const Packet2cf &a, const Packet2cf &b)
Vector v1
#define EIGEN_MAKE_CONJ_HELPER_CPLX_REAL(PACKET_CPLX, PACKET_REAL)
Definition: ConjHelper.h:14
EIGEN_STRONG_INLINE Packet2cf preduxp< Packet2cf >(const Packet2cf *vecs)
EIGEN_STRONG_INLINE Packet1cd padd< Packet1cd >(const Packet1cd &a, const Packet1cd &b)
Definition: SSE/Complex.h:285
EIGEN_STRONG_INLINE Packet1cd preduxp< Packet1cd >(const Packet1cd *vecs)
Definition: SSE/Complex.h:343
EIGEN_STRONG_INLINE Packet2cf pmul< Packet2cf >(const Packet2cf &a, const Packet2cf &b)
static Packet16uc p16uc_TRANSPOSE64_LO
static Packet16uc p16uc_COMPLEX32_REV2
Scalar Scalar * c
Definition: benchVecAdd.cpp:17
EIGEN_STRONG_INLINE Packet1cd pand< Packet1cd >(const Packet1cd &a, const Packet1cd &b)
Definition: SSE/Complex.h:308
EIGEN_STRONG_INLINE Packet2cf ploadu< Packet2cf >(const std::complex< float > *from)
__vector unsigned int Packet4ui
Namespace containing all symbols from the Eigen library.
Definition: jet.h:637
EIGEN_STRONG_INLINE Packet2cf pmadd(const Packet2cf &x, const Packet2cf &y, const Packet2cf &c) const
EIGEN_STRONG_INLINE Packet2cf pmadd(const Packet2cf &x, const Packet2cf &y, const Packet2cf &c) const
Definition: Half.h:150
EIGEN_STRONG_INLINE Packet1cd pdiv< Packet1cd >(const Packet1cd &a, const Packet1cd &b)
Definition: SSE/Complex.h:419
EIGEN_STRONG_INLINE Packet2cf pload< Packet2cf >(const std::complex< float > *from)
EIGEN_STRONG_INLINE Packet2cf pset1< Packet2cf >(const std::complex< float > &from)
EIGEN_STRONG_INLINE Packet1cd pxor< Packet1cd >(const Packet1cd &a, const Packet1cd &b)
Definition: SSE/Complex.h:310
EIGEN_STRONG_INLINE std::complex< float > pfirst< Packet2cf >(const Packet2cf &a)
static Packet16uc p16uc_PSET32_WEVEN
EIGEN_STRONG_INLINE Packet1cd pset1< Packet1cd >(const std::complex< double > &from)
Definition: SSE/Complex.h:318
EIGEN_STRONG_INLINE Packet2cf pcplxflip(const Packet2cf &x)
Definition: SSE/Complex.h:242
EIGEN_STRONG_INLINE Packet2cf psub< Packet2cf >(const Packet2cf &a, const Packet2cf &b)
#define EIGEN_PPC_PREFETCH(ADDR)
static Packet4f p4f_MZERO
Array33i a
EIGEN_STRONG_INLINE Packet2d padd< Packet2d >(const Packet2d &a, const Packet2d &b)
EIGEN_DEVICE_FUNC Packet padd(const Packet &a, const Packet &b)
cout<< "Here is the matrix m:"<< endl<< m<< endl;Matrix< ptrdiff_t, 3, 1 > res
Scalar Scalar int size
Definition: benchVecAdd.cpp:17
EIGEN_STRONG_INLINE Packet2cf pmul(const Packet2cf &a, const Packet2cf &b) const
EIGEN_STRONG_INLINE Packet2cf(const Packet4f &a)
EIGEN_STRONG_INLINE Packet2cf pmadd(const Packet2cf &x, const Packet2cf &y, const Packet2cf &c) const
EIGEN_STRONG_INLINE std::complex< double > predux< Packet1cd >(const Packet1cd &a)
Definition: SSE/Complex.h:338
EIGEN_DEVICE_FUNC void pstoreu(Scalar *to, const Packet &from)
constexpr int first(int i)
Implementation details for constexpr functions.
Values result
__vector unsigned long long Packet2ul
EIGEN_STRONG_INLINE Packet4f ploadu< Packet4f >(const float *from)
EIGEN_STRONG_INLINE void ptranspose(PacketBlock< Packet2cf, 2 > &kernel)
EIGEN_STRONG_INLINE Packet2cf pand< Packet2cf >(const Packet2cf &a, const Packet2cf &b)
EIGEN_STRONG_INLINE Packet2cf()
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
Definition: Meta.h:33
Vector2 b2(4,-5)
EIGEN_STRONG_INLINE Packet4f por< Packet4f >(const Packet4f &a, const Packet4f &b)
EIGEN_STRONG_INLINE Packet1cd pandnot< Packet1cd >(const Packet1cd &a, const Packet1cd &b)
Definition: SSE/Complex.h:311
EIGEN_DEVICE_FUNC unpacket_traits< Packet >::type pfirst(const Packet &a)
EIGEN_STRONG_INLINE Packet1cd pload< Packet1cd >(const std::complex< double > *from)
Definition: SSE/Complex.h:314
RealScalar s
EIGEN_STRONG_INLINE Packet4f pandnot< Packet4f >(const Packet4f &a, const Packet4f &b)
static Packet16uc p16uc_COMPLEX32_REV
EIGEN_STRONG_INLINE std::complex< float > predux_mul< Packet2cf >(const Packet2cf &a)
EIGEN_STRONG_INLINE Packet2cf pmul(const Packet2cf &a, const Packet2cf &b) const
EIGEN_STRONG_INLINE Packet2d ploadu< Packet2d >(const double *from)
EIGEN_STRONG_INLINE Packet2cf pconj(const Packet2cf &a)
EIGEN_STRONG_INLINE Packet2d pload< Packet2d >(const double *from)
EIGEN_STRONG_INLINE std::complex< float > predux< Packet2cf >(const Packet2cf &a)
EIGEN_STRONG_INLINE Packet2cf ploaddup< Packet2cf >(const std::complex< float > *from)
EIGEN_STRONG_INLINE std::complex< double > predux_mul< Packet1cd >(const Packet1cd &a)
Definition: SSE/Complex.h:348
EIGEN_STRONG_INLINE Packet4f pmul< Packet4f >(const Packet4f &a, const Packet4f &b)
EIGEN_DEVICE_FUNC void pstore(Scalar *to, const Packet &from)
EIGEN_STRONG_INLINE Packet4f pload< Packet4f >(const float *from)
Vector2 b1(2,-1)
#define EIGEN_ALIGN16
Definition: Macros.h:753
EIGEN_STRONG_INLINE Packet1cd psub< Packet1cd >(const Packet1cd &a, const Packet1cd &b)
Definition: SSE/Complex.h:286
EIGEN_STRONG_INLINE Packet2cf pnegate(const Packet2cf &a)
EIGEN_DEVICE_FUNC Packet pdiv(const Packet &a, const Packet &b)
static EIGEN_STRONG_INLINE void run(Packet2cf &first, const Packet2cf &second)
EIGEN_STRONG_INLINE Packet4f padd< Packet4f >(const Packet4f &a, const Packet4f &b)
EIGEN_DEVICE_FUNC Packet pandnot(const Packet &a, const Packet &b)
EIGEN_STRONG_INLINE Packet1cd pmul< Packet1cd >(const Packet1cd &a, const Packet1cd &b)
Definition: SSE/Complex.h:294
EIGEN_STRONG_INLINE Packet4f pmadd(const Packet4f &a, const Packet4f &b, const Packet4f &c)
static Packet4ui p4ui_CONJ_XOR
EIGEN_STRONG_INLINE Packet1cd ploadu< Packet1cd >(const std::complex< double > *from)
Definition: SSE/Complex.h:316
EIGEN_DEVICE_FUNC Packet pxor(const Packet &a, const Packet &b)
EIGEN_STRONG_INLINE Packet1cd por< Packet1cd >(const Packet1cd &a, const Packet1cd &b)
Definition: SSE/Complex.h:309
EIGEN_STRONG_INLINE Packet2cf pxor< Packet2cf >(const Packet2cf &a, const Packet2cf &b)
EIGEN_STRONG_INLINE Packet2d pmul< Packet2d >(const Packet2d &a, const Packet2d &b)
static Packet2ul p2ul_CONJ_XOR1
EIGEN_STRONG_INLINE Packet2cf padd< Packet2cf >(const Packet2cf &a, const Packet2cf &b)
void run(Expr &expr, Dev &dev)
Definition: TensorSyclRun.h:33
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
static Packet16uc p16uc_PSET64_HI
EIGEN_DEVICE_FUNC Packet pmul(const Packet &a, const Packet &b)
static Packet16uc p16uc_TRANSPOSE64_HI
static Packet16uc p16uc_PSET64_LO
EIGEN_STRONG_INLINE Packet2cf pandnot< Packet2cf >(const Packet2cf &a, const Packet2cf &b)
EIGEN_STRONG_INLINE Packet4i pblend(const Selector< 4 > &ifPacket, const Packet4i &thenPacket, const Packet4i &elsePacket)
EIGEN_STRONG_INLINE std::complex< double > pfirst< Packet1cd >(const Packet1cd &a)
Definition: SSE/Complex.h:329
EIGEN_DEVICE_FUNC Packet pand(const Packet &a, const Packet &b)
EIGEN_STRONG_INLINE Packet2cf pcplxflip< Packet2cf >(const Packet2cf &x)
EIGEN_STRONG_INLINE Packet2cf preverse(const Packet2cf &a)
static Packet2ul p2ul_CONJ_XOR2
const Product< Lhs, Rhs > prod(const Lhs &lhs, const Rhs &rhs)
Definition: evaluators.cpp:8
EIGEN_STRONG_INLINE Packet4f pand< Packet4f >(const Packet4f &a, const Packet4f &b)


gtsam
Author(s):
autogenerated on Sat May 8 2021 02:41:49