TR-mbed 1.0
Loading...
Searching...
No Matches
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) 2008-2009 Gael Guennebaud <gael.guennebaud@inria.fr>
5// Copyright (C) 2010 Konstantinos Margaritis <markos@freevec.org>
6// Heavily based on Gael's SSE version.
7//
8// This Source Code Form is subject to the terms of the Mozilla
9// Public License v. 2.0. If a copy of the MPL was not distributed
10// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
11
12#ifndef EIGEN_PACKET_MATH_NEON_H
13#define EIGEN_PACKET_MATH_NEON_H
14
15namespace Eigen {
16
17namespace internal {
18
19#ifndef EIGEN_CACHEFRIENDLY_PRODUCT_THRESHOLD
20#define EIGEN_CACHEFRIENDLY_PRODUCT_THRESHOLD 8
21#endif
22
23#ifndef EIGEN_HAS_SINGLE_INSTRUCTION_MADD
24#define EIGEN_HAS_SINGLE_INSTRUCTION_MADD
25#endif
26
27#ifndef EIGEN_ARCH_DEFAULT_NUMBER_OF_REGISTERS
28#if EIGEN_ARCH_ARM64
29#define EIGEN_ARCH_DEFAULT_NUMBER_OF_REGISTERS 32
30#else
31#define EIGEN_ARCH_DEFAULT_NUMBER_OF_REGISTERS 16
32#endif
33#endif
34
35#if EIGEN_COMP_MSVC_STRICT
36
37// In MSVC's arm_neon.h header file, all NEON vector types
38// are aliases to the same underlying type __n128.
39// We thus have to wrap them to make them different C++ types.
40// (See also bug 1428)
41typedef eigen_packet_wrapper<float32x2_t,0> Packet2f;
42typedef eigen_packet_wrapper<float32x4_t,1> Packet4f;
43typedef eigen_packet_wrapper<int32_t ,2> Packet4c;
44typedef eigen_packet_wrapper<int8x8_t ,3> Packet8c;
45typedef eigen_packet_wrapper<int8x16_t ,4> Packet16c;
46typedef eigen_packet_wrapper<uint32_t ,5> Packet4uc;
47typedef eigen_packet_wrapper<uint8x8_t ,6> Packet8uc;
48typedef eigen_packet_wrapper<uint8x16_t ,7> Packet16uc;
49typedef eigen_packet_wrapper<int16x4_t ,8> Packet4s;
50typedef eigen_packet_wrapper<int16x8_t ,9> Packet8s;
51typedef eigen_packet_wrapper<uint16x4_t ,10> Packet4us;
52typedef eigen_packet_wrapper<uint16x8_t ,11> Packet8us;
53typedef eigen_packet_wrapper<int32x2_t ,12> Packet2i;
54typedef eigen_packet_wrapper<int32x4_t ,13> Packet4i;
55typedef eigen_packet_wrapper<uint32x2_t ,14> Packet2ui;
56typedef eigen_packet_wrapper<uint32x4_t ,15> Packet4ui;
57typedef eigen_packet_wrapper<int64x2_t ,16> Packet2l;
58typedef eigen_packet_wrapper<uint64x2_t ,17> Packet2ul;
59
60#else
61
63typedef float32x4_t Packet4f;
66typedef int8x16_t Packet16c;
71typedef int16x8_t Packet8s;
73typedef uint16x8_t Packet8us;
75typedef int32x4_t Packet4i;
77typedef uint32x4_t Packet4ui;
78typedef int64x2_t Packet2l;
79typedef uint64x2_t Packet2ul;
80
81#endif // EIGEN_COMP_MSVC_STRICT
82
84 const float* a = reinterpret_cast<const float*>(&m);
85 Packet4f res = {*(a + (mask & 3)), *(a + ((mask >> 2) & 3)), *(a + ((mask >> 4) & 3 )), *(a + ((mask >> 6) & 3))};
86 return res;
87}
88
89// fuctionally equivalent to _mm_shuffle_ps in SSE when interleave
90// == false (i.e. shuffle<false>(m, n, mask) equals _mm_shuffle_ps(m, n, mask)),
91// interleave m and n when interleave == true. Currently used in LU/arch/InverseSize4.h
92// to enable a shared implementation for fast inversion of matrices of size 4.
93template<bool interleave>
95{
96 const float* a = reinterpret_cast<const float*>(&m);
97 const float* b = reinterpret_cast<const float*>(&n);
98 Packet4f res = {*(a + (mask & 3)), *(a + ((mask >> 2) & 3)), *(b + ((mask >> 4) & 3)), *(b + ((mask >> 6) & 3))};
99 return res;
100}
101
102template<>
104{
105 const float* a = reinterpret_cast<const float*>(&m);
106 const float* b = reinterpret_cast<const float*>(&n);
107 Packet4f res = {*(a + (mask & 3)), *(b + ((mask >> 2) & 3)), *(a + ((mask >> 4) & 3)), *(b + ((mask >> 6) & 3))};
108 return res;
109}
110
111EIGEN_STRONG_INLINE static int eigen_neon_shuffle_mask(int p, int q, int r, int s) {return ((s)<<6|(r)<<4|(q)<<2|(p));}
112
113EIGEN_STRONG_INLINE Packet4f vec4f_swizzle1(const Packet4f& a, int p, int q, int r, int s)
114{
115 return shuffle1(a, eigen_neon_shuffle_mask(p, q, r, s));
116}
117EIGEN_STRONG_INLINE Packet4f vec4f_swizzle2(const Packet4f& a, const Packet4f& b, int p, int q, int r, int s)
118{
119 return shuffle2<false>(a,b,eigen_neon_shuffle_mask(p, q, r, s));
120}
122{
123 return shuffle2<false>(a,b,eigen_neon_shuffle_mask(0, 1, 0, 1));
124}
126{
127 return shuffle2<false>(b,a,eigen_neon_shuffle_mask(2, 3, 2, 3));
128}
130{
131 return shuffle2<true>(a,b,eigen_neon_shuffle_mask(0, 0, 1, 1));
132}
134{
135 return shuffle2<true>(a,b,eigen_neon_shuffle_mask(2, 2, 3, 3));
136}
137#define vec4f_duplane(a, p) \
138 vdupq_lane_f32(vget_low_f32(a), p)
139
140#define _EIGEN_DECLARE_CONST_Packet4f(NAME,X) \
141 const Packet4f p4f_##NAME = pset1<Packet4f>(X)
142
143#define _EIGEN_DECLARE_CONST_Packet4f_FROM_INT(NAME,X) \
144 const Packet4f p4f_##NAME = vreinterpretq_f32_u32(pset1<int32_t>(X))
145
146#define _EIGEN_DECLARE_CONST_Packet4i(NAME,X) \
147 const Packet4i p4i_##NAME = pset1<Packet4i>(X)
148
149#if EIGEN_ARCH_ARM64
150 // __builtin_prefetch tends to do nothing on ARM64 compilers because the
151 // prefetch instructions there are too detailed for __builtin_prefetch to map
152 // meaningfully to them.
153 #define EIGEN_ARM_PREFETCH(ADDR) __asm__ __volatile__("prfm pldl1keep, [%[addr]]\n" ::[addr] "r"(ADDR) : );
154#elif EIGEN_HAS_BUILTIN(__builtin_prefetch) || EIGEN_COMP_GNUC
155 #define EIGEN_ARM_PREFETCH(ADDR) __builtin_prefetch(ADDR);
156#elif defined __pld
157 #define EIGEN_ARM_PREFETCH(ADDR) __pld(ADDR)
158#elif EIGEN_ARCH_ARM32
159 #define EIGEN_ARM_PREFETCH(ADDR) __asm__ __volatile__ ("pld [%[addr]]\n" :: [addr] "r" (ADDR) : );
160#else
161 // by default no explicit prefetching
162 #define EIGEN_ARM_PREFETCH(ADDR)
163#endif
164
165template <>
166struct packet_traits<float> : default_packet_traits
167{
168 typedef Packet4f type;
169 typedef Packet2f half;
170 enum
171 {
172 Vectorizable = 1,
173 AlignedOnScalar = 1,
174 size = 4,
175 HasHalfPacket = 1,
176
177 HasAdd = 1,
178 HasSub = 1,
180 HasMul = 1,
181 HasNegate = 1,
182 HasAbs = 1,
186 HasMin = 1,
187 HasMax = 1,
188 HasConj = 1,
190 HasBlend = 0,
191
192 HasDiv = 1,
193 HasFloor = 1,
194 HasCeil = 1,
195 HasRint = 1,
196
199 HasLog = 1,
200 HasExp = 1,
201 HasSqrt = 1,
202 HasRsqrt = 1,
205 HasBessel = 0, // Issues with accuracy.
206 HasNdtri = 0
207 };
208};
209
210template <>
238
239template <>
269
270template <>
298
299template <>
328
329template <>
330struct packet_traits<int32_t> : default_packet_traits
331{
332 typedef Packet4i type;
333 typedef Packet2i half;
334 enum
335 {
336 Vectorizable = 1,
337 AlignedOnScalar = 1,
338 size = 4,
339 HasHalfPacket = 1,
340
354 HasBlend = 0
355 };
356};
357
358template <>
388
389template <>
418
419template <>
448
449#if EIGEN_GNUC_AT_MOST(4, 4) && !EIGEN_COMP_LLVM
450// workaround gcc 4.2, 4.3 and 4.4 compilation issue
451EIGEN_STRONG_INLINE float32x4_t vld1q_f32(const float* x) { return ::vld1q_f32((const float32_t*)x); }
452EIGEN_STRONG_INLINE float32x2_t vld1_f32(const float* x) { return ::vld1_f32 ((const float32_t*)x); }
453EIGEN_STRONG_INLINE float32x2_t vld1_dup_f32(const float* x) { return ::vld1_dup_f32 ((const float32_t*)x); }
454EIGEN_STRONG_INLINE void vst1q_f32(float* to, float32x4_t from) { ::vst1q_f32((float32_t*)to,from); }
455EIGEN_STRONG_INLINE void vst1_f32 (float* to, float32x2_t from) { ::vst1_f32 ((float32_t*)to,from); }
456#endif
457
458template<> struct unpacket_traits<Packet2f>
459{
460 typedef float type;
461 typedef Packet2f half;
463 enum
464 {
465 size = 2,
470 };
471};
472template<> struct unpacket_traits<Packet4f>
473{
474 typedef float type;
475 typedef Packet2f half;
477 enum
478 {
479 size = 4,
481 vectorizable = true,
482 masked_load_available = false,
484 };
485};
486template<> struct unpacket_traits<Packet4c>
487{
488 typedef int8_t type;
489 typedef Packet4c half;
490 enum
491 {
492 size = 4,
497 };
498};
499template<> struct unpacket_traits<Packet8c>
500{
501 typedef int8_t type;
502 typedef Packet4c half;
503 enum
504 {
505 size = 8,
510 };
511};
512template<> struct unpacket_traits<Packet16c>
513{
514 typedef int8_t type;
515 typedef Packet8c half;
516 enum
517 {
518 size = 16,
520 vectorizable = true,
521 masked_load_available = false,
523 };
524};
525template<> struct unpacket_traits<Packet4uc>
526{
527 typedef uint8_t type;
529 enum
530 {
531 size = 4,
536 };
537};
538template<> struct unpacket_traits<Packet8uc>
539{
540 typedef uint8_t type;
542 enum
543 {
544 size = 8,
549 };
550};
551template<> struct unpacket_traits<Packet16uc>
552{
553 typedef uint8_t type;
555 enum
556 {
557 size = 16,
559 vectorizable = true,
560 masked_load_available = false,
561 masked_store_available = false};
562};
563template<> struct unpacket_traits<Packet4s>
564{
565 typedef int16_t type;
566 typedef Packet4s half;
567 enum
568 {
569 size = 4,
574 };
575};
576template<> struct unpacket_traits<Packet8s>
577{
578 typedef int16_t type;
579 typedef Packet4s half;
580 enum
581 {
582 size = 8,
584 vectorizable = true,
585 masked_load_available = false,
587 };
588};
589template<> struct unpacket_traits<Packet4us>
590{
591 typedef uint16_t type;
593 enum
594 {
595 size = 4,
600 };
601};
602template<> struct unpacket_traits<Packet8us>
603{
604 typedef uint16_t type;
606 enum
607 {
608 size = 8,
610 vectorizable = true,
611 masked_load_available = false,
613 };
614};
615template<> struct unpacket_traits<Packet2i>
616{
617 typedef int32_t type;
618 typedef Packet2i half;
619 enum
620 {
621 size = 2,
626 };
627};
628template<> struct unpacket_traits<Packet4i>
629{
630 typedef int32_t type;
631 typedef Packet2i half;
632 enum
633 {
634 size = 4,
636 vectorizable = true,
637 masked_load_available = false,
639 };
640};
641template<> struct unpacket_traits<Packet2ui>
642{
643 typedef uint32_t type;
645 enum
646 {
647 size = 2,
652 };
653};
654template<> struct unpacket_traits<Packet4ui>
655{
656 typedef uint32_t type;
658 enum
659 {
660 size = 4,
665 };
666};
667template<> struct unpacket_traits<Packet2l>
668{
669 typedef int64_t type;
670 typedef Packet2l half;
671 enum
672 {
673 size = 2,
678 };
679};
680template<> struct unpacket_traits<Packet2ul>
681{
682 typedef uint64_t type;
684 enum
685 {
686 size = 2,
691 };
692};
693
694template<> EIGEN_STRONG_INLINE Packet2f pset1<Packet2f>(const float& from) { return vdup_n_f32(from); }
698template<> EIGEN_STRONG_INLINE Packet8c pset1<Packet8c>(const int8_t& from) { return vdup_n_s8(from); }
699template<> EIGEN_STRONG_INLINE Packet16c pset1<Packet16c>(const int8_t& from) { return vdupq_n_s8(from); }
702template<> EIGEN_STRONG_INLINE Packet8uc pset1<Packet8uc>(const uint8_t& from) { return vdup_n_u8(from); }
704template<> EIGEN_STRONG_INLINE Packet4s pset1<Packet4s>(const int16_t& from) { return vdup_n_s16(from); }
705template<> EIGEN_STRONG_INLINE Packet8s pset1<Packet8s>(const int16_t& from) { return vdupq_n_s16(from); }
706template<> EIGEN_STRONG_INLINE Packet4us pset1<Packet4us>(const uint16_t& from) { return vdup_n_u16(from); }
707template<> EIGEN_STRONG_INLINE Packet8us pset1<Packet8us>(const uint16_t& from) { return vdupq_n_u16(from); }
708template<> EIGEN_STRONG_INLINE Packet2i pset1<Packet2i>(const int32_t& from) { return vdup_n_s32(from); }
709template<> EIGEN_STRONG_INLINE Packet4i pset1<Packet4i>(const int32_t& from) { return vdupq_n_s32(from); }
710template<> EIGEN_STRONG_INLINE Packet2ui pset1<Packet2ui>(const uint32_t& from) { return vdup_n_u32(from); }
711template<> EIGEN_STRONG_INLINE Packet4ui pset1<Packet4ui>(const uint32_t& from) { return vdupq_n_u32(from); }
712template<> EIGEN_STRONG_INLINE Packet2l pset1<Packet2l>(const int64_t& from) { return vdupq_n_s64(from); }
713template<> EIGEN_STRONG_INLINE Packet2ul pset1<Packet2ul>(const uint64_t& from) { return vdupq_n_u64(from); }
714
719
721{
722 const float c[] = {0.0f,1.0f};
724}
726{
727 const float c[] = {0.0f,1.0f,2.0f,3.0f};
729}
733{
734 const int8_t c[] = {0,1,2,3,4,5,6,7};
735 return vadd_s8(pset1<Packet8c>(a), vld1_s8(c));
736}
738{
739 const int8_t c[] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15};
741}
745{
746 const uint8_t c[] = {0,1,2,3,4,5,6,7};
748}
750{
751 const uint8_t c[] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15};
753}
755{
756 const int16_t c[] = {0,1,2,3};
758}
760{
761 const uint16_t c[] = {0,1,2,3};
763}
765{
766 const int16_t c[] = {0,1,2,3,4,5,6,7};
768}
770{
771 const uint16_t c[] = {0,1,2,3,4,5,6,7};
773}
775{
776 const int32_t c[] = {0,1};
778}
780{
781 const int32_t c[] = {0,1,2,3};
783}
785{
786 const uint32_t c[] = {0,1};
788}
790{
791 const uint32_t c[] = {0,1,2,3};
793}
795{
796 const int64_t c[] = {0,1};
798}
800{
801 const uint64_t c[] = {0,1};
803}
804
805template<> EIGEN_STRONG_INLINE Packet2f padd<Packet2f>(const Packet2f& a, const Packet2f& b) { return vadd_f32(a,b); }
813template<> EIGEN_STRONG_INLINE Packet8c padd<Packet8c>(const Packet8c& a, const Packet8c& b) { return vadd_s8(a,b); }
823template<> EIGEN_STRONG_INLINE Packet4s padd<Packet4s>(const Packet4s& a, const Packet4s& b) { return vadd_s16(a,b); }
827template<> EIGEN_STRONG_INLINE Packet2i padd<Packet2i>(const Packet2i& a, const Packet2i& b) { return vadd_s32(a,b); }
833
834template<> EIGEN_STRONG_INLINE Packet2f psub<Packet2f>(const Packet2f& a, const Packet2f& b) { return vsub_f32(a,b); }
842template<> EIGEN_STRONG_INLINE Packet8c psub<Packet8c>(const Packet8c& a, const Packet8c& b) { return vsub_s8(a,b); }
852template<> EIGEN_STRONG_INLINE Packet4s psub<Packet4s>(const Packet4s& a, const Packet4s& b) { return vsub_s16(a,b); }
856template<> EIGEN_STRONG_INLINE Packet2i psub<Packet2i>(const Packet2i& a, const Packet2i& b) { return vsub_s32(a,b); }
862
865 Packet2f mask = {numext::bit_cast<float>(0x80000000u), 0.0f};
866 return padd(a, pxor(mask, b));
867}
870 Packet4f mask = {numext::bit_cast<float>(0x80000000u), 0.0f, numext::bit_cast<float>(0x80000000u), 0.0f};
871 return padd(a, pxor(mask, b));
872}
873
874template<> EIGEN_STRONG_INLINE Packet2f pnegate(const Packet2f& a) { return vneg_f32(a); }
875template<> EIGEN_STRONG_INLINE Packet4f pnegate(const Packet4f& a) { return vnegq_f32(a); }
878template<> EIGEN_STRONG_INLINE Packet8c pnegate(const Packet8c& a) { return vneg_s8(a); }
880template<> EIGEN_STRONG_INLINE Packet4s pnegate(const Packet4s& a) { return vneg_s16(a); }
881template<> EIGEN_STRONG_INLINE Packet8s pnegate(const Packet8s& a) { return vnegq_s16(a); }
882template<> EIGEN_STRONG_INLINE Packet2i pnegate(const Packet2i& a) { return vneg_s32(a); }
883template<> EIGEN_STRONG_INLINE Packet4i pnegate(const Packet4i& a) { return vnegq_s32(a); }
885#if EIGEN_ARCH_ARM64
886 return vnegq_s64(a);
887#else
888 return vcombine_s64(
891#endif
892}
893
894template<> EIGEN_STRONG_INLINE Packet2f pconj(const Packet2f& a) { return a; }
895template<> EIGEN_STRONG_INLINE Packet4f pconj(const Packet4f& a) { return a; }
896template<> EIGEN_STRONG_INLINE Packet4c pconj(const Packet4c& a) { return a; }
897template<> EIGEN_STRONG_INLINE Packet8c pconj(const Packet8c& a) { return a; }
898template<> EIGEN_STRONG_INLINE Packet16c pconj(const Packet16c& a) { return a; }
899template<> EIGEN_STRONG_INLINE Packet4uc pconj(const Packet4uc& a) { return a; }
900template<> EIGEN_STRONG_INLINE Packet8uc pconj(const Packet8uc& a) { return a; }
901template<> EIGEN_STRONG_INLINE Packet16uc pconj(const Packet16uc& a) { return a; }
902template<> EIGEN_STRONG_INLINE Packet4s pconj(const Packet4s& a) { return a; }
903template<> EIGEN_STRONG_INLINE Packet8s pconj(const Packet8s& a) { return a; }
904template<> EIGEN_STRONG_INLINE Packet4us pconj(const Packet4us& a) { return a; }
905template<> EIGEN_STRONG_INLINE Packet8us pconj(const Packet8us& a) { return a; }
906template<> EIGEN_STRONG_INLINE Packet2i pconj(const Packet2i& a) { return a; }
907template<> EIGEN_STRONG_INLINE Packet4i pconj(const Packet4i& a) { return a; }
908template<> EIGEN_STRONG_INLINE Packet2ui pconj(const Packet2ui& a) { return a; }
909template<> EIGEN_STRONG_INLINE Packet4ui pconj(const Packet4ui& a) { return a; }
910template<> EIGEN_STRONG_INLINE Packet2l pconj(const Packet2l& a) { return a; }
911template<> EIGEN_STRONG_INLINE Packet2ul pconj(const Packet2ul& a) { return a; }
912
913template<> EIGEN_STRONG_INLINE Packet2f pmul<Packet2f>(const Packet2f& a, const Packet2f& b) { return vmul_f32(a,b); }
921template<> EIGEN_STRONG_INLINE Packet8c pmul<Packet8c>(const Packet8c& a, const Packet8c& b) { return vmul_s8(a,b); }
931template<> EIGEN_STRONG_INLINE Packet4s pmul<Packet4s>(const Packet4s& a, const Packet4s& b) { return vmul_s16(a,b); }
935template<> EIGEN_STRONG_INLINE Packet2i pmul<Packet2i>(const Packet2i& a, const Packet2i& b) { return vmul_s32(a,b); }
949
951{
952#if EIGEN_ARCH_ARM64
953 return vdiv_f32(a,b);
954#else
955 Packet2f inv, restep, div;
956
957 // NEON does not offer a divide instruction, we have to do a reciprocal approximation
958 // However NEON in contrast to other SIMD engines (AltiVec/SSE), offers
959 // a reciprocal estimate AND a reciprocal step -which saves a few instructions
960 // vrecpeq_f32() returns an estimate to 1/b, which we will finetune with
961 // Newton-Raphson and vrecpsq_f32()
962 inv = vrecpe_f32(b);
963
964 // This returns a differential, by which we will have to multiply inv to get a better
965 // approximation of 1/b.
966 restep = vrecps_f32(b, inv);
967 inv = vmul_f32(restep, inv);
968
969 // Finally, multiply a by 1/b and get the wanted result of the division.
970 div = vmul_f32(a, inv);
971
972 return div;
973#endif
974}
976{
977#if EIGEN_ARCH_ARM64
978 return vdivq_f32(a,b);
979#else
980 Packet4f inv, restep, div;
981
982 // NEON does not offer a divide instruction, we have to do a reciprocal approximation
983 // However NEON in contrast to other SIMD engines (AltiVec/SSE), offers
984 // a reciprocal estimate AND a reciprocal step -which saves a few instructions
985 // vrecpeq_f32() returns an estimate to 1/b, which we will finetune with
986 // Newton-Raphson and vrecpsq_f32()
987 inv = vrecpeq_f32(b);
988
989 // This returns a differential, by which we will have to multiply inv to get a better
990 // approximation of 1/b.
991 restep = vrecpsq_f32(b, inv);
992 inv = vmulq_f32(restep, inv);
993
994 // Finally, multiply a by 1/b and get the wanted result of the division.
995 div = vmulq_f32(a, inv);
996
997 return div;
998#endif
999}
1000
1001template<> EIGEN_STRONG_INLINE Packet4c pdiv<Packet4c>(const Packet4c& /*a*/, const Packet4c& /*b*/)
1002{
1003 eigen_assert(false && "packet integer division are not supported by NEON");
1004 return pset1<Packet4c>(0);
1005}
1006template<> EIGEN_STRONG_INLINE Packet8c pdiv<Packet8c>(const Packet8c& /*a*/, const Packet8c& /*b*/)
1007{
1008 eigen_assert(false && "packet integer division are not supported by NEON");
1009 return pset1<Packet8c>(0);
1010}
1012{
1013 eigen_assert(false && "packet integer division are not supported by NEON");
1014 return pset1<Packet16c>(0);
1015}
1017{
1018 eigen_assert(false && "packet integer division are not supported by NEON");
1019 return pset1<Packet4uc>(0);
1020}
1022{
1023 eigen_assert(false && "packet integer division are not supported by NEON");
1024 return pset1<Packet8uc>(0);
1025}
1027{
1028 eigen_assert(false && "packet integer division are not supported by NEON");
1029 return pset1<Packet16uc>(0);
1030}
1031template<> EIGEN_STRONG_INLINE Packet4s pdiv<Packet4s>(const Packet4s& /*a*/, const Packet4s& /*b*/)
1032{
1033 eigen_assert(false && "packet integer division are not supported by NEON");
1034 return pset1<Packet4s>(0);
1035}
1036template<> EIGEN_STRONG_INLINE Packet8s pdiv<Packet8s>(const Packet8s& /*a*/, const Packet8s& /*b*/)
1037{
1038 eigen_assert(false && "packet integer division are not supported by NEON");
1039 return pset1<Packet8s>(0);
1040}
1042{
1043 eigen_assert(false && "packet integer division are not supported by NEON");
1044 return pset1<Packet4us>(0);
1045}
1047{
1048 eigen_assert(false && "packet integer division are not supported by NEON");
1049 return pset1<Packet8us>(0);
1050}
1051template<> EIGEN_STRONG_INLINE Packet2i pdiv<Packet2i>(const Packet2i& /*a*/, const Packet2i& /*b*/)
1052{
1053 eigen_assert(false && "packet integer division are not supported by NEON");
1054 return pset1<Packet2i>(0);
1055}
1056template<> EIGEN_STRONG_INLINE Packet4i pdiv<Packet4i>(const Packet4i& /*a*/, const Packet4i& /*b*/)
1057{
1058 eigen_assert(false && "packet integer division are not supported by NEON");
1059 return pset1<Packet4i>(0);
1060}
1062{
1063 eigen_assert(false && "packet integer division are not supported by NEON");
1064 return pset1<Packet2ui>(0);
1065}
1067{
1068 eigen_assert(false && "packet integer division are not supported by NEON");
1069 return pset1<Packet4ui>(0);
1070}
1071template<> EIGEN_STRONG_INLINE Packet2l pdiv<Packet2l>(const Packet2l& /*a*/, const Packet2l& /*b*/)
1072{
1073 eigen_assert(false && "packet integer division are not supported by NEON");
1074 return pset1<Packet2l>(0LL);
1075}
1077{
1078 eigen_assert(false && "packet integer division are not supported by NEON");
1079 return pset1<Packet2ul>(0ULL);
1080}
1081
1082
1083#ifdef __ARM_FEATURE_FMA
1084template<> EIGEN_STRONG_INLINE Packet4f pmadd(const Packet4f& a, const Packet4f& b, const Packet4f& c)
1085{ return vfmaq_f32(c,a,b); }
1086template<> EIGEN_STRONG_INLINE Packet2f pmadd(const Packet2f& a, const Packet2f& b, const Packet2f& c)
1087{ return vfma_f32(c,a,b); }
1088#else
1089template<> EIGEN_STRONG_INLINE Packet4f pmadd(const Packet4f& a, const Packet4f& b, const Packet4f& c)
1090{
1091 return vmlaq_f32(c,a,b);
1092}
1093template<> EIGEN_STRONG_INLINE Packet2f pmadd(const Packet2f& a, const Packet2f& b, const Packet2f& c)
1094{
1095 return vmla_f32(c,a,b);
1096}
1097#endif
1098
1099// No FMA instruction for int, so use MLA unconditionally.
1107template<> EIGEN_STRONG_INLINE Packet8c pmadd(const Packet8c& a, const Packet8c& b, const Packet8c& c)
1108{ return vmla_s8(c,a,b); }
1110{ return vmlaq_s8(c,a,b); }
1119{ return vmla_u8(c,a,b); }
1121{ return vmlaq_u8(c,a,b); }
1122template<> EIGEN_STRONG_INLINE Packet4s pmadd(const Packet4s& a, const Packet4s& b, const Packet4s& c)
1123{ return vmla_s16(c,a,b); }
1124template<> EIGEN_STRONG_INLINE Packet8s pmadd(const Packet8s& a, const Packet8s& b, const Packet8s& c)
1125{ return vmlaq_s16(c,a,b); }
1127{ return vmla_u16(c,a,b); }
1129{ return vmlaq_u16(c,a,b); }
1130template<> EIGEN_STRONG_INLINE Packet2i pmadd(const Packet2i& a, const Packet2i& b, const Packet2i& c)
1131{ return vmla_s32(c,a,b); }
1132template<> EIGEN_STRONG_INLINE Packet4i pmadd(const Packet4i& a, const Packet4i& b, const Packet4i& c)
1133{ return vmlaq_s32(c,a,b); }
1135{ return vmla_u32(c,a,b); }
1137{ return vmlaq_u32(c,a,b); }
1138
1140{ return vabd_f32(a,b); }
1142{ return vabdq_f32(a,b); }
1150{ return vabd_s8(a,b); }
1160{ return vabd_u8(a,b); }
1164{ return vabd_s16(a,b); }
1166{ return vabdq_s16(a,b); }
1172{ return vabd_s32(a,b); }
1174{ return vabdq_s32(a,b); }
1179
1182
1183#ifdef __ARM_FEATURE_NUMERIC_MAXMIN
1184// numeric max and min are only available if ARM_FEATURE_NUMERIC_MAXMIN is defined (which can only be the case for Armv8 systems).
1185template<> EIGEN_STRONG_INLINE Packet4f pmin<PropagateNumbers, Packet4f>(const Packet4f& a, const Packet4f& b) { return vminnmq_f32(a, b); }
1186template<> EIGEN_STRONG_INLINE Packet2f pmin<PropagateNumbers, Packet2f>(const Packet2f& a, const Packet2f& b) { return vminnm_f32(a, b); }
1187#endif
1188
1190
1192
1199template<> EIGEN_STRONG_INLINE Packet8c pmin<Packet8c>(const Packet8c& a, const Packet8c& b) { return vmin_s8(a,b); }
1218 return vcombine_s64(
1219 vdup_n_s64((std::min)(vgetq_lane_s64(a, 0), vgetq_lane_s64(b, 0))),
1220 vdup_n_s64((std::min)(vgetq_lane_s64(a, 1), vgetq_lane_s64(b, 1))));
1221}
1223 return vcombine_u64(
1224 vdup_n_u64((std::min)(vgetq_lane_u64(a, 0), vgetq_lane_u64(b, 0))),
1225 vdup_n_u64((std::min)(vgetq_lane_u64(a, 1), vgetq_lane_u64(b, 1))));
1226}
1227
1230
1231#ifdef __ARM_FEATURE_NUMERIC_MAXMIN
1232// numeric max and min are only available if ARM_FEATURE_NUMERIC_MAXMIN is defined (which can only be the case for Armv8 systems).
1233template<> EIGEN_STRONG_INLINE Packet4f pmax<PropagateNumbers, Packet4f>(const Packet4f& a, const Packet4f& b) { return vmaxnmq_f32(a, b); }
1234template<> EIGEN_STRONG_INLINE Packet2f pmax<PropagateNumbers, Packet2f>(const Packet2f& a, const Packet2f& b) { return vmaxnm_f32(a, b); }
1235#endif
1236
1238
1240
1247template<> EIGEN_STRONG_INLINE Packet8c pmax<Packet8c>(const Packet8c& a, const Packet8c& b) { return vmax_s8(a,b); }
1266 return vcombine_s64(
1267 vdup_n_s64((std::max)(vgetq_lane_s64(a, 0), vgetq_lane_s64(b, 0))),
1268 vdup_n_s64((std::max)(vgetq_lane_s64(a, 1), vgetq_lane_s64(b, 1))));
1269}
1271 return vcombine_u64(
1272 vdup_n_u64((std::max)(vgetq_lane_u64(a, 0), vgetq_lane_u64(b, 0))),
1273 vdup_n_u64((std::max)(vgetq_lane_u64(a, 1), vgetq_lane_u64(b, 1))));
1274}
1275
1297{ return vcle_u8(a,b); }
1305{ return vcle_u16(a,b); }
1313{ return vcle_u32(a,b); }
1317{
1318#if EIGEN_ARCH_ARM64
1320#else
1321 return vcombine_s64(
1324#endif
1325}
1327{
1328#if EIGEN_ARCH_ARM64
1329 return vcleq_u64(a,b);
1330#else
1331 return vcombine_u64(
1334#endif
1335}
1336
1358{ return vclt_u8(a,b); }
1366{ return vclt_u16(a,b); }
1374{ return vclt_u32(a,b); }
1378{
1379#if EIGEN_ARCH_ARM64
1381#else
1382 return vcombine_s64(
1385#endif
1386}
1388{
1389#if EIGEN_ARCH_ARM64
1390 return vcltq_u64(a,b);
1391#else
1392 return vcombine_u64(
1395#endif
1396}
1397
1419{ return vceq_u8(a,b); }
1427{ return vceq_u16(a,b); }
1435{ return vceq_u32(a,b); }
1439{
1440#if EIGEN_ARCH_ARM64
1442#else
1443 return vcombine_s64(
1446#endif
1447}
1449{
1450#if EIGEN_ARCH_ARM64
1451 return vceqq_u64(a,b);
1452#else
1453 return vcombine_u64(
1456#endif
1457}
1458
1463
1464// Logical Operations are not supported for float, so we have to reinterpret casts using NEON intrinsics
1470{ return a & b; }
1472{ return vand_s8(a,b); }
1474{ return vandq_s8(a,b); }
1476{ return a & b; }
1478{ return vand_u8(a,b); }
1484{ return vand_u16(a,b); }
1486{ return vandq_u16(a,b); }
1490{ return vand_u32(a,b); }
1492{ return vandq_u32(a,b); }
1495{ return vandq_u64(a,b); }
1496
1502{ return a | b; }
1503template<> EIGEN_STRONG_INLINE Packet8c por<Packet8c>(const Packet8c& a, const Packet8c& b) { return vorr_s8(a,b); }
1505{ return vorrq_s8(a,b); }
1507{ return a | b; }
1509{ return vorr_u8(a,b); }
1511{ return vorrq_u8(a,b); }
1513{ return vorr_s16(a,b); }
1515{ return vorrq_s16(a,b); }
1517{ return vorr_u16(a,b); }
1519{ return vorrq_u16(a,b); }
1520template<> EIGEN_STRONG_INLINE Packet2i por<Packet2i>(const Packet2i& a, const Packet2i& b) { return vorr_s32(a,b); }
1523{ return vorr_u32(a,b); }
1525{ return vorrq_u32(a,b); }
1527{ return vorrq_s64(a,b); }
1529{ return vorrq_u64(a,b); }
1530
1536{ return a ^ b; }
1538{ return veor_s8(a,b); }
1540{ return veorq_s8(a,b); }
1542{ return a ^ b; }
1544{ return veor_u8(a,b); }
1550{ return veor_u16(a,b); }
1552{ return veorq_u16(a,b); }
1556{ return veor_u32(a,b); }
1558{ return veorq_u32(a,b); }
1560{ return veorq_s64(a,b); }
1562{ return veorq_u64(a,b); }
1563
1569{ return a & ~b; }
1573{ return a & ~b; }
1575{ return vbic_u8(a,b); }
1579{ return vbic_s16(a,b); }
1581{ return vbicq_s16(a,b); }
1583{ return vbic_u16(a,b); }
1587{ return vbic_s32(a,b); }
1589{ return vbicq_s32(a,b); }
1591{ return vbic_u32(a,b); }
1595{ return vbicq_s64(a,b); }
1598
1599
1618
1644
1663
1669{
1670 Packet4c res;
1671 memcpy(&res, from, sizeof(Packet4c));
1672 return res;
1673}
1679{
1680 Packet4uc res;
1681 memcpy(&res, from, sizeof(Packet4uc));
1682 return res;
1683}
1708
1714{
1715 Packet4c res;
1716 memcpy(&res, from, sizeof(Packet4c));
1717 return res;
1718}
1724{
1725 Packet4uc res;
1726 memcpy(&res, from, sizeof(Packet4uc));
1727 return res;
1728}
1753
1755{ return vld1_dup_f32(from); }
1764{
1765 const int8x8_t a = vld1_s8(from);
1766 return vzip_s8(a,a).val[0];
1767}
1769{
1770 const int8x8_t a = vld1_s8(from);
1771 const int8x8x2_t b = vzip_s8(a,a);
1772 return vcombine_s8(b.val[0], b.val[1]);
1773}
1780{
1781 const uint8x8_t a = vld1_u8(from);
1782 return vzip_u8(a,a).val[0];
1783}
1785{
1786 const uint8x8_t a = vld1_u8(from);
1787 const uint8x8x2_t b = vzip_u8(a,a);
1788 return vcombine_u8(b.val[0], b.val[1]);
1789}
1796{
1797 const int16x4_t a = vld1_s16(from);
1798 const int16x4x2_t b = vzip_s16(a,a);
1799 return vcombine_s16(b.val[0], b.val[1]);
1800}
1807{
1808 const uint16x4_t a = vld1_u16(from);
1809 const uint16x4x2_t b = vzip_u16(a,a);
1810 return vcombine_u16(b.val[0], b.val[1]);
1811}
1813{ return vld1_dup_s32(from); }
1817{ return vld1_dup_u32(from); }
1821{ return vld1q_dup_s64(from); }
1823{ return vld1q_dup_u64(from); }
1824
1868
1873template<> EIGEN_STRONG_INLINE void pstore<int8_t>(int8_t* to, const Packet4c& from)
1874{ memcpy(to, &from, sizeof(from)); }
1879template<> EIGEN_STRONG_INLINE void pstore<uint8_t>(uint8_t* to, const Packet4uc& from)
1880{ memcpy(to, &from, sizeof(from)); }
1905
1910template<> EIGEN_STRONG_INLINE void pstoreu<int8_t>(int8_t* to, const Packet4c& from)
1911{ memcpy(to, &from, sizeof(from)); }
1916template<> EIGEN_STRONG_INLINE void pstoreu<uint8_t>(uint8_t* to, const Packet4uc& from)
1917{ memcpy(to, &from, sizeof(from)); }
1942
1944{
1946 res = vld1_lane_f32(from + 1*stride, res, 1);
1947 return res;
1948}
1950{
1952 res = vld1q_lane_f32(from + 1*stride, res, 1);
1953 res = vld1q_lane_f32(from + 2*stride, res, 2);
1954 res = vld1q_lane_f32(from + 3*stride, res, 3);
1955 return res;
1956}
1958{
1959 Packet4c res;
1960 for (int i = 0; i != 4; i++)
1961 reinterpret_cast<int8_t*>(&res)[i] = *(from + i * stride);
1962 return res;
1963}
1965{
1967 res = vld1_lane_s8(from + 1*stride, res, 1);
1968 res = vld1_lane_s8(from + 2*stride, res, 2);
1969 res = vld1_lane_s8(from + 3*stride, res, 3);
1970 res = vld1_lane_s8(from + 4*stride, res, 4);
1971 res = vld1_lane_s8(from + 5*stride, res, 5);
1972 res = vld1_lane_s8(from + 6*stride, res, 6);
1973 res = vld1_lane_s8(from + 7*stride, res, 7);
1974 return res;
1975}
1977{
1979 res = vld1q_lane_s8(from + 1*stride, res, 1);
1980 res = vld1q_lane_s8(from + 2*stride, res, 2);
1981 res = vld1q_lane_s8(from + 3*stride, res, 3);
1982 res = vld1q_lane_s8(from + 4*stride, res, 4);
1983 res = vld1q_lane_s8(from + 5*stride, res, 5);
1984 res = vld1q_lane_s8(from + 6*stride, res, 6);
1985 res = vld1q_lane_s8(from + 7*stride, res, 7);
1986 res = vld1q_lane_s8(from + 8*stride, res, 8);
1987 res = vld1q_lane_s8(from + 9*stride, res, 9);
1988 res = vld1q_lane_s8(from + 10*stride, res, 10);
1989 res = vld1q_lane_s8(from + 11*stride, res, 11);
1990 res = vld1q_lane_s8(from + 12*stride, res, 12);
1991 res = vld1q_lane_s8(from + 13*stride, res, 13);
1992 res = vld1q_lane_s8(from + 14*stride, res, 14);
1993 res = vld1q_lane_s8(from + 15*stride, res, 15);
1994 return res;
1995}
1997{
1998 Packet4uc res;
1999 for (int i = 0; i != 4; i++)
2000 reinterpret_cast<uint8_t*>(&res)[i] = *(from + i * stride);
2001 return res;
2002}
2004{
2006 res = vld1_lane_u8(from + 1*stride, res, 1);
2007 res = vld1_lane_u8(from + 2*stride, res, 2);
2008 res = vld1_lane_u8(from + 3*stride, res, 3);
2009 res = vld1_lane_u8(from + 4*stride, res, 4);
2010 res = vld1_lane_u8(from + 5*stride, res, 5);
2011 res = vld1_lane_u8(from + 6*stride, res, 6);
2012 res = vld1_lane_u8(from + 7*stride, res, 7);
2013 return res;
2014}
2016{
2018 res = vld1q_lane_u8(from + 1*stride, res, 1);
2019 res = vld1q_lane_u8(from + 2*stride, res, 2);
2020 res = vld1q_lane_u8(from + 3*stride, res, 3);
2021 res = vld1q_lane_u8(from + 4*stride, res, 4);
2022 res = vld1q_lane_u8(from + 5*stride, res, 5);
2023 res = vld1q_lane_u8(from + 6*stride, res, 6);
2024 res = vld1q_lane_u8(from + 7*stride, res, 7);
2025 res = vld1q_lane_u8(from + 8*stride, res, 8);
2026 res = vld1q_lane_u8(from + 9*stride, res, 9);
2027 res = vld1q_lane_u8(from + 10*stride, res, 10);
2028 res = vld1q_lane_u8(from + 11*stride, res, 11);
2029 res = vld1q_lane_u8(from + 12*stride, res, 12);
2030 res = vld1q_lane_u8(from + 13*stride, res, 13);
2031 res = vld1q_lane_u8(from + 14*stride, res, 14);
2032 res = vld1q_lane_u8(from + 15*stride, res, 15);
2033 return res;
2034}
2036{
2038 res = vld1_lane_s16(from + 1*stride, res, 1);
2039 res = vld1_lane_s16(from + 2*stride, res, 2);
2040 res = vld1_lane_s16(from + 3*stride, res, 3);
2041 return res;
2042}
2044{
2046 res = vld1q_lane_s16(from + 1*stride, res, 1);
2047 res = vld1q_lane_s16(from + 2*stride, res, 2);
2048 res = vld1q_lane_s16(from + 3*stride, res, 3);
2049 res = vld1q_lane_s16(from + 4*stride, res, 4);
2050 res = vld1q_lane_s16(from + 5*stride, res, 5);
2051 res = vld1q_lane_s16(from + 6*stride, res, 6);
2052 res = vld1q_lane_s16(from + 7*stride, res, 7);
2053 return res;
2054}
2056{
2058 res = vld1_lane_u16(from + 1*stride, res, 1);
2059 res = vld1_lane_u16(from + 2*stride, res, 2);
2060 res = vld1_lane_u16(from + 3*stride, res, 3);
2061 return res;
2062}
2064{
2066 res = vld1q_lane_u16(from + 1*stride, res, 1);
2067 res = vld1q_lane_u16(from + 2*stride, res, 2);
2068 res = vld1q_lane_u16(from + 3*stride, res, 3);
2069 res = vld1q_lane_u16(from + 4*stride, res, 4);
2070 res = vld1q_lane_u16(from + 5*stride, res, 5);
2071 res = vld1q_lane_u16(from + 6*stride, res, 6);
2072 res = vld1q_lane_u16(from + 7*stride, res, 7);
2073 return res;
2074}
2076{
2078 res = vld1_lane_s32(from + 1*stride, res, 1);
2079 return res;
2080}
2082{
2084 res = vld1q_lane_s32(from + 1*stride, res, 1);
2085 res = vld1q_lane_s32(from + 2*stride, res, 2);
2086 res = vld1q_lane_s32(from + 3*stride, res, 3);
2087 return res;
2088}
2090{
2092 res = vld1_lane_u32(from + 1*stride, res, 1);
2093 return res;
2094}
2096{
2098 res = vld1q_lane_u32(from + 1*stride, res, 1);
2099 res = vld1q_lane_u32(from + 2*stride, res, 2);
2100 res = vld1q_lane_u32(from + 3*stride, res, 3);
2101 return res;
2102}
2104{
2106 res = vld1q_lane_s64(from + 1*stride, res, 1);
2107 return res;
2108}
2110{
2112 res = vld1q_lane_u64(from + 1*stride, res, 1);
2113 return res;
2114}
2115
2117{
2118 vst1_lane_f32(to + stride*0, from, 0);
2119 vst1_lane_f32(to + stride*1, from, 1);
2120}
2122{
2123 vst1q_lane_f32(to + stride*0, from, 0);
2124 vst1q_lane_f32(to + stride*1, from, 1);
2125 vst1q_lane_f32(to + stride*2, from, 2);
2126 vst1q_lane_f32(to + stride*3, from, 3);
2127}
2129{
2130 for (int i = 0; i != 4; i++)
2131 *(to + i * stride) = reinterpret_cast<const int8_t*>(&from)[i];
2132}
2134{
2135 vst1_lane_s8(to + stride*0, from, 0);
2136 vst1_lane_s8(to + stride*1, from, 1);
2137 vst1_lane_s8(to + stride*2, from, 2);
2138 vst1_lane_s8(to + stride*3, from, 3);
2139 vst1_lane_s8(to + stride*4, from, 4);
2140 vst1_lane_s8(to + stride*5, from, 5);
2141 vst1_lane_s8(to + stride*6, from, 6);
2142 vst1_lane_s8(to + stride*7, from, 7);
2143}
2145{
2146 vst1q_lane_s8(to + stride*0, from, 0);
2147 vst1q_lane_s8(to + stride*1, from, 1);
2148 vst1q_lane_s8(to + stride*2, from, 2);
2149 vst1q_lane_s8(to + stride*3, from, 3);
2150 vst1q_lane_s8(to + stride*4, from, 4);
2151 vst1q_lane_s8(to + stride*5, from, 5);
2152 vst1q_lane_s8(to + stride*6, from, 6);
2153 vst1q_lane_s8(to + stride*7, from, 7);
2154 vst1q_lane_s8(to + stride*8, from, 8);
2155 vst1q_lane_s8(to + stride*9, from, 9);
2156 vst1q_lane_s8(to + stride*10, from, 10);
2157 vst1q_lane_s8(to + stride*11, from, 11);
2158 vst1q_lane_s8(to + stride*12, from, 12);
2159 vst1q_lane_s8(to + stride*13, from, 13);
2160 vst1q_lane_s8(to + stride*14, from, 14);
2161 vst1q_lane_s8(to + stride*15, from, 15);
2162}
2164{
2165 for (int i = 0; i != 4; i++)
2166 *(to + i * stride) = reinterpret_cast<const uint8_t*>(&from)[i];
2167}
2169{
2170 vst1_lane_u8(to + stride*0, from, 0);
2171 vst1_lane_u8(to + stride*1, from, 1);
2172 vst1_lane_u8(to + stride*2, from, 2);
2173 vst1_lane_u8(to + stride*3, from, 3);
2174 vst1_lane_u8(to + stride*4, from, 4);
2175 vst1_lane_u8(to + stride*5, from, 5);
2176 vst1_lane_u8(to + stride*6, from, 6);
2177 vst1_lane_u8(to + stride*7, from, 7);
2178}
2180{
2181 vst1q_lane_u8(to + stride*0, from, 0);
2182 vst1q_lane_u8(to + stride*1, from, 1);
2183 vst1q_lane_u8(to + stride*2, from, 2);
2184 vst1q_lane_u8(to + stride*3, from, 3);
2185 vst1q_lane_u8(to + stride*4, from, 4);
2186 vst1q_lane_u8(to + stride*5, from, 5);
2187 vst1q_lane_u8(to + stride*6, from, 6);
2188 vst1q_lane_u8(to + stride*7, from, 7);
2189 vst1q_lane_u8(to + stride*8, from, 8);
2190 vst1q_lane_u8(to + stride*9, from, 9);
2191 vst1q_lane_u8(to + stride*10, from, 10);
2192 vst1q_lane_u8(to + stride*11, from, 11);
2193 vst1q_lane_u8(to + stride*12, from, 12);
2194 vst1q_lane_u8(to + stride*13, from, 13);
2195 vst1q_lane_u8(to + stride*14, from, 14);
2196 vst1q_lane_u8(to + stride*15, from, 15);
2197}
2199{
2200 vst1_lane_s16(to + stride*0, from, 0);
2201 vst1_lane_s16(to + stride*1, from, 1);
2202 vst1_lane_s16(to + stride*2, from, 2);
2203 vst1_lane_s16(to + stride*3, from, 3);
2204}
2206{
2207 vst1q_lane_s16(to + stride*0, from, 0);
2208 vst1q_lane_s16(to + stride*1, from, 1);
2209 vst1q_lane_s16(to + stride*2, from, 2);
2210 vst1q_lane_s16(to + stride*3, from, 3);
2211 vst1q_lane_s16(to + stride*4, from, 4);
2212 vst1q_lane_s16(to + stride*5, from, 5);
2213 vst1q_lane_s16(to + stride*6, from, 6);
2214 vst1q_lane_s16(to + stride*7, from, 7);
2215}
2217{
2218 vst1_lane_u16(to + stride*0, from, 0);
2219 vst1_lane_u16(to + stride*1, from, 1);
2220 vst1_lane_u16(to + stride*2, from, 2);
2221 vst1_lane_u16(to + stride*3, from, 3);
2222}
2224{
2225 vst1q_lane_u16(to + stride*0, from, 0);
2226 vst1q_lane_u16(to + stride*1, from, 1);
2227 vst1q_lane_u16(to + stride*2, from, 2);
2228 vst1q_lane_u16(to + stride*3, from, 3);
2229 vst1q_lane_u16(to + stride*4, from, 4);
2230 vst1q_lane_u16(to + stride*5, from, 5);
2231 vst1q_lane_u16(to + stride*6, from, 6);
2232 vst1q_lane_u16(to + stride*7, from, 7);
2233}
2235{
2236 vst1_lane_s32(to + stride*0, from, 0);
2237 vst1_lane_s32(to + stride*1, from, 1);
2238}
2240{
2241 vst1q_lane_s32(to + stride*0, from, 0);
2242 vst1q_lane_s32(to + stride*1, from, 1);
2243 vst1q_lane_s32(to + stride*2, from, 2);
2244 vst1q_lane_s32(to + stride*3, from, 3);
2245}
2247{
2248 vst1_lane_u32(to + stride*0, from, 0);
2249 vst1_lane_u32(to + stride*1, from, 1);
2250}
2252{
2253 vst1q_lane_u32(to + stride*0, from, 0);
2254 vst1q_lane_u32(to + stride*1, from, 1);
2255 vst1q_lane_u32(to + stride*2, from, 2);
2256 vst1q_lane_u32(to + stride*3, from, 3);
2257}
2259{
2260 vst1q_lane_s64(to + stride*0, from, 0);
2261 vst1q_lane_s64(to + stride*1, from, 1);
2262}
2264{
2265 vst1q_lane_u64(to + stride*0, from, 0);
2266 vst1q_lane_u64(to + stride*1, from, 1);
2267}
2268
2278
2279template<> EIGEN_STRONG_INLINE float pfirst<Packet2f>(const Packet2f& a) { return vget_lane_f32(a,0); }
2280template<> EIGEN_STRONG_INLINE float pfirst<Packet4f>(const Packet4f& a) { return vgetq_lane_f32(a,0); }
2281template<> EIGEN_STRONG_INLINE int8_t pfirst<Packet4c>(const Packet4c& a) { return static_cast<int8_t>(a & 0xff); }
2282template<> EIGEN_STRONG_INLINE int8_t pfirst<Packet8c>(const Packet8c& a) { return vget_lane_s8(a,0); }
2283template<> EIGEN_STRONG_INLINE int8_t pfirst<Packet16c>(const Packet16c& a) { return vgetq_lane_s8(a,0); }
2284template<> EIGEN_STRONG_INLINE uint8_t pfirst<Packet4uc>(const Packet4uc& a) { return static_cast<uint8_t>(a & 0xff); }
2285template<> EIGEN_STRONG_INLINE uint8_t pfirst<Packet8uc>(const Packet8uc& a) { return vget_lane_u8(a,0); }
2286template<> EIGEN_STRONG_INLINE uint8_t pfirst<Packet16uc>(const Packet16uc& a) { return vgetq_lane_u8(a,0); }
2287template<> EIGEN_STRONG_INLINE int16_t pfirst<Packet4s>(const Packet4s& a) { return vget_lane_s16(a,0); }
2288template<> EIGEN_STRONG_INLINE int16_t pfirst<Packet8s>(const Packet8s& a) { return vgetq_lane_s16(a,0); }
2289template<> EIGEN_STRONG_INLINE uint16_t pfirst<Packet4us>(const Packet4us& a) { return vget_lane_u16(a,0); }
2290template<> EIGEN_STRONG_INLINE uint16_t pfirst<Packet8us>(const Packet8us& a) { return vgetq_lane_u16(a,0); }
2291template<> EIGEN_STRONG_INLINE int32_t pfirst<Packet2i>(const Packet2i& a) { return vget_lane_s32(a,0); }
2292template<> EIGEN_STRONG_INLINE int32_t pfirst<Packet4i>(const Packet4i& a) { return vgetq_lane_s32(a,0); }
2293template<> EIGEN_STRONG_INLINE uint32_t pfirst<Packet2ui>(const Packet2ui& a) { return vget_lane_u32(a,0); }
2294template<> EIGEN_STRONG_INLINE uint32_t pfirst<Packet4ui>(const Packet4ui& a) { return vgetq_lane_u32(a,0); }
2295template<> EIGEN_STRONG_INLINE int64_t pfirst<Packet2l>(const Packet2l& a) { return vgetq_lane_s64(a,0); }
2296template<> EIGEN_STRONG_INLINE uint64_t pfirst<Packet2ul>(const Packet2ul& a) { return vgetq_lane_u64(a,0); }
2297
2348
2349template<> EIGEN_STRONG_INLINE Packet2f pabs(const Packet2f& a) { return vabs_f32(a); }
2350template<> EIGEN_STRONG_INLINE Packet4f pabs(const Packet4f& a) { return vabsq_f32(a); }
2353template<> EIGEN_STRONG_INLINE Packet8c pabs(const Packet8c& a) { return vabs_s8(a); }
2354template<> EIGEN_STRONG_INLINE Packet16c pabs(const Packet16c& a) { return vabsq_s8(a); }
2355template<> EIGEN_STRONG_INLINE Packet4uc pabs(const Packet4uc& a) { return a; }
2356template<> EIGEN_STRONG_INLINE Packet8uc pabs(const Packet8uc& a) { return a; }
2357template<> EIGEN_STRONG_INLINE Packet16uc pabs(const Packet16uc& a) { return a; }
2358template<> EIGEN_STRONG_INLINE Packet4s pabs(const Packet4s& a) { return vabs_s16(a); }
2359template<> EIGEN_STRONG_INLINE Packet8s pabs(const Packet8s& a) { return vabsq_s16(a); }
2360template<> EIGEN_STRONG_INLINE Packet4us pabs(const Packet4us& a) { return a; }
2361template<> EIGEN_STRONG_INLINE Packet8us pabs(const Packet8us& a) { return a; }
2362template<> EIGEN_STRONG_INLINE Packet2i pabs(const Packet2i& a) { return vabs_s32(a); }
2363template<> EIGEN_STRONG_INLINE Packet4i pabs(const Packet4i& a) { return vabsq_s32(a); }
2364template<> EIGEN_STRONG_INLINE Packet2ui pabs(const Packet2ui& a) { return a; }
2365template<> EIGEN_STRONG_INLINE Packet4ui pabs(const Packet4ui& a) { return a; }
2367#if EIGEN_ARCH_ARM64
2368 return vabsq_s64(a);
2369#else
2370 return vcombine_s64(
2371 vdup_n_s64((std::abs)(vgetq_lane_s64(a, 0))),
2372 vdup_n_s64((std::abs)(vgetq_lane_s64(a, 1))));
2373#endif
2374}
2375template<> EIGEN_STRONG_INLINE Packet2ul pabs(const Packet2ul& a) { return a; }
2376
2381
2386
2387template<> EIGEN_STRONG_INLINE float predux<Packet2f>(const Packet2f& a) { return vget_lane_f32(vpadd_f32(a,a), 0); }
2389{
2391 return vget_lane_f32(vpadd_f32(sum, sum), 0);
2392}
2394{
2396 int8x8_t sum = vpadd_s8(a_dup, a_dup);
2397 sum = vpadd_s8(sum, sum);
2398 return vget_lane_s8(sum, 0);
2399}
2401{
2402 int8x8_t sum = vpadd_s8(a,a);
2403 sum = vpadd_s8(sum, sum);
2404 sum = vpadd_s8(sum, sum);
2405 return vget_lane_s8(sum, 0);
2406}
2408{
2410 sum = vpadd_s8(sum, sum);
2411 sum = vpadd_s8(sum, sum);
2412 sum = vpadd_s8(sum, sum);
2413 return vget_lane_s8(sum, 0);
2414}
2416{
2418 uint8x8_t sum = vpadd_u8(a_dup, a_dup);
2419 sum = vpadd_u8(sum, sum);
2420 return vget_lane_u8(sum, 0);
2421}
2423{
2424 uint8x8_t sum = vpadd_u8(a,a);
2425 sum = vpadd_u8(sum, sum);
2426 sum = vpadd_u8(sum, sum);
2427 return vget_lane_u8(sum, 0);
2428}
2430{
2432 sum = vpadd_u8(sum, sum);
2433 sum = vpadd_u8(sum, sum);
2434 sum = vpadd_u8(sum, sum);
2435 return vget_lane_u8(sum, 0);
2436}
2438{
2439 const int16x4_t sum = vpadd_s16(a,a);
2440 return vget_lane_s16(vpadd_s16(sum, sum), 0);
2441}
2443{
2445 sum = vpadd_s16(sum, sum);
2446 sum = vpadd_s16(sum, sum);
2447 return vget_lane_s16(sum, 0);
2448}
2450{
2451 const uint16x4_t sum = vpadd_u16(a,a);
2452 return vget_lane_u16(vpadd_u16(sum, sum), 0);
2453}
2455{
2457 sum = vpadd_u16(sum, sum);
2458 sum = vpadd_u16(sum, sum);
2459 return vget_lane_u16(sum, 0);
2460}
2461template<> EIGEN_STRONG_INLINE int32_t predux<Packet2i>(const Packet2i& a) { return vget_lane_s32(vpadd_s32(a,a), 0); }
2463{
2465 return vget_lane_s32(vpadd_s32(sum, sum), 0);
2466}
2467template<> EIGEN_STRONG_INLINE uint32_t predux<Packet2ui>(const Packet2ui& a) { return vget_lane_u32(vpadd_u32(a,a), 0); }
2469{
2471 return vget_lane_u32(vpadd_u32(sum, sum), 0);
2472}
2474{ return vgetq_lane_s64(a, 0) + vgetq_lane_s64(a, 1); }
2476{ return vgetq_lane_u64(a, 0) + vgetq_lane_u64(a, 1); }
2477
2496
2497// Other reduction functions:
2498// mul
2500{ return vget_lane_f32(a, 0) * vget_lane_f32(a, 1); }
2510{
2513 return vget_lane_s8(prod, 0) * vget_lane_s8(prod, 4);
2514}
2524{
2527 return vget_lane_u8(prod, 0) * vget_lane_u8(prod, 4);
2528}
2532{
2533 const int16x4_t prod = vmul_s16(a, vrev32_s16(a));
2534 return vget_lane_s16(prod, 0) * vget_lane_s16(prod, 2);
2535}
2537{
2539
2540 // Get the product of a_lo * a_hi -> |a1*a5|a2*a6|a3*a7|a4*a8|
2542 // Swap and multiply |a1*a5*a2*a6|a3*a7*a4*a8|
2544 // Multiply |a1*a5*a2*a6*a3*a7*a4*a8|
2545 return vget_lane_s16(prod, 0) * vget_lane_s16(prod, 2);
2546}
2548{
2549 const uint16x4_t prod = vmul_u16(a, vrev32_u16(a));
2550 return vget_lane_u16(prod, 0) * vget_lane_u16(prod, 2);
2551}
2553{
2555
2556 // Get the product of a_lo * a_hi -> |a1*a5|a2*a6|a3*a7|a4*a8|
2558 // Swap and multiply |a1*a5*a2*a6|a3*a7*a4*a8|
2560 // Multiply |a1*a5*a2*a6*a3*a7*a4*a8|
2561 return vget_lane_u16(prod, 0) * vget_lane_u16(prod, 2);
2562}
2564{ return vget_lane_s32(a, 0) * vget_lane_s32(a, 1); }
2568{ return vget_lane_u32(a, 0) * vget_lane_u32(a, 1); }
2572{ return vgetq_lane_s64(a, 0) * vgetq_lane_s64(a, 1); }
2574{ return vgetq_lane_u64(a, 0) * vgetq_lane_u64(a, 1); }
2575
2576// min
2578{ return vget_lane_f32(vpmin_f32(a,a), 0); }
2580{
2582 return vget_lane_f32(vpmin_f32(min, min), 0);
2583}
2585{
2588 min = vpmin_s8(min, min);
2589 return vget_lane_s8(min, 0);
2590}
2592{
2593 int8x8_t min = vpmin_s8(a,a);
2594 min = vpmin_s8(min, min);
2595 min = vpmin_s8(min, min);
2596 return vget_lane_s8(min, 0);
2597}
2599{
2601 min = vpmin_s8(min, min);
2602 min = vpmin_s8(min, min);
2603 min = vpmin_s8(min, min);
2604 return vget_lane_s8(min, 0);
2605}
2607{
2610 min = vpmin_u8(min, min);
2611 return vget_lane_u8(min, 0);
2612}
2614{
2616 min = vpmin_u8(min, min);
2617 min = vpmin_u8(min, min);
2618 return vget_lane_u8(min, 0);
2619}
2621{
2623 min = vpmin_u8(min, min);
2624 min = vpmin_u8(min, min);
2625 min = vpmin_u8(min, min);
2626 return vget_lane_u8(min, 0);
2627}
2629{
2630 const int16x4_t min = vpmin_s16(a,a);
2631 return vget_lane_s16(vpmin_s16(min, min), 0);
2632}
2634{
2636 min = vpmin_s16(min, min);
2637 min = vpmin_s16(min, min);
2638 return vget_lane_s16(min, 0);
2639}
2641{
2642 const uint16x4_t min = vpmin_u16(a,a);
2643 return vget_lane_u16(vpmin_u16(min, min), 0);
2644}
2646{
2648 min = vpmin_u16(min, min);
2649 min = vpmin_u16(min, min);
2650 return vget_lane_u16(min, 0);
2651}
2653{ return vget_lane_s32(vpmin_s32(a,a), 0); }
2655{
2657 return vget_lane_s32(vpmin_s32(min, min), 0);
2658}
2660{ return vget_lane_u32(vpmin_u32(a,a), 0); }
2662{
2664 return vget_lane_u32(vpmin_u32(min, min), 0);
2665}
2667{ return (std::min)(vgetq_lane_s64(a, 0), vgetq_lane_s64(a, 1)); }
2669{ return (std::min)(vgetq_lane_u64(a, 0), vgetq_lane_u64(a, 1)); }
2670
2671// max
2673{ return vget_lane_f32(vpmax_f32(a,a), 0); }
2675{
2677 return vget_lane_f32(vpmax_f32(max, max), 0);
2678}
2680{
2683 max = vpmax_s8(max, max);
2684 return vget_lane_s8(max, 0);
2685}
2687{
2688 int8x8_t max = vpmax_s8(a,a);
2689 max = vpmax_s8(max, max);
2690 max = vpmax_s8(max, max);
2691 return vget_lane_s8(max, 0);
2692}
2694{
2696 max = vpmax_s8(max, max);
2697 max = vpmax_s8(max, max);
2698 max = vpmax_s8(max, max);
2699 return vget_lane_s8(max, 0);
2700}
2702{
2705 max = vpmax_u8(max, max);
2706 return vget_lane_u8(max, 0);
2707}
2709{
2711 max = vpmax_u8(max, max);
2712 max = vpmax_u8(max, max);
2713 return vget_lane_u8(max, 0);
2714}
2716{
2718 max = vpmax_u8(max, max);
2719 max = vpmax_u8(max, max);
2720 max = vpmax_u8(max, max);
2721 return vget_lane_u8(max, 0);
2722}
2724{
2725 const int16x4_t max = vpmax_s16(a,a);
2726 return vget_lane_s16(vpmax_s16(max, max), 0);
2727}
2729{
2731 max = vpmax_s16(max, max);
2732 max = vpmax_s16(max, max);
2733 return vget_lane_s16(max, 0);
2734}
2736{
2737 const uint16x4_t max = vpmax_u16(a,a);
2738 return vget_lane_u16(vpmax_u16(max, max), 0);
2739}
2741{
2743 max = vpmax_u16(max, max);
2744 max = vpmax_u16(max, max);
2745 return vget_lane_u16(max, 0);
2746}
2748{ return vget_lane_s32(vpmax_s32(a,a), 0); }
2750{
2752 return vget_lane_s32(vpmax_s32(max, max), 0);
2753}
2755{ return vget_lane_u32(vpmax_u32(a,a), 0); }
2757{
2759 return vget_lane_u32(vpmax_u32(max, max), 0);
2760}
2762{ return (std::max)(vgetq_lane_s64(a, 0), vgetq_lane_s64(a, 1)); }
2764{ return (std::max)(vgetq_lane_u64(a, 0), vgetq_lane_u64(a, 1)); }
2765
2772
2773// Helpers for ptranspose.
2774namespace detail {
2775
2776template<typename Packet>
2778
2779template<>
2781 const float32x2x2_t tmp = vzip_f32(p1, p2);
2782 p1 = tmp.val[0];
2783 p2 = tmp.val[1];
2784}
2785
2786template<>
2788 const float32x4x2_t tmp = vzipq_f32(p1, p2);
2789 p1 = tmp.val[0];
2790 p2 = tmp.val[1];
2791}
2792
2793template<>
2795 const int8x8x2_t tmp = vzip_s8(p1, p2);
2796 p1 = tmp.val[0];
2797 p2 = tmp.val[1];
2798}
2799
2800template<>
2802 const int8x16x2_t tmp = vzipq_s8(p1, p2);
2803 p1 = tmp.val[0];
2804 p2 = tmp.val[1];
2805}
2806
2807template<>
2809 const uint8x8x2_t tmp = vzip_u8(p1, p2);
2810 p1 = tmp.val[0];
2811 p2 = tmp.val[1];
2812}
2813
2814template<>
2816 const uint8x16x2_t tmp = vzipq_u8(p1, p2);
2817 p1 = tmp.val[0];
2818 p2 = tmp.val[1];
2819}
2820
2821template<>
2823 const int32x2x2_t tmp = vzip_s32(p1, p2);
2824 p1 = tmp.val[0];
2825 p2 = tmp.val[1];
2826}
2827
2828template<>
2830 const int32x4x2_t tmp = vzipq_s32(p1, p2);
2831 p1 = tmp.val[0];
2832 p2 = tmp.val[1];
2833}
2834
2835template<>
2837 const uint32x2x2_t tmp = vzip_u32(p1, p2);
2838 p1 = tmp.val[0];
2839 p2 = tmp.val[1];
2840}
2841
2842template<>
2844 const uint32x4x2_t tmp = vzipq_u32(p1, p2);
2845 p1 = tmp.val[0];
2846 p2 = tmp.val[1];
2847}
2848
2849template<>
2851 const int16x4x2_t tmp = vzip_s16(p1, p2);
2852 p1 = tmp.val[0];
2853 p2 = tmp.val[1];
2854}
2855
2856template<>
2858 const int16x8x2_t tmp = vzipq_s16(p1, p2);
2859 p1 = tmp.val[0];
2860 p2 = tmp.val[1];
2861}
2862
2863template<>
2865 const uint16x4x2_t tmp = vzip_u16(p1, p2);
2866 p1 = tmp.val[0];
2867 p2 = tmp.val[1];
2868}
2869
2870template<>
2872 const uint16x8x2_t tmp = vzipq_u16(p1, p2);
2873 p1 = tmp.val[0];
2874 p2 = tmp.val[1];
2875}
2876
2877template<typename Packet>
2879 zip_in_place(kernel.packet[0], kernel.packet[1]);
2880}
2881
2882template<typename Packet>
2884 zip_in_place(kernel.packet[0], kernel.packet[2]);
2885 zip_in_place(kernel.packet[1], kernel.packet[3]);
2886 zip_in_place(kernel.packet[0], kernel.packet[1]);
2887 zip_in_place(kernel.packet[2], kernel.packet[3]);
2888}
2889
2890template<typename Packet>
2892 zip_in_place(kernel.packet[0], kernel.packet[4]);
2893 zip_in_place(kernel.packet[1], kernel.packet[5]);
2894 zip_in_place(kernel.packet[2], kernel.packet[6]);
2895 zip_in_place(kernel.packet[3], kernel.packet[7]);
2896
2897 zip_in_place(kernel.packet[0], kernel.packet[2]);
2898 zip_in_place(kernel.packet[1], kernel.packet[3]);
2899 zip_in_place(kernel.packet[4], kernel.packet[6]);
2900 zip_in_place(kernel.packet[5], kernel.packet[7]);
2901
2902 zip_in_place(kernel.packet[0], kernel.packet[1]);
2903 zip_in_place(kernel.packet[2], kernel.packet[3]);
2904 zip_in_place(kernel.packet[4], kernel.packet[5]);
2905 zip_in_place(kernel.packet[6], kernel.packet[7]);
2906}
2907
2908template<typename Packet>
2911 for (int i=0; i<4; ++i) {
2912 const int m = (1 << i);
2914 for (int j=0; j<m; ++j) {
2915 const int n = (1 << (3-i));
2917 for (int k=0; k<n; ++k) {
2918 const int idx = 2*j*n+k;
2919 zip_in_place(kernel.packet[idx], kernel.packet[idx + n]);
2920 }
2921 }
2922 }
2923}
2924
2925} // namespace detail
2926
2930EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void ptranspose(PacketBlock<Packet4f, 4>& kernel) {
2932}
2933
2935{
2936 const int8x8_t a = vreinterpret_s8_s32(vset_lane_s32(kernel.packet[2], vdup_n_s32(kernel.packet[0]), 1));
2937 const int8x8_t b = vreinterpret_s8_s32(vset_lane_s32(kernel.packet[3], vdup_n_s32(kernel.packet[1]), 1));
2938
2939 const int8x8x2_t zip8 = vzip_s8(a,b);
2941
2942 kernel.packet[0] = vget_lane_s32(vreinterpret_s32_s16(zip16.val[0]), 0);
2943 kernel.packet[1] = vget_lane_s32(vreinterpret_s32_s16(zip16.val[0]), 1);
2944 kernel.packet[2] = vget_lane_s32(vreinterpret_s32_s16(zip16.val[1]), 0);
2945 kernel.packet[3] = vget_lane_s32(vreinterpret_s32_s16(zip16.val[1]), 1);
2946}
2953EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void ptranspose(PacketBlock<Packet16c, 16>& kernel) {
2955}
2959EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void ptranspose(PacketBlock<Packet16c, 4>& kernel) {
2961}
2962
2964{
2965 const uint8x8_t a = vreinterpret_u8_u32(vset_lane_u32(kernel.packet[2], vdup_n_u32(kernel.packet[0]), 1));
2966 const uint8x8_t b = vreinterpret_u8_u32(vset_lane_u32(kernel.packet[3], vdup_n_u32(kernel.packet[1]), 1));
2967
2968 const uint8x8x2_t zip8 = vzip_u8(a,b);
2970
2971 kernel.packet[0] = vget_lane_u32(vreinterpret_u32_u16(zip16.val[0]), 0);
2972 kernel.packet[1] = vget_lane_u32(vreinterpret_u32_u16(zip16.val[0]), 1);
2973 kernel.packet[2] = vget_lane_u32(vreinterpret_u32_u16(zip16.val[1]), 0);
2974 kernel.packet[3] = vget_lane_u32(vreinterpret_u32_u16(zip16.val[1]), 1);
2975}
2982EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void ptranspose(PacketBlock<Packet16uc, 16>& kernel) {
2984}
2988EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void ptranspose(PacketBlock<Packet16uc, 4>& kernel) {
2990}
2991
2995EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void ptranspose(PacketBlock<Packet8s, 8>& kernel) {
2997}
2998EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void ptranspose(PacketBlock<Packet8s, 4>& kernel) {
3000}
3001
3005EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void ptranspose(PacketBlock<Packet8us, 8>& kernel) {
3007}
3008EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void ptranspose(PacketBlock<Packet8us, 4>& kernel) {
3010}
3011
3015EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void ptranspose(PacketBlock<Packet4i, 4>& kernel) {
3017}
3019 detail::zip_in_place(kernel.packet[0], kernel.packet[1]);
3020}
3024
3027{
3028#if EIGEN_ARCH_ARM64
3029 const int64x2_t tmp1 = vzip1q_s64(kernel.packet[0], kernel.packet[1]);
3030 kernel.packet[1] = vzip2q_s64(kernel.packet[0], kernel.packet[1]);
3031 kernel.packet[0] = tmp1;
3032#else
3033 const int64x1_t tmp[2][2] = {
3034 { vget_low_s64(kernel.packet[0]), vget_high_s64(kernel.packet[0]) },
3035 { vget_low_s64(kernel.packet[1]), vget_high_s64(kernel.packet[1]) }
3036 };
3037
3038 kernel.packet[0] = vcombine_s64(tmp[0][0], tmp[1][0]);
3039 kernel.packet[1] = vcombine_s64(tmp[0][1], tmp[1][1]);
3040#endif
3041}
3044{
3045#if EIGEN_ARCH_ARM64
3046 const uint64x2_t tmp1 = vzip1q_u64(kernel.packet[0], kernel.packet[1]);
3047 kernel.packet[1] = vzip2q_u64(kernel.packet[0], kernel.packet[1]);
3048 kernel.packet[0] = tmp1;
3049#else
3050 const uint64x1_t tmp[2][2] = {
3051 { vget_low_u64(kernel.packet[0]), vget_high_u64(kernel.packet[0]) },
3052 { vget_low_u64(kernel.packet[1]), vget_high_u64(kernel.packet[1]) }
3053 };
3054
3055 kernel.packet[0] = vcombine_u64(tmp[0][0], tmp[1][0]);
3056 kernel.packet[1] = vcombine_u64(tmp[0][1], tmp[1][1]);
3057#endif
3058}
3059
3061{ return vbsl_f32(vreinterpret_u32_f32(mask), a, b); }
3063{ return vbslq_f32(vreinterpretq_u32_f32(mask), a, b); }
3065{ return vbsl_s8(vreinterpret_u8_s8(mask), a, b); }
3067{ return vbslq_s8(vreinterpretq_u8_s8(mask), a, b); }
3069{ return vbsl_u8(mask, a, b); }
3071{ return vbslq_u8(mask, a, b); }
3073{ return vbsl_s16(vreinterpret_u16_s16(mask), a, b); }
3075{ return vbslq_s16(vreinterpretq_u16_s16(mask), a, b); }
3077{ return vbsl_u16(mask, a, b); }
3079{ return vbslq_u16(mask, a, b); }
3081{ return vbsl_s32(vreinterpret_u32_s32(mask), a, b); }
3083{ return vbslq_s32(vreinterpretq_u32_s32(mask), a, b); }
3085{ return vbsl_u32(mask, a, b); }
3087{ return vbslq_u32(mask, a, b); }
3089{ return vbslq_s64(vreinterpretq_u64_s64(mask), a, b); }
3091{ return vbslq_u64(mask, a, b); }
3092
3093// Use armv8 rounding intinsics if available.
3094#if EIGEN_ARCH_ARMV8
3095template<> EIGEN_STRONG_INLINE Packet2f print<Packet2f>(const Packet2f& a)
3096{ return vrndn_f32(a); }
3097
3099{ return vrndnq_f32(a); }
3100
3102{ return vrndm_f32(a); }
3103
3105{ return vrndmq_f32(a); }
3106
3108{ return vrndp_f32(a); }
3109
3111{ return vrndpq_f32(a); }
3112
3113#else
3114
3116 // Adds and subtracts signum(a) * 2^23 to force rounding.
3117 const Packet4f limit = pset1<Packet4f>(static_cast<float>(1<<23));
3118 const Packet4f abs_a = pabs(a);
3119 Packet4f r = padd(abs_a, limit);
3120 // Don't compile-away addition and subtraction.
3122 r = psub(r, limit);
3123 // If greater than limit, simply return a. Otherwise, account for sign.
3124 r = pselect(pcmp_lt(abs_a, limit),
3125 pselect(pcmp_lt(a, pzero(a)), pnegate(r), r), a);
3126 return r;
3127}
3128
3130 // Adds and subtracts signum(a) * 2^23 to force rounding.
3131 const Packet2f limit = pset1<Packet2f>(static_cast<float>(1<<23));
3132 const Packet2f abs_a = pabs(a);
3133 Packet2f r = padd(abs_a, limit);
3134 // Don't compile-away addition and subtraction.
3136 r = psub(r, limit);
3137 // If greater than limit, simply return a. Otherwise, account for sign.
3138 r = pselect(pcmp_lt(abs_a, limit),
3139 pselect(pcmp_lt(a, pzero(a)), pnegate(r), r), a);
3140 return r;
3141}
3142
3144{
3145 const Packet4f cst_1 = pset1<Packet4f>(1.0f);
3147 // If greater, subtract one.
3148 Packet4f mask = pcmp_lt(a, tmp);
3149 mask = pand(mask, cst_1);
3150 return psub(tmp, mask);
3151}
3152
3154{
3155 const Packet2f cst_1 = pset1<Packet2f>(1.0f);
3157 // If greater, subtract one.
3158 Packet2f mask = pcmp_lt(a, tmp);
3159 mask = pand(mask, cst_1);
3160 return psub(tmp, mask);
3161}
3162
3164{
3165 const Packet4f cst_1 = pset1<Packet4f>(1.0f);
3167 // If smaller, add one.
3168 Packet4f mask = pcmp_lt(tmp, a);
3169 mask = pand(mask, cst_1);
3170 return padd(tmp, mask);
3171}
3172
3174{
3175 const Packet2f cst_1 = pset1<Packet2f>(1.0);
3177 // If smaller, add one.
3178 Packet2f mask = pcmp_lt(tmp, a);
3179 mask = pand(mask, cst_1);
3180 return padd(tmp, mask);
3181}
3182
3183#endif
3184
3193 uint8x8_t res = vdup_n_u8(0);
3194 uint8x8_t add = vdup_n_u8(0x8);
3195 for (int i = 0; i < 4; i++)
3196 {
3197 const uint8x8_t temp = vorr_u8(res, add);
3198 res = vbsl_u8(vcge_u8(x, vmul_u8(temp, temp)), temp, res);
3199 add = vshr_n_u8(add, 1);
3200 }
3202}
3205 uint8x8_t res = vdup_n_u8(0);
3206 uint8x8_t add = vdup_n_u8(0x8);
3207 for (int i = 0; i < 4; i++)
3208 {
3209 const uint8x8_t temp = vorr_u8(res, add);
3210 res = vbsl_u8(vcge_u8(a, vmul_u8(temp, temp)), temp, res);
3211 add = vshr_n_u8(add, 1);
3212 }
3213 return res;
3214}
3218 uint8x16_t add = vdupq_n_u8(0x8);
3219 for (int i = 0; i < 4; i++)
3220 {
3221 const uint8x16_t temp = vorrq_u8(res, add);
3222 res = vbslq_u8(vcgeq_u8(a, vmulq_u8(temp, temp)), temp, res);
3223 add = vshrq_n_u8(add, 1);
3224 }
3225 return res;
3226}
3230 uint16x4_t add = vdup_n_u16(0x80);
3231 for (int i = 0; i < 8; i++)
3232 {
3233 const uint16x4_t temp = vorr_u16(res, add);
3234 res = vbsl_u16(vcge_u16(a, vmul_u16(temp, temp)), temp, res);
3235 add = vshr_n_u16(add, 1);
3236 }
3237 return res;
3238}
3242 uint16x8_t add = vdupq_n_u16(0x80);
3243 for (int i = 0; i < 8; i++)
3244 {
3245 const uint16x8_t temp = vorrq_u16(res, add);
3246 res = vbslq_u16(vcgeq_u16(a, vmulq_u16(temp, temp)), temp, res);
3247 add = vshrq_n_u16(add, 1);
3248 }
3249 return res;
3250}
3254 uint32x2_t add = vdup_n_u32(0x8000);
3255 for (int i = 0; i < 16; i++)
3256 {
3257 const uint32x2_t temp = vorr_u32(res, add);
3258 res = vbsl_u32(vcge_u32(a, vmul_u32(temp, temp)), temp, res);
3259 add = vshr_n_u32(add, 1);
3260 }
3261 return res;
3262}
3266 uint32x4_t add = vdupq_n_u32(0x8000);
3267 for (int i = 0; i < 16; i++)
3268 {
3269 const uint32x4_t temp = vorrq_u32(res, add);
3270 res = vbslq_u32(vcgeq_u32(a, vmulq_u32(temp, temp)), temp, res);
3271 add = vshrq_n_u32(add, 1);
3272 }
3273 return res;
3274}
3275
3277 // Compute approximate reciprocal sqrt.
3279 // Do Newton iterations for 1/sqrt(x).
3283 return pselect(pcmp_eq(a, pzero(a)), infinity, x);
3284}
3285
3287 // Compute approximate reciprocal sqrt.
3289 // Do Newton iterations for 1/sqrt(x).
3290 x = vmul_f32(vrsqrts_f32(vmul_f32(a, x), x), x);
3291 x = vmul_f32(vrsqrts_f32(vmul_f32(a, x), x), x);
3293 return pselect(pcmp_eq(a, pzero(a)), infinity, x);
3294}
3295
3296// Unfortunately vsqrt_f32 is only available for A64.
3297#if EIGEN_ARCH_ARM64
3298template<> EIGEN_STRONG_INLINE Packet4f psqrt(const Packet4f& _x){return vsqrtq_f32(_x);}
3299template<> EIGEN_STRONG_INLINE Packet2f psqrt(const Packet2f& _x){return vsqrt_f32(_x); }
3300#else
3303 const Packet4f is_zero_or_inf = por(pcmp_eq(a, pzero(a)), pcmp_eq(a, infinity));
3304 return pselect(is_zero_or_inf, a, pmul(a, prsqrt(a)));
3305}
3308 const Packet2f is_zero_or_inf = por(pcmp_eq(a, pzero(a)), pcmp_eq(a, infinity));
3309 return pselect(is_zero_or_inf, a, pmul(a, prsqrt(a)));
3310}
3311#endif
3312
3313//---------- bfloat16 ----------
3314// TODO: Add support for native armv8.6-a bfloat16_t
3315
3316// TODO: Guard if we have native bfloat16 support
3318
3319template<> struct is_arithmetic<Packet4bf> { enum { value = true }; };
3320
3321template<> struct packet_traits<bfloat16> : default_packet_traits
3322{
3325 enum
3326 {
3327 Vectorizable = 1,
3328 AlignedOnScalar = 1,
3329 size = 4,
3330 HasHalfPacket = 0,
3331
3332 HasCmp = 1,
3333 HasAdd = 1,
3334 HasSub = 1,
3336 HasMul = 1,
3337 HasNegate = 1,
3338 HasAbs = 1,
3340 HasAbs2 = 1,
3342 HasMin = 1,
3343 HasMax = 1,
3344 HasConj = 1,
3345 HasSetLinear = 0,
3346 HasBlend = 0,
3347 HasDiv = 1,
3348 HasFloor = 1,
3349 HasCeil = 1,
3350 HasRint = 1,
3351
3354 HasLog = 1,
3355 HasExp = 1,
3356 HasSqrt = 0,
3359 HasBessel = 0, // Issues with accuracy.
3360 HasNdtri = 0
3361 };
3362};
3363
3364template<> struct unpacket_traits<Packet4bf>
3365{
3368 enum
3369 {
3370 size = 4,
3376};
3377
3378namespace detail {
3379template<>
3381 const uint16x4x2_t tmp = vzip_u16(p1, p2);
3382 p1 = tmp.val[0];
3383 p2 = tmp.val[1];
3384}
3385} // namespace detail
3386
3388{
3389 // See the scalar implemention in BFloat16.h for a comprehensible explanation
3390 // of this fast rounding algorithm
3391 Packet4ui input = reinterpret_cast<Packet4ui>(p);
3392
3393 // lsb = (input >> 16) & 1
3395
3396 // rounding_bias = 0x7fff + lsb
3398
3399 // input += rounding_bias
3401
3402 // input = input >> 16
3403 input = vshrq_n_u32(input, 16);
3404
3405 // Replace float-nans by bfloat16-nans, that is 0x7fc0
3406 const Packet4ui bf16_nan = vdupq_n_u32(0x7fc0);
3407 const Packet4ui mask = vceqq_f32(p, p);
3408 input = vbslq_u32(mask, input, bf16_nan);
3409
3410 // output = static_cast<uint16_t>(input)
3411 return vmovn_u32(input);
3412}
3413
3415{
3416 return reinterpret_cast<Packet4f>(vshlq_n_u32(vmovl_u16(p), 16));
3417}
3418
3422
3424 return pset1<Packet4us>(from.value);
3425}
3426
3430
3432{
3433 return pload<Packet4us>(reinterpret_cast<const uint16_t*>(from));
3434}
3435
3437{
3438 return ploadu<Packet4us>(reinterpret_cast<const uint16_t*>(from));
3439}
3440
3442{
3443 EIGEN_DEBUG_ALIGNED_STORE vst1_u16(reinterpret_cast<uint16_t*>(to), from);
3444}
3445
3447{
3448 EIGEN_DEBUG_UNALIGNED_STORE vst1_u16(reinterpret_cast<uint16_t*>(to), from);
3449}
3450
3452{
3453 return ploaddup<Packet4us>(reinterpret_cast<const uint16_t*>(from));
3454}
3455
3459
3470
3472 const Packet4bf &b)
3473{
3475}
3476
3487
3489 const Packet4bf &b)
3490{
3492}
3493
3495{
3496 return F32ToBf16(plset<Packet4f>(static_cast<float>(a)));
3497}
3498
3500 return por<Packet4us>(a, b);
3501}
3502
3504 return pxor<Packet4us>(a, b);
3505}
3506
3508 return pand<Packet4us>(a, b);
3509}
3510
3512 return pandnot<Packet4us>(a, b);
3513}
3514
3516 const Packet4bf& b)
3517{
3518 return pselect<Packet4us>(mask, a, b);
3519}
3520
3525
3530
3535
3536template<> EIGEN_STRONG_INLINE Packet4bf pconj(const Packet4bf& a) { return a; }
3537
3541
3545
3549
3553
3554template<>
3556{
3557 return pgather<uint16_t, Packet4us>(reinterpret_cast<const uint16_t*>(from), stride);
3558}
3559
3560template<>
3562{
3563 pscatter<uint16_t, Packet4us>(reinterpret_cast<uint16_t*>(to), from, stride);
3564}
3565
3567{
3568 return static_cast<bfloat16>(predux<Packet4f>(Bf16ToF32(a)));
3569}
3570
3572{
3573 return static_cast<bfloat16>(predux_max<Packet4f>(Bf16ToF32(a)));
3574}
3575
3577{
3578 return static_cast<bfloat16>(predux_min<Packet4f>(Bf16ToF32(a)));
3579}
3580
3582{
3583 return static_cast<bfloat16>(predux_mul<Packet4f>(Bf16ToF32(a)));
3584}
3585
3590
3595
3600
3605
3610
3615
3620
3622{
3623 return pxor<Packet4us>(a, pset1<Packet4us>(static_cast<uint16_t>(0x8000)));
3624}
3625
3626//---------- double ----------
3627
3628// Clang 3.5 in the iOS toolchain has an ICE triggered by NEON intrisics for double.
3629// Confirmed at least with __apple_build_version__ = 6000054.
3630#ifdef __apple_build_version__
3631// Let's hope that by the time __apple_build_version__ hits the 601* range, the bug will be fixed.
3632// https://gist.github.com/yamaya/2924292 suggests that the 3 first digits are only updated with
3633// major toolchain updates.
3634#define EIGEN_APPLE_DOUBLE_NEON_BUG (__apple_build_version__ < 6010000)
3635#else
3636#define EIGEN_APPLE_DOUBLE_NEON_BUG 0
3637#endif
3638
3639#if EIGEN_ARCH_ARM64 && !EIGEN_APPLE_DOUBLE_NEON_BUG
3640
3641// Bug 907: workaround missing declarations of the following two functions in the ADK
3642// Defining these functions as templates ensures that if these intrinsics are
3643// already defined in arm_neon.h, then our workaround doesn't cause a conflict
3644// and has lower priority in overload resolution.
3645template <typename T> uint64x2_t vreinterpretq_u64_f64(T a) { return (uint64x2_t) a; }
3646
3647template <typename T> float64x2_t vreinterpretq_f64_u64(T a) { return (float64x2_t) a; }
3648
3649typedef float64x2_t Packet2d;
3650typedef float64x1_t Packet1d;
3651
3652// fuctionally equivalent to _mm_shuffle_pd in SSE (i.e. shuffle(m, n, mask) equals _mm_shuffle_pd(m,n,mask))
3653// Currently used in LU/arch/InverseSize4.h to enable a shared implementation
3654// for fast inversion of matrices of size 4.
3655EIGEN_STRONG_INLINE Packet2d shuffle(const Packet2d& m, const Packet2d& n, int mask)
3656{
3657 const double* a = reinterpret_cast<const double*>(&m);
3658 const double* b = reinterpret_cast<const double*>(&n);
3659 Packet2d res = {*(a + (mask & 1)), *(b + ((mask >> 1) & 1))};
3660 return res;
3661}
3662
3664{
3665 return shuffle(a, b, mask);
3666}
3668{
3669 return shuffle(a, b, 0);
3670}
3672{
3673 return shuffle(a, b, 3);
3674}
3675#define vec2d_duplane(a, p) \
3676 vdupq_laneq_f64(a, p)
3677
3678template<> struct packet_traits<double> : default_packet_traits
3679{
3680 typedef Packet2d type;
3681 typedef Packet2d half;
3682 enum
3683 {
3684 Vectorizable = 1,
3685 AlignedOnScalar = 1,
3686 size = 2,
3687 HasHalfPacket = 0,
3688
3689 HasCmp = 1,
3690 HasAdd = 1,
3691 HasSub = 1,
3692 HasShift = 1,
3693 HasMul = 1,
3694 HasNegate = 1,
3695 HasAbs = 1,
3696 HasArg = 0,
3697 HasAbs2 = 1,
3698 HasAbsDiff = 1,
3699 HasMin = 1,
3700 HasMax = 1,
3701 HasConj = 1,
3702 HasSetLinear = 0,
3703 HasBlend = 0,
3704
3705 HasDiv = 1,
3706 HasFloor = 1,
3707 HasCeil = 1,
3708 HasRint = 1,
3709
3710 HasSin = 0,
3711 HasCos = 0,
3712 HasLog = 1,
3713 HasExp = 1,
3714 HasSqrt = 1,
3715 HasRsqrt = 1,
3716 HasTanh = 0,
3717 HasErf = 0
3718 };
3719};
3720
3721template<> struct unpacket_traits<Packet2d>
3722{
3723 typedef double type;
3724 typedef Packet2d half;
3725 typedef Packet2l integer_packet;
3726 enum
3727 {
3728 size = 2,
3730 vectorizable = true,
3731 masked_load_available = false,
3733 };
3734};
3735
3736template<> EIGEN_STRONG_INLINE Packet2d pset1<Packet2d>(const double& from) { return vdupq_n_f64(from); }
3737
3738template<> EIGEN_STRONG_INLINE Packet2d plset<Packet2d>(const double& a)
3739{
3740 const double c[] = {0.0,1.0};
3741 return vaddq_f64(pset1<Packet2d>(a), vld1q_f64(c));
3742}
3743
3744template<> EIGEN_STRONG_INLINE Packet2d padd<Packet2d>(const Packet2d& a, const Packet2d& b) { return vaddq_f64(a,b); }
3745
3746template<> EIGEN_STRONG_INLINE Packet2d psub<Packet2d>(const Packet2d& a, const Packet2d& b) { return vsubq_f64(a,b); }
3747
3748template<> EIGEN_STRONG_INLINE Packet2d pxor<Packet2d>(const Packet2d& , const Packet2d& );
3750 const Packet2d mask = {numext::bit_cast<double>(0x8000000000000000ull),0.0};
3751 return padd(a, pxor(mask, b));
3752}
3753
3754template<> EIGEN_STRONG_INLINE Packet2d pnegate(const Packet2d& a) { return vnegq_f64(a); }
3755
3756template<> EIGEN_STRONG_INLINE Packet2d pconj(const Packet2d& a) { return a; }
3757
3758template<> EIGEN_STRONG_INLINE Packet2d pmul<Packet2d>(const Packet2d& a, const Packet2d& b) { return vmulq_f64(a,b); }
3759
3760template<> EIGEN_STRONG_INLINE Packet2d pdiv<Packet2d>(const Packet2d& a, const Packet2d& b) { return vdivq_f64(a,b); }
3761
3762#ifdef __ARM_FEATURE_FMA
3763// See bug 936. See above comment about FMA for float.
3764template<> EIGEN_STRONG_INLINE Packet2d pmadd(const Packet2d& a, const Packet2d& b, const Packet2d& c)
3765{ return vfmaq_f64(c,a,b); }
3766#else
3767template<> EIGEN_STRONG_INLINE Packet2d pmadd(const Packet2d& a, const Packet2d& b, const Packet2d& c)
3768{ return vmlaq_f64(c,a,b); }
3769#endif
3770
3771template<> EIGEN_STRONG_INLINE Packet2d pmin<Packet2d>(const Packet2d& a, const Packet2d& b) { return vminq_f64(a,b); }
3772
3773#ifdef __ARM_FEATURE_NUMERIC_MAXMIN
3774// numeric max and min are only available if ARM_FEATURE_NUMERIC_MAXMIN is defined (which can only be the case for Armv8 systems).
3775template<> EIGEN_STRONG_INLINE Packet2d pmin<PropagateNumbers, Packet2d>(const Packet2d& a, const Packet2d& b) { return vminnmq_f64(a, b); }
3776template<> EIGEN_STRONG_INLINE Packet2d pmax<PropagateNumbers, Packet2d>(const Packet2d& a, const Packet2d& b) { return vmaxnmq_f64(a, b); }
3777
3778#endif
3779
3781
3782template<> EIGEN_STRONG_INLINE Packet2d pmax<Packet2d>(const Packet2d& a, const Packet2d& b) { return vmaxq_f64(a,b); }
3783
3784
3786
3787// Logical Operations are not supported for float, so we have to reinterpret casts using NEON intrinsics
3789{ return vreinterpretq_f64_u64(vandq_u64(vreinterpretq_u64_f64(a),vreinterpretq_u64_f64(b))); }
3790
3792{ return vreinterpretq_f64_u64(vorrq_u64(vreinterpretq_u64_f64(a),vreinterpretq_u64_f64(b))); }
3793
3795{ return vreinterpretq_f64_u64(veorq_u64(vreinterpretq_u64_f64(a),vreinterpretq_u64_f64(b))); }
3796
3798{ return vreinterpretq_f64_u64(vbicq_u64(vreinterpretq_u64_f64(a),vreinterpretq_u64_f64(b))); }
3799
3800template<> EIGEN_STRONG_INLINE Packet2d pcmp_le(const Packet2d& a, const Packet2d& b)
3801{ return vreinterpretq_f64_u64(vcleq_f64(a,b)); }
3802
3803template<> EIGEN_STRONG_INLINE Packet2d pcmp_lt(const Packet2d& a, const Packet2d& b)
3804{ return vreinterpretq_f64_u64(vcltq_f64(a,b)); }
3805
3807{ return vreinterpretq_f64_u32(vmvnq_u32(vreinterpretq_u32_u64(vcgeq_f64(a,b)))); }
3808
3809template<> EIGEN_STRONG_INLINE Packet2d pcmp_eq(const Packet2d& a, const Packet2d& b)
3810{ return vreinterpretq_f64_u64(vceqq_f64(a,b)); }
3811
3812template<> EIGEN_STRONG_INLINE Packet2d pload<Packet2d>(const double* from)
3813{ EIGEN_DEBUG_ALIGNED_LOAD return vld1q_f64(from); }
3814
3815template<> EIGEN_STRONG_INLINE Packet2d ploadu<Packet2d>(const double* from)
3816{ EIGEN_DEBUG_UNALIGNED_LOAD return vld1q_f64(from); }
3817
3818template<> EIGEN_STRONG_INLINE Packet2d ploaddup<Packet2d>(const double* from) { return vld1q_dup_f64(from); }
3819template<> EIGEN_STRONG_INLINE void pstore<double>(double* to, const Packet2d& from)
3820{ EIGEN_DEBUG_ALIGNED_STORE vst1q_f64(to,from); }
3821
3822template<> EIGEN_STRONG_INLINE void pstoreu<double>(double* to, const Packet2d& from)
3823{ EIGEN_DEBUG_UNALIGNED_STORE vst1q_f64(to,from); }
3824
3826{
3828 res = vld1q_lane_f64(from + 0*stride, res, 0);
3829 res = vld1q_lane_f64(from + 1*stride, res, 1);
3830 return res;
3831}
3832
3833template<> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void pscatter<double, Packet2d>(double* to, const Packet2d& from, Index stride)
3834{
3835 vst1q_lane_f64(to + stride*0, from, 0);
3836 vst1q_lane_f64(to + stride*1, from, 1);
3837}
3838
3839template<> EIGEN_STRONG_INLINE void prefetch<double>(const double* addr) { EIGEN_ARM_PREFETCH(addr); }
3840
3841// FIXME only store the 2 first elements ?
3842template<> EIGEN_STRONG_INLINE double pfirst<Packet2d>(const Packet2d& a) { return vgetq_lane_f64(a,0); }
3843
3845{ return vcombine_f64(vget_high_f64(a), vget_low_f64(a)); }
3846
3847template<> EIGEN_STRONG_INLINE Packet2d pabs(const Packet2d& a) { return vabsq_f64(a); }
3848
3849#if EIGEN_COMP_CLANG && defined(__apple_build_version__)
3850// workaround ICE, see bug 907
3851template<> EIGEN_STRONG_INLINE double predux<Packet2d>(const Packet2d& a)
3852{ return (vget_low_f64(a) + vget_high_f64(a))[0]; }
3853#else
3854template<> EIGEN_STRONG_INLINE double predux<Packet2d>(const Packet2d& a)
3855{ return vget_lane_f64(vget_low_f64(a) + vget_high_f64(a), 0); }
3856#endif
3857
3858// Other reduction functions:
3859// mul
3860#if EIGEN_COMP_CLANG && defined(__apple_build_version__)
3861template<> EIGEN_STRONG_INLINE double predux_mul<Packet2d>(const Packet2d& a)
3862{ return (vget_low_f64(a) * vget_high_f64(a))[0]; }
3863#else
3864template<> EIGEN_STRONG_INLINE double predux_mul<Packet2d>(const Packet2d& a)
3865{ return vget_lane_f64(vget_low_f64(a) * vget_high_f64(a), 0); }
3866#endif
3867
3868// min
3869template<> EIGEN_STRONG_INLINE double predux_min<Packet2d>(const Packet2d& a)
3870{ return vgetq_lane_f64(vpminq_f64(a,a), 0); }
3871
3872// max
3873template<> EIGEN_STRONG_INLINE double predux_max<Packet2d>(const Packet2d& a)
3874{ return vgetq_lane_f64(vpmaxq_f64(a,a), 0); }
3875
3876
3878ptranspose(PacketBlock<Packet2d, 2>& kernel)
3879{
3880 const float64x2_t tmp1 = vzip1q_f64(kernel.packet[0], kernel.packet[1]);
3881 const float64x2_t tmp2 = vzip2q_f64(kernel.packet[0], kernel.packet[1]);
3882
3883 kernel.packet[0] = tmp1;
3884 kernel.packet[1] = tmp2;
3885}
3886
3887template<> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Packet2d pselect( const Packet2d& mask, const Packet2d& a, const Packet2d& b)
3888{ return vbslq_f64(vreinterpretq_u64_f64(mask), a, b); }
3889
3890template<> EIGEN_STRONG_INLINE Packet2d print<Packet2d>(const Packet2d& a)
3891{ return vrndnq_f64(a); }
3892
3894{ return vrndmq_f64(a); }
3895
3897{ return vrndpq_f64(a); }
3898
3899template<> EIGEN_STRONG_INLINE Packet2d pldexp<Packet2d>(const Packet2d& a, const Packet2d& exponent)
3900{ return pldexp_generic(a, exponent); }
3901
3902template<> EIGEN_STRONG_INLINE Packet2d pfrexp<Packet2d>(const Packet2d& a, Packet2d& exponent)
3903{ return pfrexp_generic(a,exponent); }
3904
3906{ return vreinterpretq_f64_u64(vdupq_n_u64(from)); }
3907
3908template<> EIGEN_STRONG_INLINE Packet2d prsqrt(const Packet2d& a) {
3909 // Compute approximate reciprocal sqrt.
3910 Packet2d x = vrsqrteq_f64(a);
3911 // Do Newton iterations for 1/sqrt(x).
3912 x = vmulq_f64(vrsqrtsq_f64(vmulq_f64(a, x), x), x);
3913 x = vmulq_f64(vrsqrtsq_f64(vmulq_f64(a, x), x), x);
3914 x = vmulq_f64(vrsqrtsq_f64(vmulq_f64(a, x), x), x);
3915 const Packet2d infinity = pset1<Packet2d>(NumTraits<double>::infinity());
3916 return pselect(pcmp_eq(a, pzero(a)), infinity, x);
3917}
3918
3919template<> EIGEN_STRONG_INLINE Packet2d psqrt(const Packet2d& _x){ return vsqrtq_f64(_x); }
3920
3921#endif // EIGEN_ARCH_ARM64
3922
3923// Do we have an fp16 types and supporting Neon intrinsics?
3924#if EIGEN_HAS_ARM64_FP16_VECTOR_ARITHMETIC
3925typedef float16x4_t Packet4hf;
3926typedef float16x8_t Packet8hf;
3927
3928template <>
3929struct packet_traits<Eigen::half> : default_packet_traits {
3930 typedef Packet8hf type;
3931 typedef Packet4hf half;
3932 enum {
3933 Vectorizable = 1,
3934 AlignedOnScalar = 1,
3935 size = 8,
3936 HasHalfPacket = 1,
3937
3938 HasCmp = 1,
3939 HasCast = 1,
3940 HasAdd = 1,
3941 HasSub = 1,
3942 HasShift = 1,
3943 HasMul = 1,
3944 HasNegate = 1,
3945 HasAbs = 1,
3946 HasArg = 0,
3947 HasAbs2 = 1,
3948 HasAbsDiff = 0,
3949 HasMin = 1,
3950 HasMax = 1,
3951 HasConj = 1,
3952 HasSetLinear = 0,
3953 HasBlend = 0,
3954 HasInsert = 1,
3955 HasReduxp = 1,
3956 HasDiv = 1,
3957 HasFloor = 1,
3958 HasCeil = 1,
3959 HasRint = 1,
3960 HasSin = 0,
3961 HasCos = 0,
3962 HasLog = 0,
3963 HasExp = 0,
3964 HasSqrt = 1,
3965 HasRsqrt = 1,
3967 HasBessel = 0, // Issues with accuracy.
3968 HasNdtri = 0
3969 };
3970};
3971
3972template <>
3973struct unpacket_traits<Packet4hf> {
3974 typedef Eigen::half type;
3975 typedef Packet4hf half;
3976 enum {
3977 size = 4,
3979 vectorizable = true,
3980 masked_load_available = false,
3982 };
3983};
3984
3985template <>
3986struct unpacket_traits<Packet8hf> {
3987 typedef Eigen::half type;
3988 typedef Packet4hf half;
3989 enum {
3990 size = 8,
3992 vectorizable = true,
3993 masked_load_available = false,
3995 };
3996};
3997
3998template<>
3999EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Packet4hf predux_half_dowto4<Packet8hf>(const Packet8hf& a) {
4000 return vadd_f16(vget_low_f16(a), vget_high_f16(a));
4001}
4002
4003template <>
4004EIGEN_STRONG_INLINE Packet8hf pset1<Packet8hf>(const Eigen::half& from) {
4005 return vdupq_n_f16(from.x);
4006}
4007
4008template <>
4009EIGEN_STRONG_INLINE Packet4hf pset1<Packet4hf>(const Eigen::half& from) {
4010 return vdup_n_f16(from.x);
4011}
4012
4013template <>
4014EIGEN_STRONG_INLINE Packet8hf plset<Packet8hf>(const Eigen::half& a) {
4015 const float16_t f[] = {0, 1, 2, 3, 4, 5, 6, 7};
4016 Packet8hf countdown = vld1q_f16(f);
4017 return vaddq_f16(pset1<Packet8hf>(a), countdown);
4018}
4019
4020template <>
4021EIGEN_STRONG_INLINE Packet4hf plset<Packet4hf>(const Eigen::half& a) {
4022 const float16_t f[] = {0, 1, 2, 3};
4023 Packet4hf countdown = vld1_f16(f);
4024 return vadd_f16(pset1<Packet4hf>(a), countdown);
4025}
4026
4027template <>
4028EIGEN_STRONG_INLINE Packet8hf padd<Packet8hf>(const Packet8hf& a, const Packet8hf& b) {
4029 return vaddq_f16(a, b);
4030}
4031
4032template <>
4033EIGEN_STRONG_INLINE Packet4hf padd<Packet4hf>(const Packet4hf& a, const Packet4hf& b) {
4034 return vadd_f16(a, b);
4035}
4036
4037template <>
4038EIGEN_STRONG_INLINE Packet8hf psub<Packet8hf>(const Packet8hf& a, const Packet8hf& b) {
4039 return vsubq_f16(a, b);
4040}
4041
4042template <>
4043EIGEN_STRONG_INLINE Packet4hf psub<Packet4hf>(const Packet4hf& a, const Packet4hf& b) {
4044 return vsub_f16(a, b);
4045}
4046
4047template <>
4048EIGEN_STRONG_INLINE Packet8hf pnegate(const Packet8hf& a) {
4049 return vnegq_f16(a);
4050}
4051
4052template <>
4053EIGEN_STRONG_INLINE Packet4hf pnegate(const Packet4hf& a) {
4054 return vneg_f16(a);
4055}
4056
4057template <>
4058EIGEN_STRONG_INLINE Packet8hf pconj(const Packet8hf& a) {
4059 return a;
4060}
4061
4062template <>
4063EIGEN_STRONG_INLINE Packet4hf pconj(const Packet4hf& a) {
4064 return a;
4065}
4066
4067template <>
4068EIGEN_STRONG_INLINE Packet8hf pmul<Packet8hf>(const Packet8hf& a, const Packet8hf& b) {
4069 return vmulq_f16(a, b);
4070}
4071
4072template <>
4073EIGEN_STRONG_INLINE Packet4hf pmul<Packet4hf>(const Packet4hf& a, const Packet4hf& b) {
4074 return vmul_f16(a, b);
4075}
4076
4077template <>
4078EIGEN_STRONG_INLINE Packet8hf pdiv<Packet8hf>(const Packet8hf& a, const Packet8hf& b) {
4079 return vdivq_f16(a, b);
4080}
4081
4082template <>
4083EIGEN_STRONG_INLINE Packet4hf pdiv<Packet4hf>(const Packet4hf& a, const Packet4hf& b) {
4084 return vdiv_f16(a, b);
4085}
4086
4087template <>
4088EIGEN_STRONG_INLINE Packet8hf pmadd(const Packet8hf& a, const Packet8hf& b, const Packet8hf& c) {
4089 return vfmaq_f16(c, a, b);
4090}
4091
4092template <>
4093EIGEN_STRONG_INLINE Packet4hf pmadd(const Packet4hf& a, const Packet4hf& b, const Packet4hf& c) {
4094 return vfma_f16(c, a, b);
4095}
4096
4097template <>
4098EIGEN_STRONG_INLINE Packet8hf pmin<Packet8hf>(const Packet8hf& a, const Packet8hf& b) {
4099 return vminq_f16(a, b);
4100}
4101
4102template <>
4103EIGEN_STRONG_INLINE Packet4hf pmin<Packet4hf>(const Packet4hf& a, const Packet4hf& b) {
4104 return vmin_f16(a, b);
4105}
4106
4107#ifdef __ARM_FEATURE_NUMERIC_MAXMIN
4108// numeric max and min are only available if ARM_FEATURE_NUMERIC_MAXMIN is defined (which can only be the case for Armv8 systems).
4109template<> EIGEN_STRONG_INLINE Packet4hf pmin<PropagateNumbers, Packet4hf>(const Packet4hf& a, const Packet4hf& b) { return vminnm_f16(a, b); }
4110template<> EIGEN_STRONG_INLINE Packet8hf pmin<PropagateNumbers, Packet8hf>(const Packet8hf& a, const Packet8hf& b) { return vminnmq_f16(a, b); }
4111#endif
4112
4113template<> EIGEN_STRONG_INLINE Packet4hf pmin<PropagateNaN, Packet4hf>(const Packet4hf& a, const Packet4hf& b) { return pmin<Packet4hf>(a, b); }
4114
4115template<> EIGEN_STRONG_INLINE Packet8hf pmin<PropagateNaN, Packet8hf>(const Packet8hf& a, const Packet8hf& b) { return pmin<Packet8hf>(a, b); }
4116
4117template <>
4118EIGEN_STRONG_INLINE Packet8hf pmax<Packet8hf>(const Packet8hf& a, const Packet8hf& b) {
4119 return vmaxq_f16(a, b);
4120}
4121
4122template <>
4123EIGEN_STRONG_INLINE Packet4hf pmax<Packet4hf>(const Packet4hf& a, const Packet4hf& b) {
4124 return vmax_f16(a, b);
4125}
4126
4127#ifdef __ARM_FEATURE_NUMERIC_MAXMIN
4128// numeric max and min are only available if ARM_FEATURE_NUMERIC_MAXMIN is defined (which can only be the case for Armv8 systems).
4129template<> EIGEN_STRONG_INLINE Packet4hf pmax<PropagateNumbers, Packet4hf>(const Packet4hf& a, const Packet4hf& b) { return vmaxnm_f16(a, b); }
4130template<> EIGEN_STRONG_INLINE Packet8hf pmax<PropagateNumbers, Packet8hf>(const Packet8hf& a, const Packet8hf& b) { return vmaxnmq_f16(a, b); }
4131#endif
4132
4133template<> EIGEN_STRONG_INLINE Packet4hf pmax<PropagateNaN, Packet4hf>(const Packet4hf& a, const Packet4hf& b) { return pmax<Packet4hf>(a, b); }
4134
4135template<> EIGEN_STRONG_INLINE Packet8hf pmax<PropagateNaN, Packet8hf>(const Packet8hf& a, const Packet8hf& b) { return pmax<Packet8hf>(a, b); }
4136
4137#define EIGEN_MAKE_ARM_FP16_CMP_8(name) \
4138 template <> \
4139 EIGEN_STRONG_INLINE Packet8hf pcmp_##name(const Packet8hf& a, const Packet8hf& b) { \
4140 return vreinterpretq_f16_u16(vc##name##q_f16(a, b)); \
4141 }
4142
4143#define EIGEN_MAKE_ARM_FP16_CMP_4(name) \
4144 template <> \
4145 EIGEN_STRONG_INLINE Packet4hf pcmp_##name(const Packet4hf& a, const Packet4hf& b) { \
4146 return vreinterpret_f16_u16(vc##name##_f16(a, b)); \
4147 }
4148
4149EIGEN_MAKE_ARM_FP16_CMP_8(eq)
4150EIGEN_MAKE_ARM_FP16_CMP_8(lt)
4151EIGEN_MAKE_ARM_FP16_CMP_8(le)
4152
4153EIGEN_MAKE_ARM_FP16_CMP_4(eq)
4154EIGEN_MAKE_ARM_FP16_CMP_4(lt)
4155EIGEN_MAKE_ARM_FP16_CMP_4(le)
4156
4157#undef EIGEN_MAKE_ARM_FP16_CMP_8
4158#undef EIGEN_MAKE_ARM_FP16_CMP_4
4159
4160template <>
4161EIGEN_STRONG_INLINE Packet8hf pcmp_lt_or_nan<Packet8hf>(const Packet8hf& a, const Packet8hf& b) {
4162 return vreinterpretq_f16_u16(vmvnq_u16(vcgeq_f16(a, b)));
4163}
4164
4165template <>
4166EIGEN_STRONG_INLINE Packet4hf pcmp_lt_or_nan<Packet4hf>(const Packet4hf& a, const Packet4hf& b) {
4167 return vreinterpret_f16_u16(vmvn_u16(vcge_f16(a, b)));
4168}
4169
4170template <>
4171EIGEN_STRONG_INLINE Packet8hf print<Packet8hf>(const Packet8hf& a)
4172{ return vrndnq_f16(a); }
4173
4174template <>
4175EIGEN_STRONG_INLINE Packet4hf print<Packet4hf>(const Packet4hf& a)
4176{ return vrndn_f16(a); }
4177
4178template <>
4179EIGEN_STRONG_INLINE Packet8hf pfloor<Packet8hf>(const Packet8hf& a)
4180{ return vrndmq_f16(a); }
4181
4182template <>
4183EIGEN_STRONG_INLINE Packet4hf pfloor<Packet4hf>(const Packet4hf& a)
4184{ return vrndm_f16(a); }
4185
4186template <>
4187EIGEN_STRONG_INLINE Packet8hf pceil<Packet8hf>(const Packet8hf& a)
4188{ return vrndpq_f16(a); }
4189
4190template <>
4191EIGEN_STRONG_INLINE Packet4hf pceil<Packet4hf>(const Packet4hf& a)
4192{ return vrndp_f16(a); }
4193
4194template <>
4195EIGEN_STRONG_INLINE Packet8hf psqrt<Packet8hf>(const Packet8hf& a) {
4196 return vsqrtq_f16(a);
4197}
4198
4199template <>
4200EIGEN_STRONG_INLINE Packet4hf psqrt<Packet4hf>(const Packet4hf& a) {
4201 return vsqrt_f16(a);
4202}
4203
4204template <>
4205EIGEN_STRONG_INLINE Packet8hf pand<Packet8hf>(const Packet8hf& a, const Packet8hf& b) {
4206 return vreinterpretq_f16_u16(vandq_u16(vreinterpretq_u16_f16(a), vreinterpretq_u16_f16(b)));
4207}
4208
4209template <>
4210EIGEN_STRONG_INLINE Packet4hf pand<Packet4hf>(const Packet4hf& a, const Packet4hf& b) {
4211 return vreinterpret_f16_u16(vand_u16(vreinterpret_u16_f16(a), vreinterpret_u16_f16(b)));
4212}
4213
4214template <>
4215EIGEN_STRONG_INLINE Packet8hf por<Packet8hf>(const Packet8hf& a, const Packet8hf& b) {
4216 return vreinterpretq_f16_u16(vorrq_u16(vreinterpretq_u16_f16(a), vreinterpretq_u16_f16(b)));
4217}
4218
4219template <>
4220EIGEN_STRONG_INLINE Packet4hf por<Packet4hf>(const Packet4hf& a, const Packet4hf& b) {
4221 return vreinterpret_f16_u16(vorr_u16(vreinterpret_u16_f16(a), vreinterpret_u16_f16(b)));
4222}
4223
4224template <>
4225EIGEN_STRONG_INLINE Packet8hf pxor<Packet8hf>(const Packet8hf& a, const Packet8hf& b) {
4226 return vreinterpretq_f16_u16(veorq_u16(vreinterpretq_u16_f16(a), vreinterpretq_u16_f16(b)));
4227}
4228
4229template <>
4230EIGEN_STRONG_INLINE Packet4hf pxor<Packet4hf>(const Packet4hf& a, const Packet4hf& b) {
4231 return vreinterpret_f16_u16(veor_u16(vreinterpret_u16_f16(a), vreinterpret_u16_f16(b)));
4232}
4233
4234template <>
4235EIGEN_STRONG_INLINE Packet8hf pandnot<Packet8hf>(const Packet8hf& a, const Packet8hf& b) {
4236 return vreinterpretq_f16_u16(vbicq_u16(vreinterpretq_u16_f16(a), vreinterpretq_u16_f16(b)));
4237}
4238
4239template <>
4240EIGEN_STRONG_INLINE Packet4hf pandnot<Packet4hf>(const Packet4hf& a, const Packet4hf& b) {
4241 return vreinterpret_f16_u16(vbic_u16(vreinterpret_u16_f16(a), vreinterpret_u16_f16(b)));
4242}
4243
4244template <>
4245EIGEN_STRONG_INLINE Packet8hf pload<Packet8hf>(const Eigen::half* from) {
4246 EIGEN_DEBUG_ALIGNED_LOAD return vld1q_f16(reinterpret_cast<const float16_t*>(from));
4247}
4248
4249template <>
4250EIGEN_STRONG_INLINE Packet4hf pload<Packet4hf>(const Eigen::half* from) {
4251 EIGEN_DEBUG_ALIGNED_LOAD return vld1_f16(reinterpret_cast<const float16_t*>(from));
4252}
4253
4254template <>
4255EIGEN_STRONG_INLINE Packet8hf ploadu<Packet8hf>(const Eigen::half* from) {
4256 EIGEN_DEBUG_UNALIGNED_LOAD return vld1q_f16(reinterpret_cast<const float16_t*>(from));
4257}
4258
4259template <>
4260EIGEN_STRONG_INLINE Packet4hf ploadu<Packet4hf>(const Eigen::half* from) {
4261 EIGEN_DEBUG_UNALIGNED_LOAD return vld1_f16(reinterpret_cast<const float16_t*>(from));
4262}
4263
4264template <>
4265EIGEN_STRONG_INLINE Packet8hf ploaddup<Packet8hf>(const Eigen::half* from) {
4266 Packet8hf packet;
4267 packet[0] = from[0].x;
4268 packet[1] = from[0].x;
4269 packet[2] = from[1].x;
4270 packet[3] = from[1].x;
4271 packet[4] = from[2].x;
4272 packet[5] = from[2].x;
4273 packet[6] = from[3].x;
4274 packet[7] = from[3].x;
4275 return packet;
4276}
4277
4278template <>
4279EIGEN_STRONG_INLINE Packet4hf ploaddup<Packet4hf>(const Eigen::half* from) {
4280 float16x4_t packet;
4281 float16_t* tmp;
4282 tmp = (float16_t*)&packet;
4283 tmp[0] = from[0].x;
4284 tmp[1] = from[0].x;
4285 tmp[2] = from[1].x;
4286 tmp[3] = from[1].x;
4287 return packet;
4288}
4289
4290template <>
4291EIGEN_STRONG_INLINE Packet8hf ploadquad<Packet8hf>(const Eigen::half* from) {
4292 Packet4hf lo, hi;
4293 lo = vld1_dup_f16(reinterpret_cast<const float16_t*>(from));
4294 hi = vld1_dup_f16(reinterpret_cast<const float16_t*>(from+1));
4295 return vcombine_f16(lo, hi);
4296}
4297
4298EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Packet8hf pinsertfirst(const Packet8hf& a, Eigen::half b) { return vsetq_lane_f16(b.x, a, 0); }
4299
4300EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Packet4hf pinsertfirst(const Packet4hf& a, Eigen::half b) { return vset_lane_f16(b.x, a, 0); }
4301
4302template <>
4303EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Packet8hf pselect(const Packet8hf& mask, const Packet8hf& a, const Packet8hf& b) {
4304 return vbslq_f16(vreinterpretq_u16_f16(mask), a, b);
4305}
4306
4307template <>
4308EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Packet4hf pselect(const Packet4hf& mask, const Packet4hf& a, const Packet4hf& b) {
4309 return vbsl_f16(vreinterpret_u16_f16(mask), a, b);
4310}
4311
4312EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Packet8hf pinsertlast(const Packet8hf& a, Eigen::half b) { return vsetq_lane_f16(b.x, a, 7); }
4313
4314EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Packet4hf pinsertlast(const Packet4hf& a, Eigen::half b) { return vset_lane_f16(b.x, a, 3); }
4315
4316template <>
4317EIGEN_STRONG_INLINE void pstore<Eigen::half>(Eigen::half* to, const Packet8hf& from) {
4318 EIGEN_DEBUG_ALIGNED_STORE vst1q_f16(reinterpret_cast<float16_t*>(to), from);
4319}
4320
4321template <>
4322EIGEN_STRONG_INLINE void pstore<Eigen::half>(Eigen::half* to, const Packet4hf& from) {
4323 EIGEN_DEBUG_ALIGNED_STORE vst1_f16(reinterpret_cast<float16_t*>(to), from);
4324}
4325
4326template <>
4327EIGEN_STRONG_INLINE void pstoreu<Eigen::half>(Eigen::half* to, const Packet8hf& from) {
4328 EIGEN_DEBUG_UNALIGNED_STORE vst1q_f16(reinterpret_cast<float16_t*>(to), from);
4329}
4330
4331template <>
4332EIGEN_STRONG_INLINE void pstoreu<Eigen::half>(Eigen::half* to, const Packet4hf& from) {
4333 EIGEN_DEBUG_UNALIGNED_STORE vst1_f16(reinterpret_cast<float16_t*>(to), from);
4334}
4335
4336template <>
4337EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Packet8hf pgather<Eigen::half, Packet8hf>(const Eigen::half* from, Index stride) {
4338 Packet8hf res = pset1<Packet8hf>(Eigen::half(0.f));
4339 res = vsetq_lane_f16(from[0 * stride].x, res, 0);
4340 res = vsetq_lane_f16(from[1 * stride].x, res, 1);
4341 res = vsetq_lane_f16(from[2 * stride].x, res, 2);
4342 res = vsetq_lane_f16(from[3 * stride].x, res, 3);
4343 res = vsetq_lane_f16(from[4 * stride].x, res, 4);
4344 res = vsetq_lane_f16(from[5 * stride].x, res, 5);
4345 res = vsetq_lane_f16(from[6 * stride].x, res, 6);
4346 res = vsetq_lane_f16(from[7 * stride].x, res, 7);
4347 return res;
4348}
4349
4350template <>
4351EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Packet4hf pgather<Eigen::half, Packet4hf>(const Eigen::half* from, Index stride) {
4352 Packet4hf res = pset1<Packet4hf>(Eigen::half(0.f));
4353 res = vset_lane_f16(from[0 * stride].x, res, 0);
4354 res = vset_lane_f16(from[1 * stride].x, res, 1);
4355 res = vset_lane_f16(from[2 * stride].x, res, 2);
4356 res = vset_lane_f16(from[3 * stride].x, res, 3);
4357 return res;
4358}
4359
4360template <>
4361EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void pscatter<Eigen::half, Packet8hf>(Eigen::half* to, const Packet8hf& from, Index stride) {
4362 to[stride * 0].x = vgetq_lane_f16(from, 0);
4363 to[stride * 1].x = vgetq_lane_f16(from, 1);
4364 to[stride * 2].x = vgetq_lane_f16(from, 2);
4365 to[stride * 3].x = vgetq_lane_f16(from, 3);
4366 to[stride * 4].x = vgetq_lane_f16(from, 4);
4367 to[stride * 5].x = vgetq_lane_f16(from, 5);
4368 to[stride * 6].x = vgetq_lane_f16(from, 6);
4369 to[stride * 7].x = vgetq_lane_f16(from, 7);
4370}
4371
4372template <>
4373EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void pscatter<Eigen::half, Packet4hf>(Eigen::half* to, const Packet4hf& from, Index stride) {
4374 to[stride * 0].x = vget_lane_f16(from, 0);
4375 to[stride * 1].x = vget_lane_f16(from, 1);
4376 to[stride * 2].x = vget_lane_f16(from, 2);
4377 to[stride * 3].x = vget_lane_f16(from, 3);
4378}
4379
4380template <>
4381EIGEN_STRONG_INLINE void prefetch<Eigen::half>(const Eigen::half* addr) {
4382 EIGEN_ARM_PREFETCH(addr);
4383}
4384
4385template <>
4386EIGEN_STRONG_INLINE Eigen::half pfirst<Packet8hf>(const Packet8hf& a) {
4387 float16_t x[8];
4388 vst1q_f16(x, a);
4389 Eigen::half h;
4390 h.x = x[0];
4391 return h;
4392}
4393
4394template <>
4395EIGEN_STRONG_INLINE Eigen::half pfirst<Packet4hf>(const Packet4hf& a) {
4396 float16_t x[4];
4397 vst1_f16(x, a);
4398 Eigen::half h;
4399 h.x = x[0];
4400 return h;
4401}
4402
4403template<> EIGEN_STRONG_INLINE Packet8hf preverse(const Packet8hf& a) {
4404 float16x4_t a_lo, a_hi;
4405 Packet8hf a_r64;
4406
4407 a_r64 = vrev64q_f16(a);
4408 a_lo = vget_low_f16(a_r64);
4409 a_hi = vget_high_f16(a_r64);
4410 return vcombine_f16(a_hi, a_lo);
4411}
4412
4413template <>
4414EIGEN_STRONG_INLINE Packet4hf preverse<Packet4hf>(const Packet4hf& a) {
4415 return vrev64_f16(a);
4416}
4417
4418template <>
4419EIGEN_STRONG_INLINE Packet8hf pabs<Packet8hf>(const Packet8hf& a) {
4420 return vabsq_f16(a);
4421}
4422
4423template <>
4424EIGEN_STRONG_INLINE Packet4hf pabs<Packet4hf>(const Packet4hf& a) {
4425 return vabs_f16(a);
4426}
4427
4428template <>
4429EIGEN_STRONG_INLINE Eigen::half predux<Packet8hf>(const Packet8hf& a) {
4430 float16x4_t a_lo, a_hi, sum;
4431
4432 a_lo = vget_low_f16(a);
4433 a_hi = vget_high_f16(a);
4434 sum = vpadd_f16(a_lo, a_hi);
4435 sum = vpadd_f16(sum, sum);
4436 sum = vpadd_f16(sum, sum);
4437
4438 Eigen::half h;
4439 h.x = vget_lane_f16(sum, 0);
4440 return h;
4441}
4442
4443template <>
4444EIGEN_STRONG_INLINE Eigen::half predux<Packet4hf>(const Packet4hf& a) {
4445 float16x4_t sum;
4446
4447 sum = vpadd_f16(a, a);
4448 sum = vpadd_f16(sum, sum);
4449 Eigen::half h;
4450 h.x = vget_lane_f16(sum, 0);
4451 return h;
4452}
4453
4454template <>
4455EIGEN_STRONG_INLINE Eigen::half predux_mul<Packet8hf>(const Packet8hf& a) {
4456 float16x4_t a_lo, a_hi, prod;
4457
4458 a_lo = vget_low_f16(a);
4459 a_hi = vget_high_f16(a);
4460 prod = vmul_f16(a_lo, a_hi);
4461 prod = vmul_f16(prod, vrev64_f16(prod));
4462
4463 Eigen::half h;
4464 h.x = vmulh_f16(vget_lane_f16(prod, 0), vget_lane_f16(prod, 1));
4465 return h;
4466}
4467
4468template <>
4469EIGEN_STRONG_INLINE Eigen::half predux_mul<Packet4hf>(const Packet4hf& a) {
4470 float16x4_t prod;
4471 prod = vmul_f16(a, vrev64_f16(a));
4472 Eigen::half h;
4473 h.x = vmulh_f16(vget_lane_f16(prod, 0), vget_lane_f16(prod, 1));
4474 return h;
4475}
4476
4477template <>
4478EIGEN_STRONG_INLINE Eigen::half predux_min<Packet8hf>(const Packet8hf& a) {
4479 float16x4_t a_lo, a_hi, min;
4480
4481 a_lo = vget_low_f16(a);
4482 a_hi = vget_high_f16(a);
4483 min = vpmin_f16(a_lo, a_hi);
4484 min = vpmin_f16(min, min);
4485 min = vpmin_f16(min, min);
4486
4487 Eigen::half h;
4488 h.x = vget_lane_f16(min, 0);
4489 return h;
4490}
4491
4492template <>
4493EIGEN_STRONG_INLINE Eigen::half predux_min<Packet4hf>(const Packet4hf& a) {
4494 Packet4hf tmp;
4495 tmp = vpmin_f16(a, a);
4496 tmp = vpmin_f16(tmp, tmp);
4497 Eigen::half h;
4498 h.x = vget_lane_f16(tmp, 0);
4499 return h;
4500}
4501
4502template <>
4503EIGEN_STRONG_INLINE Eigen::half predux_max<Packet8hf>(const Packet8hf& a) {
4504 float16x4_t a_lo, a_hi, max;
4505
4506 a_lo = vget_low_f16(a);
4507 a_hi = vget_high_f16(a);
4508 max = vpmax_f16(a_lo, a_hi);
4509 max = vpmax_f16(max, max);
4510 max = vpmax_f16(max, max);
4511
4512 Eigen::half h;
4513 h.x = vget_lane_f16(max, 0);
4514 return h;
4515}
4516
4517template <>
4518EIGEN_STRONG_INLINE Eigen::half predux_max<Packet4hf>(const Packet4hf& a) {
4519 Packet4hf tmp;
4520 tmp = vpmax_f16(a, a);
4521 tmp = vpmax_f16(tmp, tmp);
4522 Eigen::half h;
4523 h.x = vget_lane_f16(tmp, 0);
4524 return h;
4525}
4526
4527EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void ptranspose(PacketBlock<Packet8hf, 4>& kernel)
4528{
4529 const float16x8x2_t zip16_1 = vzipq_f16(kernel.packet[0], kernel.packet[1]);
4530 const float16x8x2_t zip16_2 = vzipq_f16(kernel.packet[2], kernel.packet[3]);
4531
4532 const float32x4x2_t zip32_1 = vzipq_f32(vreinterpretq_f32_f16(zip16_1.val[0]), vreinterpretq_f32_f16(zip16_2.val[0]));
4533 const float32x4x2_t zip32_2 = vzipq_f32(vreinterpretq_f32_f16(zip16_1.val[1]), vreinterpretq_f32_f16(zip16_2.val[1]));
4534
4535 kernel.packet[0] = vreinterpretq_f16_f32(zip32_1.val[0]);
4536 kernel.packet[1] = vreinterpretq_f16_f32(zip32_1.val[1]);
4537 kernel.packet[2] = vreinterpretq_f16_f32(zip32_2.val[0]);
4538 kernel.packet[3] = vreinterpretq_f16_f32(zip32_2.val[1]);
4539}
4540
4541EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void ptranspose(PacketBlock<Packet4hf, 4>& kernel) {
4542 EIGEN_ALIGN16 float16x4x4_t tmp_x4;
4543 float16_t* tmp = (float16_t*)&kernel;
4544 tmp_x4 = vld4_f16(tmp);
4545
4546 kernel.packet[0] = tmp_x4.val[0];
4547 kernel.packet[1] = tmp_x4.val[1];
4548 kernel.packet[2] = tmp_x4.val[2];
4549 kernel.packet[3] = tmp_x4.val[3];
4550}
4551
4552EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void ptranspose(PacketBlock<Packet8hf, 8>& kernel) {
4553 float16x8x2_t T_1[4];
4554
4555 T_1[0] = vuzpq_f16(kernel.packet[0], kernel.packet[1]);
4556 T_1[1] = vuzpq_f16(kernel.packet[2], kernel.packet[3]);
4557 T_1[2] = vuzpq_f16(kernel.packet[4], kernel.packet[5]);
4558 T_1[3] = vuzpq_f16(kernel.packet[6], kernel.packet[7]);
4559
4560 float16x8x2_t T_2[4];
4561 T_2[0] = vuzpq_f16(T_1[0].val[0], T_1[1].val[0]);
4562 T_2[1] = vuzpq_f16(T_1[0].val[1], T_1[1].val[1]);
4563 T_2[2] = vuzpq_f16(T_1[2].val[0], T_1[3].val[0]);
4564 T_2[3] = vuzpq_f16(T_1[2].val[1], T_1[3].val[1]);
4565
4566 float16x8x2_t T_3[4];
4567 T_3[0] = vuzpq_f16(T_2[0].val[0], T_2[2].val[0]);
4568 T_3[1] = vuzpq_f16(T_2[0].val[1], T_2[2].val[1]);
4569 T_3[2] = vuzpq_f16(T_2[1].val[0], T_2[3].val[0]);
4570 T_3[3] = vuzpq_f16(T_2[1].val[1], T_2[3].val[1]);
4571
4572 kernel.packet[0] = T_3[0].val[0];
4573 kernel.packet[1] = T_3[2].val[0];
4574 kernel.packet[2] = T_3[1].val[0];
4575 kernel.packet[3] = T_3[3].val[0];
4576 kernel.packet[4] = T_3[0].val[1];
4577 kernel.packet[5] = T_3[2].val[1];
4578 kernel.packet[6] = T_3[1].val[1];
4579 kernel.packet[7] = T_3[3].val[1];
4580}
4581#endif // end EIGEN_HAS_ARM64_FP16_VECTOR_ARITHMETIC
4582
4583} // end namespace internal
4584
4585} // end namespace Eigen
4586
4587#endif // EIGEN_PACKET_MATH_NEON_H
Matrix3f m
Definition AngleAxis_mimic_euler.cpp:1
ArrayXXi a
Definition Array_initializer_list_23_cxx11.cpp:1
int n
Definition BiCGSTAB_simple.cpp:1
int i
Definition BiCGSTAB_step_by_step.cpp:9
#define EIGEN_ALIGN16
Definition ConfigureVectorization.h:153
#define EIGEN_DEBUG_ALIGNED_STORE
Definition GenericPacketMath.h:35
#define EIGEN_DEBUG_ALIGNED_LOAD
Definition GenericPacketMath.h:27
#define EIGEN_DEBUG_UNALIGNED_STORE
Definition GenericPacketMath.h:39
#define EIGEN_DEBUG_UNALIGNED_LOAD
Definition GenericPacketMath.h:31
#define EIGEN_ALWAYS_INLINE
Definition Macros.h:932
#define EIGEN_UNROLL_LOOP
Definition Macros.h:1461
#define EIGEN_DEVICE_FUNC
Definition Macros.h:976
#define eigen_assert(x)
Definition Macros.h:1037
#define EIGEN_FAST_MATH
Definition Macros.h:49
#define EIGEN_STRONG_INLINE
Definition Macros.h:917
#define EIGEN_OPTIMIZATION_BARRIER(X)
Definition Macros.h:1144
Vector3f p1
Definition MatrixBase_all.cpp:2
#define EIGEN_ARM_PREFETCH(ADDR)
Definition PacketMath.h:162
cout<< "Here is the matrix m:"<< endl<< m<< endl;Matrix< ptrdiff_t, 3, 1 > res
Definition PartialRedux_count.cpp:3
#define vec4f_swizzle2(a, b, p, q, r, s)
Definition PacketMath.h:70
#define vec4f_swizzle1(v, p, q, r, s)
Definition PacketMath.h:61
#define vec2d_swizzle2(a, b, mask)
Definition PacketMath.h:95
float * p
Definition Tutorial_Map_using.cpp:9
Scalar Scalar * c
Definition benchVecAdd.cpp:17
Scalar * b
Definition benchVecAdd.cpp:17
@ N
Definition constructor.cpp:23
#define min(a, b)
Definition datatypes.h:19
#define max(a, b)
Definition datatypes.h:20
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
@ Unaligned
Definition Constants.h:233
@ Aligned16
Definition Constants.h:235
RealScalar s
Definition level1_cplx_impl.h:126
EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR __bfloat16_raw raw_uint16_to_bfloat16(unsigned short value)
EIGEN_ALWAYS_INLINE void zip_in_place< Packet8c >(Packet8c &p1, Packet8c &p2)
Definition PacketMath.h:2794
void zip_in_place(Packet &p1, Packet &p2)
EIGEN_ALWAYS_INLINE void zip_in_place< Packet2i >(Packet2i &p1, Packet2i &p2)
Definition PacketMath.h:2822
EIGEN_ALWAYS_INLINE void zip_in_place< Packet16c >(Packet16c &p1, Packet16c &p2)
Definition PacketMath.h:2801
EIGEN_ALWAYS_INLINE void zip_in_place< Packet4i >(Packet4i &p1, Packet4i &p2)
Definition PacketMath.h:2829
EIGEN_ALWAYS_INLINE void zip_in_place< Packet8uc >(Packet8uc &p1, Packet8uc &p2)
Definition PacketMath.h:2808
EIGEN_ALWAYS_INLINE void zip_in_place< Packet2ui >(Packet2ui &p1, Packet2ui &p2)
Definition PacketMath.h:2836
EIGEN_ALWAYS_INLINE void zip_in_place< Packet16uc >(Packet16uc &p1, Packet16uc &p2)
Definition PacketMath.h:2815
EIGEN_ALWAYS_INLINE void zip_in_place< Packet4us >(Packet4us &p1, Packet4us &p2)
Definition PacketMath.h:2864
EIGEN_ALWAYS_INLINE void zip_in_place< Packet4ui >(Packet4ui &p1, Packet4ui &p2)
Definition PacketMath.h:2843
EIGEN_ALWAYS_INLINE void zip_in_place< Packet8s >(Packet8s &p1, Packet8s &p2)
Definition PacketMath.h:2857
EIGEN_ALWAYS_INLINE void zip_in_place< Packet8us >(Packet8us &p1, Packet8us &p2)
Definition PacketMath.h:2871
EIGEN_ALWAYS_INLINE void zip_in_place< Packet4f >(Packet4f &p1, Packet4f &p2)
Definition PacketMath.h:2787
EIGEN_ALWAYS_INLINE void ptranspose_impl(PacketBlock< Packet, 2 > &kernel)
Definition PacketMath.h:2878
EIGEN_ALWAYS_INLINE void zip_in_place< Packet4bf >(Packet4bf &p1, Packet4bf &p2)
Definition PacketMath.h:3380
EIGEN_ALWAYS_INLINE void zip_in_place< Packet2f >(Packet2f &p1, Packet2f &p2)
Definition PacketMath.h:2780
EIGEN_ALWAYS_INLINE void zip_in_place< Packet4s >(Packet4s &p1, Packet4s &p2)
Definition PacketMath.h:2850
EIGEN_STRONG_INLINE int64_t predux_min< Packet2l >(const Packet2l &a)
Definition PacketMath.h:2666
EIGEN_STRONG_INLINE Packet16uc pdiv< Packet16uc >(const Packet16uc &, const Packet16uc &)
Definition PacketMath.h:1026
EIGEN_STRONG_INLINE Packet8uc pmin< Packet8uc >(const Packet8uc &a, const Packet8uc &b)
Definition PacketMath.h:1207
EIGEN_STRONG_INLINE Packet4f pandnot< Packet4f >(const Packet4f &a, const Packet4f &b)
Definition PacketMath.h:914
EIGEN_STRONG_INLINE Packet8s pabsdiff< Packet8s >(const Packet8s &a, const Packet8s &b)
Definition PacketMath.h:1165
EIGEN_STRONG_INLINE Packet4ui psub< Packet4ui >(const Packet4ui &a, const Packet4ui &b)
Definition PacketMath.h:859
EIGEN_STRONG_INLINE void pscatter< bfloat16, Packet4bf >(bfloat16 *to, const Packet4bf &from, Index stride)
Definition PacketMath.h:3561
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Packet2ui pgather< uint32_t, Packet2ui >(const uint32_t *from, Index stride)
Definition PacketMath.h:2089
EIGEN_STRONG_INLINE Packet2i pmax< Packet2i >(const Packet2i &a, const Packet2i &b)
Definition PacketMath.h:1261
EIGEN_STRONG_INLINE Packet16c pmin< Packet16c >(const Packet16c &a, const Packet16c &b)
Definition PacketMath.h:846
EIGEN_STRONG_INLINE Packet8uc pload< Packet8uc >(const uint8_t *from)
Definition PacketMath.h:1684
EIGEN_STRONG_INLINE Packet2ui pabsdiff< Packet2ui >(const Packet2ui &a, const Packet2ui &b)
Definition PacketMath.h:1175
EIGEN_STRONG_INLINE Packet8us pand< Packet8us >(const Packet8us &a, const Packet8us &b)
Definition PacketMath.h:894
EIGEN_STRONG_INLINE Packet8c por< Packet8c >(const Packet8c &a, const Packet8c &b)
Definition PacketMath.h:1503
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void pscatter< uint16_t, Packet4us >(uint16_t *to, const Packet4us &from, Index stride)
Definition PacketMath.h:2216
EIGEN_STRONG_INLINE Packet4uc plset< Packet4uc >(const uint8_t &a)
Definition PacketMath.h:742
EIGEN_STRONG_INLINE Packet16c pcmp_le< Packet16c >(const Packet16c &a, const Packet16c &b)
Definition PacketMath.h:1288
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Packet4c pgather< int8_t, Packet4c >(const int8_t *from, Index stride)
Definition PacketMath.h:1957
v2f64 Packet2d
Definition PacketMath.h:820
EIGEN_STRONG_INLINE Packet4ui pset1< Packet4ui >(const uint32_t &from)
Definition PacketMath.h:711
EIGEN_STRONG_INLINE void pstoreu< double >(double *to, const Packet4d &from)
Definition PacketMath.h:627
EIGEN_STRONG_INLINE Packet8s pmax< Packet8s >(const Packet8s &a, const Packet8s &b)
Definition PacketMath.h:862
EIGEN_STRONG_INLINE Packet8c pload< Packet8c >(const int8_t *from)
Definition PacketMath.h:1674
EIGEN_STRONG_INLINE float predux< Packet2f >(const Packet2f &a)
Definition PacketMath.h:2387
EIGEN_STRONG_INLINE Packet2ui psub< Packet2ui >(const Packet2ui &a, const Packet2ui &b)
Definition PacketMath.h:858
EIGEN_STRONG_INLINE double predux< Packet2d >(const Packet2d &a)
Definition PacketMath.h:1082
EIGEN_STRONG_INLINE void pstoreu< int8_t >(int8_t *to, const Packet4c &from)
Definition PacketMath.h:1910
EIGEN_STRONG_INLINE void prefetch< uint64_t >(const uint64_t *addr)
Definition PacketMath.h:2277
EIGEN_STRONG_INLINE Packet2cf pconj(const Packet2cf &a)
Definition Complex.h:167
v2i64 Packet2l
Definition PacketMath.h:821
EIGEN_STRONG_INLINE Packet4c psub< Packet4c >(const Packet4c &a, const Packet4c &b)
Definition PacketMath.h:836
EIGEN_STRONG_INLINE signed char predux< Packet16c >(const Packet16c &a)
Definition PacketMath.h:1521
EIGEN_STRONG_INLINE Packet8c psub< Packet8c >(const Packet8c &a, const Packet8c &b)
Definition PacketMath.h:842
EIGEN_STRONG_INLINE Packet2ui pdiv< Packet2ui >(const Packet2ui &, const Packet2ui &)
Definition PacketMath.h:1061
EIGEN_STRONG_INLINE Packet4s pcmp_lt< Packet4s >(const Packet4s &a, const Packet4s &b)
Definition PacketMath.h:1361
EIGEN_STRONG_INLINE Packet16c pmax< Packet16c >(const Packet16c &a, const Packet16c &b)
Definition PacketMath.h:864
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Packet16uc pgather< uint8_t, Packet16uc >(const uint8_t *from, Index stride)
Definition PacketMath.h:2015
EIGEN_STRONG_INLINE Packet4s pcmp_eq< Packet4s >(const Packet4s &a, const Packet4s &b)
Definition PacketMath.h:1422
EIGEN_STRONG_INLINE Packet4us pset1< Packet4us >(const uint16_t &from)
Definition PacketMath.h:706
EIGEN_STRONG_INLINE Packet2i pand< Packet2i >(const Packet2i &a, const Packet2i &b)
Definition PacketMath.h:1487
EIGEN_STRONG_INLINE void prefetch< int8_t >(const int8_t *addr)
Definition PacketMath.h:2270
EIGEN_STRONG_INLINE Packet8c pand< Packet8c >(const Packet8c &a, const Packet8c &b)
Definition PacketMath.h:1471
EIGEN_STRONG_INLINE void prefetch< uint32_t >(const uint32_t *addr)
Definition PacketMath.h:2275
EIGEN_STRONG_INLINE Packet2l pandnot< Packet2l >(const Packet2l &a, const Packet2l &b)
Definition PacketMath.h:1594
EIGEN_STRONG_INLINE int64_t predux< Packet2l >(const Packet2l &a)
Definition PacketMath.h:2473
EIGEN_DEVICE_FUNC Packet padd(const Packet &a, const Packet &b)
Definition GenericPacketMath.h:215
EIGEN_STRONG_INLINE float predux_min< Packet2f >(const Packet2f &a)
Definition PacketMath.h:2577
EIGEN_STRONG_INLINE Packet4us pmin< Packet4us >(const Packet4us &a, const Packet4us &b)
Definition PacketMath.h:1211
EIGEN_STRONG_INLINE int8_t predux_min< Packet8c >(const Packet8c &a)
Definition PacketMath.h:2591
EIGEN_STRONG_INLINE Packet4us por< Packet4us >(const Packet4us &a, const Packet4us &b)
Definition PacketMath.h:1516
EIGEN_STRONG_INLINE Packet8c ploadu< Packet8c >(const int8_t *from)
Definition PacketMath.h:1719
EIGEN_STRONG_INLINE Packet8us pabsdiff< Packet8us >(const Packet8us &a, const Packet8us &b)
Definition PacketMath.h:1169
EIGEN_STRONG_INLINE Packet4f pmin< Packet4f >(const Packet4f &a, const Packet4f &b)
Definition PacketMath.h:832
EIGEN_STRONG_INLINE Packet2d padd< Packet2d >(const Packet2d &a, const Packet2d &b)
Definition PacketMath.h:880
EIGEN_STRONG_INLINE Packet2d pandnot< Packet2d >(const Packet2d &a, const Packet2d &b)
Definition PacketMath.h:960
uint32x2_t Packet2ui
Definition PacketMath.h:76
EIGEN_STRONG_INLINE Packet8c padd< Packet8c >(const Packet8c &a, const Packet8c &b)
Definition PacketMath.h:813
EIGEN_STRONG_INLINE Packet8f Bf16ToF32(const Packet8bf &a)
Definition PacketMath.h:1260
EIGEN_STRONG_INLINE Packet8f pzero(const Packet8f &)
Definition PacketMath.h:247
EIGEN_STRONG_INLINE int32_t predux_mul< Packet2i >(const Packet2i &a)
Definition PacketMath.h:2563
EIGEN_STRONG_INLINE Packet2f pand< Packet2f >(const Packet2f &a, const Packet2f &b)
Definition PacketMath.h:1465
EIGEN_STRONG_INLINE Packet2i psub< Packet2i >(const Packet2i &a, const Packet2i &b)
Definition PacketMath.h:856
EIGEN_STRONG_INLINE uint32_t predux_max< Packet4ui >(const Packet4ui &a)
Definition PacketMath.h:2756
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void pscatter< uint64_t, Packet2ul >(uint64_t *to, const Packet2ul &from, Index stride)
Definition PacketMath.h:2263
__vector int Packet4i
Definition PacketMath.h:31
EIGEN_STRONG_INLINE Packet16uc ploadu< Packet16uc >(const unsigned char *from)
Definition PacketMath.h:992
EIGEN_STRONG_INLINE Packet4us ploadu< Packet4us >(const uint16_t *from)
Definition PacketMath.h:1737
EIGEN_STRONG_INLINE Packet4bf pcmp_le< Packet4bf >(const Packet4bf &a, const Packet4bf &b)
Definition PacketMath.h:3616
EIGEN_STRONG_INLINE unsigned char pfirst< Packet16uc >(const Packet16uc &a)
Definition PacketMath.h:1142
EIGEN_STRONG_INLINE Packet4f vec4f_movelh(const Packet4f &a, const Packet4f &b)
Definition PacketMath.h:121
EIGEN_STRONG_INLINE Packet2f pset1< Packet2f >(const float &from)
Definition PacketMath.h:694
EIGEN_STRONG_INLINE Packet2l ploadu< Packet2l >(const int64_t *from)
Definition PacketMath.h:1749
EIGEN_STRONG_INLINE void pstore< int64_t >(int64_t *to, const Packet2l &from)
Definition PacketMath.h:1901
EIGEN_STRONG_INLINE Packet4f pcmp_eq< Packet4f >(const Packet4f &a, const Packet4f &b)
Definition PacketMath.h:1400
EIGEN_STRONG_INLINE Packet8c pdiv< Packet8c >(const Packet8c &, const Packet8c &)
Definition PacketMath.h:1006
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Packet2l pgather< int64_t, Packet2l >(const int64_t *from, Index stride)
Definition PacketMath.h:2103
EIGEN_STRONG_INLINE Packet16c ploadquad< Packet16c >(const int8_t *from)
Definition PacketMath.h:1834
EIGEN_STRONG_INLINE Packet2d pmin< PropagateNaN, Packet2d >(const Packet2d &a, const Packet2d &b)
Definition PacketMath.h:585
EIGEN_STRONG_INLINE Packet4f padd< Packet4f >(const Packet4f &a, const Packet4f &b)
Definition PacketMath.h:774
EIGEN_STRONG_INLINE Packet16uc pmul< Packet16uc >(const Packet16uc &a, const Packet16uc &b)
Definition PacketMath.h:800
EIGEN_STRONG_INLINE Packet4bf pset1< Packet4bf >(const bfloat16 &from)
Definition PacketMath.h:3423
EIGEN_STRONG_INLINE Packet4i por< Packet4i >(const Packet4i &a, const Packet4i &b)
Definition PacketMath.h:901
EIGEN_STRONG_INLINE Packet2d pmax< PropagateNumbers, Packet2d >(const Packet2d &a, const Packet2d &b)
Definition PacketMath.h:577
int8x8_t Packet8c
Definition PacketMath.h:65
EIGEN_STRONG_INLINE Packet4c ploaddup< Packet4c >(const int8_t *from)
Definition PacketMath.h:1758
EIGEN_STRONG_INLINE Packet8c pcmp_eq< Packet8c >(const Packet8c &a, const Packet8c &b)
Definition PacketMath.h:1408
EIGEN_STRONG_INLINE Packet16c pdiv< Packet16c >(const Packet16c &, const Packet16c &)
Definition PacketMath.h:1011
EIGEN_STRONG_INLINE Packet16c por< Packet16c >(const Packet16c &a, const Packet16c &b)
Definition PacketMath.h:1504
EIGEN_STRONG_INLINE short int predux_min< Packet8s >(const Packet8s &a)
Definition PacketMath.h:1631
EIGEN_STRONG_INLINE Packet2ul pmin< Packet2ul >(const Packet2ul &a, const Packet2ul &b)
Definition PacketMath.h:1222
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Packet8us pgather< uint16_t, Packet8us >(const uint16_t *from, Index stride)
Definition PacketMath.h:2063
EIGEN_STRONG_INLINE Packet2i pcmp_le< Packet2i >(const Packet2i &a, const Packet2i &b)
Definition PacketMath.h:1308
EIGEN_STRONG_INLINE Packet4bf preverse< Packet4bf >(const Packet4bf &a)
Definition PacketMath.h:3586
EIGEN_STRONG_INLINE Packet4ui pmul< Packet4ui >(const Packet4ui &a, const Packet4ui &b)
Definition PacketMath.h:938
__vector unsigned char Packet16uc
Definition PacketMath.h:37
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void pscatter< int64_t, Packet2l >(int64_t *to, const Packet2l &from, Index stride)
Definition PacketMath.h:2258
EIGEN_STRONG_INLINE Packet8uc pandnot< Packet8uc >(const Packet8uc &a, const Packet8uc &b)
Definition PacketMath.h:1574
EIGEN_STRONG_INLINE Packet4i pset1< Packet4i >(const int &from)
Definition PacketMath.h:551
EIGEN_STRONG_INLINE Packet16c pload< Packet16c >(const signed char *from)
Definition PacketMath.h:463
EIGEN_STRONG_INLINE Packet4ui pdiv< Packet4ui >(const Packet4ui &, const Packet4ui &)
Definition PacketMath.h:1066
EIGEN_STRONG_INLINE Packet8us pmin< Packet8us >(const Packet8us &a, const Packet8us &b)
Definition PacketMath.h:845
EIGEN_STRONG_INLINE uint16_t predux_max< Packet4us >(const Packet4us &a)
Definition PacketMath.h:2735
EIGEN_STRONG_INLINE Packet2d paddsub< Packet2d >(const Packet2d &a, const Packet2d &b)
Definition PacketMath.h:312
EIGEN_STRONG_INLINE Packet4us pabsdiff< Packet4us >(const Packet4us &a, const Packet4us &b)
Definition PacketMath.h:1167
EIGEN_STRONG_INLINE Packet4f shuffle2(const Packet4f &m, const Packet4f &n, int mask)
Definition PacketMath.h:94
EIGEN_STRONG_INLINE Packet4bf pmin< Packet4bf >(const Packet4bf &a, const Packet4bf &b)
Definition PacketMath.h:3471
eigen_packet_wrapper< uint16x4_t, 19 > Packet4bf
Definition PacketMath.h:3317
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void pscatter< int8_t, Packet4c >(int8_t *to, const Packet4c &from, Index stride)
Definition PacketMath.h:2128
EIGEN_STRONG_INLINE int8_t pfirst< Packet4c >(const Packet4c &a)
Definition PacketMath.h:2281
EIGEN_STRONG_INLINE Packet16c psub< Packet16c >(const Packet16c &a, const Packet16c &b)
Definition PacketMath.h:786
EIGEN_STRONG_INLINE Packet2i ploaddup< Packet2i >(const int32_t *from)
Definition PacketMath.h:1812
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Packet8uc pgather< uint8_t, Packet8uc >(const uint8_t *from, Index stride)
Definition PacketMath.h:2003
EIGEN_STRONG_INLINE Packet4bf pmax< PropagateNaN, Packet4bf >(const Packet4bf &a, const Packet4bf &b)
Definition PacketMath.h:3482
EIGEN_STRONG_INLINE Packet4us pload< Packet4us >(const uint16_t *from)
Definition PacketMath.h:1692
EIGEN_STRONG_INLINE Packet4c pload< Packet4c >(const int8_t *from)
Definition PacketMath.h:1668
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void pscatter< int32_t, Packet2i >(int32_t *to, const Packet2i &from, Index stride)
Definition PacketMath.h:2234
EIGEN_STRONG_INLINE unsigned short int predux_mul< Packet8us >(const Packet8us &a)
Definition PacketMath.h:1558
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Packet4ui pgather< uint32_t, Packet4ui >(const uint32_t *from, Index stride)
Definition PacketMath.h:2095
EIGEN_STRONG_INLINE Packet4c ploadquad< Packet4c >(const int8_t *from)
Definition PacketMath.h:1826
EIGEN_STRONG_INLINE Packet2d vec2d_unpackhi(const Packet2d &a, const Packet2d &b)
Definition PacketMath.h:102
EIGEN_STRONG_INLINE Packet8s pcmp_eq< Packet8s >(const Packet8s &a, const Packet8s &b)
Definition PacketMath.h:1424
EIGEN_STRONG_INLINE void pstoreu< Eigen::half >(Eigen::half *to, const Packet8h &from)
Definition PacketMath.h:958
EIGEN_STRONG_INLINE Packet2ul pxor< Packet2ul >(const Packet2ul &a, const Packet2ul &b)
Definition PacketMath.h:1561
EIGEN_STRONG_INLINE float pfirst< Packet4f >(const Packet4f &a)
Definition PacketMath.h:1120
EIGEN_STRONG_INLINE Packet2d pand< Packet2d >(const Packet2d &a, const Packet2d &b)
Definition PacketMath.h:939
EIGEN_STRONG_INLINE Packet16uc pmax< Packet16uc >(const Packet16uc &a, const Packet16uc &b)
Definition PacketMath.h:865
EIGEN_STRONG_INLINE Packet4c pandnot< Packet4c >(const Packet4c &a, const Packet4c &b)
Definition PacketMath.h:1568
EIGEN_STRONG_INLINE Packet4f ploadquad< Packet4f >(const float *from)
Definition PacketMath.h:1825
EIGEN_STRONG_INLINE Packet4s pset1< Packet4s >(const int16_t &from)
Definition PacketMath.h:704
EIGEN_STRONG_INLINE Packet4f shuffle1(const Packet4f &m, int mask)
Definition PacketMath.h:83
EIGEN_STRONG_INLINE void prefetch< uint16_t >(const uint16_t *addr)
Definition PacketMath.h:2273
EIGEN_STRONG_INLINE Packet2ul pandnot< Packet2ul >(const Packet2ul &a, const Packet2ul &b)
Definition PacketMath.h:1596
EIGEN_STRONG_INLINE Packet8us pcmp_le< Packet8us >(const Packet8us &a, const Packet8us &b)
Definition PacketMath.h:1306
EIGEN_STRONG_INLINE Packet4s pmin< Packet4s >(const Packet4s &a, const Packet4s &b)
Definition PacketMath.h:1209
EIGEN_STRONG_INLINE Packet8s por< Packet8s >(const Packet8s &a, const Packet8s &b)
Definition PacketMath.h:902
EIGEN_STRONG_INLINE Packet8uc pcmp_lt< Packet8uc >(const Packet8uc &a, const Packet8uc &b)
Definition PacketMath.h:1357
EIGEN_STRONG_INLINE void prefetch< int64_t >(const int64_t *addr)
Definition PacketMath.h:2276
EIGEN_STRONG_INLINE Packet8us psub< Packet8us >(const Packet8us &a, const Packet8us &b)
Definition PacketMath.h:785
EIGEN_STRONG_INLINE Packet2f pcmp_eq< Packet2f >(const Packet2f &a, const Packet2f &b)
Definition PacketMath.h:1398
EIGEN_STRONG_INLINE Packet4bf print< Packet4bf >(const Packet4bf &a)
Definition PacketMath.h:3521
EIGEN_STRONG_INLINE Packet8c pxor< Packet8c >(const Packet8c &a, const Packet8c &b)
Definition PacketMath.h:1537
EIGEN_STRONG_INLINE Packet4bf pmul< Packet4bf >(const Packet4bf &a, const Packet4bf &b)
Definition PacketMath.h:3546
EIGEN_STRONG_INLINE Packet2ul pset1< Packet2ul >(const uint64_t &from)
Definition PacketMath.h:713
EIGEN_STRONG_INLINE Packet4c pdiv< Packet4c >(const Packet4c &, const Packet4c &)
Definition PacketMath.h:1001
EIGEN_STRONG_INLINE Packet4ui padd< Packet4ui >(const Packet4ui &a, const Packet4ui &b)
Definition PacketMath.h:776
EIGEN_STRONG_INLINE Packet8uc pxor< Packet8uc >(const Packet8uc &a, const Packet8uc &b)
Definition PacketMath.h:1543
EIGEN_STRONG_INLINE void ptranspose(PacketBlock< Packet2cf, 2 > &kernel)
Definition Complex.h:224
EIGEN_STRONG_INLINE Packet16c plset< Packet16c >(const signed char &a)
Definition PacketMath.h:771
EIGEN_STRONG_INLINE Packet4ui pand< Packet4ui >(const Packet4ui &a, const Packet4ui &b)
Definition PacketMath.h:893
EIGEN_STRONG_INLINE Packet4uc ploadquad< Packet4uc >(const uint8_t *from)
Definition PacketMath.h:1844
EIGEN_STRONG_INLINE Packet2ul pcmp_eq< Packet2ul >(const Packet2ul &a, const Packet2ul &b)
Definition PacketMath.h:1448
EIGEN_STRONG_INLINE Packet4bf pmin< PropagateNaN, Packet4bf >(const Packet4bf &a, const Packet4bf &b)
Definition PacketMath.h:3465
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Packet8s pgather< int16_t, Packet8s >(const int16_t *from, Index stride)
Definition PacketMath.h:2043
EIGEN_STRONG_INLINE uint8_t pfirst< Packet8uc >(const Packet8uc &a)
Definition PacketMath.h:2285
EIGEN_STRONG_INLINE Packet16c pabsdiff< Packet16c >(const Packet16c &a, const Packet16c &b)
Definition PacketMath.h:1151
EIGEN_STRONG_INLINE int32_t predux_min< Packet2i >(const Packet2i &a)
Definition PacketMath.h:2652
EIGEN_STRONG_INLINE Packet16uc pset1< Packet16uc >(const unsigned char &from)
Definition PacketMath.h:567
EIGEN_STRONG_INLINE Packet4bf pmax< Packet4bf >(const Packet4bf &a, const Packet4bf &b)
Definition PacketMath.h:3488
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void pscatter< uint32_t, Packet4ui >(uint32_t *to, const Packet4ui &from, Index stride)
Definition PacketMath.h:2251
EIGEN_STRONG_INLINE Packet4uc pdiv< Packet4uc >(const Packet4uc &, const Packet4uc &)
Definition PacketMath.h:1016
eigen_packet_wrapper< int32_t,2 > Packet4c
Definition PacketMath.h:64
EIGEN_STRONG_INLINE Packet4i ploaddup< Packet4i >(const int *from)
Definition PacketMath.h:1008
EIGEN_STRONG_INLINE bool predux_any(const Packet4f &x)
Definition PacketMath.h:1765
EIGEN_STRONG_INLINE uint32_t predux_mul< Packet2ui >(const Packet2ui &a)
Definition PacketMath.h:2567
EIGEN_STRONG_INLINE Packet4us pcmp_le< Packet4us >(const Packet4us &a, const Packet4us &b)
Definition PacketMath.h:1304
EIGEN_STRONG_INLINE Packet4s padd< Packet4s >(const Packet4s &a, const Packet4s &b)
Definition PacketMath.h:823
EIGEN_STRONG_INLINE Packet4s pand< Packet4s >(const Packet4s &a, const Packet4s &b)
Definition PacketMath.h:1481
EIGEN_STRONG_INLINE float predux_max< Packet4f >(const Packet4f &a)
Definition PacketMath.h:1693
EIGEN_STRONG_INLINE Packet4bf padd< Packet4bf >(const Packet4bf &a, const Packet4bf &b)
Definition PacketMath.h:3538
EIGEN_STRONG_INLINE Packet2ui ploadu< Packet2ui >(const uint32_t *from)
Definition PacketMath.h:1745
EIGEN_STRONG_INLINE Packet2ul ploaddup< Packet2ul >(const uint64_t *from)
Definition PacketMath.h:1822
EIGEN_STRONG_INLINE Packet2d ploaddup< Packet2d >(const double *from)
Definition PacketMath.h:1011
EIGEN_STRONG_INLINE Packet8us plset< Packet8us >(const unsigned short int &a)
Definition PacketMath.h:770
__vector unsigned short int Packet8us
Definition PacketMath.h:35
EIGEN_STRONG_INLINE Packet2l pcmp_eq< Packet2l >(const Packet2l &a, const Packet2l &b)
Definition PacketMath.h:1438
EIGEN_STRONG_INLINE Packet4f vec4f_movehl(const Packet4f &a, const Packet4f &b)
Definition PacketMath.h:125
EIGEN_STRONG_INLINE Packet2d pxor< Packet2d >(const Packet2d &a, const Packet2d &b)
Definition PacketMath.h:953
EIGEN_STRONG_INLINE uint8_t predux_max< Packet4uc >(const Packet4uc &a)
Definition PacketMath.h:2701
EIGEN_STRONG_INLINE uint32_t predux_min< Packet2ui >(const Packet2ui &a)
Definition PacketMath.h:2659
EIGEN_STRONG_INLINE unsigned char predux< Packet16uc >(const Packet16uc &a)
Definition PacketMath.h:1526
EIGEN_STRONG_INLINE unsigned char predux_max< Packet16uc >(const Packet16uc &a)
Definition PacketMath.h:1753
EIGEN_STRONG_INLINE Packet2d por< Packet2d >(const Packet2d &a, const Packet2d &b)
Definition PacketMath.h:946
EIGEN_STRONG_INLINE Packet2ul pload< Packet2ul >(const uint64_t *from)
Definition PacketMath.h:1706
EIGEN_STRONG_INLINE Packet2f pceil< Packet2f >(const Packet2f &a)
Definition PacketMath.h:3173
EIGEN_STRONG_INLINE Packet4f shuffle2< true >(const Packet4f &m, const Packet4f &n, int mask)
Definition PacketMath.h:103
EIGEN_STRONG_INLINE void pstore< bfloat16 >(bfloat16 *to, const Packet8bf &from)
Definition PacketMath.h:511
EIGEN_STRONG_INLINE Packet2d pldexp< Packet2d >(const Packet2d &a, const Packet2d &exponent)
Definition PacketMath.h:928
EIGEN_STRONG_INLINE Packet2f pmul< Packet2f >(const Packet2f &a, const Packet2f &b)
Definition PacketMath.h:913
EIGEN_STRONG_INLINE Packet2f pmax< PropagateNaN, Packet2f >(const Packet2f &a, const Packet2f &b)
Definition PacketMath.h:1239
EIGEN_STRONG_INLINE int16_t predux_mul< Packet4s >(const Packet4s &a)
Definition PacketMath.h:2531
EIGEN_STRONG_INLINE Packet2ui pand< Packet2ui >(const Packet2ui &a, const Packet2ui &b)
Definition PacketMath.h:1489
EIGEN_STRONG_INLINE Packet4us pmax< Packet4us >(const Packet4us &a, const Packet4us &b)
Definition PacketMath.h:1259
EIGEN_STRONG_INLINE Packet2l padd< Packet2l >(const Packet2l &a, const Packet2l &b)
Definition PacketMath.h:831
EIGEN_STRONG_INLINE Packet8s ploadu< Packet8s >(const short int *from)
Definition PacketMath.h:976
EIGEN_STRONG_INLINE Packet4f pmax< PropagateNumbers, Packet4f >(const Packet4f &a, const Packet4f &b)
Definition PacketMath.h:573
EIGEN_STRONG_INLINE Packet4ui pcmp_le< Packet4ui >(const Packet4ui &a, const Packet4ui &b)
Definition PacketMath.h:1314
EIGEN_STRONG_INLINE Packet8us pdiv< Packet8us >(const Packet8us &, const Packet8us &)
Definition PacketMath.h:1046
EIGEN_STRONG_INLINE Packet2f pmin< PropagateNaN, Packet2f >(const Packet2f &a, const Packet2f &b)
Definition PacketMath.h:1191
EIGEN_STRONG_INLINE uint16_t predux_min< Packet4us >(const Packet4us &a)
Definition PacketMath.h:2640
EIGEN_STRONG_INLINE Packet2ui padd< Packet2ui >(const Packet2ui &a, const Packet2ui &b)
Definition PacketMath.h:829
EIGEN_STRONG_INLINE Packet2l pcmp_lt< Packet2l >(const Packet2l &a, const Packet2l &b)
Definition PacketMath.h:1377
EIGEN_STRONG_INLINE Packet4uc pmul< Packet4uc >(const Packet4uc &a, const Packet4uc &b)
Definition PacketMath.h:923
EIGEN_STRONG_INLINE Packet4c pabsdiff< Packet4c >(const Packet4c &a, const Packet4c &b)
Definition PacketMath.h:1143
EIGEN_STRONG_INLINE Packet4f ploaddup< Packet4f >(const float *from)
Definition PacketMath.h:1004
EIGEN_STRONG_INLINE Packet4f por< Packet4f >(const Packet4f &a, const Packet4f &b)
Definition PacketMath.h:900
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void pscatter< uint8_t, Packet8uc >(uint8_t *to, const Packet8uc &from, Index stride)
Definition PacketMath.h:2168
EIGEN_STRONG_INLINE Packet2l por< Packet2l >(const Packet2l &a, const Packet2l &b)
Definition PacketMath.h:1526
EIGEN_STRONG_INLINE void prefetch< int32_t >(const int32_t *addr)
Definition PacketMath.h:516
EIGEN_STRONG_INLINE Packet8uc pset1< Packet8uc >(const uint8_t &from)
Definition PacketMath.h:702
EIGEN_STRONG_INLINE Packet4ui pabsdiff< Packet4ui >(const Packet4ui &a, const Packet4ui &b)
Definition PacketMath.h:1177
EIGEN_STRONG_INLINE Packet2i pmin< Packet2i >(const Packet2i &a, const Packet2i &b)
Definition PacketMath.h:1213
EIGEN_STRONG_INLINE Packet4i plogical_shift_left(const Packet4i &a)
Definition PacketMath.h:1191
EIGEN_STRONG_INLINE Packet8s plset< Packet8s >(const short int &a)
Definition PacketMath.h:769
EIGEN_STRONG_INLINE unsigned char predux_mul< Packet16uc >(const Packet16uc &a)
Definition PacketMath.h:1590
EIGEN_STRONG_INLINE Packet4c pcmp_eq< Packet4c >(const Packet4c &a, const Packet4c &b)
Definition PacketMath.h:1402
EIGEN_STRONG_INLINE short int predux_mul< Packet8s >(const Packet8s &a)
Definition PacketMath.h:1547
EIGEN_STRONG_INLINE Packet16uc padd< Packet16uc >(const Packet16uc &a, const Packet16uc &b)
Definition PacketMath.h:780
EIGEN_STRONG_INLINE int predux_min< Packet4i >(const Packet4i &a)
Definition PacketMath.h:1618
EIGEN_STRONG_INLINE Packet2ui pload< Packet2ui >(const uint32_t *from)
Definition PacketMath.h:1700
EIGEN_STRONG_INLINE Packet16uc psub< Packet16uc >(const Packet16uc &a, const Packet16uc &b)
Definition PacketMath.h:787
EIGEN_STRONG_INLINE Packet8uc plset< Packet8uc >(const uint8_t &a)
Definition PacketMath.h:744
EIGEN_STRONG_INLINE Packet2f pcmp_lt_or_nan< Packet2f >(const Packet2f &a, const Packet2f &b)
Definition PacketMath.h:1459
EIGEN_STRONG_INLINE Packet8c pmul< Packet8c >(const Packet8c &a, const Packet8c &b)
Definition PacketMath.h:921
EIGEN_STRONG_INLINE Packet4bf ploadu< Packet4bf >(const bfloat16 *from)
Definition PacketMath.h:3436
EIGEN_STRONG_INLINE Packet8c pabsdiff< Packet8c >(const Packet8c &a, const Packet8c &b)
Definition PacketMath.h:1149
EIGEN_STRONG_INLINE Packet4i pxor< Packet4i >(const Packet4i &a, const Packet4i &b)
Definition PacketMath.h:909
EIGEN_STRONG_INLINE Packet4f print(const Packet4f &a)
Definition PacketMath.h:3115
EIGEN_STRONG_INLINE Packet2i padd< Packet2i >(const Packet2i &a, const Packet2i &b)
Definition PacketMath.h:827
EIGEN_STRONG_INLINE double predux_max< Packet2d >(const Packet2d &a)
Definition PacketMath.h:1116
EIGEN_STRONG_INLINE int8_t predux_max< Packet8c >(const Packet8c &a)
Definition PacketMath.h:2686
EIGEN_STRONG_INLINE Packet4c pcmp_lt< Packet4c >(const Packet4c &a, const Packet4c &b)
Definition PacketMath.h:1341
EIGEN_STRONG_INLINE Packet4f pmul< Packet4f >(const Packet4f &a, const Packet4f &b)
Definition PacketMath.h:795
EIGEN_STRONG_INLINE Packet8us pcmp_lt< Packet8us >(const Packet8us &a, const Packet8us &b)
Definition PacketMath.h:1367
EIGEN_STRONG_INLINE Packet2f pcmp_lt< Packet2f >(const Packet2f &a, const Packet2f &b)
Definition PacketMath.h:1337
EIGEN_STRONG_INLINE Packet4s pxor< Packet4s >(const Packet4s &a, const Packet4s &b)
Definition PacketMath.h:1547
EIGEN_STRONG_INLINE Packet2l pcmp_le< Packet2l >(const Packet2l &a, const Packet2l &b)
Definition PacketMath.h:1316
EIGEN_STRONG_INLINE uint32_t predux< Packet4ui >(const Packet4ui &a)
Definition PacketMath.h:2468
EIGEN_STRONG_INLINE Packet4i pcmp_eq< Packet4i >(const Packet4i &a, const Packet4i &b)
Definition PacketMath.h:1432
EIGEN_STRONG_INLINE Packet4ui por< Packet4ui >(const Packet4ui &a, const Packet4ui &b)
Definition PacketMath.h:1524
EIGEN_STRONG_INLINE Packet4c plset< Packet4c >(const int8_t &a)
Definition PacketMath.h:730
EIGEN_STRONG_INLINE Packet8uc ploaddup< Packet8uc >(const uint8_t *from)
Definition PacketMath.h:1779
EIGEN_STRONG_INLINE Packet4ui pmin< Packet4ui >(const Packet4ui &a, const Packet4ui &b)
Definition PacketMath.h:1216
EIGEN_STRONG_INLINE Packet4c pmin< Packet4c >(const Packet4c &a, const Packet4c &b)
Definition PacketMath.h:1193
EIGEN_DEVICE_FUNC Packet4f pgather< float, Packet4f >(const float *from, Index stride)
Definition PacketMath.h:613
EIGEN_STRONG_INLINE Packet8us pmax< Packet8us >(const Packet8us &a, const Packet8us &b)
Definition PacketMath.h:863
EIGEN_STRONG_INLINE short int pfirst< Packet8s >(const Packet8s &a)
Definition PacketMath.h:1129
EIGEN_STRONG_INLINE Packet4f pcmp_le(const Packet4f &a, const Packet4f &b)
Definition PacketMath.h:867
EIGEN_STRONG_INLINE Packet4f paddsub< Packet4f >(const Packet4f &a, const Packet4f &b)
Definition PacketMath.h:869
EIGEN_STRONG_INLINE Packet8c plset< Packet8c >(const int8_t &a)
Definition PacketMath.h:732
EIGEN_STRONG_INLINE Packet2d pset1< Packet2d >(const double &from)
Definition PacketMath.h:872
EIGEN_STRONG_INLINE Packet4i plogical_shift_right(const Packet4i &a)
Definition PacketMath.h:1189
EIGEN_STRONG_INLINE Packet4uc pcmp_eq< Packet4uc >(const Packet4uc &a, const Packet4uc &b)
Definition PacketMath.h:1412
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Packet4us pgather< uint16_t, Packet4us >(const uint16_t *from, Index stride)
Definition PacketMath.h:2055
EIGEN_STRONG_INLINE Packet2ui pcmp_eq< Packet2ui >(const Packet2ui &a, const Packet2ui &b)
Definition PacketMath.h:1434
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void pscatter< uint32_t, Packet2ui >(uint32_t *to, const Packet2ui &from, Index stride)
Definition PacketMath.h:2246
EIGEN_STRONG_INLINE Packet4f pload< Packet4f >(const float *from)
Definition PacketMath.h:443
__vector signed char Packet16c
Definition PacketMath.h:36
EIGEN_STRONG_INLINE void pstore< int8_t >(int8_t *to, const Packet4c &from)
Definition PacketMath.h:1873
EIGEN_STRONG_INLINE int predux_mul< Packet4i >(const Packet4i &a)
Definition PacketMath.h:1540
EIGEN_STRONG_INLINE Packet4uc pload< Packet4uc >(const uint8_t *from)
Definition PacketMath.h:1678
EIGEN_STRONG_INLINE Packet4us plset< Packet4us >(const uint16_t &a)
Definition PacketMath.h:759
EIGEN_STRONG_INLINE Packet16uc pload< Packet16uc >(const unsigned char *from)
Definition PacketMath.h:468
EIGEN_STRONG_INLINE Packet4us ploaddup< Packet4us >(const uint16_t *from)
Definition PacketMath.h:1801
EIGEN_STRONG_INLINE Packet4s por< Packet4s >(const Packet4s &a, const Packet4s &b)
Definition PacketMath.h:1512
EIGEN_STRONG_INLINE Packet8us ploadu< Packet8us >(const unsigned short int *from)
Definition PacketMath.h:980
EIGEN_STRONG_INLINE Packet4c por< Packet4c >(const Packet4c &a, const Packet4c &b)
Definition PacketMath.h:1501
EIGEN_STRONG_INLINE Packet2f pldexp< Packet2f >(const Packet2f &a, const Packet2f &exponent)
Definition PacketMath.h:2382
EIGEN_STRONG_INLINE int16_t predux< Packet4s >(const Packet4s &a)
Definition PacketMath.h:2437
EIGEN_STRONG_INLINE signed char predux_mul< Packet16c >(const Packet16c &a)
Definition PacketMath.h:1578
EIGEN_STRONG_INLINE Packet8h por(const Packet8h &a, const Packet8h &b)
Definition PacketMath.h:1042
EIGEN_STRONG_INLINE Packet2f pmin< Packet2f >(const Packet2f &a, const Packet2f &b)
Definition PacketMath.h:1180
EIGEN_STRONG_INLINE Packet2ui pmin< Packet2ui >(const Packet2ui &a, const Packet2ui &b)
Definition PacketMath.h:1215
EIGEN_STRONG_INLINE Packet8us pmul< Packet8us >(const Packet8us &a, const Packet8us &b)
Definition PacketMath.h:798
EIGEN_STRONG_INLINE uint64_t predux_max< Packet2ul >(const Packet2ul &a)
Definition PacketMath.h:2763
EIGEN_STRONG_INLINE Packet8s pand< Packet8s >(const Packet8s &a, const Packet8s &b)
Definition PacketMath.h:1482
__vector unsigned int Packet4ui
Definition PacketMath.h:32
EIGEN_STRONG_INLINE Packet2d pmax< PropagateNaN, Packet2d >(const Packet2d &a, const Packet2d &b)
Definition PacketMath.h:593
EIGEN_STRONG_INLINE unsigned char predux_min< Packet16uc >(const Packet16uc &a)
Definition PacketMath.h:1673
EIGEN_STRONG_INLINE Packet4f pcmp_lt_or_nan< Packet4f >(const Packet4f &a, const Packet4f &b)
Definition PacketMath.h:1461
EIGEN_STRONG_INLINE Packet4f pmin< PropagateNaN, Packet4f >(const Packet4f &a, const Packet4f &b)
Definition PacketMath.h:1189
EIGEN_STRONG_INLINE Packet2i pload< Packet2i >(const int32_t *from)
Definition PacketMath.h:1696
EIGEN_STRONG_INLINE void pstore< uint8_t >(uint8_t *to, const Packet4uc &from)
Definition PacketMath.h:1879
EIGEN_STRONG_INLINE Packet2cf preverse(const Packet2cf &a)
Definition Complex.h:184
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void pscatter< int16_t, Packet4s >(int16_t *to, const Packet4s &from, Index stride)
Definition PacketMath.h:2198
EIGEN_STRONG_INLINE Packet2ui pmax< Packet2ui >(const Packet2ui &a, const Packet2ui &b)
Definition PacketMath.h:1263
EIGEN_STRONG_INLINE Packet8s pcmp_le< Packet8s >(const Packet8s &a, const Packet8s &b)
Definition PacketMath.h:1302
EIGEN_STRONG_INLINE uint16_t predux< Packet4us >(const Packet4us &a)
Definition PacketMath.h:2449
EIGEN_STRONG_INLINE void pstore< double >(double *to, const Packet4d &from)
Definition PacketMath.h:623
EIGEN_STRONG_INLINE Packet4f pcmp_le< Packet4f >(const Packet4f &a, const Packet4f &b)
Definition PacketMath.h:1278
EIGEN_STRONG_INLINE Packet4i padd< Packet4i >(const Packet4i &a, const Packet4i &b)
Definition PacketMath.h:775
EIGEN_DEVICE_FUNC unpacket_traits< Packet >::type predux_mul(const Packet &a)
Definition GenericPacketMath.h:882
EIGEN_STRONG_INLINE Packet4f pfloor< Packet4f >(const Packet4f &a)
Definition PacketMath.h:939
EIGEN_STRONG_INLINE Packet16c pcmp_eq< Packet16c >(const Packet16c &a, const Packet16c &b)
Definition PacketMath.h:1410
EIGEN_STRONG_INLINE uint32_t pfirst< Packet4ui >(const Packet4ui &a)
Definition PacketMath.h:2294
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void pscatter< float, Packet2f >(float *to, const Packet2f &from, Index stride)
Definition PacketMath.h:2116
EIGEN_STRONG_INLINE Packet4c pand< Packet4c >(const Packet4c &a, const Packet4c &b)
Definition PacketMath.h:1469
EIGEN_STRONG_INLINE Packet4f pmadd(const Packet4f &a, const Packet4f &b, const Packet4f &c)
Definition PacketMath.h:827
EIGEN_STRONG_INLINE Packet8c pcmp_le< Packet8c >(const Packet8c &a, const Packet8c &b)
Definition PacketMath.h:1286
EIGEN_STRONG_INLINE Packet16c pcmp_lt< Packet16c >(const Packet16c &a, const Packet16c &b)
Definition PacketMath.h:1349
EIGEN_STRONG_INLINE Packet4us padd< Packet4us >(const Packet4us &a, const Packet4us &b)
Definition PacketMath.h:825
EIGEN_STRONG_INLINE Packet4us pmul< Packet4us >(const Packet4us &a, const Packet4us &b)
Definition PacketMath.h:933
EIGEN_STRONG_INLINE Packet4i pandnot< Packet4i >(const Packet4i &a, const Packet4i &b)
Definition PacketMath.h:915
EIGEN_DEVICE_FUNC Packet pmul(const Packet &a, const Packet &b)
Definition GenericPacketMath.h:237
EIGEN_STRONG_INLINE uint8_t predux_min< Packet8uc >(const Packet8uc &a)
Definition PacketMath.h:2613
EIGEN_STRONG_INLINE Packet8us pandnot< Packet8us >(const Packet8us &a, const Packet8us &b)
Definition PacketMath.h:1584
EIGEN_STRONG_INLINE Packet2ul pmul< Packet2ul >(const Packet2ul &a, const Packet2ul &b)
Definition PacketMath.h:944
EIGEN_STRONG_INLINE Packet4ui pandnot< Packet4ui >(const Packet4ui &a, const Packet4ui &b)
Definition PacketMath.h:1592
EIGEN_STRONG_INLINE Packet8s ploaddup< Packet8s >(const short int *from)
Definition PacketMath.h:1013
EIGEN_STRONG_INLINE Packet4bf F32MaskToBf16Mask(const Packet4f &p)
Definition PacketMath.h:3419
EIGEN_STRONG_INLINE uint32_t predux< Packet2ui >(const Packet2ui &a)
Definition PacketMath.h:2467
EIGEN_STRONG_INLINE Packet2ul pmax< Packet2ul >(const Packet2ul &a, const Packet2ul &b)
Definition PacketMath.h:1270
EIGEN_STRONG_INLINE Packet4f pdiv< Packet4f >(const Packet4f &a, const Packet4f &b)
Definition PacketMath.h:803
EIGEN_STRONG_INLINE Packet4uc pmin< Packet4uc >(const Packet4uc &a, const Packet4uc &b)
Definition PacketMath.h:1201
EIGEN_STRONG_INLINE Packet8h pandnot(const Packet8h &a, const Packet8h &b)
Definition PacketMath.h:1053
EIGEN_STRONG_INLINE Packet8uc pmax< Packet8uc >(const Packet8uc &a, const Packet8uc &b)
Definition PacketMath.h:1255
EIGEN_STRONG_INLINE Packet2d pload< Packet2d >(const double *from)
Definition PacketMath.h:967
EIGEN_STRONG_INLINE Packet4uc pcmp_lt< Packet4uc >(const Packet4uc &a, const Packet4uc &b)
Definition PacketMath.h:1351
EIGEN_STRONG_INLINE Packet8uc pmul< Packet8uc >(const Packet8uc &a, const Packet8uc &b)
Definition PacketMath.h:929
EIGEN_STRONG_INLINE bfloat16 predux_max< Packet4bf >(const Packet4bf &a)
Definition PacketMath.h:3571
EIGEN_STRONG_INLINE Packet8us pload< Packet8us >(const unsigned short int *from)
Definition PacketMath.h:458
EIGEN_STRONG_INLINE Packet16uc pcmp_lt< Packet16uc >(const Packet16uc &a, const Packet16uc &b)
Definition PacketMath.h:1359
EIGEN_STRONG_INLINE Packet2f pset1frombits< Packet2f >(unsigned int from)
Definition PacketMath.h:715
EIGEN_STRONG_INLINE Packet4c pcmp_le< Packet4c >(const Packet4c &a, const Packet4c &b)
Definition PacketMath.h:1280
EIGEN_STRONG_INLINE Packet2d pmul< Packet2d >(const Packet2d &a, const Packet2d &b)
Definition PacketMath.h:916
EIGEN_STRONG_INLINE Packet4i pabsdiff< Packet4i >(const Packet4i &a, const Packet4i &b)
Definition PacketMath.h:1173
EIGEN_STRONG_INLINE Packet8uc psub< Packet8uc >(const Packet8uc &a, const Packet8uc &b)
Definition PacketMath.h:850
EIGEN_STRONG_INLINE bfloat16 pfirst< Packet4bf >(const Packet4bf &from)
Definition PacketMath.h:3427
EIGEN_STRONG_INLINE Packet4s pmax< Packet4s >(const Packet4s &a, const Packet4s &b)
Definition PacketMath.h:1257
EIGEN_STRONG_INLINE Packet2cf pnegate(const Packet2cf &a)
Definition Complex.h:166
EIGEN_STRONG_INLINE Packet2ui pandnot< Packet2ui >(const Packet2ui &a, const Packet2ui &b)
Definition PacketMath.h:1590
EIGEN_STRONG_INLINE Packet4f pfrexp< Packet4f >(const Packet4f &a, Packet4f &exponent)
Definition PacketMath.h:1361
EIGEN_STRONG_INLINE float predux_mul< Packet4f >(const Packet4f &a)
Definition PacketMath.h:1533
EIGEN_STRONG_INLINE Packet2ul plset< Packet2ul >(const uint64_t &a)
Definition PacketMath.h:799
EIGEN_STRONG_INLINE Packet4f pcmp_lt(const Packet4f &a, const Packet4f &b)
Definition PacketMath.h:868
EIGEN_STRONG_INLINE Packet2d pmin< PropagateNumbers, Packet2d >(const Packet2d &a, const Packet2d &b)
Definition PacketMath.h:569
EIGEN_STRONG_INLINE Packet2f pandnot< Packet2f >(const Packet2f &a, const Packet2f &b)
Definition PacketMath.h:1564
EIGEN_STRONG_INLINE Packet4f pselect(const Packet4f &mask, const Packet4f &a, const Packet4f &b)
Definition PacketMath.h:917
EIGEN_STRONG_INLINE Packet2i pcmp_lt< Packet2i >(const Packet2i &a, const Packet2i &b)
Definition PacketMath.h:1369
EIGEN_STRONG_INLINE Packet8uc pcmp_le< Packet8uc >(const Packet8uc &a, const Packet8uc &b)
Definition PacketMath.h:1296
EIGEN_STRONG_INLINE Packet2f pmax< Packet2f >(const Packet2f &a, const Packet2f &b)
Definition PacketMath.h:1228
EIGEN_STRONG_INLINE void prefetch< float >(const float *addr)
Definition PacketMath.h:1117
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void pscatter< int16_t, Packet8s >(int16_t *to, const Packet8s &from, Index stride)
Definition PacketMath.h:2205
EIGEN_STRONG_INLINE void pstoreu< bfloat16 >(bfloat16 *to, const Packet8bf &from)
Definition PacketMath.h:1104
EIGEN_STRONG_INLINE Packet4i parithmetic_shift_right(const Packet4i &a)
Definition PacketMath.h:1187
EIGEN_STRONG_INLINE Packet4us pcmp_eq< Packet4us >(const Packet4us &a, const Packet4us &b)
Definition PacketMath.h:1426
EIGEN_STRONG_INLINE Packet4us pxor< Packet4us >(const Packet4us &a, const Packet4us &b)
Definition PacketMath.h:1549
EIGEN_STRONG_INLINE int32_t pfirst< Packet2i >(const Packet2i &a)
Definition PacketMath.h:2291
EIGEN_STRONG_INLINE Packet4ui pcmp_lt< Packet4ui >(const Packet4ui &a, const Packet4ui &b)
Definition PacketMath.h:1375
EIGEN_STRONG_INLINE signed char pfirst< Packet16c >(const Packet16c &a)
Definition PacketMath.h:1137
EIGEN_STRONG_INLINE Packet8s padd< Packet8s >(const Packet8s &a, const Packet8s &b)
Definition PacketMath.h:777
EIGEN_DEVICE_FUNC void pscatter< double, Packet2d >(double *to, const Packet2d &from, Index stride)
Definition PacketMath.h:1044
EIGEN_STRONG_INLINE Packet4uc psub< Packet4uc >(const Packet4uc &a, const Packet4uc &b)
Definition PacketMath.h:844
EIGEN_STRONG_INLINE bfloat16 predux_min< Packet4bf >(const Packet4bf &a)
Definition PacketMath.h:3576
EIGEN_STRONG_INLINE Packet4ui pload< Packet4ui >(const uint32_t *from)
Definition PacketMath.h:1702
EIGEN_STRONG_INLINE Packet2i pmul< Packet2i >(const Packet2i &a, const Packet2i &b)
Definition PacketMath.h:935
EIGEN_STRONG_INLINE Packet16uc pandnot< Packet16uc >(const Packet16uc &a, const Packet16uc &b)
Definition PacketMath.h:1576
EIGEN_STRONG_INLINE Packet8us ploaddup< Packet8us >(const unsigned short int *from)
Definition PacketMath.h:1021
EIGEN_STRONG_INLINE Packet4f pmax< PropagateNaN, Packet4f >(const Packet4f &a, const Packet4f &b)
Definition PacketMath.h:1237
EIGEN_STRONG_INLINE Packet4i ploadu< Packet4i >(const int *from)
Definition PacketMath.h:972
EIGEN_STRONG_INLINE double predux_mul< Packet2d >(const Packet2d &a)
Definition PacketMath.h:1092
__vector short int Packet8s
Definition PacketMath.h:34
EIGEN_STRONG_INLINE Packet2d pdiv< Packet2d >(const Packet2d &a, const Packet2d &b)
Definition PacketMath.h:923
EIGEN_STRONG_INLINE Packet2ul ploadu< Packet2ul >(const uint64_t *from)
Definition PacketMath.h:1751
EIGEN_STRONG_INLINE Packet2ui pcmp_lt< Packet2ui >(const Packet2ui &a, const Packet2ui &b)
Definition PacketMath.h:1373
EIGEN_STRONG_INLINE Packet2i pset1< Packet2i >(const int32_t &from)
Definition PacketMath.h:708
EIGEN_STRONG_INLINE Packet4uc pabsdiff< Packet4uc >(const Packet4uc &a, const Packet4uc &b)
Definition PacketMath.h:1153
EIGEN_STRONG_INLINE Packet4c pset1< Packet4c >(const int8_t &from)
Definition PacketMath.h:696
EIGEN_STRONG_INLINE uint64_t predux_min< Packet2ul >(const Packet2ul &a)
Definition PacketMath.h:2668
EIGEN_STRONG_INLINE Packet4s pandnot< Packet4s >(const Packet4s &a, const Packet4s &b)
Definition PacketMath.h:1578
EIGEN_STRONG_INLINE Packet2i pdiv< Packet2i >(const Packet2i &, const Packet2i &)
Definition PacketMath.h:1051
EIGEN_STRONG_INLINE double predux_min< Packet2d >(const Packet2d &a)
Definition PacketMath.h:1101
EIGEN_STRONG_INLINE Packet8c pcmp_lt< Packet8c >(const Packet8c &a, const Packet8c &b)
Definition PacketMath.h:1347
EIGEN_STRONG_INLINE Packet4s ploadu< Packet4s >(const int16_t *from)
Definition PacketMath.h:1733
EIGEN_STRONG_INLINE Packet4f pset1< Packet4f >(const float &from)
Definition PacketMath.h:547
EIGEN_STRONG_INLINE Packet2f pfloor< Packet2f >(const Packet2f &a)
Definition PacketMath.h:3153
EIGEN_STRONG_INLINE void pstore< int16_t >(int16_t *to, const Packet4s &from)
Definition PacketMath.h:1885
EIGEN_STRONG_INLINE Packet2ui por< Packet2ui >(const Packet2ui &a, const Packet2ui &b)
Definition PacketMath.h:1522
EIGEN_STRONG_INLINE Packet4us pand< Packet4us >(const Packet4us &a, const Packet4us &b)
Definition PacketMath.h:1483
EIGEN_STRONG_INLINE Packet4ui pmax< Packet4ui >(const Packet4ui &a, const Packet4ui &b)
Definition PacketMath.h:1264
EIGEN_STRONG_INLINE int8_t predux_min< Packet4c >(const Packet4c &a)
Definition PacketMath.h:2584
EIGEN_STRONG_INLINE Packet8c ploadquad< Packet8c >(const int8_t *from)
Definition PacketMath.h:1828
uint16x4_t Packet4us
Definition PacketMath.h:72
EIGEN_STRONG_INLINE uint32_t predux_min< Packet4ui >(const Packet4ui &a)
Definition PacketMath.h:2661
EIGEN_STRONG_INLINE uint8_t predux_mul< Packet4uc >(const Packet4uc &a)
Definition PacketMath.h:2517
EIGEN_STRONG_INLINE Packet4s ploaddup< Packet4s >(const int16_t *from)
Definition PacketMath.h:1790
EIGEN_STRONG_INLINE Packet4i psub< Packet4i >(const Packet4i &a, const Packet4i &b)
Definition PacketMath.h:783
EIGEN_STRONG_INLINE Packet8c pmax< Packet8c >(const Packet8c &a, const Packet8c &b)
Definition PacketMath.h:1247
EIGEN_STRONG_INLINE Packet4f pmin< PropagateNumbers, Packet4f >(const Packet4f &a, const Packet4f &b)
Definition PacketMath.h:565
EIGEN_STRONG_INLINE Packet4ui plset< Packet4ui >(const uint32_t &a)
Definition PacketMath.h:789
EIGEN_STRONG_INLINE Packet4bf pnegate< Packet4bf >(const Packet4bf &a)
Definition PacketMath.h:3621
EIGEN_STRONG_INLINE Packet4s plset< Packet4s >(const int16_t &a)
Definition PacketMath.h:754
EIGEN_DEVICE_FUNC void pscatter< float, Packet4f >(float *to, const Packet4f &from, Index stride)
Definition PacketMath.h:695
EIGEN_STRONG_INLINE uint16_t pfirst< Packet4us >(const Packet4us &a)
Definition PacketMath.h:2289
EIGEN_STRONG_INLINE Packet2d plset< Packet2d >(const double &a)
Definition PacketMath.h:887
EIGEN_STRONG_INLINE uint64_t predux_mul< Packet2ul >(const Packet2ul &a)
Definition PacketMath.h:2573
EIGEN_STRONG_INLINE Packet8uc ploadu< Packet8uc >(const uint8_t *from)
Definition PacketMath.h:1729
EIGEN_STRONG_INLINE Packet8s pload< Packet8s >(const short int *from)
Definition PacketMath.h:453
EIGEN_STRONG_INLINE Packet8uc ploadquad< Packet8uc >(const uint8_t *from)
Definition PacketMath.h:1846
EIGEN_STRONG_INLINE Packet2ul padd< Packet2ul >(const Packet2ul &a, const Packet2ul &b)
Definition PacketMath.h:832
uint8x8_t Packet8uc
Definition PacketMath.h:68
EIGEN_STRONG_INLINE Packet8us pxor< Packet8us >(const Packet8us &a, const Packet8us &b)
Definition PacketMath.h:1551
EIGEN_STRONG_INLINE Packet2f plset< Packet2f >(const float &a)
Definition PacketMath.h:720
EIGEN_STRONG_INLINE int64_t predux_mul< Packet2l >(const Packet2l &a)
Definition PacketMath.h:2571
EIGEN_STRONG_INLINE Packet4f pcmp_lt< Packet4f >(const Packet4f &a, const Packet4f &b)
Definition PacketMath.h:1339
EIGEN_STRONG_INLINE Packet8us padd< Packet8us >(const Packet8us &a, const Packet8us &b)
Definition PacketMath.h:778
EIGEN_STRONG_INLINE int16_t predux_min< Packet4s >(const Packet4s &a)
Definition PacketMath.h:2628
EIGEN_STRONG_INLINE Packet4f pceil< Packet4f >(const Packet4f &a)
Definition PacketMath.h:938
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Packet16c pgather< int8_t, Packet16c >(const int8_t *from, Index stride)
Definition PacketMath.h:1976
EIGEN_STRONG_INLINE Packet16uc pand< Packet16uc >(const Packet16uc &a, const Packet16uc &b)
Definition PacketMath.h:1479
EIGEN_STRONG_INLINE void pstore< float >(float *to, const Packet4f &from)
Definition PacketMath.h:491
EIGEN_STRONG_INLINE Packet2l pset1< Packet2l >(const int64_t &from)
Definition PacketMath.h:712
EIGEN_STRONG_INLINE Packet4bf pcmp_lt< Packet4bf >(const Packet4bf &a, const Packet4bf &b)
Definition PacketMath.h:3606
EIGEN_STRONG_INLINE Packet8uc por< Packet8uc >(const Packet8uc &a, const Packet8uc &b)
Definition PacketMath.h:1508
EIGEN_STRONG_INLINE Packet4f pabs(const Packet4f &a)
Definition PacketMath.h:1176
EIGEN_STRONG_INLINE Packet2ui pmul< Packet2ui >(const Packet2ui &a, const Packet2ui &b)
Definition PacketMath.h:937
EIGEN_STRONG_INLINE Packet2ui pxor< Packet2ui >(const Packet2ui &a, const Packet2ui &b)
Definition PacketMath.h:1555
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void pscatter< uint8_t, Packet4uc >(uint8_t *to, const Packet4uc &from, Index stride)
Definition PacketMath.h:2163
EIGEN_STRONG_INLINE Packet4uc pand< Packet4uc >(const Packet4uc &a, const Packet4uc &b)
Definition PacketMath.h:1475
EIGEN_STRONG_INLINE Packet2l ploaddup< Packet2l >(const int64_t *from)
Definition PacketMath.h:1820
EIGEN_STRONG_INLINE Packet8uc padd< Packet8uc >(const Packet8uc &a, const Packet8uc &b)
Definition PacketMath.h:821
EIGEN_STRONG_INLINE Packet2ul por< Packet2ul >(const Packet2ul &a, const Packet2ul &b)
Definition PacketMath.h:1528
EIGEN_STRONG_INLINE Packet16uc por< Packet16uc >(const Packet16uc &a, const Packet16uc &b)
Definition PacketMath.h:1510
EIGEN_STRONG_INLINE Packet8uc pand< Packet8uc >(const Packet8uc &a, const Packet8uc &b)
Definition PacketMath.h:1477
EIGEN_STRONG_INLINE Packet4i pcmp_le< Packet4i >(const Packet4i &a, const Packet4i &b)
Definition PacketMath.h:1310
EIGEN_STRONG_INLINE uint64_t predux< Packet2ul >(const Packet2ul &a)
Definition PacketMath.h:2475
EIGEN_STRONG_INLINE Packet8us por< Packet8us >(const Packet8us &a, const Packet8us &b)
Definition PacketMath.h:903
float32x2_t Packet2f
Definition PacketMath.h:62
EIGEN_STRONG_INLINE void pstoreu< uint32_t >(uint32_t *to, const Packet2ui &from)
Definition PacketMath.h:1934
EIGEN_STRONG_INLINE unsigned short int predux< Packet8us >(const Packet8us &a)
Definition PacketMath.h:1494
EIGEN_STRONG_INLINE Packet4uc por< Packet4uc >(const Packet4uc &a, const Packet4uc &b)
Definition PacketMath.h:1506
EIGEN_STRONG_INLINE Packet4f pset1frombits< Packet4f >(unsigned int from)
Definition PacketMath.h:571
EIGEN_STRONG_INLINE Packet4bf plset< Packet4bf >(const bfloat16 &a)
Definition PacketMath.h:3494
EIGEN_STRONG_INLINE Packet4us pcmp_lt< Packet4us >(const Packet4us &a, const Packet4us &b)
Definition PacketMath.h:1365
EIGEN_STRONG_INLINE uint8_t predux_min< Packet4uc >(const Packet4uc &a)
Definition PacketMath.h:2606
EIGEN_STRONG_INLINE Packet4uc pandnot< Packet4uc >(const Packet4uc &a, const Packet4uc &b)
Definition PacketMath.h:1572
EIGEN_STRONG_INLINE Packet4uc pxor< Packet4uc >(const Packet4uc &a, const Packet4uc &b)
Definition PacketMath.h:1541
EIGEN_STRONG_INLINE Packet4f pldexp< Packet4f >(const Packet4f &a, const Packet4f &exponent)
Definition PacketMath.h:1354
EIGEN_STRONG_INLINE Packet2d ploadu< Packet2d >(const double *from)
Definition PacketMath.h:1004
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void pscatter< int8_t, Packet8c >(int8_t *to, const Packet8c &from, Index stride)
Definition PacketMath.h:2133
EIGEN_STRONG_INLINE Packet4us pdiv< Packet4us >(const Packet4us &, const Packet4us &)
Definition PacketMath.h:1041
EIGEN_STRONG_INLINE Packet4f vec4f_unpackhi(const Packet4f &a, const Packet4f &b)
Definition PacketMath.h:133
EIGEN_STRONG_INLINE float pfirst< Packet2f >(const Packet2f &a)
Definition PacketMath.h:2279
EIGEN_STRONG_INLINE Packet2f pfrexp< Packet2f >(const Packet2f &a, Packet2f &exponent)
Definition PacketMath.h:2377
EIGEN_STRONG_INLINE Packet2i pabsdiff< Packet2i >(const Packet2i &a, const Packet2i &b)
Definition PacketMath.h:1171
EIGEN_STRONG_INLINE Packet2ul pcmp_le< Packet2ul >(const Packet2ul &a, const Packet2ul &b)
Definition PacketMath.h:1326
EIGEN_STRONG_INLINE Packet8c pmin< Packet8c >(const Packet8c &a, const Packet8c &b)
Definition PacketMath.h:1199
EIGEN_STRONG_INLINE int8_t predux_mul< Packet4c >(const Packet4c &a)
Definition PacketMath.h:2503
EIGEN_STRONG_INLINE Packet4f pxor< Packet4f >(const Packet4f &a, const Packet4f &b)
Definition PacketMath.h:908
EIGEN_STRONG_INLINE void pstoreu< int32_t >(int32_t *to, const Packet4i &from)
Definition PacketMath.h:450
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void pscatter< int8_t, Packet16c >(int8_t *to, const Packet16c &from, Index stride)
Definition PacketMath.h:2144
EIGEN_STRONG_INLINE Packet4i pmin< Packet4i >(const Packet4i &a, const Packet4i &b)
Definition PacketMath.h:843
EIGEN_STRONG_INLINE uint32_t pfirst< Packet2ui >(const Packet2ui &a)
Definition PacketMath.h:2293
EIGEN_STRONG_INLINE Packet4uc pmax< Packet4uc >(const Packet4uc &a, const Packet4uc &b)
Definition PacketMath.h:1249
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Packet4c predux_half_dowto4(const Packet8c &a)
Definition PacketMath.h:2478
EIGEN_STRONG_INLINE Packet4uc pcmp_le< Packet4uc >(const Packet4uc &a, const Packet4uc &b)
Definition PacketMath.h:1290
EIGEN_STRONG_INLINE void prefetch< uint8_t >(const uint8_t *addr)
Definition PacketMath.h:2271
EIGEN_STRONG_INLINE Packet2f ploadu< Packet2f >(const float *from)
Definition PacketMath.h:1709
EIGEN_STRONG_INLINE Packet4f psqrt(const Packet4f &a)
Definition PacketMath.h:723
EIGEN_STRONG_INLINE Packet2i ploadu< Packet2i >(const int32_t *from)
Definition PacketMath.h:1741
EIGEN_STRONG_INLINE Packet16uc plset< Packet16uc >(const unsigned char &a)
Definition PacketMath.h:772
EIGEN_STRONG_INLINE Packet16c ploadu< Packet16c >(const signed char *from)
Definition PacketMath.h:988
EIGEN_STRONG_INLINE Packet2l pmax< Packet2l >(const Packet2l &a, const Packet2l &b)
Definition PacketMath.h:1265
EIGEN_STRONG_INLINE Packet2l psub< Packet2l >(const Packet2l &a, const Packet2l &b)
Definition PacketMath.h:860
EIGEN_STRONG_INLINE uint8_t pfirst< Packet4uc >(const Packet4uc &a)
Definition PacketMath.h:2284
EIGEN_STRONG_INLINE Packet2d pfrexp< Packet2d >(const Packet2d &a, Packet2d &exponent)
Definition PacketMath.h:918
EIGEN_STRONG_INLINE Packet2cf pcmp_eq(const Packet2cf &a, const Packet2cf &b)
Definition Complex.h:231
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Packet2i pgather< int32_t, Packet2i >(const int32_t *from, Index stride)
Definition PacketMath.h:2075
EIGEN_STRONG_INLINE Packet8s pmin< Packet8s >(const Packet8s &a, const Packet8s &b)
Definition PacketMath.h:844
EIGEN_STRONG_INLINE Packet4uc pset1< Packet4uc >(const uint8_t &from)
Definition PacketMath.h:700
EIGEN_STRONG_INLINE void pstoreu< uint16_t >(uint16_t *to, const Packet4us &from)
Definition PacketMath.h:1926
EIGEN_STRONG_INLINE Packet8s pset1< Packet8s >(const short int &from)
Definition PacketMath.h:555
EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC Packet pldexp_generic(const Packet &a, const Packet &exponent)
Definition GenericPacketMathFunctions.h:85
EIGEN_STRONG_INLINE Packet8c pset1< Packet8c >(const int8_t &from)
Definition PacketMath.h:698
EIGEN_STRONG_INLINE Packet8s pmul< Packet8s >(const Packet8s &a, const Packet8s &b)
Definition PacketMath.h:797
EIGEN_STRONG_INLINE Packet4c pabs< Packet4c >(const Packet4c &a)
Definition PacketMath.h:2351
EIGEN_STRONG_INLINE Packet4f vec4f_unpacklo(const Packet4f &a, const Packet4f &b)
Definition PacketMath.h:129
EIGEN_STRONG_INLINE Packet4bf pmax< PropagateNumbers, Packet4bf >(const Packet4bf &a, const Packet4bf &b)
Definition PacketMath.h:3477
EIGEN_STRONG_INLINE Packet16uc pcmp_le< Packet16uc >(const Packet16uc &a, const Packet16uc &b)
Definition PacketMath.h:1298
EIGEN_STRONG_INLINE Packet2l pand< Packet2l >(const Packet2l &a, const Packet2l &b)
Definition PacketMath.h:1493
EIGEN_STRONG_INLINE Packet4ui pxor< Packet4ui >(const Packet4ui &a, const Packet4ui &b)
Definition PacketMath.h:1557
EIGEN_STRONG_INLINE Packet8h pand(const Packet8h &a, const Packet8h &b)
Definition PacketMath.h:1050
EIGEN_STRONG_INLINE int8_t predux< Packet4c >(const Packet4c &a)
Definition PacketMath.h:2393
EIGEN_STRONG_INLINE Packet2i pcmp_eq< Packet2i >(const Packet2i &a, const Packet2i &b)
Definition PacketMath.h:1430
EIGEN_STRONG_INLINE Packet8s pcmp_lt< Packet8s >(const Packet8s &a, const Packet8s &b)
Definition PacketMath.h:1363
EIGEN_STRONG_INLINE Packet2f paddsub< Packet2f >(const Packet2f &a, const Packet2f &b)
Definition PacketMath.h:864
EIGEN_STRONG_INLINE unsigned short int predux_max< Packet8us >(const Packet8us &a)
Definition PacketMath.h:1726
EIGEN_STRONG_INLINE void pstore< int32_t >(int32_t *to, const Packet4i &from)
Definition PacketMath.h:436
EIGEN_STRONG_INLINE Packet16c pand< Packet16c >(const Packet16c &a, const Packet16c &b)
Definition PacketMath.h:1473
EIGEN_STRONG_INLINE Packet4bf pabsdiff< Packet4bf >(const Packet4bf &a, const Packet4bf &b)
Definition PacketMath.h:3596
EIGEN_STRONG_INLINE Packet4s pload< Packet4s >(const int16_t *from)
Definition PacketMath.h:1688
EIGEN_STRONG_INLINE Packet16c pandnot< Packet16c >(const Packet16c &a, const Packet16c &b)
Definition PacketMath.h:1571
EIGEN_STRONG_INLINE Packet16uc pmin< Packet16uc >(const Packet16uc &a, const Packet16uc &b)
Definition PacketMath.h:847
EIGEN_STRONG_INLINE Packet8h pxor(const Packet8h &a, const Packet8h &b)
Definition PacketMath.h:1047
EIGEN_STRONG_INLINE Packet4bf pfloor< Packet4bf >(const Packet4bf &a)
Definition PacketMath.h:3526
EIGEN_STRONG_INLINE int pfirst< Packet4i >(const Packet4i &a)
Definition PacketMath.h:1121
EIGEN_STRONG_INLINE Packet4i plset< Packet4i >(const int &a)
Definition PacketMath.h:768
EIGEN_STRONG_INLINE Packet2d vec2d_unpacklo(const Packet2d &a, const Packet2d &b)
Definition PacketMath.h:98
EIGEN_STRONG_INLINE Packet2ui pcmp_le< Packet2ui >(const Packet2ui &a, const Packet2ui &b)
Definition PacketMath.h:1312
EIGEN_STRONG_INLINE float predux< Packet4f >(const Packet4f &a)
Definition PacketMath.h:1444
EIGEN_STRONG_INLINE bfloat16 predux_mul< Packet4bf >(const Packet4bf &a)
Definition PacketMath.h:3581
EIGEN_STRONG_INLINE Packet8uc pdiv< Packet8uc >(const Packet8uc &, const Packet8uc &)
Definition PacketMath.h:1021
EIGEN_STRONG_INLINE Packet4bf psub< Packet4bf >(const Packet4bf &a, const Packet4bf &b)
Definition PacketMath.h:3542
EIGEN_STRONG_INLINE float predux_mul< Packet2f >(const Packet2f &a)
Definition PacketMath.h:2499
EIGEN_STRONG_INLINE Packet2ul pcmp_lt< Packet2ul >(const Packet2ul &a, const Packet2ul &b)
Definition PacketMath.h:1387
EIGEN_STRONG_INLINE Packet2d pceil< Packet2d >(const Packet2d &a)
Definition PacketMath.h:1182
EIGEN_STRONG_INLINE Packet2l pload< Packet2l >(const int64_t *from)
Definition PacketMath.h:1704
EIGEN_STRONG_INLINE Packet2f padd< Packet2f >(const Packet2f &a, const Packet2f &b)
Definition PacketMath.h:805
EIGEN_STRONG_INLINE Packet4s pmul< Packet4s >(const Packet4s &a, const Packet4s &b)
Definition PacketMath.h:931
EIGEN_STRONG_INLINE Packet4f ploadu< Packet4f >(const float *from)
Definition PacketMath.h:968
EIGEN_STRONG_INLINE Packet16uc pcmp_eq< Packet16uc >(const Packet16uc &a, const Packet16uc &b)
Definition PacketMath.h:1420
EIGEN_STRONG_INLINE Packet2f por< Packet2f >(const Packet2f &a, const Packet2f &b)
Definition PacketMath.h:1497
EIGEN_STRONG_INLINE Packet4i pmul< Packet4i >(const Packet4i &a, const Packet4i &b)
Definition PacketMath.h:796
EIGEN_STRONG_INLINE int32_t predux_max< Packet2i >(const Packet2i &a)
Definition PacketMath.h:2747
EIGEN_STRONG_INLINE Packet4bf pmin< PropagateNumbers, Packet4bf >(const Packet4bf &a, const Packet4bf &b)
Definition PacketMath.h:3460
EIGEN_STRONG_INLINE short int predux_max< Packet8s >(const Packet8s &a)
Definition PacketMath.h:1711
EIGEN_STRONG_INLINE Packet2ul pdiv< Packet2ul >(const Packet2ul &, const Packet2ul &)
Definition PacketMath.h:1076
EIGEN_STRONG_INLINE Packet4bf pcmp_lt_or_nan< Packet4bf >(const Packet4bf &a, const Packet4bf &b)
Definition PacketMath.h:3611
EIGEN_STRONG_INLINE short int predux< Packet8s >(const Packet8s &a)
Definition PacketMath.h:1489
EIGEN_STRONG_INLINE Packet4i ploadquad< Packet4i >(const int32_t *from)
Definition PacketMath.h:1866
EIGEN_STRONG_INLINE Packet4i pand< Packet4i >(const Packet4i &a, const Packet4i &b)
Definition PacketMath.h:892
EIGEN_STRONG_INLINE Packet2ui pset1< Packet2ui >(const uint32_t &from)
Definition PacketMath.h:710
EIGEN_STRONG_INLINE Packet4bf pload< Packet4bf >(const bfloat16 *from)
Definition PacketMath.h:3431
EIGEN_STRONG_INLINE Packet2d pmin< Packet2d >(const Packet2d &a, const Packet2d &b)
Definition PacketMath.h:974
EIGEN_STRONG_INLINE Packet16uc ploaddup< Packet16uc >(const unsigned char *from)
Definition PacketMath.h:1058
EIGEN_STRONG_INLINE int predux< Packet4i >(const Packet4i &a)
Definition PacketMath.h:1454
EIGEN_STRONG_INLINE Packet8us pcmp_eq< Packet8us >(const Packet8us &a, const Packet8us &b)
Definition PacketMath.h:1428
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Packet2ul pgather< uint64_t, Packet2ul >(const uint64_t *from, Index stride)
Definition PacketMath.h:2109
EIGEN_STRONG_INLINE Packet2f pdiv< Packet2f >(const Packet2f &a, const Packet2f &b)
Definition PacketMath.h:950
EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC Packet pfrexp_generic(const Packet &a, Packet &exponent)
Definition GenericPacketMathFunctions.h:40
EIGEN_STRONG_INLINE void pstoreu< int16_t >(int16_t *to, const Packet4s &from)
Definition PacketMath.h:1922
EIGEN_STRONG_INLINE Packet4bf pceil< Packet4bf >(const Packet4bf &a)
Definition PacketMath.h:3531
EIGEN_STRONG_INLINE Packet4f pand< Packet4f >(const Packet4f &a, const Packet4f &b)
Definition PacketMath.h:891
EIGEN_STRONG_INLINE void pstoreu< int64_t >(int64_t *to, const Packet2l &from)
Definition PacketMath.h:1938
EIGEN_DEVICE_FUNC Packet psub(const Packet &a, const Packet &b)
Definition GenericPacketMath.h:222
EIGEN_STRONG_INLINE unsigned short int predux_min< Packet8us >(const Packet8us &a)
Definition PacketMath.h:1646
EIGEN_STRONG_INLINE int8_t predux_mul< Packet8c >(const Packet8c &a)
Definition PacketMath.h:2509
EIGEN_STRONG_INLINE float predux_max< Packet2f >(const Packet2f &a)
Definition PacketMath.h:2672
EIGEN_STRONG_INLINE int predux_max< Packet4i >(const Packet4i &a)
Definition PacketMath.h:1698
EIGEN_STRONG_INLINE uint8_t predux< Packet8uc >(const Packet8uc &a)
Definition PacketMath.h:2422
EIGEN_STRONG_INLINE Packet2l pmin< Packet2l >(const Packet2l &a, const Packet2l &b)
Definition PacketMath.h:1217
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void pscatter< uint8_t, Packet16uc >(uint8_t *to, const Packet16uc &from, Index stride)
Definition PacketMath.h:2179
EIGEN_STRONG_INLINE Packet8us pset1< Packet8us >(const unsigned short int &from)
Definition PacketMath.h:559
EIGEN_STRONG_INLINE bfloat16 predux< Packet4bf >(const Packet4bf &a)
Definition PacketMath.h:3566
EIGEN_STRONG_INLINE Packet2ui ploaddup< Packet2ui >(const uint32_t *from)
Definition PacketMath.h:1816
EIGEN_STRONG_INLINE Packet8s pandnot< Packet8s >(const Packet8s &a, const Packet8s &b)
Definition PacketMath.h:1580
EIGEN_DEVICE_FUNC Packet2d pgather< double, Packet2d >(const double *from, Index stride)
Definition PacketMath.h:1033
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Packet4s pgather< int16_t, Packet4s >(const int16_t *from, Index stride)
Definition PacketMath.h:2035
EIGEN_STRONG_INLINE Packet2f ploaddup< Packet2f >(const float *from)
Definition PacketMath.h:1754
EIGEN_STRONG_INLINE Packet4s pabsdiff< Packet4s >(const Packet4s &a, const Packet4s &b)
Definition PacketMath.h:1163
EIGEN_STRONG_INLINE Packet16c ploaddup< Packet16c >(const signed char *from)
Definition PacketMath.h:1050
EIGEN_STRONG_INLINE int8_t predux< Packet8c >(const Packet8c &a)
Definition PacketMath.h:2400
EIGEN_STRONG_INLINE Packet8c ploaddup< Packet8c >(const int8_t *from)
Definition PacketMath.h:1763
EIGEN_STRONG_INLINE Packet4bf pdiv< Packet4bf >(const Packet4bf &a, const Packet4bf &b)
Definition PacketMath.h:3550
EIGEN_STRONG_INLINE Packet4i pcmp_lt< Packet4i >(const Packet4i &a, const Packet4i &b)
Definition PacketMath.h:1371
EIGEN_STRONG_INLINE int64_t predux_max< Packet2l >(const Packet2l &a)
Definition PacketMath.h:2761
EIGEN_STRONG_INLINE Packet4c pxor< Packet4c >(const Packet4c &a, const Packet4c &b)
Definition PacketMath.h:1535
EIGEN_STRONG_INLINE int8_t pfirst< Packet8c >(const Packet8c &a)
Definition PacketMath.h:2282
EIGEN_STRONG_INLINE Packet4i pmax< Packet4i >(const Packet4i &a, const Packet4i &b)
Definition PacketMath.h:861
EIGEN_STRONG_INLINE int16_t pfirst< Packet4s >(const Packet4s &a)
Definition PacketMath.h:2287
EIGEN_STRONG_INLINE Packet8c pandnot< Packet8c >(const Packet8c &a, const Packet8c &b)
Definition PacketMath.h:1570
EIGEN_STRONG_INLINE Packet4i pdiv< Packet4i >(const Packet4i &, const Packet4i &)
Definition PacketMath.h:821
EIGEN_STRONG_INLINE Packet16uc pxor< Packet16uc >(const Packet16uc &a, const Packet16uc &b)
Definition PacketMath.h:1545
EIGEN_STRONG_INLINE Packet4f pabsdiff< Packet4f >(const Packet4f &a, const Packet4f &b)
Definition PacketMath.h:1141
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Packet8c pgather< int8_t, Packet8c >(const int8_t *from, Index stride)
Definition PacketMath.h:1964
EIGEN_STRONG_INLINE Packet16c padd< Packet16c >(const Packet16c &a, const Packet16c &b)
Definition PacketMath.h:779
EIGEN_STRONG_INLINE Packet4c padd< Packet4c >(const Packet4c &a, const Packet4c &b)
Definition PacketMath.h:807
EIGEN_STRONG_INLINE Packet8s pdiv< Packet8s >(const Packet8s &, const Packet8s &)
Definition PacketMath.h:1036
EIGEN_STRONG_INLINE signed char predux_max< Packet16c >(const Packet16c &a)
Definition PacketMath.h:1741
EIGEN_STRONG_INLINE int8_t predux_max< Packet4c >(const Packet4c &a)
Definition PacketMath.h:2679
EIGEN_STRONG_INLINE Packet16uc ploadquad< Packet16uc >(const uint8_t *from)
Definition PacketMath.h:1852
EIGEN_STRONG_INLINE uint8_t predux_mul< Packet8uc >(const Packet8uc &a)
Definition PacketMath.h:2523
EIGEN_STRONG_INLINE uint8_t predux< Packet4uc >(const Packet4uc &a)
Definition PacketMath.h:2415
EIGEN_STRONG_INLINE Packet2l pmul< Packet2l >(const Packet2l &a, const Packet2l &b)
Definition PacketMath.h:939
EIGEN_STRONG_INLINE int16_t predux_max< Packet4s >(const Packet4s &a)
Definition PacketMath.h:2723
EIGEN_STRONG_INLINE Packet2i pxor< Packet2i >(const Packet2i &a, const Packet2i &b)
Definition PacketMath.h:1553
EIGEN_STRONG_INLINE Packet2d pset1frombits< Packet2d >(uint64_t from)
Definition PacketMath.h:264
EIGEN_STRONG_INLINE Packet4i pload< Packet4i >(const int *from)
Definition PacketMath.h:448
EIGEN_STRONG_INLINE int32_t predux< Packet2i >(const Packet2i &a)
Definition PacketMath.h:2461
__vector float Packet4f
Definition PacketMath.h:30
EIGEN_DEVICE_FUNC Packet4i pgather< int32_t, Packet4i >(const int32_t *from, Index stride)
Definition PacketMath.h:469
EIGEN_STRONG_INLINE Packet2d psub< Packet2d >(const Packet2d &a, const Packet2d &b)
Definition PacketMath.h:895
EIGEN_STRONG_INLINE Packet4s psub< Packet4s >(const Packet4s &a, const Packet4s &b)
Definition PacketMath.h:852
EIGEN_STRONG_INLINE Packet4f psub< Packet4f >(const Packet4f &a, const Packet4f &b)
Definition PacketMath.h:782
EIGEN_STRONG_INLINE Packet4c pmul< Packet4c >(const Packet4c &a, const Packet4c &b)
Definition PacketMath.h:915
EIGEN_STRONG_INLINE Packet8s psub< Packet8s >(const Packet8s &a, const Packet8s &b)
Definition PacketMath.h:784
EIGEN_STRONG_INLINE Packet2f pxor< Packet2f >(const Packet2f &a, const Packet2f &b)
Definition PacketMath.h:1531
EIGEN_STRONG_INLINE Packet4f prsqrt(const Packet4f &a)
Definition PacketMath.h:730
EIGEN_STRONG_INLINE Packet4uc padd< Packet4uc >(const Packet4uc &a, const Packet4uc &b)
Definition PacketMath.h:815
EIGEN_STRONG_INLINE void pstore< uint32_t >(uint32_t *to, const Packet2ui &from)
Definition PacketMath.h:1897
int32x2_t Packet2i
Definition PacketMath.h:74
EIGEN_STRONG_INLINE Packet4f plset< Packet4f >(const float &a)
Definition PacketMath.h:767
EIGEN_STRONG_INLINE uint32_t predux_mul< Packet4ui >(const Packet4ui &a)
Definition PacketMath.h:2569
EIGEN_STRONG_INLINE Packet2ul psub< Packet2ul >(const Packet2ul &a, const Packet2ul &b)
Definition PacketMath.h:861
EIGEN_STRONG_INLINE Packet8uc pcmp_eq< Packet8uc >(const Packet8uc &a, const Packet8uc &b)
Definition PacketMath.h:1418
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void pscatter< uint16_t, Packet8us >(uint16_t *to, const Packet8us &from, Index stride)
Definition PacketMath.h:2223
EIGEN_STRONG_INLINE Packet8s ploadquad< Packet8s >(const short int *from)
Definition PacketMath.h:1029
EIGEN_STRONG_INLINE uint64_t pfirst< Packet2ul >(const Packet2ul &a)
Definition PacketMath.h:2296
EIGEN_STRONG_INLINE Packet4s pdiv< Packet4s >(const Packet4s &, const Packet4s &)
Definition PacketMath.h:1031
EIGEN_STRONG_INLINE Packet8bf F32ToBf16(Packet4f p4f)
Definition PacketMath.h:1252
EIGEN_STRONG_INLINE Packet4uc ploadu< Packet4uc >(const uint8_t *from)
Definition PacketMath.h:1723
EIGEN_STRONG_INLINE void pstoreu< float >(float *to, const Packet4f &from)
Definition PacketMath.h:1088
EIGEN_STRONG_INLINE Packet2d pmax< Packet2d >(const Packet2d &a, const Packet2d &b)
Definition PacketMath.h:989
EIGEN_STRONG_INLINE Packet4f pcmp_lt_or_nan(const Packet4f &a, const Packet4f &b)
Definition PacketMath.h:870
eigen_packet_wrapper< uint32_t,5 > Packet4uc
Definition PacketMath.h:67
EIGEN_STRONG_INLINE void prefetch< int16_t >(const int16_t *addr)
Definition PacketMath.h:2272
EIGEN_STRONG_INLINE Packet4bf pgather< bfloat16, Packet4bf >(const bfloat16 *from, Index stride)
Definition PacketMath.h:3555
EIGEN_STRONG_INLINE Packet16c pset1< Packet16c >(const signed char &from)
Definition PacketMath.h:563
EIGEN_STRONG_INLINE void pstore< uint64_t >(uint64_t *to, const Packet2ul &from)
Definition PacketMath.h:1903
EIGEN_STRONG_INLINE uint8_t predux_max< Packet8uc >(const Packet8uc &a)
Definition PacketMath.h:2708
EIGEN_STRONG_INLINE Packet2l plset< Packet2l >(const int64_t &a)
Definition PacketMath.h:794
EIGEN_STRONG_INLINE Packet2l pdiv< Packet2l >(const Packet2l &, const Packet2l &)
Definition PacketMath.h:1071
EIGEN_STRONG_INLINE Packet2i pandnot< Packet2i >(const Packet2i &a, const Packet2i &b)
Definition PacketMath.h:1586
EIGEN_STRONG_INLINE Packet4ui ploadu< Packet4ui >(const uint32_t *from)
Definition PacketMath.h:1747
EIGEN_STRONG_INLINE int64_t pfirst< Packet2l >(const Packet2l &a)
Definition PacketMath.h:2295
EIGEN_STRONG_INLINE Packet4us pandnot< Packet4us >(const Packet4us &a, const Packet4us &b)
Definition PacketMath.h:1582
EIGEN_STRONG_INLINE Packet4bf pcmp_eq< Packet4bf >(const Packet4bf &a, const Packet4bf &b)
Definition PacketMath.h:3601
EIGEN_STRONG_INLINE void pstore< Eigen::half >(Eigen::half *to, const Packet8h &from)
Definition PacketMath.h:954
EIGEN_STRONG_INLINE Packet4us psub< Packet4us >(const Packet4us &a, const Packet4us &b)
Definition PacketMath.h:854
EIGEN_STRONG_INLINE Packet16c pxor< Packet16c >(const Packet16c &a, const Packet16c &b)
Definition PacketMath.h:1539
EIGEN_STRONG_INLINE Packet4ui ploadquad< Packet4ui >(const uint32_t *from)
Definition PacketMath.h:1867
EIGEN_STRONG_INLINE Packet2i por< Packet2i >(const Packet2i &a, const Packet2i &b)
Definition PacketMath.h:1520
EIGEN_STRONG_INLINE void pstoreu< uint64_t >(uint64_t *to, const Packet2ul &from)
Definition PacketMath.h:1940
EIGEN_STRONG_INLINE void pstore< uint16_t >(uint16_t *to, const Packet4us &from)
Definition PacketMath.h:1889
EIGEN_STRONG_INLINE double pfirst< Packet2d >(const Packet2d &a)
Definition PacketMath.h:1061
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Packet2f pgather< float, Packet2f >(const float *from, Index stride)
Definition PacketMath.h:1943
EIGEN_STRONG_INLINE uint16_t predux_mul< Packet4us >(const Packet4us &a)
Definition PacketMath.h:2547
EIGEN_STRONG_INLINE Packet16uc pabsdiff< Packet16uc >(const Packet16uc &a, const Packet16uc &b)
Definition PacketMath.h:1161
EIGEN_STRONG_INLINE unsigned short int pfirst< Packet8us >(const Packet8us &a)
Definition PacketMath.h:1133
EIGEN_STRONG_INLINE Packet2f pabsdiff< Packet2f >(const Packet2f &a, const Packet2f &b)
Definition PacketMath.h:1139
EIGEN_STRONG_INLINE Packet4ui pcmp_eq< Packet4ui >(const Packet4ui &a, const Packet4ui &b)
Definition PacketMath.h:1436
v2u64 Packet2ul
Definition PacketMath.h:822
EIGEN_STRONG_INLINE Packet2l pxor< Packet2l >(const Packet2l &a, const Packet2l &b)
Definition PacketMath.h:1559
int16x4_t Packet4s
Definition PacketMath.h:70
EIGEN_STRONG_INLINE Packet4s pcmp_le< Packet4s >(const Packet4s &a, const Packet4s &b)
Definition PacketMath.h:1300
EIGEN_STRONG_INLINE Packet4uc ploaddup< Packet4uc >(const uint8_t *from)
Definition PacketMath.h:1774
EIGEN_STRONG_INLINE Packet2ui plset< Packet2ui >(const uint32_t &a)
Definition PacketMath.h:784
EIGEN_STRONG_INLINE Packet16c pmul< Packet16c >(const Packet16c &a, const Packet16c &b)
Definition PacketMath.h:799
EIGEN_STRONG_INLINE void pstoreu< uint8_t >(uint8_t *to, const Packet4uc &from)
Definition PacketMath.h:1916
EIGEN_STRONG_INLINE Packet4bf ploaddup< Packet4bf >(const bfloat16 *from)
Definition PacketMath.h:3451
EIGEN_STRONG_INLINE Packet8s pxor< Packet8s >(const Packet8s &a, const Packet8s &b)
Definition PacketMath.h:1548
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Packet4uc pgather< uint8_t, Packet4uc >(const uint8_t *from, Index stride)
Definition PacketMath.h:1996
EIGEN_STRONG_INLINE Packet4ui ploaddup< Packet4ui >(const uint32_t *from)
Definition PacketMath.h:1818
EIGEN_STRONG_INLINE Packet2f pcmp_le< Packet2f >(const Packet2f &a, const Packet2f &b)
Definition PacketMath.h:1276
EIGEN_STRONG_INLINE Packet2f pload< Packet2f >(const float *from)
Definition PacketMath.h:1664
EIGEN_STRONG_INLINE Packet8us ploadquad< Packet8us >(const unsigned short int *from)
Definition PacketMath.h:1037
EIGEN_STRONG_INLINE Packet4f print< Packet4f >(const Packet4f &a)
Definition PacketMath.h:940
EIGEN_STRONG_INLINE Packet2d pfloor< Packet2d >(const Packet2d &a)
Definition PacketMath.h:1163
EIGEN_STRONG_INLINE Packet2f psub< Packet2f >(const Packet2f &a, const Packet2f &b)
Definition PacketMath.h:834
EIGEN_STRONG_INLINE float predux_min< Packet4f >(const Packet4f &a)
Definition PacketMath.h:1613
EIGEN_STRONG_INLINE void prefetch< double >(const double *addr)
Definition PacketMath.h:692
EIGEN_STRONG_INLINE uint32_t predux_max< Packet2ui >(const Packet2ui &a)
Definition PacketMath.h:2754
EIGEN_DEVICE_FUNC void pscatter< int32_t, Packet4i >(int32_t *to, const Packet4i &from, Index stride)
Definition PacketMath.h:495
EIGEN_STRONG_INLINE Packet4f pmax< Packet4f >(const Packet4f &a, const Packet4f &b)
Definition PacketMath.h:850
EIGEN_STRONG_INLINE Packet2ul pand< Packet2ul >(const Packet2ul &a, const Packet2ul &b)
Definition PacketMath.h:1494
EIGEN_STRONG_INLINE Packet4c pmax< Packet4c >(const Packet4c &a, const Packet4c &b)
Definition PacketMath.h:1241
EIGEN_STRONG_INLINE Packet8uc pabsdiff< Packet8uc >(const Packet8uc &a, const Packet8uc &b)
Definition PacketMath.h:1159
EIGEN_STRONG_INLINE Packet4c ploadu< Packet4c >(const int8_t *from)
Definition PacketMath.h:1713
EIGEN_STRONG_INLINE signed char predux_min< Packet16c >(const Packet16c &a)
Definition PacketMath.h:1661
EIGEN_STRONG_INLINE Packet2i plset< Packet2i >(const int32_t &a)
Definition PacketMath.h:774
::uint64_t uint64_t
Definition Meta.h:58
::int64_t int64_t
Definition Meta.h:59
Namespace containing all symbols from the Eigen library.
Definition bench_norm.cpp:85
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
Definition Meta.h:74
const Product< Lhs, Rhs > prod(const Lhs &lhs, const Rhs &rhs)
Definition evaluators.cpp:8
Definition BandTriangularSolver.h:13
Holds information about the various numeric (i.e. scalar) types allowed by Eigen.
Definition NumTraits.h:233
Definition BFloat16.h:58
numext::uint16_t x
Definition Half.h:104
Definition Half.h:142
Definition GenericPacketMath.h:43
@ HasRsqrt
Definition GenericPacketMath.h:67
@ HasSin
Definition GenericPacketMath.h:75
@ HasBlend
Definition GenericPacketMath.h:60
@ HasAbsDiff
Definition GenericPacketMath.h:55
@ HasArg
Definition GenericPacketMath.h:53
@ HasNdtri
Definition GenericPacketMath.h:90
@ HasCos
Definition GenericPacketMath.h:76
@ HasCmp
Definition GenericPacketMath.h:63
@ HasShift
Definition GenericPacketMath.h:49
@ HasCeil
Definition GenericPacketMath.h:101
@ HasExp
Definition GenericPacketMath.h:68
@ HasRint
Definition GenericPacketMath.h:99
@ HasSqrt
Definition GenericPacketMath.h:66
@ HasErf
Definition GenericPacketMath.h:88
@ HasBessel
Definition GenericPacketMath.h:91
@ HasLog
Definition GenericPacketMath.h:70
@ HasTanh
Definition GenericPacketMath.h:83
@ HasFloor
Definition GenericPacketMath.h:100
@ HasDiv
Definition GenericPacketMath.h:65
Definition GenericPacketMath.h:160
Definition Meta.h:133
@ value
Definition Meta.h:133
Packet4bf half
Definition PacketMath.h:3324
Packet4bf type
Definition PacketMath.h:3323
Packet2f half
Definition PacketMath.h:169
Packet4f type
Definition PacketMath.h:168
Packet8s type
Definition PacketMath.h:273
Packet4s half
Definition PacketMath.h:274
Packet2i half
Definition PacketMath.h:333
Packet4i type
Definition PacketMath.h:332
Packet2l half
Definition PacketMath.h:393
Packet2l type
Definition PacketMath.h:392
Packet8c half
Definition PacketMath.h:214
Packet16c type
Definition PacketMath.h:213
Packet4us half
Definition PacketMath.h:303
Packet8us type
Definition PacketMath.h:302
Packet2ui half
Definition PacketMath.h:362
Packet4ui type
Definition PacketMath.h:361
Packet2ul type
Definition PacketMath.h:422
Packet2ul half
Definition PacketMath.h:423
Packet16uc type
Definition PacketMath.h:242
Packet8uc half
Definition PacketMath.h:243
Definition GenericPacketMath.h:107
@ HasSub
Definition GenericPacketMath.h:118
@ HasMax
Definition GenericPacketMath.h:124
@ HasNegate
Definition GenericPacketMath.h:120
@ HasMul
Definition GenericPacketMath.h:119
@ HasAdd
Definition GenericPacketMath.h:117
@ HasSetLinear
Definition GenericPacketMath.h:126
@ HasMin
Definition GenericPacketMath.h:123
@ HasConj
Definition GenericPacketMath.h:125
@ HasAbs2
Definition GenericPacketMath.h:122
@ HasAbs
Definition GenericPacketMath.h:121
T type
Definition GenericPacketMath.h:108
T half
Definition GenericPacketMath.h:109
@ HasHalfPacket
Definition GenericPacketMath.h:114
@ size
Definition GenericPacketMath.h:112
@ AlignedOnScalar
Definition GenericPacketMath.h:113
@ Vectorizable
Definition GenericPacketMath.h:111
Definition ForwardDeclarations.h:17
int8_t type
Definition PacketMath.h:514
Packet8c half
Definition PacketMath.h:515
uint8_t type
Definition PacketMath.h:553
Packet8uc half
Definition PacketMath.h:554
Packet2f half
Definition PacketMath.h:461
Packet2i integer_packet
Definition PacketMath.h:462
float type
Definition PacketMath.h:460
int32_t type
Definition PacketMath.h:617
Packet2i half
Definition PacketMath.h:618
Packet2l half
Definition PacketMath.h:670
int64_t type
Definition PacketMath.h:669
uint32_t type
Definition PacketMath.h:643
Packet2ui half
Definition PacketMath.h:644
Packet2ul half
Definition PacketMath.h:683
uint64_t type
Definition PacketMath.h:682
Packet4bf half
Definition PacketMath.h:3367
bfloat16 type
Definition PacketMath.h:3366
Packet4c half
Definition PacketMath.h:489
int8_t type
Definition PacketMath.h:488
Packet4i integer_packet
Definition PacketMath.h:476
Packet2f half
Definition PacketMath.h:475
float type
Definition PacketMath.h:474
int32_t type
Definition PacketMath.h:630
Packet2i half
Definition PacketMath.h:631
int16_t type
Definition PacketMath.h:565
Packet4s half
Definition PacketMath.h:566
Packet4uc half
Definition PacketMath.h:528
uint8_t type
Definition PacketMath.h:527
uint32_t type
Definition PacketMath.h:656
Packet2ui half
Definition PacketMath.h:657
uint16_t type
Definition PacketMath.h:591
Packet4us half
Definition PacketMath.h:592
int8_t type
Definition PacketMath.h:501
Packet4c half
Definition PacketMath.h:502
int16_t type
Definition PacketMath.h:578
Packet4s half
Definition PacketMath.h:579
uint8_t type
Definition PacketMath.h:540
Packet4uc half
Definition PacketMath.h:541
Packet4us half
Definition PacketMath.h:605
uint16_t type
Definition PacketMath.h:604
Definition GenericPacketMath.h:133
T type
Definition GenericPacketMath.h:134
T half
Definition GenericPacketMath.h:135
@ masked_load_available
Definition GenericPacketMath.h:141
@ size
Definition GenericPacketMath.h:138
@ masked_store_available
Definition GenericPacketMath.h:142
@ vectorizable
Definition GenericPacketMath.h:140
@ alignment
Definition GenericPacketMath.h:139
std::ptrdiff_t j
Definition tut_arithmetic_redux_minmax.cpp:2
Definition PacketMath.h:47