ZVector/PacketMath.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) 2016 Konstantinos Margaritis <markos@freevec.org>
5 //
6 // This Source Code Form is subject to the terms of the Mozilla
7 // Public License v. 2.0. If a copy of the MPL was not distributed
8 // with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 
10 #ifndef EIGEN_PACKET_MATH_ZVECTOR_H
11 #define EIGEN_PACKET_MATH_ZVECTOR_H
12 
13 namespace Eigen {
14 
15 namespace internal {
16 
17 #ifndef EIGEN_CACHEFRIENDLY_PRODUCT_THRESHOLD
18 #define EIGEN_CACHEFRIENDLY_PRODUCT_THRESHOLD 16
19 #endif
20 
21 #ifndef EIGEN_HAS_SINGLE_INSTRUCTION_MADD
22 #define EIGEN_HAS_SINGLE_INSTRUCTION_MADD
23 #endif
24 
25 #ifndef EIGEN_ARCH_DEFAULT_NUMBER_OF_REGISTERS
26 #define EIGEN_ARCH_DEFAULT_NUMBER_OF_REGISTERS 32
27 #endif
28 
29 typedef __vector int Packet4i;
30 typedef __vector unsigned int Packet4ui;
31 typedef __vector __bool int Packet4bi;
32 typedef __vector short int Packet8i;
33 typedef __vector unsigned char Packet16uc;
34 typedef __vector double Packet2d;
35 typedef __vector unsigned long long Packet2ul;
36 typedef __vector long long Packet2l;
37 
38 // Z14 has builtin support for float vectors
39 #if !defined(__ARCH__) || (defined(__ARCH__) && __ARCH__ >= 12)
40 typedef __vector float Packet4f;
41 #else
42 typedef struct {
43  Packet2d v4f[2];
44 } Packet4f;
45 #endif
46 
47 typedef union {
52  double d[2];
53  float f[4];
59 #if !defined(__ARCH__) || (defined(__ARCH__) && __ARCH__ >= 12)
61 #endif
62 } Packet;
63 
64 // We don't want to write the same code all the time, but we need to reuse the constants
65 // and it doesn't really work to declare them global, so we define macros instead
66 
67 #define _EIGEN_DECLARE_CONST_FAST_Packet4i(NAME,X) \
68  Packet4i p4i_##NAME = reinterpret_cast<Packet4i>(vec_splat_s32(X))
69 
70 #define _EIGEN_DECLARE_CONST_FAST_Packet2d(NAME,X) \
71  Packet2d p2d_##NAME = reinterpret_cast<Packet2d>(vec_splat_s64(X))
72 
73 #define _EIGEN_DECLARE_CONST_FAST_Packet2l(NAME,X) \
74  Packet2l p2l_##NAME = reinterpret_cast<Packet2l>(vec_splat_s64(X))
75 
76 #define _EIGEN_DECLARE_CONST_Packet4i(NAME,X) \
77  Packet4i p4i_##NAME = pset1<Packet4i>(X)
78 
79 #define _EIGEN_DECLARE_CONST_Packet2d(NAME,X) \
80  Packet2d p2d_##NAME = pset1<Packet2d>(X)
81 
82 #define _EIGEN_DECLARE_CONST_Packet2l(NAME,X) \
83  Packet2l p2l_##NAME = pset1<Packet2l>(X)
84 
85 // These constants are endian-agnostic
86 static _EIGEN_DECLARE_CONST_FAST_Packet4i(ZERO, 0); //{ 0, 0, 0, 0,}
87 static _EIGEN_DECLARE_CONST_FAST_Packet4i(ONE, 1); //{ 1, 1, 1, 1}
88 
92 
93 static Packet2d p2d_ONE = { 1.0, 1.0 };
94 static Packet2d p2d_ZERO_ = { numext::bit_cast<double>0x8000000000000000ull),
95  numext::bit_cast<double>0x8000000000000000ull) };
96 
97 #if !defined(__ARCH__) || (defined(__ARCH__) && __ARCH__ >= 12)
98 #define _EIGEN_DECLARE_CONST_FAST_Packet4f(NAME,X) \
99  Packet4f p4f_##NAME = reinterpret_cast<Packet4f>(vec_splat_s32(X))
100 
101 #define _EIGEN_DECLARE_CONST_Packet4f(NAME,X) \
102  Packet4f p4f_##NAME = pset1<Packet4f>(X)
103 
104 #define _EIGEN_DECLARE_CONST_Packet4f_FROM_INT(NAME,X) \
105  const Packet4f p4f_##NAME = reinterpret_cast<Packet4f>(pset1<Packet4i>(X))
106 
107 static _EIGEN_DECLARE_CONST_FAST_Packet4f(ZERO, 0); //{ 0.0, 0.0, 0.0, 0.0}
108 static _EIGEN_DECLARE_CONST_FAST_Packet4i(MINUS1,-1); //{ -1, -1, -1, -1}
109 static Packet4f p4f_MZERO = { 0x80000000, 0x80000000, 0x80000000, 0x80000000};
110 #endif
111 
112 static Packet4i p4i_COUNTDOWN = { 0, 1, 2, 3 };
113 static Packet4f p4f_COUNTDOWN = { 0.0, 1.0, 2.0, 3.0 };
114 static Packet2d p2d_COUNTDOWN = reinterpret_cast<Packet2d>(vec_sld(reinterpret_cast<Packet16uc>(p2d_ZERO), reinterpret_cast<Packet16uc>(p2d_ONE), 8));
115 
116 static Packet16uc p16uc_PSET64_HI = { 0,1,2,3, 4,5,6,7, 0,1,2,3, 4,5,6,7 };
117 static Packet16uc p16uc_DUPLICATE32_HI = { 0,1,2,3, 0,1,2,3, 4,5,6,7, 4,5,6,7 };
118 
119 // Mask alignment
120 #define _EIGEN_MASK_ALIGNMENT 0xfffffffffffffff0
121 
122 #define _EIGEN_ALIGNED_PTR(x) ((std::ptrdiff_t)(x) & _EIGEN_MASK_ALIGNMENT)
123 
124 // Handle endianness properly while loading constants
125 // Define global static constants:
126 
127 static Packet16uc p16uc_FORWARD = { 0,1,2,3, 4,5,6,7, 8,9,10,11, 12,13,14,15 };
128 static Packet16uc p16uc_REVERSE32 = { 12,13,14,15, 8,9,10,11, 4,5,6,7, 0,1,2,3 };
129 static Packet16uc p16uc_REVERSE64 = { 8,9,10,11, 12,13,14,15, 0,1,2,3, 4,5,6,7 };
130 
131 static Packet16uc p16uc_PSET32_WODD = vec_sld((Packet16uc) vec_splat((Packet4ui)p16uc_FORWARD, 0), (Packet16uc) vec_splat((Packet4ui)p16uc_FORWARD, 2), 8);//{ 0,1,2,3, 0,1,2,3, 8,9,10,11, 8,9,10,11 };
132 static Packet16uc p16uc_PSET32_WEVEN = vec_sld(p16uc_DUPLICATE32_HI, (Packet16uc) vec_splat((Packet4ui)p16uc_FORWARD, 3), 8);//{ 4,5,6,7, 4,5,6,7, 12,13,14,15, 12,13,14,15 };
133 /*static Packet16uc p16uc_HALF64_0_16 = vec_sld((Packet16uc)p4i_ZERO, vec_splat((Packet16uc) vec_abs(p4i_MINUS16), 3), 8); //{ 0,0,0,0, 0,0,0,0, 16,16,16,16, 16,16,16,16};
134 
135 static Packet16uc p16uc_PSET64_HI = (Packet16uc) vec_mergeh((Packet4ui)p16uc_PSET32_WODD, (Packet4ui)p16uc_PSET32_WEVEN); //{ 0,1,2,3, 4,5,6,7, 0,1,2,3, 4,5,6,7 };*/
136 static Packet16uc p16uc_PSET64_LO = (Packet16uc) vec_mergel((Packet4ui)p16uc_PSET32_WODD, (Packet4ui)p16uc_PSET32_WEVEN); //{ 8,9,10,11, 12,13,14,15, 8,9,10,11, 12,13,14,15 };
137 /*static Packet16uc p16uc_TRANSPOSE64_HI = vec_add(p16uc_PSET64_HI, p16uc_HALF64_0_16); //{ 0,1,2,3, 4,5,6,7, 16,17,18,19, 20,21,22,23};
138 static Packet16uc p16uc_TRANSPOSE64_LO = vec_add(p16uc_PSET64_LO, p16uc_HALF64_0_16); //{ 8,9,10,11, 12,13,14,15, 24,25,26,27, 28,29,30,31};*/
139 static Packet16uc p16uc_TRANSPOSE64_HI = { 0,1,2,3, 4,5,6,7, 16,17,18,19, 20,21,22,23};
140 static Packet16uc p16uc_TRANSPOSE64_LO = { 8,9,10,11, 12,13,14,15, 24,25,26,27, 28,29,30,31};
141 
142 static Packet16uc p16uc_COMPLEX32_REV = vec_sld(p16uc_REVERSE32, p16uc_REVERSE32, 8); //{ 4,5,6,7, 0,1,2,3, 12,13,14,15, 8,9,10,11 };
143 
144 static Packet16uc p16uc_COMPLEX32_REV2 = vec_sld(p16uc_FORWARD, p16uc_FORWARD, 8); //{ 8,9,10,11, 12,13,14,15, 0,1,2,3, 4,5,6,7 };
145 
146 
147 #if EIGEN_HAS_BUILTIN(__builtin_prefetch) || EIGEN_COMP_GNUC
148  #define EIGEN_ZVECTOR_PREFETCH(ADDR) __builtin_prefetch(ADDR);
149 #else
150  #define EIGEN_ZVECTOR_PREFETCH(ADDR) asm( " pfd [%[addr]]\n" :: [addr] "r" (ADDR) : "cc" );
151 #endif
152 
153 template<> struct packet_traits<int> : default_packet_traits
154 {
155  typedef Packet4i type;
156  typedef Packet4i half;
157  enum {
158  Vectorizable = 1,
159  AlignedOnScalar = 1,
160  size = 4,
161  HasHalfPacket = 0,
162 
163  HasAdd = 1,
164  HasSub = 1,
165  HasMul = 1,
166  HasDiv = 1,
167  HasBlend = 1
168  };
169 };
170 
171 template <>
172 struct packet_traits<float> : default_packet_traits {
173  typedef Packet4f type;
174  typedef Packet4f half;
175  enum {
176  Vectorizable = 1,
177  AlignedOnScalar = 1,
178  size = 4,
179  HasHalfPacket = 0,
180 
181  HasAdd = 1,
182  HasSub = 1,
183  HasMul = 1,
184  HasDiv = 1,
185  HasMin = 1,
186  HasMax = 1,
187  HasAbs = 1,
188  HasSin = 0,
189  HasCos = 0,
190  HasLog = 0,
191  HasExp = 1,
192  HasSqrt = 1,
193  HasRsqrt = 1,
194  HasTanh = 1,
195  HasErf = 1,
196  HasRound = 1,
197  HasFloor = 1,
198  HasCeil = 1,
199  HasNegate = 1,
200  HasBlend = 1
201  };
202 };
203 
204 template<> struct packet_traits<double> : default_packet_traits
205 {
206  typedef Packet2d type;
207  typedef Packet2d half;
208  enum {
209  Vectorizable = 1,
210  AlignedOnScalar = 1,
211  size=2,
212  HasHalfPacket = 1,
213 
214  HasAdd = 1,
215  HasSub = 1,
216  HasMul = 1,
217  HasDiv = 1,
218  HasMin = 1,
219  HasMax = 1,
220  HasAbs = 1,
221  HasSin = 0,
222  HasCos = 0,
223  HasLog = 0,
224  HasExp = 1,
225  HasSqrt = 1,
226  HasRsqrt = 1,
227  HasRound = 1,
228  HasFloor = 1,
229  HasCeil = 1,
231  HasBlend = 1
232  };
233 };
234 
235 template<> struct unpacket_traits<Packet4i> { typedef int type; enum {size=4, alignment=Aligned16, vectorizable=true, masked_load_available=false, masked_store_available=false}; typedef Packet4i half; };
236 template<> struct unpacket_traits<Packet4f> { typedef float type; enum {size=4, alignment=Aligned16, vectorizable=true, masked_load_available=false, masked_store_available=false}; typedef Packet4f half; };
237 template<> struct unpacket_traits<Packet2d> { typedef double type; enum {size=2, alignment=Aligned16, vectorizable=true, masked_load_available=false, masked_store_available=false}; typedef Packet2d half; };
238 
239 /* Forward declaration */
241 
242 inline std::ostream & operator <<(std::ostream & s, const Packet4i & v)
243 {
244  Packet vt;
245  vt.v4i = v;
246  s << vt.i[0] << ", " << vt.i[1] << ", " << vt.i[2] << ", " << vt.i[3];
247  return s;
248 }
249 
250 inline std::ostream & operator <<(std::ostream & s, const Packet4ui & v)
251 {
252  Packet vt;
253  vt.v4ui = v;
254  s << vt.ui[0] << ", " << vt.ui[1] << ", " << vt.ui[2] << ", " << vt.ui[3];
255  return s;
256 }
257 
258 inline std::ostream & operator <<(std::ostream & s, const Packet2l & v)
259 {
260  Packet vt;
261  vt.v2l = v;
262  s << vt.l[0] << ", " << vt.l[1];
263  return s;
264 }
265 
266 inline std::ostream & operator <<(std::ostream & s, const Packet2ul & v)
267 {
268  Packet vt;
269  vt.v2ul = v;
270  s << vt.ul[0] << ", " << vt.ul[1] ;
271  return s;
272 }
273 
274 inline std::ostream & operator <<(std::ostream & s, const Packet2d & v)
275 {
276  Packet vt;
277  vt.v2d = v;
278  s << vt.d[0] << ", " << vt.d[1];
279  return s;
280 }
281 
282 #if !defined(__ARCH__) || (defined(__ARCH__) && __ARCH__ >= 12)
283 inline std::ostream & operator <<(std::ostream & s, const Packet4f & v)
284 {
285  Packet vt;
286  vt.v4f = v;
287  s << vt.f[0] << ", " << vt.f[1] << ", " << vt.f[2] << ", " << vt.f[3];
288  return s;
289 }
290 #endif
291 
292 template<> EIGEN_STRONG_INLINE Packet4i pload<Packet4i>(const int* from)
293 {
294  // FIXME: No intrinsic yet
296  Packet *vfrom;
297  vfrom = (Packet *) from;
298  return vfrom->v4i;
299 }
300 
301 template<> EIGEN_STRONG_INLINE Packet2d pload<Packet2d>(const double* from)
302 {
303  // FIXME: No intrinsic yet
305  Packet *vfrom;
306  vfrom = (Packet *) from;
307  return vfrom->v2d;
308 }
309 
310 template<> EIGEN_STRONG_INLINE void pstore<int>(int* to, const Packet4i& from)
311 {
312  // FIXME: No intrinsic yet
314  Packet *vto;
315  vto = (Packet *) to;
316  vto->v4i = from;
317 }
318 
319 template<> EIGEN_STRONG_INLINE void pstore<double>(double* to, const Packet2d& from)
320 {
321  // FIXME: No intrinsic yet
323  Packet *vto;
324  vto = (Packet *) to;
325  vto->v2d = from;
326 }
327 
328 template<> EIGEN_STRONG_INLINE Packet4i pset1<Packet4i>(const int& from)
329 {
330  return vec_splats(from);
331 }
332 template<> EIGEN_STRONG_INLINE Packet2d pset1<Packet2d>(const double& from) {
333  return vec_splats(from);
334 }
335 
336 template<> EIGEN_STRONG_INLINE void
337 pbroadcast4<Packet4i>(const int *a,
339 {
340  a3 = pload<Packet4i>(a);
341  a0 = vec_splat(a3, 0);
342  a1 = vec_splat(a3, 1);
343  a2 = vec_splat(a3, 2);
344  a3 = vec_splat(a3, 3);
345 }
346 
347 template<> EIGEN_STRONG_INLINE void
348 pbroadcast4<Packet2d>(const double *a,
350 {
351  a1 = pload<Packet2d>(a);
352  a0 = vec_splat(a1, 0);
353  a1 = vec_splat(a1, 1);
354  a3 = pload<Packet2d>(a+2);
355  a2 = vec_splat(a3, 0);
356  a3 = vec_splat(a3, 1);
357 }
358 
359 template<> EIGEN_DEVICE_FUNC inline Packet4i pgather<int, Packet4i>(const int* from, Index stride)
360 {
361  int EIGEN_ALIGN16 ai[4];
362  ai[0] = from[0*stride];
363  ai[1] = from[1*stride];
364  ai[2] = from[2*stride];
365  ai[3] = from[3*stride];
366  return pload<Packet4i>(ai);
367 }
368 
369 template<> EIGEN_DEVICE_FUNC inline Packet2d pgather<double, Packet2d>(const double* from, Index stride)
370 {
371  double EIGEN_ALIGN16 af[2];
372  af[0] = from[0*stride];
373  af[1] = from[1*stride];
374  return pload<Packet2d>(af);
375 }
376 
377 template<> EIGEN_DEVICE_FUNC inline void pscatter<int, Packet4i>(int* to, const Packet4i& from, Index stride)
378 {
379  int EIGEN_ALIGN16 ai[4];
380  pstore<int>((int *)ai, from);
381  to[0*stride] = ai[0];
382  to[1*stride] = ai[1];
383  to[2*stride] = ai[2];
384  to[3*stride] = ai[3];
385 }
386 
387 template<> EIGEN_DEVICE_FUNC inline void pscatter<double, Packet2d>(double* to, const Packet2d& from, Index stride)
388 {
389  double EIGEN_ALIGN16 af[2];
390  pstore<double>(af, from);
391  to[0*stride] = af[0];
392  to[1*stride] = af[1];
393 }
394 
395 template<> EIGEN_STRONG_INLINE Packet4i padd<Packet4i>(const Packet4i& a, const Packet4i& b) { return (a + b); }
396 template<> EIGEN_STRONG_INLINE Packet2d padd<Packet2d>(const Packet2d& a, const Packet2d& b) { return (a + b); }
397 
398 template<> EIGEN_STRONG_INLINE Packet4i psub<Packet4i>(const Packet4i& a, const Packet4i& b) { return (a - b); }
399 template<> EIGEN_STRONG_INLINE Packet2d psub<Packet2d>(const Packet2d& a, const Packet2d& b) { return (a - b); }
400 
401 template<> EIGEN_STRONG_INLINE Packet4i pmul<Packet4i>(const Packet4i& a, const Packet4i& b) { return (a * b); }
402 template<> EIGEN_STRONG_INLINE Packet2d pmul<Packet2d>(const Packet2d& a, const Packet2d& b) { return (a * b); }
403 
404 template<> EIGEN_STRONG_INLINE Packet4i pdiv<Packet4i>(const Packet4i& a, const Packet4i& b) { return (a / b); }
405 template<> EIGEN_STRONG_INLINE Packet2d pdiv<Packet2d>(const Packet2d& a, const Packet2d& b) { return (a / b); }
406 
407 template<> EIGEN_STRONG_INLINE Packet4i pnegate(const Packet4i& a) { return (-a); }
408 template<> EIGEN_STRONG_INLINE Packet2d pnegate(const Packet2d& a) { return (-a); }
409 
410 template<> EIGEN_STRONG_INLINE Packet4i pconj(const Packet4i& a) { return a; }
411 template<> EIGEN_STRONG_INLINE Packet2d pconj(const Packet2d& a) { return a; }
412 
413 template<> EIGEN_STRONG_INLINE Packet4i pmadd(const Packet4i& a, const Packet4i& b, const Packet4i& c) { return padd<Packet4i>(pmul<Packet4i>(a, b), c); }
414 template<> EIGEN_STRONG_INLINE Packet2d pmadd(const Packet2d& a, const Packet2d& b, const Packet2d& c) { return vec_madd(a, b, c); }
415 
418 
419 template<> EIGEN_STRONG_INLINE Packet4i pmin<Packet4i>(const Packet4i& a, const Packet4i& b) { return vec_min(a, b); }
420 template<> EIGEN_STRONG_INLINE Packet2d pmin<Packet2d>(const Packet2d& a, const Packet2d& b) { return vec_min(a, b); }
421 
422 template<> EIGEN_STRONG_INLINE Packet4i pmax<Packet4i>(const Packet4i& a, const Packet4i& b) { return vec_max(a, b); }
423 template<> EIGEN_STRONG_INLINE Packet2d pmax<Packet2d>(const Packet2d& a, const Packet2d& b) { return vec_max(a, b); }
424 
425 template<> EIGEN_STRONG_INLINE Packet4i pand<Packet4i>(const Packet4i& a, const Packet4i& b) { return vec_and(a, b); }
426 template<> EIGEN_STRONG_INLINE Packet2d pand<Packet2d>(const Packet2d& a, const Packet2d& b) { return vec_and(a, b); }
427 
428 template<> EIGEN_STRONG_INLINE Packet4i por<Packet4i>(const Packet4i& a, const Packet4i& b) { return vec_or(a, b); }
429 template<> EIGEN_STRONG_INLINE Packet2d por<Packet2d>(const Packet2d& a, const Packet2d& b) { return vec_or(a, b); }
430 
431 template<> EIGEN_STRONG_INLINE Packet4i pxor<Packet4i>(const Packet4i& a, const Packet4i& b) { return vec_xor(a, b); }
432 template<> EIGEN_STRONG_INLINE Packet2d pxor<Packet2d>(const Packet2d& a, const Packet2d& b) { return vec_xor(a, b); }
433 
434 template<> EIGEN_STRONG_INLINE Packet4i pandnot<Packet4i>(const Packet4i& a, const Packet4i& b) { return pand<Packet4i>(a, vec_nor(b, b)); }
435 template<> EIGEN_STRONG_INLINE Packet2d pandnot<Packet2d>(const Packet2d& a, const Packet2d& b) { return vec_and(a, vec_nor(b, b)); }
436 
437 template<> EIGEN_STRONG_INLINE Packet2d pround<Packet2d>(const Packet2d& a) { return vec_round(a); }
438 template<> EIGEN_STRONG_INLINE Packet2d pceil<Packet2d>(const Packet2d& a) { return vec_ceil(a); }
439 template<> EIGEN_STRONG_INLINE Packet2d pfloor<Packet2d>(const Packet2d& a) { return vec_floor(a); }
440 
441 template<> EIGEN_STRONG_INLINE Packet4i ploadu<Packet4i>(const int* from) { return pload<Packet4i>(from); }
442 template<> EIGEN_STRONG_INLINE Packet2d ploadu<Packet2d>(const double* from) { return pload<Packet2d>(from); }
443 
444 
445 template<> EIGEN_STRONG_INLINE Packet4i ploaddup<Packet4i>(const int* from)
446 {
447  Packet4i p = pload<Packet4i>(from);
448  return vec_perm(p, p, p16uc_DUPLICATE32_HI);
449 }
450 
451 template<> EIGEN_STRONG_INLINE Packet2d ploaddup<Packet2d>(const double* from)
452 {
453  Packet2d p = pload<Packet2d>(from);
454  return vec_perm(p, p, p16uc_PSET64_HI);
455 }
456 
457 template<> EIGEN_STRONG_INLINE void pstoreu<int>(int* to, const Packet4i& from) { pstore<int>(to, from); }
458 template<> EIGEN_STRONG_INLINE void pstoreu<double>(double* to, const Packet2d& from) { pstore<double>(to, from); }
459 
460 template<> EIGEN_STRONG_INLINE void prefetch<int>(const int* addr) { EIGEN_ZVECTOR_PREFETCH(addr); }
461 template<> EIGEN_STRONG_INLINE void prefetch<double>(const double* addr) { EIGEN_ZVECTOR_PREFETCH(addr); }
462 
463 template<> EIGEN_STRONG_INLINE int pfirst<Packet4i>(const Packet4i& a) { int EIGEN_ALIGN16 x[4]; pstore(x, a); return x[0]; }
464 template<> EIGEN_STRONG_INLINE double pfirst<Packet2d>(const Packet2d& a) { double EIGEN_ALIGN16 x[2]; pstore(x, a); return x[0]; }
465 
467 {
468  return reinterpret_cast<Packet4i>(vec_perm(reinterpret_cast<Packet16uc>(a), reinterpret_cast<Packet16uc>(a), p16uc_REVERSE32));
469 }
470 
472 {
473  return reinterpret_cast<Packet2d>(vec_perm(reinterpret_cast<Packet16uc>(a), reinterpret_cast<Packet16uc>(a), p16uc_REVERSE64));
474 }
475 
476 template<> EIGEN_STRONG_INLINE Packet4i pabs<Packet4i>(const Packet4i& a) { return vec_abs(a); }
477 template<> EIGEN_STRONG_INLINE Packet2d pabs<Packet2d>(const Packet2d& a) { return vec_abs(a); }
478 
479 template<> EIGEN_STRONG_INLINE int predux<Packet4i>(const Packet4i& a)
480 {
481  Packet4i b, sum;
482  b = vec_sld(a, a, 8);
483  sum = padd<Packet4i>(a, b);
484  b = vec_sld(sum, sum, 4);
485  sum = padd<Packet4i>(sum, b);
486  return pfirst(sum);
487 }
488 
489 template<> EIGEN_STRONG_INLINE double predux<Packet2d>(const Packet2d& a)
490 {
491  Packet2d b, sum;
492  b = reinterpret_cast<Packet2d>(vec_sld(reinterpret_cast<Packet4i>(a), reinterpret_cast<Packet4i>(a), 8));
493  sum = padd<Packet2d>(a, b);
494  return pfirst(sum);
495 }
496 
497 // Other reduction functions:
498 // mul
499 template<> EIGEN_STRONG_INLINE int predux_mul<Packet4i>(const Packet4i& a)
500 {
501  EIGEN_ALIGN16 int aux[4];
502  pstore(aux, a);
503  return aux[0] * aux[1] * aux[2] * aux[3];
504 }
505 
506 template<> EIGEN_STRONG_INLINE double predux_mul<Packet2d>(const Packet2d& a)
507 {
508  return pfirst(pmul(a, reinterpret_cast<Packet2d>(vec_sld(reinterpret_cast<Packet4i>(a), reinterpret_cast<Packet4i>(a), 8))));
509 }
510 
511 // min
512 template<> EIGEN_STRONG_INLINE int predux_min<Packet4i>(const Packet4i& a)
513 {
514  Packet4i b, res;
515  b = pmin<Packet4i>(a, vec_sld(a, a, 8));
516  res = pmin<Packet4i>(b, vec_sld(b, b, 4));
517  return pfirst(res);
518 }
519 
520 template<> EIGEN_STRONG_INLINE double predux_min<Packet2d>(const Packet2d& a)
521 {
522  return pfirst(pmin<Packet2d>(a, reinterpret_cast<Packet2d>(vec_sld(reinterpret_cast<Packet4i>(a), reinterpret_cast<Packet4i>(a), 8))));
523 }
524 
525 // max
526 template<> EIGEN_STRONG_INLINE int predux_max<Packet4i>(const Packet4i& a)
527 {
528  Packet4i b, res;
529  b = pmax<Packet4i>(a, vec_sld(a, a, 8));
530  res = pmax<Packet4i>(b, vec_sld(b, b, 4));
531  return pfirst(res);
532 }
533 
534 // max
535 template<> EIGEN_STRONG_INLINE double predux_max<Packet2d>(const Packet2d& a)
536 {
537  return pfirst(pmax<Packet2d>(a, reinterpret_cast<Packet2d>(vec_sld(reinterpret_cast<Packet4i>(a), reinterpret_cast<Packet4i>(a), 8))));
538 }
539 
540 EIGEN_DEVICE_FUNC inline void
541 ptranspose(PacketBlock<Packet4i,4>& kernel) {
542  Packet4i t0 = vec_mergeh(kernel.packet[0], kernel.packet[2]);
543  Packet4i t1 = vec_mergel(kernel.packet[0], kernel.packet[2]);
544  Packet4i t2 = vec_mergeh(kernel.packet[1], kernel.packet[3]);
545  Packet4i t3 = vec_mergel(kernel.packet[1], kernel.packet[3]);
546  kernel.packet[0] = vec_mergeh(t0, t2);
547  kernel.packet[1] = vec_mergel(t0, t2);
548  kernel.packet[2] = vec_mergeh(t1, t3);
549  kernel.packet[3] = vec_mergel(t1, t3);
550 }
551 
552 EIGEN_DEVICE_FUNC inline void
553 ptranspose(PacketBlock<Packet2d,2>& kernel) {
554  Packet2d t0 = vec_perm(kernel.packet[0], kernel.packet[1], p16uc_TRANSPOSE64_HI);
555  Packet2d t1 = vec_perm(kernel.packet[0], kernel.packet[1], p16uc_TRANSPOSE64_LO);
556  kernel.packet[0] = t0;
557  kernel.packet[1] = t1;
558 }
559 
560 template<> EIGEN_STRONG_INLINE Packet4i pblend(const Selector<4>& ifPacket, const Packet4i& thenPacket, const Packet4i& elsePacket) {
561  Packet4ui select = { ifPacket.select[0], ifPacket.select[1], ifPacket.select[2], ifPacket.select[3] };
562  Packet4ui mask = vec_cmpeq(select, reinterpret_cast<Packet4ui>(p4i_ONE));
563  return vec_sel(elsePacket, thenPacket, mask);
564 }
565 
566 
567 template<> EIGEN_STRONG_INLINE Packet2d pblend(const Selector<2>& ifPacket, const Packet2d& thenPacket, const Packet2d& elsePacket) {
568  Packet2ul select = { ifPacket.select[0], ifPacket.select[1] };
569  Packet2ul mask = vec_cmpeq(select, reinterpret_cast<Packet2ul>(p2l_ONE));
570  return vec_sel(elsePacket, thenPacket, mask);
571 }
572 
573 /* z13 has no vector float support so we emulate that with double
574  z14 has proper vector float support.
575 */
576 #if !defined(__ARCH__) || (defined(__ARCH__) && __ARCH__ < 12)
577 /* Helper function to simulate a vec_splat_packet4f
578  */
579 template<int element> EIGEN_STRONG_INLINE Packet4f vec_splat_packet4f(const Packet4f& from)
580 {
581  Packet4f splat;
582  switch (element) {
583  case 0:
584  splat.v4f[0] = vec_splat(from.v4f[0], 0);
585  splat.v4f[1] = splat.v4f[0];
586  break;
587  case 1:
588  splat.v4f[0] = vec_splat(from.v4f[0], 1);
589  splat.v4f[1] = splat.v4f[0];
590  break;
591  case 2:
592  splat.v4f[0] = vec_splat(from.v4f[1], 0);
593  splat.v4f[1] = splat.v4f[0];
594  break;
595  case 3:
596  splat.v4f[0] = vec_splat(from.v4f[1], 1);
597  splat.v4f[1] = splat.v4f[0];
598  break;
599  }
600  return splat;
601 }
602 
603 template<> EIGEN_STRONG_INLINE Packet4f pload<Packet4f>(const float* from)
604 {
605  // FIXME: No intrinsic yet
607  Packet4f vfrom;
608  vfrom.v4f[0] = vec_ld2f(&from[0]);
609  vfrom.v4f[1] = vec_ld2f(&from[2]);
610  return vfrom;
611 }
612 
613 template<> EIGEN_STRONG_INLINE void pstore<float>(float* to, const Packet4f& from)
614 {
615  // FIXME: No intrinsic yet
617  vec_st2f(from.v4f[0], &to[0]);
618  vec_st2f(from.v4f[1], &to[2]);
619 }
620 
621 template<> EIGEN_STRONG_INLINE Packet4f pset1<Packet4f>(const float& from)
622 {
623  Packet4f to;
624  to.v4f[0] = pset1<Packet2d>(static_cast<const double&>(from));
625  to.v4f[1] = to.v4f[0];
626  return to;
627 }
628 
629 template<> EIGEN_STRONG_INLINE void
630 pbroadcast4<Packet4f>(const float *a,
632 {
633  a3 = pload<Packet4f>(a);
634  a0 = vec_splat_packet4f<0>(a3);
635  a1 = vec_splat_packet4f<1>(a3);
636  a2 = vec_splat_packet4f<2>(a3);
637  a3 = vec_splat_packet4f<3>(a3);
638 }
639 
640 template<> EIGEN_DEVICE_FUNC inline Packet4f pgather<float, Packet4f>(const float* from, Index stride)
641 {
642  float EIGEN_ALIGN16 ai[4];
643  ai[0] = from[0*stride];
644  ai[1] = from[1*stride];
645  ai[2] = from[2*stride];
646  ai[3] = from[3*stride];
647  return pload<Packet4f>(ai);
648 }
649 
650 template<> EIGEN_DEVICE_FUNC inline void pscatter<float, Packet4f>(float* to, const Packet4f& from, Index stride)
651 {
652  float EIGEN_ALIGN16 ai[4];
653  pstore<float>((float *)ai, from);
654  to[0*stride] = ai[0];
655  to[1*stride] = ai[1];
656  to[2*stride] = ai[2];
657  to[3*stride] = ai[3];
658 }
659 
661 {
662  Packet4f c;
663  c.v4f[0] = a.v4f[0] + b.v4f[0];
664  c.v4f[1] = a.v4f[1] + b.v4f[1];
665  return c;
666 }
667 
669 {
670  Packet4f c;
671  c.v4f[0] = a.v4f[0] - b.v4f[0];
672  c.v4f[1] = a.v4f[1] - b.v4f[1];
673  return c;
674 }
675 
677 {
678  Packet4f c;
679  c.v4f[0] = a.v4f[0] * b.v4f[0];
680  c.v4f[1] = a.v4f[1] * b.v4f[1];
681  return c;
682 }
683 
685 {
686  Packet4f c;
687  c.v4f[0] = a.v4f[0] / b.v4f[0];
688  c.v4f[1] = a.v4f[1] / b.v4f[1];
689  return c;
690 }
691 
692 template<> EIGEN_STRONG_INLINE Packet4f pnegate(const Packet4f& a)
693 {
694  Packet4f c;
695  c.v4f[0] = -a.v4f[0];
696  c.v4f[1] = -a.v4f[1];
697  return c;
698 }
699 
700 template<> EIGEN_STRONG_INLINE Packet4f pmadd(const Packet4f& a, const Packet4f& b, const Packet4f& c)
701 {
702  Packet4f res;
703  res.v4f[0] = vec_madd(a.v4f[0], b.v4f[0], c.v4f[0]);
704  res.v4f[1] = vec_madd(a.v4f[1], b.v4f[1], c.v4f[1]);
705  return res;
706 }
707 
709 {
710  Packet4f res;
711  res.v4f[0] = pmin(a.v4f[0], b.v4f[0]);
712  res.v4f[1] = pmin(a.v4f[1], b.v4f[1]);
713  return res;
714 }
715 
717 {
718  Packet4f res;
719  res.v4f[0] = pmax(a.v4f[0], b.v4f[0]);
720  res.v4f[1] = pmax(a.v4f[1], b.v4f[1]);
721  return res;
722 }
723 
725 {
726  Packet4f res;
727  res.v4f[0] = pand(a.v4f[0], b.v4f[0]);
728  res.v4f[1] = pand(a.v4f[1], b.v4f[1]);
729  return res;
730 }
731 
732 template<> EIGEN_STRONG_INLINE Packet4f por<Packet4f>(const Packet4f& a, const Packet4f& b)
733 {
734  Packet4f res;
735  res.v4f[0] = por(a.v4f[0], b.v4f[0]);
736  res.v4f[1] = por(a.v4f[1], b.v4f[1]);
737  return res;
738 }
739 
741 {
742  Packet4f res;
743  res.v4f[0] = pxor(a.v4f[0], b.v4f[0]);
744  res.v4f[1] = pxor(a.v4f[1], b.v4f[1]);
745  return res;
746 }
747 
749 {
750  Packet4f res;
751  res.v4f[0] = pandnot(a.v4f[0], b.v4f[0]);
752  res.v4f[1] = pandnot(a.v4f[1], b.v4f[1]);
753  return res;
754 }
755 
757 {
758  Packet4f res;
759  res.v4f[0] = vec_round(a.v4f[0]);
760  res.v4f[1] = vec_round(a.v4f[1]);
761  return res;
762 }
763 
765 {
766  Packet4f res;
767  res.v4f[0] = vec_ceil(a.v4f[0]);
768  res.v4f[1] = vec_ceil(a.v4f[1]);
769  return res;
770 }
771 
773 {
774  Packet4f res;
775  res.v4f[0] = vec_floor(a.v4f[0]);
776  res.v4f[1] = vec_floor(a.v4f[1]);
777  return res;
778 }
779 
780 template<> EIGEN_STRONG_INLINE Packet4f ploaddup<Packet4f>(const float* from)
781 {
782  Packet4f p = pload<Packet4f>(from);
783  p.v4f[1] = vec_splat(p.v4f[0], 1);
784  p.v4f[0] = vec_splat(p.v4f[0], 0);
785  return p;
786 }
787 
788 template<> EIGEN_STRONG_INLINE float pfirst<Packet4f>(const Packet4f& a) { float EIGEN_ALIGN16 x[2]; vec_st2f(a.v4f[0], &x[0]); return x[0]; }
789 
791 {
792  Packet4f rev;
793  rev.v4f[0] = preverse<Packet2d>(a.v4f[1]);
794  rev.v4f[1] = preverse<Packet2d>(a.v4f[0]);
795  return rev;
796 }
797 
799 {
800  Packet4f res;
801  res.v4f[0] = pabs(a.v4f[0]);
802  res.v4f[1] = pabs(a.v4f[1]);
803  return res;
804 }
805 
806 template<> EIGEN_STRONG_INLINE float predux<Packet4f>(const Packet4f& a)
807 {
808  Packet2d sum;
809  sum = padd<Packet2d>(a.v4f[0], a.v4f[1]);
810  double first = predux<Packet2d>(sum);
811  return static_cast<float>(first);
812 }
813 
814 template<> EIGEN_STRONG_INLINE float predux_mul<Packet4f>(const Packet4f& a)
815 {
816  // Return predux_mul<Packet2d> of the subvectors product
817  return static_cast<float>(pfirst(predux_mul(pmul(a.v4f[0], a.v4f[1]))));
818 }
819 
820 template<> EIGEN_STRONG_INLINE float predux_min<Packet4f>(const Packet4f& a)
821 {
822  Packet2d b, res;
823  b = pmin<Packet2d>(a.v4f[0], a.v4f[1]);
824  res = pmin<Packet2d>(b, reinterpret_cast<Packet2d>(vec_sld(reinterpret_cast<Packet4i>(b), reinterpret_cast<Packet4i>(b), 8)));
825  return static_cast<float>(pfirst(res));
826 }
827 
828 template<> EIGEN_STRONG_INLINE float predux_max<Packet4f>(const Packet4f& a)
829 {
830  Packet2d b, res;
831  b = pmax<Packet2d>(a.v4f[0], a.v4f[1]);
832  res = pmax<Packet2d>(b, reinterpret_cast<Packet2d>(vec_sld(reinterpret_cast<Packet4i>(b), reinterpret_cast<Packet4i>(b), 8)));
833  return static_cast<float>(pfirst(res));
834 }
835 
836 /* Split the Packet4f PacketBlock into 4 Packet2d PacketBlocks and transpose each one
837  */
838 EIGEN_DEVICE_FUNC inline void
839 ptranspose(PacketBlock<Packet4f,4>& kernel) {
840  PacketBlock<Packet2d,2> t0,t1,t2,t3;
841  // copy top-left 2x2 Packet2d block
842  t0.packet[0] = kernel.packet[0].v4f[0];
843  t0.packet[1] = kernel.packet[1].v4f[0];
844 
845  // copy top-right 2x2 Packet2d block
846  t1.packet[0] = kernel.packet[0].v4f[1];
847  t1.packet[1] = kernel.packet[1].v4f[1];
848 
849  // copy bottom-left 2x2 Packet2d block
850  t2.packet[0] = kernel.packet[2].v4f[0];
851  t2.packet[1] = kernel.packet[3].v4f[0];
852 
853  // copy bottom-right 2x2 Packet2d block
854  t3.packet[0] = kernel.packet[2].v4f[1];
855  t3.packet[1] = kernel.packet[3].v4f[1];
856 
857  // Transpose all 2x2 blocks
858  ptranspose(t0);
859  ptranspose(t1);
860  ptranspose(t2);
861  ptranspose(t3);
862 
863  // Copy back transposed blocks, but exchange t1 and t2 due to transposition
864  kernel.packet[0].v4f[0] = t0.packet[0];
865  kernel.packet[0].v4f[1] = t2.packet[0];
866  kernel.packet[1].v4f[0] = t0.packet[1];
867  kernel.packet[1].v4f[1] = t2.packet[1];
868  kernel.packet[2].v4f[0] = t1.packet[0];
869  kernel.packet[2].v4f[1] = t3.packet[0];
870  kernel.packet[3].v4f[0] = t1.packet[1];
871  kernel.packet[3].v4f[1] = t3.packet[1];
872 }
873 
874 template<> EIGEN_STRONG_INLINE Packet4f pblend(const Selector<4>& ifPacket, const Packet4f& thenPacket, const Packet4f& elsePacket) {
875  Packet2ul select_hi = { ifPacket.select[0], ifPacket.select[1] };
876  Packet2ul select_lo = { ifPacket.select[2], ifPacket.select[3] };
877  Packet2ul mask_hi = vec_cmpeq(select_hi, reinterpret_cast<Packet2ul>(p2l_ONE));
878  Packet2ul mask_lo = vec_cmpeq(select_lo, reinterpret_cast<Packet2ul>(p2l_ONE));
880  result.v4f[0] = vec_sel(elsePacket.v4f[0], thenPacket.v4f[0], mask_hi);
881  result.v4f[1] = vec_sel(elsePacket.v4f[1], thenPacket.v4f[1], mask_lo);
882  return result;
883 }
884 
886 {
887  Packet4f res;
888  res.v4f[0] = pcmp_le(a.v4f[0], b.v4f[0]);
889  res.v4f[1] = pcmp_le(a.v4f[1], b.v4f[1]);
890  return res;
891 }
892 
894 {
895  Packet4f res;
896  res.v4f[0] = pcmp_lt(a.v4f[0], b.v4f[0]);
897  res.v4f[1] = pcmp_lt(a.v4f[1], b.v4f[1]);
898  return res;
899 }
900 
902 {
903  Packet4f res;
904  res.v4f[0] = pcmp_eq(a.v4f[0], b.v4f[0]);
905  res.v4f[1] = pcmp_eq(a.v4f[1], b.v4f[1]);
906  return res;
907 }
908 
909 #else
910 template<> EIGEN_STRONG_INLINE Packet4f pload<Packet4f>(const float* from)
911 {
912  // FIXME: No intrinsic yet
914  Packet *vfrom;
915  vfrom = (Packet *) from;
916  return vfrom->v4f;
917 }
918 
919 template<> EIGEN_STRONG_INLINE void pstore<float>(float* to, const Packet4f& from)
920 {
921  // FIXME: No intrinsic yet
923  Packet *vto;
924  vto = (Packet *) to;
925  vto->v4f = from;
926 }
927 
928 template<> EIGEN_STRONG_INLINE Packet4f pset1<Packet4f>(const float& from)
929 {
930  return vec_splats(from);
931 }
932 
933 template<> EIGEN_STRONG_INLINE void
934 pbroadcast4<Packet4f>(const float *a,
936 {
937  a3 = pload<Packet4f>(a);
938  a0 = vec_splat(a3, 0);
939  a1 = vec_splat(a3, 1);
940  a2 = vec_splat(a3, 2);
941  a3 = vec_splat(a3, 3);
942 }
943 
944 template<> EIGEN_DEVICE_FUNC inline Packet4f pgather<float, Packet4f>(const float* from, Index stride)
945 {
946  float EIGEN_ALIGN16 af[4];
947  af[0] = from[0*stride];
948  af[1] = from[1*stride];
949  af[2] = from[2*stride];
950  af[3] = from[3*stride];
951  return pload<Packet4f>(af);
952 }
953 
954 template<> EIGEN_DEVICE_FUNC inline void pscatter<float, Packet4f>(float* to, const Packet4f& from, Index stride)
955 {
956  float EIGEN_ALIGN16 af[4];
957  pstore<float>((float*)af, from);
958  to[0*stride] = af[0];
959  to[1*stride] = af[1];
960  to[2*stride] = af[2];
961  to[3*stride] = af[3];
962 }
963 
964 template<> EIGEN_STRONG_INLINE Packet4f padd<Packet4f>(const Packet4f& a, const Packet4f& b) { return (a + b); }
965 template<> EIGEN_STRONG_INLINE Packet4f psub<Packet4f>(const Packet4f& a, const Packet4f& b) { return (a - b); }
966 template<> EIGEN_STRONG_INLINE Packet4f pmul<Packet4f>(const Packet4f& a, const Packet4f& b) { return (a * b); }
967 template<> EIGEN_STRONG_INLINE Packet4f pdiv<Packet4f>(const Packet4f& a, const Packet4f& b) { return (a / b); }
968 template<> EIGEN_STRONG_INLINE Packet4f pnegate<Packet4f>(const Packet4f& a) { return (-a); }
969 template<> EIGEN_STRONG_INLINE Packet4f pconj<Packet4f> (const Packet4f& a) { return a; }
970 template<> EIGEN_STRONG_INLINE Packet4f pmadd<Packet4f> (const Packet4f& a, const Packet4f& b, const Packet4f& c) { return vec_madd(a, b, c); }
971 template<> EIGEN_STRONG_INLINE Packet4f pmin<Packet4f> (const Packet4f& a, const Packet4f& b) { return vec_min(a, b); }
972 template<> EIGEN_STRONG_INLINE Packet4f pmax<Packet4f> (const Packet4f& a, const Packet4f& b) { return vec_max(a, b); }
973 template<> EIGEN_STRONG_INLINE Packet4f pand<Packet4f> (const Packet4f& a, const Packet4f& b) { return vec_and(a, b); }
974 template<> EIGEN_STRONG_INLINE Packet4f por<Packet4f> (const Packet4f& a, const Packet4f& b) { return vec_or(a, b); }
975 template<> EIGEN_STRONG_INLINE Packet4f pxor<Packet4f> (const Packet4f& a, const Packet4f& b) { return vec_xor(a, b); }
976 template<> EIGEN_STRONG_INLINE Packet4f pandnot<Packet4f>(const Packet4f& a, const Packet4f& b) { return vec_and(a, vec_nor(b, b)); }
977 template<> EIGEN_STRONG_INLINE Packet4f pround<Packet4f> (const Packet4f& a) { return vec_round(a); }
978 template<> EIGEN_STRONG_INLINE Packet4f pceil<Packet4f> (const Packet4f& a) { return vec_ceil(a); }
979 template<> EIGEN_STRONG_INLINE Packet4f pfloor<Packet4f> (const Packet4f& a) { return vec_floor(a); }
980 template<> EIGEN_STRONG_INLINE Packet4f pabs<Packet4f> (const Packet4f& a) { return vec_abs(a); }
981 template<> EIGEN_STRONG_INLINE float pfirst<Packet4f>(const Packet4f& a) { float EIGEN_ALIGN16 x[4]; pstore(x, a); return x[0]; }
982 
983 template<> EIGEN_STRONG_INLINE Packet4f ploaddup<Packet4f>(const float* from)
984 {
985  Packet4f p = pload<Packet4f>(from);
986  return vec_perm(p, p, p16uc_DUPLICATE32_HI);
987 }
988 
990 {
991  return reinterpret_cast<Packet4f>(vec_perm(reinterpret_cast<Packet16uc>(a), reinterpret_cast<Packet16uc>(a), p16uc_REVERSE32));
992 }
993 
994 template<> EIGEN_STRONG_INLINE float predux<Packet4f>(const Packet4f& a)
995 {
996  Packet4f b, sum;
997  b = vec_sld(a, a, 8);
998  sum = padd<Packet4f>(a, b);
999  b = vec_sld(sum, sum, 4);
1000  sum = padd<Packet4f>(sum, b);
1001  return pfirst(sum);
1002 }
1003 
1004 // Other reduction functions:
1005 // mul
1006 template<> EIGEN_STRONG_INLINE float predux_mul<Packet4f>(const Packet4f& a)
1007 {
1008  Packet4f prod;
1009  prod = pmul(a, vec_sld(a, a, 8));
1010  return pfirst(pmul(prod, vec_sld(prod, prod, 4)));
1011 }
1012 
1013 // min
1014 template<> EIGEN_STRONG_INLINE float predux_min<Packet4f>(const Packet4f& a)
1015 {
1016  Packet4f b, res;
1017  b = pmin<Packet4f>(a, vec_sld(a, a, 8));
1018  res = pmin<Packet4f>(b, vec_sld(b, b, 4));
1019  return pfirst(res);
1020 }
1021 
1022 // max
1023 template<> EIGEN_STRONG_INLINE float predux_max<Packet4f>(const Packet4f& a)
1024 {
1025  Packet4f b, res;
1026  b = pmax<Packet4f>(a, vec_sld(a, a, 8));
1027  res = pmax<Packet4f>(b, vec_sld(b, b, 4));
1028  return pfirst(res);
1029 }
1030 
1031 EIGEN_DEVICE_FUNC inline void
1032 ptranspose(PacketBlock<Packet4f,4>& kernel) {
1033  Packet4f t0 = vec_mergeh(kernel.packet[0], kernel.packet[2]);
1034  Packet4f t1 = vec_mergel(kernel.packet[0], kernel.packet[2]);
1035  Packet4f t2 = vec_mergeh(kernel.packet[1], kernel.packet[3]);
1036  Packet4f t3 = vec_mergel(kernel.packet[1], kernel.packet[3]);
1037  kernel.packet[0] = vec_mergeh(t0, t2);
1038  kernel.packet[1] = vec_mergel(t0, t2);
1039  kernel.packet[2] = vec_mergeh(t1, t3);
1040  kernel.packet[3] = vec_mergel(t1, t3);
1041 }
1042 
1043 template<> EIGEN_STRONG_INLINE Packet4f pblend(const Selector<4>& ifPacket, const Packet4f& thenPacket, const Packet4f& elsePacket) {
1044  Packet4ui select = { ifPacket.select[0], ifPacket.select[1], ifPacket.select[2], ifPacket.select[3] };
1045  Packet4ui mask = vec_cmpeq(select, reinterpret_cast<Packet4ui>(p4i_ONE));
1046  return vec_sel(elsePacket, thenPacket, mask);
1047 }
1048 
1049 #endif
1050 
1051 template<> EIGEN_STRONG_INLINE void prefetch<float>(const float* addr) { EIGEN_ZVECTOR_PREFETCH(addr); }
1052 template<> EIGEN_STRONG_INLINE Packet4f ploadu<Packet4f> (const float* from) { return pload<Packet4f>(from); }
1053 template<> EIGEN_STRONG_INLINE void pstoreu<float>(float* to, const Packet4f& from) { pstore<float>(to, from); }
1055 
1056 } // end namespace internal
1057 
1058 } // end namespace Eigen
1059 
1060 #endif // EIGEN_PACKET_MATH_ZVECTOR_H
Eigen::internal::pbroadcast4< Packet4i >
EIGEN_STRONG_INLINE void pbroadcast4< Packet4i >(const int *a, Packet4i &a0, Packet4i &a1, Packet4i &a2, Packet4i &a3)
Definition: AltiVec/PacketMath.h:597
Eigen::internal::_EIGEN_DECLARE_CONST_FAST_Packet2l
static _EIGEN_DECLARE_CONST_FAST_Packet2l(ZERO, 0)
gtsam.examples.DogLegOptimizerExample.int
int
Definition: DogLegOptimizerExample.py:111
Eigen::internal::Packet4i
__vector int Packet4i
Definition: AltiVec/PacketMath.h:31
Eigen::internal::pround< Packet4f >
EIGEN_STRONG_INLINE Packet4f pround< Packet4f >(const Packet4f &a)
Definition: AltiVec/PacketMath.h:921
Eigen::internal::pcmp_eq
EIGEN_STRONG_INLINE Packet2cf pcmp_eq(const Packet2cf &a, const Packet2cf &b)
Definition: AltiVec/Complex.h:231
Eigen::internal::pset1< Packet2d >
EIGEN_STRONG_INLINE Packet2d pset1< Packet2d >(const double &from)
Definition: MSA/PacketMath.h:872
Eigen::internal::pcmp_lt< Packet4f >
EIGEN_STRONG_INLINE Packet4f pcmp_lt< Packet4f >(const Packet4f &a, const Packet4f &b)
Definition: NEON/PacketMath.h:1339
Eigen::internal::pdiv< Packet2d >
EIGEN_STRONG_INLINE Packet2d pdiv< Packet2d >(const Packet2d &a, const Packet2d &b)
Definition: MSA/PacketMath.h:923
EIGEN_DEVICE_FUNC
#define EIGEN_DEVICE_FUNC
Definition: Macros.h:976
Eigen::internal::p16uc_FORWARD
static Packet16uc p16uc_FORWARD
Definition: AltiVec/PacketMath.h:124
Eigen::internal::Packet16uc
__vector unsigned char Packet16uc
Definition: AltiVec/PacketMath.h:37
Eigen::internal::packet_traits::HasAbs
@ HasAbs
Definition: GenericPacketMath.h:121
Eigen
Namespace containing all symbols from the Eigen library.
Definition: jet.h:637
Eigen::internal::p16uc_REVERSE32
static Packet16uc p16uc_REVERSE32
Definition: AltiVec/PacketMath.h:101
Eigen::internal::pmul< Packet2d >
EIGEN_STRONG_INLINE Packet2d pmul< Packet2d >(const Packet2d &a, const Packet2d &b)
Definition: MSA/PacketMath.h:916
Eigen::internal::pxor< Packet4i >
EIGEN_STRONG_INLINE Packet4i pxor< Packet4i >(const Packet4i &a, const Packet4i &b)
Definition: AltiVec/PacketMath.h:909
Eigen::internal::pload< Packet4i >
EIGEN_STRONG_INLINE Packet4i pload< Packet4i >(const int *from)
Definition: AltiVec/PacketMath.h:448
Eigen::internal::default_packet_traits::HasLog
@ HasLog
Definition: GenericPacketMath.h:70
Eigen::internal::pfirst< Packet4i >
EIGEN_STRONG_INLINE int pfirst< Packet4i >(const Packet4i &a)
Definition: AltiVec/PacketMath.h:1121
Eigen::internal::packet_traits::HasSub
@ HasSub
Definition: GenericPacketMath.h:118
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::pand< Packet4i >
EIGEN_STRONG_INLINE Packet4i pand< Packet4i >(const Packet4i &a, const Packet4i &b)
Definition: AltiVec/PacketMath.h:892
d
static const double d[K][N]
Definition: igam.h:11
Eigen::internal::pfloor< Packet4f >
EIGEN_STRONG_INLINE Packet4f pfloor< Packet4f >(const Packet4f &a)
Definition: AltiVec/PacketMath.h:939
Eigen::internal::unpacket_traits< Packet4i >::type
int type
Definition: ZVector/PacketMath.h:235
Packet
internal::packet_traits< Scalar >::type Packet
Definition: benchmark-blocking-sizes.cpp:54
Eigen::internal::predux_max< Packet2d >
EIGEN_STRONG_INLINE double predux_max< Packet2d >(const Packet2d &a)
Definition: MSA/PacketMath.h:1116
Eigen::internal::PacketBlock
Definition: GenericPacketMath.h:1014
Eigen::internal::pgather< float, Packet4f >
EIGEN_DEVICE_FUNC Packet4f pgather< float, Packet4f >(const float *from, Index stride)
Definition: AltiVec/PacketMath.h:613
Eigen::internal::p2d_ZERO_
static Packet2d p2d_ZERO_
Definition: ZVector/PacketMath.h:94
c
Scalar Scalar * c
Definition: benchVecAdd.cpp:17
b
Scalar * b
Definition: benchVecAdd.cpp:17
Eigen::internal::pcmp_lt
EIGEN_STRONG_INLINE Packet4f pcmp_lt(const Packet4f &a, const Packet4f &b)
Definition: AltiVec/PacketMath.h:868
Eigen::numext::uint32_t
::uint32_t uint32_t
Definition: Meta.h:56
Eigen::internal::p4i_COUNTDOWN
static Packet4i p4i_COUNTDOWN
Definition: AltiVec/PacketMath.h:92
Eigen::internal::pfirst
EIGEN_STRONG_INLINE bfloat16 pfirst(const Packet8bf &a)
Definition: AltiVec/PacketMath.h:1429
Eigen::internal::ploaddup< Packet2d >
EIGEN_STRONG_INLINE Packet2d ploaddup< Packet2d >(const double *from)
Definition: MSA/PacketMath.h:1011
Eigen::internal::psub< Packet4f >
EIGEN_STRONG_INLINE Packet4f psub< Packet4f >(const Packet4f &a, const Packet4f &b)
Definition: AltiVec/PacketMath.h:782
Eigen::internal::plset< Packet4i >
EIGEN_STRONG_INLINE Packet4i plset< Packet4i >(const int &a)
Definition: AltiVec/PacketMath.h:768
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::pbroadcast4< Packet4f >
EIGEN_STRONG_INLINE void pbroadcast4< Packet4f >(const float *a, Packet4f &a0, Packet4f &a1, Packet4f &a2, Packet4f &a3)
Definition: AltiVec/PacketMath.h:591
Eigen::internal::_EIGEN_DECLARE_CONST_FAST_Packet4f
static _EIGEN_DECLARE_CONST_FAST_Packet4f(ZERO, 0)
Eigen::internal::ploadu< Packet4i >
EIGEN_STRONG_INLINE Packet4i ploadu< Packet4i >(const int *from)
Definition: AltiVec/PacketMath.h:972
Eigen::internal::preverse
EIGEN_STRONG_INLINE Packet2cf preverse(const Packet2cf &a)
Definition: AltiVec/Complex.h:184
Eigen::internal::predux_mul
EIGEN_DEVICE_FUNC unpacket_traits< Packet >::type predux_mul(const Packet &a)
Definition: GenericPacketMath.h:882
Eigen::internal::packet_traits::HasMin
@ HasMin
Definition: GenericPacketMath.h:123
Eigen::numext::int64_t
::int64_t int64_t
Definition: Meta.h:59
Eigen::internal::pandnot< Packet4i >
EIGEN_STRONG_INLINE Packet4i pandnot< Packet4i >(const Packet4i &a, const Packet4i &b)
Definition: AltiVec/PacketMath.h:915
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
Eigen::internal::predux_max< Packet4f >
EIGEN_STRONG_INLINE float predux_max< Packet4f >(const Packet4f &a)
Definition: AltiVec/PacketMath.h:1693
Eigen::internal::packet_traits< float >::half
Packet4f half
Definition: ZVector/PacketMath.h:174
res
cout<< "Here is the matrix m:"<< endl<< m<< endl;Matrix< ptrdiff_t, 3, 1 > res
Definition: PartialRedux_count.cpp:3
Eigen::internal::prefetch< float >
EIGEN_STRONG_INLINE void prefetch< float >(const float *addr)
Definition: AltiVec/PacketMath.h:1117
Eigen::internal::pcmp_le< Packet4f >
EIGEN_STRONG_INLINE Packet4f pcmp_le< Packet4f >(const Packet4f &a, const Packet4f &b)
Definition: NEON/PacketMath.h:1278
Eigen::internal::vec_splat_packet4f
EIGEN_STRONG_INLINE Packet4f vec_splat_packet4f(const Packet4f &from)
Definition: ZVector/PacketMath.h:579
Eigen::internal::ploadu< Packet4f >
EIGEN_STRONG_INLINE Packet4f ploadu< Packet4f >(const float *from)
Definition: AltiVec/PacketMath.h:968
Eigen::internal::pstoreu< int >
EIGEN_STRONG_INLINE void pstoreu< int >(int *to, const Packet4i &from)
Definition: AltiVec/PacketMath.h:1092
Eigen::internal::unpacket_traits::vectorizable
@ vectorizable
Definition: GenericPacketMath.h:140
Eigen::internal::pgather< double, Packet2d >
EIGEN_DEVICE_FUNC Packet2d pgather< double, Packet2d >(const double *from, Index stride)
Definition: MSA/PacketMath.h:1033
Eigen::internal::default_packet_traits::HasBlend
@ HasBlend
Definition: GenericPacketMath.h:60
Eigen::internal::default_packet_traits::HasCos
@ HasCos
Definition: GenericPacketMath.h:76
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::por< Packet2d >
EIGEN_STRONG_INLINE Packet2d por< Packet2d >(const Packet2d &a, const Packet2d &b)
Definition: MSA/PacketMath.h:946
Eigen::internal::Packet4bi
__vector __bool int Packet4bi
Definition: AltiVec/PacketMath.h:33
Eigen::internal::pxor
EIGEN_STRONG_INLINE Packet8h pxor(const Packet8h &a, const Packet8h &b)
Definition: AVX/PacketMath.h:1047
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::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::pgather< int, Packet4i >
EIGEN_DEVICE_FUNC Packet4i pgather< int, Packet4i >(const int *from, Index stride)
Definition: AltiVec/PacketMath.h:618
Eigen::numext::uint64_t
::uint64_t uint64_t
Definition: Meta.h:58
Eigen::internal::pand< Packet2d >
EIGEN_STRONG_INLINE Packet2d pand< Packet2d >(const Packet2d &a, const Packet2d &b)
Definition: MSA/PacketMath.h:939
Eigen::internal::pandnot< Packet4f >
EIGEN_STRONG_INLINE Packet4f pandnot< Packet4f >(const Packet4f &a, const Packet4f &b)
Definition: AltiVec/PacketMath.h:914
Eigen::internal::psub< Packet4i >
EIGEN_STRONG_INLINE Packet4i psub< Packet4i >(const Packet4i &a, const Packet4i &b)
Definition: AltiVec/PacketMath.h:783
Eigen::internal::pabs< Packet2d >
EIGEN_STRONG_INLINE Packet2d pabs< Packet2d >(const Packet2d &a)
Definition: ZVector/PacketMath.h:477
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::padd< Packet2d >
EIGEN_STRONG_INLINE Packet2d padd< Packet2d >(const Packet2d &a, const Packet2d &b)
Definition: MSA/PacketMath.h:880
Eigen::internal::pbroadcast4< Packet2d >
EIGEN_STRONG_INLINE void pbroadcast4< Packet2d >(const double *a, Packet2d &a0, Packet2d &a1, Packet2d &a2, Packet2d &a3)
Definition: SSE/PacketMath.h:960
align_3::a1
Point2 a1
Definition: testPose2.cpp:769
Eigen::internal::Packet::v4ui
Packet4ui v4ui
Definition: ZVector/PacketMath.h:55
Eigen::internal::p4f_COUNTDOWN
static Packet4f p4f_COUNTDOWN
Definition: AltiVec/PacketMath.h:91
align_3::a3
Point2 a3
Definition: testPose2.cpp:771
Eigen::internal::pmul< Packet4i >
EIGEN_STRONG_INLINE Packet4i pmul< Packet4i >(const Packet4i &a, const Packet4i &b)
Definition: AltiVec/PacketMath.h:796
Eigen::internal::unpacket_traits::size
@ size
Definition: GenericPacketMath.h:138
Eigen::internal::unpacket_traits::alignment
@ alignment
Definition: GenericPacketMath.h:139
Eigen::internal::pmin< Packet4f >
EIGEN_STRONG_INLINE Packet4f pmin< Packet4f >(const Packet4f &a, const Packet4f &b)
Definition: AltiVec/PacketMath.h:832
Eigen::internal::p2d_ONE
static Packet2d p2d_ONE
Definition: ZVector/PacketMath.h:93
Eigen::internal::Packet::v2l
Packet2l v2l
Definition: ZVector/PacketMath.h:56
Eigen::internal::pstore< double >
EIGEN_STRONG_INLINE void pstore< double >(double *to, const Packet4d &from)
Definition: AVX/PacketMath.h:623
Eigen::internal::unpacket_traits::half
T half
Definition: GenericPacketMath.h:135
Eigen::internal::pceil< Packet4f >
EIGEN_STRONG_INLINE Packet4f pceil< Packet4f >(const Packet4f &a)
Definition: AltiVec/PacketMath.h:938
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::p16uc_DUPLICATE32_HI
static Packet16uc p16uc_DUPLICATE32_HI
Definition: AltiVec/PacketMath.h:105
Eigen::internal::default_packet_traits::HasSin
@ HasSin
Definition: GenericPacketMath.h:75
Eigen::internal::Packet::v4i
Packet4i v4i
Definition: ZVector/PacketMath.h:54
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::Packet::v2ul
Packet2ul v2ul
Definition: ZVector/PacketMath.h:57
Eigen::internal::pxor< Packet2d >
EIGEN_STRONG_INLINE Packet2d pxor< Packet2d >(const Packet2d &a, const Packet2d &b)
Definition: MSA/PacketMath.h:953
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::plset< Packet2d >
EIGEN_STRONG_INLINE Packet2d plset< Packet2d >(const double &a)
Definition: MSA/PacketMath.h:887
Eigen::internal::unpacket_traits
Definition: GenericPacketMath.h:132
Eigen::internal::pset1< Packet4f >
EIGEN_STRONG_INLINE Packet4f pset1< Packet4f >(const float &from)
Definition: AltiVec/PacketMath.h:547
Eigen::internal::ptranspose
EIGEN_STRONG_INLINE void ptranspose(PacketBlock< Packet2cf, 2 > &kernel)
Definition: AltiVec/Complex.h:224
Eigen::internal::por< Packet4i >
EIGEN_STRONG_INLINE Packet4i por< Packet4i >(const Packet4i &a, const Packet4i &b)
Definition: AltiVec/PacketMath.h:901
l
static const Line3 l(Rot3(), 1, 1)
Eigen::internal::_EIGEN_DECLARE_CONST_FAST_Packet4i
static _EIGEN_DECLARE_CONST_FAST_Packet4i(ZERO, 0)
Eigen::internal::predux_min< Packet4i >
EIGEN_STRONG_INLINE int predux_min< Packet4i >(const Packet4i &a)
Definition: AltiVec/PacketMath.h:1618
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::pdiv< Packet4i >
EIGEN_STRONG_INLINE Packet4i pdiv< Packet4i >(const Packet4i &, const Packet4i &)
Definition: AltiVec/PacketMath.h:821
Eigen::internal::predux_mul< Packet4f >
EIGEN_STRONG_INLINE float predux_mul< Packet4f >(const Packet4f &a)
Definition: AltiVec/PacketMath.h:1533
Eigen::internal::first
EIGEN_CONSTEXPR Index first(const T &x) EIGEN_NOEXCEPT
Definition: IndexedViewHelper.h:81
Eigen::internal::Packet::v4f
Packet4f v4f
Definition: ZVector/PacketMath.h:60
Eigen::internal::pmax
EIGEN_DEVICE_FUNC Packet pmax(const Packet &a, const Packet &b)
Definition: GenericPacketMath.h:524
Eigen::internal::default_packet_traits::HasErf
@ HasErf
Definition: GenericPacketMath.h:88
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::pscatter< double, Packet2d >
EIGEN_DEVICE_FUNC void pscatter< double, Packet2d >(double *to, const Packet2d &from, Index stride)
Definition: MSA/PacketMath.h:1044
Eigen::internal::default_packet_traits::HasSqrt
@ HasSqrt
Definition: GenericPacketMath.h:66
Eigen::internal::Packet2l
v2i64 Packet2l
Definition: MSA/PacketMath.h:821
Eigen::internal::pand
EIGEN_STRONG_INLINE Packet8h pand(const Packet8h &a, const Packet8h &b)
Definition: AVX/PacketMath.h:1050
Eigen::internal::pscatter< float, Packet4f >
EIGEN_DEVICE_FUNC void pscatter< float, Packet4f >(float *to, const Packet4f &from, Index stride)
Definition: AltiVec/PacketMath.h:695
Eigen::internal::packet_traits< float >::type
Packet4f type
Definition: ZVector/PacketMath.h:173
Eigen::internal::Packet
Definition: ZVector/PacketMath.h:47
Eigen::internal::Packet8i
__m256i Packet8i
Definition: AVX/PacketMath.h:32
Eigen::Triplet< double >
Eigen::internal::default_packet_traits::HasCeil
@ HasCeil
Definition: GenericPacketMath.h:101
Eigen::internal::pandnot< Packet2d >
EIGEN_STRONG_INLINE Packet2d pandnot< Packet2d >(const Packet2d &a, const Packet2d &b)
Definition: MSA/PacketMath.h:960
Eigen::internal::predux_min< Packet4f >
EIGEN_STRONG_INLINE float predux_min< Packet4f >(const Packet4f &a)
Definition: AltiVec/PacketMath.h:1613
Eigen::internal::operator<<
std::ostream & operator<<(std::ostream &s, const Packet16c &v)
Definition: AltiVec/PacketMath.h:371
Eigen::internal::predux_mul< Packet2d >
EIGEN_STRONG_INLINE double predux_mul< Packet2d >(const Packet2d &a)
Definition: MSA/PacketMath.h:1092
Eigen::internal::pscatter< int, Packet4i >
EIGEN_DEVICE_FUNC void pscatter< int, Packet4i >(int *to, const Packet4i &from, Index stride)
Definition: AltiVec/PacketMath.h:700
Eigen::internal::default_packet_traits::HasFloor
@ HasFloor
Definition: GenericPacketMath.h:100
Eigen::internal::pstore
EIGEN_DEVICE_FUNC void pstore(Scalar *to, const Packet &from)
Definition: GenericPacketMath.h:696
Eigen::internal::plset< Packet4f >
EIGEN_STRONG_INLINE Packet4f plset< Packet4f >(const float &a)
Definition: AltiVec/PacketMath.h:767
Eigen::internal::ploaddup< Packet4f >
EIGEN_STRONG_INLINE Packet4f ploaddup< Packet4f >(const float *from)
Definition: AltiVec/PacketMath.h:1004
Eigen::internal::default_packet_traits::HasTanh
@ HasTanh
Definition: GenericPacketMath.h:83
Eigen::internal::pabs< Packet4i >
EIGEN_STRONG_INLINE Packet4i pabs< Packet4i >(const Packet4i &a)
Definition: ZVector/PacketMath.h:476
Eigen::internal::unpacket_traits::masked_load_available
@ masked_load_available
Definition: GenericPacketMath.h:141
Eigen::internal::psub< Packet2d >
EIGEN_STRONG_INLINE Packet2d psub< Packet2d >(const Packet2d &a, const Packet2d &b)
Definition: MSA/PacketMath.h:895
tree::f
Point2(* f)(const Point3 &, OptionalJacobian< 2, 3 >)
Definition: testExpression.cpp:218
Eigen::internal::p16uc_COMPLEX32_REV2
static Packet16uc p16uc_COMPLEX32_REV2
Definition: AltiVec/PacketMath.h:141
Eigen::internal::pabs< Packet4f >
EIGEN_STRONG_INLINE Packet4f pabs< Packet4f >(const Packet4f &a)
Definition: ZVector/PacketMath.h:798
Eigen::Aligned16
@ Aligned16
Definition: Constants.h:235
Eigen::internal::Packet::v2d
Packet2d v2d
Definition: ZVector/PacketMath.h:58
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::predux< Packet4i >
EIGEN_STRONG_INLINE int predux< Packet4i >(const Packet4i &a)
Definition: AltiVec/PacketMath.h:1454
Eigen::internal::default_packet_traits::HasExp
@ HasExp
Definition: GenericPacketMath.h:68
Eigen::internal::packet_traits< int >::type
Packet4i type
Definition: ZVector/PacketMath.h:155
Eigen::internal::pmul
EIGEN_DEVICE_FUNC Packet pmul(const Packet &a, const Packet &b)
Definition: GenericPacketMath.h:237
Eigen::internal::Packet::i
numext::int32_t i[4]
Definition: ZVector/PacketMath.h:48
Eigen::internal::pceil< Packet2d >
EIGEN_STRONG_INLINE Packet2d pceil< Packet2d >(const Packet2d &a)
Definition: MSA/PacketMath.h:1182
Eigen::internal::Packet2d
v2f64 Packet2d
Definition: MSA/PacketMath.h:820
Eigen::internal::pmax< Packet2d >
EIGEN_STRONG_INLINE Packet2d pmax< Packet2d >(const Packet2d &a, const Packet2d &b)
Definition: MSA/PacketMath.h:989
Eigen::internal::default_packet_traits::HasRsqrt
@ HasRsqrt
Definition: GenericPacketMath.h:67
Eigen::internal::pfirst< Packet2d >
EIGEN_STRONG_INLINE double pfirst< Packet2d >(const Packet2d &a)
Definition: MSA/PacketMath.h:1061
align_3::a2
Point2 a2
Definition: testPose2.cpp:770
Eigen::internal::por< Packet4f >
EIGEN_STRONG_INLINE Packet4f por< Packet4f >(const Packet4f &a, const Packet4f &b)
Definition: AltiVec/PacketMath.h:900
Eigen::internal::pstore< int >
EIGEN_STRONG_INLINE void pstore< int >(int *to, const Packet4i &from)
Definition: AltiVec/PacketMath.h:496
Eigen::internal::pmadd
EIGEN_STRONG_INLINE Packet4f pmadd(const Packet4f &a, const Packet4f &b, const Packet4f &c)
Definition: AltiVec/PacketMath.h:827
Eigen::internal::pand< Packet4f >
EIGEN_STRONG_INLINE Packet4f pand< Packet4f >(const Packet4f &a, const Packet4f &b)
Definition: AltiVec/PacketMath.h:891
p
float * p
Definition: Tutorial_Map_using.cpp:9
Eigen::internal::packet_traits< double >::half
Packet2d half
Definition: ZVector/PacketMath.h:207
Eigen::internal::pmin< Packet2d >
EIGEN_STRONG_INLINE Packet2d pmin< Packet2d >(const Packet2d &a, const Packet2d &b)
Definition: MSA/PacketMath.h:974
Eigen::internal::pstoreu< double >
EIGEN_STRONG_INLINE void pstoreu< double >(double *to, const Packet4d &from)
Definition: AVX/PacketMath.h:627
Eigen::internal::prefetch< int >
EIGEN_STRONG_INLINE void prefetch< int >(const int *addr)
Definition: AltiVec/PacketMath.h:1118
Eigen::internal::packet_traits::HasAdd
@ HasAdd
Definition: GenericPacketMath.h:117
Eigen::internal::p4f_MZERO
static Packet4f p4f_MZERO
Definition: AltiVec/PacketMath.h:86
Eigen::internal::predux< Packet4f >
EIGEN_STRONG_INLINE float predux< Packet4f >(const Packet4f &a)
Definition: AltiVec/PacketMath.h:1444
Eigen::internal::pabs
EIGEN_STRONG_INLINE Packet4f pabs(const Packet4f &a)
Definition: AltiVec/PacketMath.h:1176
v
Array< int, Dynamic, 1 > v
Definition: Array_initializer_list_vector_cxx11.cpp:1
Eigen::internal::packet_traits::HasMax
@ HasMax
Definition: GenericPacketMath.h:124
Eigen::internal::pmin
EIGEN_DEVICE_FUNC Packet pmin(const Packet &a, const Packet &b)
Definition: GenericPacketMath.h:512
gtsam.examples.DogLegOptimizerExample.float
float
Definition: DogLegOptimizerExample.py:113
Eigen::internal::packet_traits::HasNegate
@ HasNegate
Definition: GenericPacketMath.h:120
Eigen::internal::pfirst< Packet4f >
EIGEN_STRONG_INLINE float pfirst< Packet4f >(const Packet4f &a)
Definition: AltiVec/PacketMath.h:1120
Eigen::internal::por
EIGEN_STRONG_INLINE Packet8h por(const Packet8h &a, const Packet8h &b)
Definition: AVX/PacketMath.h:1042
Eigen::internal::pfloor< Packet2d >
EIGEN_STRONG_INLINE Packet2d pfloor< Packet2d >(const Packet2d &a)
Definition: MSA/PacketMath.h:1163
Eigen::internal::default_packet_traits::HasDiv
@ HasDiv
Definition: GenericPacketMath.h:65
Eigen::internal::Packet2ul
v2u64 Packet2ul
Definition: MSA/PacketMath.h:822
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
internal
Definition: BandTriangularSolver.h:13
Eigen::internal::pstoreu< float >
EIGEN_STRONG_INLINE void pstoreu< float >(float *to, const Packet4f &from)
Definition: AltiVec/PacketMath.h:1088
Eigen::internal::p2d_COUNTDOWN
static Packet2d p2d_COUNTDOWN
Definition: ZVector/PacketMath.h:114
Eigen::internal::predux_mul< Packet4i >
EIGEN_STRONG_INLINE int predux_mul< Packet4i >(const Packet4i &a)
Definition: AltiVec/PacketMath.h:1540
Eigen::internal::predux< Packet2d >
EIGEN_STRONG_INLINE double predux< Packet2d >(const Packet2d &a)
Definition: MSA/PacketMath.h:1082
Eigen::internal::predux_min< Packet2d >
EIGEN_STRONG_INLINE double predux_min< Packet2d >(const Packet2d &a)
Definition: MSA/PacketMath.h:1101
Eigen::internal::pdiv< Packet4f >
EIGEN_STRONG_INLINE Packet4f pdiv< Packet4f >(const Packet4f &a, const Packet4f &b)
Definition: AltiVec/PacketMath.h:803
Eigen::internal::packet_traits< double >::type
Packet2d type
Definition: ZVector/PacketMath.h:206
Eigen::internal::pmax< Packet4i >
EIGEN_STRONG_INLINE Packet4i pmax< Packet4i >(const Packet4i &a, const Packet4i &b)
Definition: AltiVec/PacketMath.h:861
Eigen::internal::pandnot
EIGEN_STRONG_INLINE Packet8h pandnot(const Packet8h &a, const Packet8h &b)
Definition: AVX/PacketMath.h:1053
Eigen::internal::pmax< Packet4f >
EIGEN_STRONG_INLINE Packet4f pmax< Packet4f >(const Packet4f &a, const Packet4f &b)
Definition: AltiVec/PacketMath.h:850
Eigen::internal::pmin< Packet4i >
EIGEN_STRONG_INLINE Packet4i pmin< Packet4i >(const Packet4i &a, const Packet4i &b)
Definition: AltiVec/PacketMath.h:843
Eigen::internal::prefetch< double >
EIGEN_STRONG_INLINE void prefetch< double >(const double *addr)
Definition: AVX/PacketMath.h:692
Eigen::internal::packet_traits::HasMul
@ HasMul
Definition: GenericPacketMath.h:119
Eigen::internal::pcmp_le
EIGEN_STRONG_INLINE Packet4f pcmp_le(const Packet4f &a, const Packet4f &b)
Definition: AltiVec/PacketMath.h:867
Eigen::internal::_EIGEN_DECLARE_CONST_FAST_Packet2d
static _EIGEN_DECLARE_CONST_FAST_Packet2d(ZERO, 0)
Eigen::internal::pset1< Packet4i >
EIGEN_STRONG_INLINE Packet4i pset1< Packet4i >(const int &from)
Definition: AltiVec/PacketMath.h:551
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
i
int i
Definition: BiCGSTAB_step_by_step.cpp:9
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::predux_max< Packet4i >
EIGEN_STRONG_INLINE int predux_max< Packet4i >(const Packet4i &a)
Definition: AltiVec/PacketMath.h:1698
Eigen::internal::pload< Packet2d >
EIGEN_STRONG_INLINE Packet2d pload< Packet2d >(const double *from)
Definition: MSA/PacketMath.h:967
Eigen::internal::packet_traits< int >::half
Packet4i half
Definition: ZVector/PacketMath.h:156
EIGEN_DEBUG_ALIGNED_STORE
#define EIGEN_DEBUG_ALIGNED_STORE
Definition: GenericPacketMath.h:35
Eigen::internal::pstore< float >
EIGEN_STRONG_INLINE void pstore< float >(float *to, const Packet4f &from)
Definition: AltiVec/PacketMath.h:491
Eigen::numext::int32_t
::int32_t int32_t
Definition: Meta.h:57
Eigen::internal::padd< Packet4i >
EIGEN_STRONG_INLINE Packet4i padd< Packet4i >(const Packet4i &a, const Packet4i &b)
Definition: AltiVec/PacketMath.h:775
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
Eigen::internal::ploaddup< Packet4i >
EIGEN_STRONG_INLINE Packet4i ploaddup< Packet4i >(const int *from)
Definition: AltiVec/PacketMath.h:1008
Eigen::internal::unpacket_traits< Packet2d >::type
double type
Definition: ZVector/PacketMath.h:237
Eigen::internal::unpacket_traits< Packet4f >::type
float type
Definition: ZVector/PacketMath.h:236
Eigen::internal::default_packet_traits::HasRound
@ HasRound
Definition: GenericPacketMath.h:98
Eigen::internal::pround< Packet2d >
EIGEN_STRONG_INLINE Packet2d pround< Packet2d >(const Packet2d &a)
Definition: MSA/PacketMath.h:1202


gtsam
Author(s):
autogenerated on Sat Nov 16 2024 04:03:15