10 #ifndef EIGEN_PACKET_MATH_ALTIVEC_H 11 #define EIGEN_PACKET_MATH_ALTIVEC_H 17 #ifndef EIGEN_CACHEFRIENDLY_PRODUCT_THRESHOLD 18 #define EIGEN_CACHEFRIENDLY_PRODUCT_THRESHOLD 4 21 #ifndef EIGEN_HAS_SINGLE_INSTRUCTION_MADD 22 #define EIGEN_HAS_SINGLE_INSTRUCTION_MADD 26 #ifndef EIGEN_ARCH_DEFAULT_NUMBER_OF_REGISTERS 27 #define EIGEN_ARCH_DEFAULT_NUMBER_OF_REGISTERS 32 42 #define _EIGEN_DECLARE_CONST_FAST_Packet4f(NAME,X) \ 43 Packet4f p4f_##NAME = {X, X, X, X} 45 #define _EIGEN_DECLARE_CONST_FAST_Packet4i(NAME,X) \ 46 Packet4i p4i_##NAME = vec_splat_s32(X) 48 #define _EIGEN_DECLARE_CONST_FAST_Packet4ui(NAME,X) \ 49 Packet4ui p4ui_##NAME = {X, X, X, X} 51 #define _EIGEN_DECLARE_CONST_FAST_Packet8us(NAME,X) \ 52 Packet8us p8us_##NAME = {X, X, X, X, X, X, X, X} 54 #define _EIGEN_DECLARE_CONST_FAST_Packet16uc(NAME,X) \ 55 Packet16uc p16uc_##NAME = {X, X, X, X, X, X, X, X, X, X, X, X, X, X, X, X} 57 #define _EIGEN_DECLARE_CONST_Packet4f(NAME,X) \ 58 Packet4f p4f_##NAME = pset1<Packet4f>(X) 60 #define _EIGEN_DECLARE_CONST_Packet4i(NAME,X) \ 61 Packet4i p4i_##NAME = pset1<Packet4i>(X) 63 #define _EIGEN_DECLARE_CONST_Packet2d(NAME,X) \ 64 Packet2d p2d_##NAME = pset1<Packet2d>(X) 66 #define _EIGEN_DECLARE_CONST_Packet2l(NAME,X) \ 67 Packet2l p2l_##NAME = pset1<Packet2l>(X) 69 #define _EIGEN_DECLARE_CONST_Packet4f_FROM_INT(NAME,X) \ 70 const Packet4f p4f_##NAME = reinterpret_cast<Packet4f>(pset1<Packet4i>(X)) 73 #define DST_CTRL(size, count, stride) (((size) << 24) | ((count) << 16) | (stride)) 74 #define __UNPACK_TYPE__(PACKETNAME) typename unpacket_traits<PACKETNAME>::type 88 static Packet4f
p4f_ONE = vec_ctf(p4i_ONE, 0);
97 8, 9, 10, 11, 12, 13, 14, 15};
99 8, 9, 10, 11, 12, 13, 14, 15};
101 static Packet16uc
p16uc_REVERSE32 = { 12,13,14,15, 8,9,10,11, 4,5,6,7, 0,1,2,3 };
102 static Packet16uc
p16uc_REVERSE16 = { 14,15, 12,13, 10,11, 8,9, 6,7, 4,5, 2,3, 0,1 };
103 static Packet16uc
p16uc_REVERSE8 = { 15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,0 };
105 static Packet16uc
p16uc_DUPLICATE32_HI = { 0,1,2,3, 0,1,2,3, 4,5,6,7, 4,5,6,7 };
106 static Packet16uc
p16uc_DUPLICATE16_HI = { 0,1,0,1, 2,3,2,3, 4,5,4,5, 6,7,6,7 };
107 static Packet16uc
p16uc_DUPLICATE8_HI = { 0,0, 1,1, 2,2, 3,3, 4,4, 5,5, 6,6, 7,7 };
108 static const Packet16uc
p16uc_DUPLICATE16_EVEN= { 0,1 ,0,1, 4,5, 4,5, 8,9, 8,9, 12,13, 12,13 };
109 static const Packet16uc
p16uc_DUPLICATE16_ODD = { 2,3 ,2,3, 6,7, 6,7, 10,11, 10,11, 14,15, 14,15 };
111 static Packet16uc
p16uc_QUADRUPLICATE16_HI = { 0,1,0,1,0,1,0,1, 2,3,2,3,2,3,2,3 };
118 static Packet16uc
p16uc_REVERSE64 = { 8,9,10,11, 12,13,14,15, 0,1,2,3, 4,5,6,7 };
120 static Packet16uc
p16uc_PSET32_WODD = vec_sld((Packet16uc) vec_splat((Packet4ui)p16uc_FORWARD, 0), (Packet16uc) vec_splat((Packet4ui)p16uc_FORWARD, 2), 8);
121 static Packet16uc
p16uc_PSET32_WEVEN = vec_sld(p16uc_DUPLICATE32_HI, (Packet16uc) vec_splat((Packet4ui)p16uc_FORWARD, 3), 8);
122 static Packet16uc
p16uc_HALF64_0_16 = vec_sld((Packet16uc)p4i_ZERO, vec_splat((Packet16uc) vec_abs(p4i_MINUS16), 3), 8);
125 static Packet16uc p16uc_REVERSE64 = { 8,9,10,11, 12,13,14,15, 0,1,2,3, 4,5,6,7 };
126 static Packet16uc p16uc_PSET32_WODD = vec_sld((Packet16uc) vec_splat((Packet4ui)p16uc_FORWARD, 1), (Packet16uc) vec_splat((Packet4ui)p16uc_FORWARD, 3), 8);
127 static Packet16uc p16uc_PSET32_WEVEN = vec_sld((Packet16uc) vec_splat((Packet4ui)p16uc_FORWARD, 0), (Packet16uc) vec_splat((Packet4ui)p16uc_FORWARD, 2), 8);
128 static Packet16uc p16uc_HALF64_0_16 = vec_sld(vec_splat((Packet16uc) vec_abs(p4i_MINUS16), 0), (Packet16uc)p4i_ZERO, 8);
129 #endif // _BIG_ENDIAN 141 static Packet16uc p16uc_COMPLEX32_REV2 = vec_sld(p16uc_PSET64_HI, p16uc_PSET64_LO, 8);
142 #endif // _BIG_ENDIAN 144 #if EIGEN_HAS_BUILTIN(__builtin_prefetch) || EIGEN_COMP_GNUC 145 #define EIGEN_PPC_PREFETCH(ADDR) __builtin_prefetch(ADDR); 147 #define EIGEN_PPC_PREFETCH(ADDR) asm( " dcbt [%[addr]]\n" :: [addr] "r" (ADDR) : "cc" ); 173 #if !EIGEN_COMP_CLANG 215 #if !EIGEN_COMP_CLANG 331 enum {
size=4, alignment=
Aligned16, vectorizable=
true, masked_load_available=
false, masked_store_available=
false};
337 enum {
size=4, alignment=
Aligned16, vectorizable=
true, masked_load_available=
false, masked_store_available=
false};
343 enum {
size=8, alignment=
Aligned16, vectorizable=
true, masked_load_available=
false, masked_store_available=
false};
347 typedef unsigned short int type;
349 enum {
size=8, alignment=
Aligned16, vectorizable=
true, masked_load_available=
false, masked_store_available=
false};
356 enum {
size=16, alignment=
Aligned16, vectorizable=
true, masked_load_available=
false, masked_store_available=
false};
362 enum {
size=16, alignment=
Aligned16, vectorizable=
true, masked_load_available=
false, masked_store_available=
false};
369 enum {
size=8, alignment=
Aligned16, vectorizable=
true, masked_load_available=
false, masked_store_available=
false};
378 for (
int i=0;
i< 16;
i++)
379 s << vt.n[
i] <<
", ";
390 for (
int i=0;
i< 16;
i++)
391 s << vt.n[
i] <<
", ";
402 s << vt.n[0] <<
", " << vt.n[1] <<
", " << vt.n[2] <<
", " << vt.n[3];
413 s << vt.n[0] <<
", " << vt.n[1] <<
", " << vt.n[2] <<
", " << vt.n[3];
424 s << vt.n[0] <<
", " << vt.n[1] <<
", " << vt.n[2] <<
", " << vt.n[3];
428 template <
typename Packet>
438 return vec_ld(0, from);
445 return pload_common<Packet4f>(from);
450 return pload_common<Packet4i>(from);
455 return pload_common<Packet8s>(from);
460 return pload_common<Packet8us>(from);
465 return pload_common<Packet16c>(from);
470 return pload_common<Packet16uc>(from);
475 return pload_common<Packet8us>(
reinterpret_cast<const unsigned short int*
>(from));
478 template <
typename Packet>
485 vec_xst(from, 0, to);
493 pstore_common<Packet4f>(to, from);
498 pstore_common<Packet4i>(to, from);
503 pstore_common<Packet8s>(to, from);
508 pstore_common<Packet8us>(to, from);
513 pstore_common<Packet8us>(
reinterpret_cast<unsigned short int*
>(to), from);
518 pstore_common<Packet16c>(to, from);
523 pstore_common<Packet16uc>(to, from);
526 template<
typename Packet>
529 Packet v = {from, from, from, from};
533 template<
typename Packet>
536 Packet v = {from, from, from, from, from, from, from, from};
540 template<
typename Packet>
543 Packet v = {from, from, from, from, from, from, from, from, from, from, from, from, from, from, from, from};
548 return pset1_size4<Packet4f>(from);
552 return pset1_size4<Packet4i>(from);
556 return pset1_size8<Packet8s>(from);
560 return pset1_size8<Packet8us>(from);
564 return pset1_size16<Packet16c>(from);
568 return pset1_size16<Packet16uc>(from);
576 return pset1_size8<Packet8us>(
reinterpret_cast<const unsigned short int&
>(from));
583 a3 = pload<Packet>(
a);
584 a0 = vec_splat(a3, 0);
585 a1 = vec_splat(a3, 1);
586 a2 = vec_splat(a3, 2);
587 a3 = vec_splat(a3, 3);
592 Packet4f& a0, Packet4f&
a1, Packet4f&
a2, Packet4f&
a3)
594 pbroadcast4_common<Packet4f>(
a, a0,
a1,
a2,
a3);
598 Packet4i& a0, Packet4i&
a1, Packet4i&
a2, Packet4i&
a3)
600 pbroadcast4_common<Packet4i>(
a, a0,
a1,
a2,
a3);
606 a[0] = from[0*stride];
607 a[1] = from[1*stride];
608 a[2] = from[2*stride];
609 a[3] = from[3*stride];
610 return pload<Packet>(
a);
615 return pgather_common<Packet4f>(from, stride);
620 return pgather_common<Packet4i>(from, stride);
626 a[0] = from[0*stride];
627 a[1] = from[1*stride];
628 a[2] = from[2*stride];
629 a[3] = from[3*stride];
630 a[4] = from[4*stride];
631 a[5] = from[5*stride];
632 a[6] = from[6*stride];
633 a[7] = from[7*stride];
634 return pload<Packet>(
a);
639 return pgather_size8<Packet8s>(from, stride);
644 return pgather_size8<Packet8us>(from, stride);
649 return pgather_size8<Packet8bf>(from, stride);
655 a[0] = from[0*stride];
656 a[1] = from[1*stride];
657 a[2] = from[2*stride];
658 a[3] = from[3*stride];
659 a[4] = from[4*stride];
660 a[5] = from[5*stride];
661 a[6] = from[6*stride];
662 a[7] = from[7*stride];
663 a[8] = from[8*stride];
664 a[9] = from[9*stride];
665 a[10] = from[10*stride];
666 a[11] = from[11*stride];
667 a[12] = from[12*stride];
668 a[13] = from[13*stride];
669 a[14] = from[14*stride];
670 a[15] = from[15*stride];
671 return pload<Packet>(
a);
677 return pgather_size16<Packet16c>(from, stride);
682 return pgather_size16<Packet16uc>(from, stride);
688 pstore<__UNPACK_TYPE__(Packet)>(
a, from);
697 pscatter_size4<Packet4f>(to, from, stride);
702 pscatter_size4<Packet4i>(to, from, stride);
708 pstore<__UNPACK_TYPE__(Packet)>(
a, from);
722 pscatter_size8<Packet8s>(to, from, stride);
727 pscatter_size8<Packet8us>(to, from, stride);
732 pscatter_size8<Packet8bf>(to, from, stride);
738 pstore<__UNPACK_TYPE__(Packet)>(
a, from);
749 to[10*stride] = a[10];
750 to[11*stride] = a[11];
751 to[12*stride] = a[12];
752 to[13*stride] = a[13];
753 to[14*stride] = a[14];
754 to[15*stride] = a[15];
759 pscatter_size16<Packet16c>(to, from, stride);
764 pscatter_size16<Packet16uc>(to, from, stride);
805 #ifndef __VSX__ // VSX actually provides a div instruction 806 Packet4f
t, y_0, y_1;
812 t = vec_nmsub(y_0,
b, p4f_ONE);
813 y_1 = vec_madd(y_0, t, y_0);
815 return vec_madd(a, y_1, p4f_MZERO);
817 return vec_div(a,
b);
822 {
eigen_assert(
false &&
"packet integer division are not supported by AltiVec");
837 __asm__ (
"xvcmpgesp %x0,%x1,%x2\n\txxsel %x0,%x1,%x2,%x0" :
"=&wa" (ret) :
"wa" (a),
"wa" (
b));
840 return vec_min(a,
b);
855 __asm__ (
"xvcmpgtsp %x0,%x2,%x1\n\txxsel %x0,%x1,%x2,%x0" :
"=&wa" (ret) :
"wa" (a),
"wa" (
b));
858 return vec_max(a,
b);
871 Packet4f
c =
reinterpret_cast<Packet4f
>(vec_cmpge(a,b));
887 template<>
EIGEN_STRONG_INLINE Packet16uc
pcmp_le(
const Packet16uc& a,
const Packet16uc&
b) {
return reinterpret_cast<Packet16uc
>(vec_cmple(a,b)); }
888 template<>
EIGEN_STRONG_INLINE Packet16uc
pcmp_lt(
const Packet16uc& a,
const Packet16uc&
b) {
return reinterpret_cast<Packet16uc
>(vec_cmplt(a,b)); }
889 template<>
EIGEN_STRONG_INLINE Packet16uc
pcmp_eq(
const Packet16uc& a,
const Packet16uc&
b) {
return reinterpret_cast<Packet16uc
>(vec_cmpeq(a,b)); }
918 return vec_sel(b, a, reinterpret_cast<Packet4ui>(mask));
923 Packet4f
t = vec_add(reinterpret_cast<Packet4f>(vec_or(vec_and(reinterpret_cast<Packet4ui>(a), p4ui_SIGN), p4ui_PREV0DOT5)), a);
927 __asm__(
"xvrspiz %x0, %x1\n\t" 931 __asm__(
"vrfiz %0, %1\n\t" 944 __asm__(
"xvrspic %x0, %x1\n\t" 957 MSQ = vec_ld(0, (
unsigned char *)from);
958 LSQ = vec_ld(15, (
unsigned char *)from);
959 mask = vec_lvsl(0, from);
961 return (
Packet) vec_perm(MSQ, LSQ, mask);
970 return ploadu_common<Packet4f>(from);
974 return ploadu_common<Packet4i>(from);
978 return ploadu_common<Packet8s>(from);
982 return ploadu_common<Packet8us>(from);
986 return ploadu_common<Packet8us>(
reinterpret_cast<const unsigned short int*
>(from));
990 return ploadu_common<Packet16c>(from);
994 return ploadu_common<Packet16uc>(from);
1000 if((std::ptrdiff_t(from) % 16) == 0) p = pload<Packet>(from);
1001 else p = ploadu<Packet>(from);
1002 return vec_perm(p, p, p16uc_DUPLICATE32_HI);
1006 return ploaddup_common<Packet4f>(from);
1010 return ploaddup_common<Packet4i>(from);
1018 return vec_perm(p, p, p16uc_DUPLICATE16_HI);
1026 return vec_perm(p, p, p16uc_DUPLICATE16_HI);
1034 return vec_perm(p, p, p16uc_QUADRUPLICATE16_HI);
1042 return vec_perm(p, p, p16uc_QUADRUPLICATE16_HI);
1055 return vec_perm(p, p, p16uc_DUPLICATE8_HI);
1063 return vec_perm(p, p, p16uc_DUPLICATE8_HI);
1072 Packet16uc MSQ, LSQ,
edges;
1073 Packet16uc edgeAlign,
align;
1075 MSQ = vec_ld(0, (
unsigned char *)to);
1076 LSQ = vec_ld(15, (
unsigned char *)to);
1077 edgeAlign = vec_lvsl(0, to);
1078 edges=vec_perm(LSQ,MSQ,edgeAlign);
1079 align = vec_lvsr( 0, to );
1080 MSQ = vec_perm(edges,(Packet16uc)from,align);
1081 LSQ = vec_perm((Packet16uc)from,edges,align);
1082 vec_st( LSQ, 15, (
unsigned char *)to );
1083 vec_st( MSQ, 0, (
unsigned char *)to );
1085 vec_xst(from, 0, to);
1090 pstoreu_common<Packet4f>(to, from);
1094 pstoreu_common<Packet4i>(to, from);
1098 pstoreu_common<Packet8s>(to, from);
1102 pstoreu_common<Packet8us>(to, from);
1106 pstoreu_common<Packet8us>(
reinterpret_cast<unsigned short int*
>(to), from);
1110 pstoreu_common<Packet16c>(to, from);
1114 pstoreu_common<Packet16uc>(to, from);
1130 return pfirst_common<Packet8s>(
a);
1134 return pfirst_common<Packet8us>(
a);
1139 return pfirst_common<Packet16c>(
a);
1144 return pfirst_common<Packet16uc>(
a);
1149 return reinterpret_cast<Packet4f
>(vec_perm(reinterpret_cast<Packet16uc>(a), reinterpret_cast<Packet16uc>(a), p16uc_REVERSE32));
1153 return reinterpret_cast<Packet4i
>(vec_perm(reinterpret_cast<Packet16uc>(a), reinterpret_cast<Packet16uc>(a), p16uc_REVERSE32));
1157 return reinterpret_cast<Packet8s
>(vec_perm(reinterpret_cast<Packet16uc>(a), reinterpret_cast<Packet16uc>(a), p16uc_REVERSE16));
1161 return reinterpret_cast<Packet8us
>(vec_perm(reinterpret_cast<Packet16uc>(a), reinterpret_cast<Packet16uc>(a), p16uc_REVERSE16));
1165 return vec_perm(a, a, p16uc_REVERSE8);
1169 return vec_perm(a, a, p16uc_REVERSE8);
1173 return preverse<Packet8us>(
a);
1196 Packet4ui r = vec_sl(reinterpret_cast<Packet4ui>(a), p4ui_mask);
1197 return reinterpret_cast<Packet4f
>(r);
1203 Packet4ui r = vec_sr(reinterpret_cast<Packet4ui>(a), p4ui_mask);
1204 return reinterpret_cast<Packet4f
>(r);
1210 return vec_sr(a, p4ui_mask);
1216 return vec_sl(a, p4ui_mask);
1222 return vec_sl(a, p8us_mask);
1227 return vec_sr(a, p8us_mask);
1231 return plogical_shift_left<16>(
reinterpret_cast<Packet4f
>(bf.
m_val));
1237 reinterpret_cast<Packet4f
>(bf.
m_val),
1238 reinterpret_cast<Packet4f>(p4ui_high_mask)
1246 Packet4f bf_odd, bf_even;
1247 bf_odd =
pand(reinterpret_cast<Packet4f>(p4ui_high_mask), odd);
1248 bf_even = plogical_shift_right<16>(even);
1249 return reinterpret_cast<Packet8us
>(
por<Packet4f>(bf_even, bf_odd));
1253 Packet4ui input =
reinterpret_cast<Packet4ui
>(p4f);
1254 Packet4ui lsb = plogical_shift_right<16>(input);
1266 Packet4ui mantissa =
pand<Packet4ui>(p4ui_mantissa_mask,
reinterpret_cast<Packet4ui
>(p4f));
1269 Packet4bi is_max_exp = vec_cmpeq(exp, p4ui_max_exp);
1270 Packet4bi is_zero_exp = vec_cmpeq(exp, reinterpret_cast<Packet4ui>(p4i_ZERO));
1272 Packet4bi is_mant_zero = vec_cmpeq(mantissa, reinterpret_cast<Packet4ui>(p4i_ZERO));
1274 reinterpret_cast<Packet4ui
>(is_max_exp),
1275 reinterpret_cast<Packet4ui>(is_mant_zero)
1279 reinterpret_cast<Packet4ui
>(is_zero_exp),
1280 reinterpret_cast<Packet4ui>(is_mant_zero)
1284 input = vec_sel(input, p4ui_nan, nan_selector);
1285 input = vec_sel(input, reinterpret_cast<Packet4ui>(p4f), subnormal_selector);
1288 input = plogical_shift_right<16>(input);
1289 return reinterpret_cast<Packet8us
>(input);
1293 Packet4f bf_odd, bf_even;
1295 bf_odd = plogical_shift_left<16>(bf_odd);
1297 return reinterpret_cast<Packet8us
>(
por<Packet4f>(bf_even, bf_odd));
1299 #define BF16_TO_F32_UNARY_OP_WRAPPER(OP, A) \ 1300 Packet4f a_even = Bf16ToF32Even(A);\ 1301 Packet4f a_odd = Bf16ToF32Odd(A);\ 1302 Packet4f op_even = OP(a_even);\ 1303 Packet4f op_odd = OP(a_odd);\ 1304 return F32ToBf16(op_even, op_odd);\ 1306 #define BF16_TO_F32_BINARY_OP_WRAPPER(OP, A, B) \ 1307 Packet4f a_even = Bf16ToF32Even(A);\ 1308 Packet4f a_odd = Bf16ToF32Odd(A);\ 1309 Packet4f b_even = Bf16ToF32Even(B);\ 1310 Packet4f b_odd = Bf16ToF32Odd(B);\ 1311 Packet4f op_even = OP(a_even, b_even);\ 1312 Packet4f op_odd = OP(a_odd, b_odd);\ 1313 return F32ToBf16(op_even, op_odd);\ 1315 #define BF16_TO_F32_BINARY_OP_WRAPPER_BOOL(OP, A, B) \ 1316 Packet4f a_even = Bf16ToF32Even(A);\ 1317 Packet4f a_odd = Bf16ToF32Odd(A);\ 1318 Packet4f b_even = Bf16ToF32Even(B);\ 1319 Packet4f b_odd = Bf16ToF32Odd(B);\ 1320 Packet4f op_even = OP(a_even, b_even);\ 1321 Packet4f op_odd = OP(a_odd, b_odd);\ 1322 return F32ToBf16Bool(op_even, op_odd);\ 1403 Packet4f pmadd_even = pmadd<Packet4f>(a_even, b_even, c_even);
1404 Packet4f pmadd_odd = pmadd<Packet4f>(a_odd, b_odd, c_odd);
1405 return F32ToBf16(pmadd_even, pmadd_odd);
1447 b = vec_sld(a, a, 8);
1449 b = vec_sld(sum, sum, 4);
1457 sum = vec_sums(a, p4i_ZERO);
1459 sum = vec_sld(sum, p4i_ZERO, 12);
1461 sum = vec_sld(p4i_ZERO, sum, 4);
1470 float f32_result = redux_even + redux_odd;
1481 EIGEN_ALIGN16 int first_loader[4] = { vt.n[0], vt.n[1], vt.n[2], vt.n[3] };
1482 EIGEN_ALIGN16 int second_loader[4] = { vt.n[4], vt.n[5], vt.n[6], vt.n[7] };
1491 return predux_size8<Packet8s>(
a);
1496 return predux_size8<Packet8us>(
a);
1507 EIGEN_ALIGN16 int first_loader[4] = { vt.n[0], vt.n[1], vt.n[2], vt.n[3] };
1508 EIGEN_ALIGN16 int second_loader[4] = { vt.n[4], vt.n[5], vt.n[6], vt.n[7] };
1509 EIGEN_ALIGN16 int third_loader[4] = { vt.n[8], vt.n[9], vt.n[10], vt.n[11] };
1510 EIGEN_ALIGN16 int fourth_loader[4] = { vt.n[12], vt.n[13], vt.n[14], vt.n[15] };
1523 return predux_size16<Packet16c>(
a);
1528 return predux_size16<Packet16uc>(
a);
1536 prod =
pmul(a, vec_sld(a, a, 8));
1537 return pfirst(
pmul(prod, vec_sld(prod, prod, 4)));
1544 return aux[0] * aux[1] * aux[2] * aux[3];
1549 Packet8s pair, quad, octo;
1551 pair = vec_mul(a, vec_sld(a, a, 8));
1552 quad = vec_mul(pair, vec_sld(pair, pair, 4));
1553 octo = vec_mul(quad, vec_sld(quad, quad, 2));
1560 Packet8us pair, quad, octo;
1562 pair = vec_mul(a, vec_sld(a, a, 8));
1563 quad = vec_mul(pair, vec_sld(pair, pair, 4));
1564 octo = vec_mul(quad, vec_sld(quad, quad, 2));
1573 float f32_result = redux_even * redux_odd;
1580 Packet16c pair, quad, octo,
result;
1582 pair = vec_mul(a, vec_sld(a, a, 8));
1583 quad = vec_mul(pair, vec_sld(pair, pair, 4));
1584 octo = vec_mul(quad, vec_sld(quad, quad, 2));
1585 result = vec_mul(octo, vec_sld(octo, octo, 1));
1592 Packet16uc pair, quad, octo,
result;
1594 pair = vec_mul(a, vec_sld(a, a, 8));
1595 quad = vec_mul(pair, vec_sld(pair, pair, 4));
1596 octo = vec_mul(quad, vec_sld(quad, quad, 2));
1597 result = vec_mul(octo, vec_sld(octo, octo, 1));
1607 b = vec_min(a, vec_sld(a, a, 8));
1608 res = vec_min(b, vec_sld(b, b, 4));
1615 return predux_min4<Packet4f>(
a);
1620 return predux_min4<Packet4i>(
a);
1627 float f32_result = (
std::min)(redux_even, redux_odd);
1633 Packet8s pair, quad, octo;
1636 pair = vec_min(a, vec_sld(a, a, 8));
1639 quad = vec_min(pair, vec_sld(pair, pair, 4));
1642 octo = vec_min(quad, vec_sld(quad, quad, 2));
1648 Packet8us pair, quad, octo;
1651 pair = vec_min(a, vec_sld(a, a, 8));
1654 quad = vec_min(pair, vec_sld(pair, pair, 4));
1657 octo = vec_min(quad, vec_sld(quad, quad, 2));
1663 Packet16c pair, quad, octo,
result;
1665 pair = vec_min(a, vec_sld(a, a, 8));
1666 quad = vec_min(pair, vec_sld(pair, pair, 4));
1667 octo = vec_min(quad, vec_sld(quad, quad, 2));
1668 result = vec_min(octo, vec_sld(octo, octo, 1));
1675 Packet16uc pair, quad, octo,
result;
1677 pair = vec_min(a, vec_sld(a, a, 8));
1678 quad = vec_min(pair, vec_sld(pair, pair, 4));
1679 octo = vec_min(quad, vec_sld(quad, quad, 2));
1680 result = vec_min(octo, vec_sld(octo, octo, 1));
1688 b = vec_max(a, vec_sld(a, a, 8));
1689 res = vec_max(b, vec_sld(b, b, 4));
1695 return predux_max4<Packet4f>(
a);
1700 return predux_max4<Packet4i>(
a);
1707 float f32_result = (
std::max)(redux_even, redux_odd);
1713 Packet8s pair, quad, octo;
1716 pair = vec_max(a, vec_sld(a, a, 8));
1719 quad = vec_max(pair, vec_sld(pair, pair, 4));
1722 octo = vec_max(quad, vec_sld(quad, quad, 2));
1728 Packet8us pair, quad, octo;
1731 pair = vec_max(a, vec_sld(a, a, 8));
1734 quad = vec_max(pair, vec_sld(pair, pair, 4));
1737 octo = vec_max(quad, vec_sld(quad, quad, 2));
1743 Packet16c pair, quad, octo,
result;
1745 pair = vec_max(a, vec_sld(a, a, 8));
1746 quad = vec_max(pair, vec_sld(pair, pair, 4));
1747 octo = vec_max(quad, vec_sld(quad, quad, 2));
1748 result = vec_max(octo, vec_sld(octo, octo, 1));
1755 Packet16uc pair, quad, octo,
result;
1757 pair = vec_max(a, vec_sld(a, a, 8));
1758 quad = vec_max(pair, vec_sld(pair, pair, 4));
1759 octo = vec_max(quad, vec_sld(quad, quad, 2));
1760 result = vec_max(octo, vec_sld(octo, octo, 1));
1767 return vec_any_ne(x,
pzero(x));
1777 kernel.
packet[0] = vec_mergeh(t0, t2);
1778 kernel.
packet[1] = vec_mergel(t0, t2);
1779 kernel.
packet[2] = vec_mergeh(t1, t3);
1780 kernel.
packet[3] = vec_mergel(t1, t3);
1785 ptranpose_common<Packet4f>(kernel);
1790 ptranpose_common<Packet4i>(kernel);
1795 Packet8s t0, t1, t2, t3;
1800 kernel.
packet[0] = vec_mergeh(t0, t2);
1801 kernel.
packet[1] = vec_mergel(t0, t2);
1802 kernel.
packet[2] = vec_mergeh(t1, t3);
1803 kernel.
packet[3] = vec_mergel(t1, t3);
1808 Packet8us t0, t1, t2, t3;
1813 kernel.
packet[0] = vec_mergeh(t0, t2);
1814 kernel.
packet[1] = vec_mergel(t0, t2);
1815 kernel.
packet[2] = vec_mergeh(t1, t3);
1816 kernel.
packet[3] = vec_mergel(t1, t3);
1822 Packet8us t0, t1, t2, t3;
1824 t0 = vec_mergeh(kernel.
packet[0].m_val, kernel.
packet[2].m_val);
1825 t1 = vec_mergel(kernel.
packet[0].m_val, kernel.
packet[2].m_val);
1826 t2 = vec_mergeh(kernel.
packet[1].m_val, kernel.
packet[3].m_val);
1827 t3 = vec_mergel(kernel.
packet[1].m_val, kernel.
packet[3].m_val);
1828 kernel.
packet[0] = vec_mergeh(t0, t2);
1829 kernel.
packet[1] = vec_mergel(t0, t2);
1830 kernel.
packet[2] = vec_mergeh(t1, t3);
1831 kernel.
packet[3] = vec_mergel(t1, t3);
1836 Packet16c t0, t1, t2, t3;
1841 kernel.
packet[0] = vec_mergeh(t0, t2);
1842 kernel.
packet[1] = vec_mergel(t0, t2);
1843 kernel.
packet[2] = vec_mergeh(t1, t3);
1844 kernel.
packet[3] = vec_mergel(t1, t3);
1850 Packet16uc t0, t1, t2, t3;
1855 kernel.
packet[0] = vec_mergeh(t0, t2);
1856 kernel.
packet[1] = vec_mergel(t0, t2);
1857 kernel.
packet[2] = vec_mergeh(t1, t3);
1858 kernel.
packet[3] = vec_mergel(t1, t3);
1863 Packet8s
v[8], sum[8];
1873 sum[0] = vec_mergeh(v[0], v[4]);
1874 sum[1] = vec_mergel(v[0], v[4]);
1875 sum[2] = vec_mergeh(v[1], v[5]);
1876 sum[3] = vec_mergel(v[1], v[5]);
1877 sum[4] = vec_mergeh(v[2], v[6]);
1878 sum[5] = vec_mergel(v[2], v[6]);
1879 sum[6] = vec_mergeh(v[3], v[7]);
1880 sum[7] = vec_mergel(v[3], v[7]);
1882 kernel.
packet[0] = vec_mergeh(sum[0], sum[4]);
1883 kernel.
packet[1] = vec_mergel(sum[0], sum[4]);
1884 kernel.
packet[2] = vec_mergeh(sum[1], sum[5]);
1885 kernel.
packet[3] = vec_mergel(sum[1], sum[5]);
1886 kernel.
packet[4] = vec_mergeh(sum[2], sum[6]);
1887 kernel.
packet[5] = vec_mergel(sum[2], sum[6]);
1888 kernel.
packet[6] = vec_mergeh(sum[3], sum[7]);
1889 kernel.
packet[7] = vec_mergel(sum[3], sum[7]);
1894 Packet8us
v[8], sum[8];
1904 sum[0] = vec_mergeh(v[0], v[4]);
1905 sum[1] = vec_mergel(v[0], v[4]);
1906 sum[2] = vec_mergeh(v[1], v[5]);
1907 sum[3] = vec_mergel(v[1], v[5]);
1908 sum[4] = vec_mergeh(v[2], v[6]);
1909 sum[5] = vec_mergel(v[2], v[6]);
1910 sum[6] = vec_mergeh(v[3], v[7]);
1911 sum[7] = vec_mergel(v[3], v[7]);
1913 kernel.
packet[0] = vec_mergeh(sum[0], sum[4]);
1914 kernel.
packet[1] = vec_mergel(sum[0], sum[4]);
1915 kernel.
packet[2] = vec_mergeh(sum[1], sum[5]);
1916 kernel.
packet[3] = vec_mergel(sum[1], sum[5]);
1917 kernel.
packet[4] = vec_mergeh(sum[2], sum[6]);
1918 kernel.
packet[5] = vec_mergel(sum[2], sum[6]);
1919 kernel.
packet[6] = vec_mergeh(sum[3], sum[7]);
1920 kernel.
packet[7] = vec_mergel(sum[3], sum[7]);
1925 Packet8bf
v[8], sum[8];
1927 v[0] = vec_mergeh(kernel.
packet[0].m_val, kernel.
packet[4].m_val);
1928 v[1] = vec_mergel(kernel.
packet[0].m_val, kernel.
packet[4].m_val);
1929 v[2] = vec_mergeh(kernel.
packet[1].m_val, kernel.
packet[5].m_val);
1930 v[3] = vec_mergel(kernel.
packet[1].m_val, kernel.
packet[5].m_val);
1931 v[4] = vec_mergeh(kernel.
packet[2].m_val, kernel.
packet[6].m_val);
1932 v[5] = vec_mergel(kernel.
packet[2].m_val, kernel.
packet[6].m_val);
1933 v[6] = vec_mergeh(kernel.
packet[3].m_val, kernel.
packet[7].m_val);
1934 v[7] = vec_mergel(kernel.
packet[3].m_val, kernel.
packet[7].m_val);
1935 sum[0] = vec_mergeh(v[0].m_val, v[4].m_val);
1936 sum[1] = vec_mergel(v[0].m_val, v[4].m_val);
1937 sum[2] = vec_mergeh(v[1].m_val, v[5].m_val);
1938 sum[3] = vec_mergel(v[1].m_val, v[5].m_val);
1939 sum[4] = vec_mergeh(v[2].m_val, v[6].m_val);
1940 sum[5] = vec_mergel(v[2].m_val, v[6].m_val);
1941 sum[6] = vec_mergeh(v[3].m_val, v[7].m_val);
1942 sum[7] = vec_mergel(v[3].m_val, v[7].m_val);
1944 kernel.
packet[0] = vec_mergeh(sum[0].m_val, sum[4].m_val);
1945 kernel.
packet[1] = vec_mergel(sum[0].m_val, sum[4].m_val);
1946 kernel.
packet[2] = vec_mergeh(sum[1].m_val, sum[5].m_val);
1947 kernel.
packet[3] = vec_mergel(sum[1].m_val, sum[5].m_val);
1948 kernel.
packet[4] = vec_mergeh(sum[2].m_val, sum[6].m_val);
1949 kernel.
packet[5] = vec_mergel(sum[2].m_val, sum[6].m_val);
1950 kernel.
packet[6] = vec_mergeh(sum[3].m_val, sum[7].m_val);
1951 kernel.
packet[7] = vec_mergel(sum[3].m_val, sum[7].m_val);
1956 Packet16c step1[16], step2[16], step3[16];
1958 step1[0] = vec_mergeh(kernel.
packet[0], kernel.
packet[8]);
1959 step1[1] = vec_mergel(kernel.
packet[0], kernel.
packet[8]);
1960 step1[2] = vec_mergeh(kernel.
packet[1], kernel.
packet[9]);
1961 step1[3] = vec_mergel(kernel.
packet[1], kernel.
packet[9]);
1962 step1[4] = vec_mergeh(kernel.
packet[2], kernel.
packet[10]);
1963 step1[5] = vec_mergel(kernel.
packet[2], kernel.
packet[10]);
1964 step1[6] = vec_mergeh(kernel.
packet[3], kernel.
packet[11]);
1965 step1[7] = vec_mergel(kernel.
packet[3], kernel.
packet[11]);
1966 step1[8] = vec_mergeh(kernel.
packet[4], kernel.
packet[12]);
1967 step1[9] = vec_mergel(kernel.
packet[4], kernel.
packet[12]);
1968 step1[10] = vec_mergeh(kernel.
packet[5], kernel.
packet[13]);
1969 step1[11] = vec_mergel(kernel.
packet[5], kernel.
packet[13]);
1970 step1[12] = vec_mergeh(kernel.
packet[6], kernel.
packet[14]);
1971 step1[13] = vec_mergel(kernel.
packet[6], kernel.
packet[14]);
1972 step1[14] = vec_mergeh(kernel.
packet[7], kernel.
packet[15]);
1973 step1[15] = vec_mergel(kernel.
packet[7], kernel.
packet[15]);
1975 step2[0] = vec_mergeh(step1[0], step1[8]);
1976 step2[1] = vec_mergel(step1[0], step1[8]);
1977 step2[2] = vec_mergeh(step1[1], step1[9]);
1978 step2[3] = vec_mergel(step1[1], step1[9]);
1979 step2[4] = vec_mergeh(step1[2], step1[10]);
1980 step2[5] = vec_mergel(step1[2], step1[10]);
1981 step2[6] = vec_mergeh(step1[3], step1[11]);
1982 step2[7] = vec_mergel(step1[3], step1[11]);
1983 step2[8] = vec_mergeh(step1[4], step1[12]);
1984 step2[9] = vec_mergel(step1[4], step1[12]);
1985 step2[10] = vec_mergeh(step1[5], step1[13]);
1986 step2[11] = vec_mergel(step1[5], step1[13]);
1987 step2[12] = vec_mergeh(step1[6], step1[14]);
1988 step2[13] = vec_mergel(step1[6], step1[14]);
1989 step2[14] = vec_mergeh(step1[7], step1[15]);
1990 step2[15] = vec_mergel(step1[7], step1[15]);
1992 step3[0] = vec_mergeh(step2[0], step2[8]);
1993 step3[1] = vec_mergel(step2[0], step2[8]);
1994 step3[2] = vec_mergeh(step2[1], step2[9]);
1995 step3[3] = vec_mergel(step2[1], step2[9]);
1996 step3[4] = vec_mergeh(step2[2], step2[10]);
1997 step3[5] = vec_mergel(step2[2], step2[10]);
1998 step3[6] = vec_mergeh(step2[3], step2[11]);
1999 step3[7] = vec_mergel(step2[3], step2[11]);
2000 step3[8] = vec_mergeh(step2[4], step2[12]);
2001 step3[9] = vec_mergel(step2[4], step2[12]);
2002 step3[10] = vec_mergeh(step2[5], step2[13]);
2003 step3[11] = vec_mergel(step2[5], step2[13]);
2004 step3[12] = vec_mergeh(step2[6], step2[14]);
2005 step3[13] = vec_mergel(step2[6], step2[14]);
2006 step3[14] = vec_mergeh(step2[7], step2[15]);
2007 step3[15] = vec_mergel(step2[7], step2[15]);
2009 kernel.
packet[0] = vec_mergeh(step3[0], step3[8]);
2010 kernel.
packet[1] = vec_mergel(step3[0], step3[8]);
2011 kernel.
packet[2] = vec_mergeh(step3[1], step3[9]);
2012 kernel.
packet[3] = vec_mergel(step3[1], step3[9]);
2013 kernel.
packet[4] = vec_mergeh(step3[2], step3[10]);
2014 kernel.
packet[5] = vec_mergel(step3[2], step3[10]);
2015 kernel.
packet[6] = vec_mergeh(step3[3], step3[11]);
2016 kernel.
packet[7] = vec_mergel(step3[3], step3[11]);
2017 kernel.
packet[8] = vec_mergeh(step3[4], step3[12]);
2018 kernel.
packet[9] = vec_mergel(step3[4], step3[12]);
2019 kernel.
packet[10] = vec_mergeh(step3[5], step3[13]);
2020 kernel.
packet[11] = vec_mergel(step3[5], step3[13]);
2021 kernel.
packet[12] = vec_mergeh(step3[6], step3[14]);
2022 kernel.
packet[13] = vec_mergel(step3[6], step3[14]);
2023 kernel.
packet[14] = vec_mergeh(step3[7], step3[15]);
2024 kernel.
packet[15] = vec_mergel(step3[7], step3[15]);
2029 Packet16uc step1[16], step2[16], step3[16];
2031 step1[0] = vec_mergeh(kernel.
packet[0], kernel.
packet[8]);
2032 step1[1] = vec_mergel(kernel.
packet[0], kernel.
packet[8]);
2033 step1[2] = vec_mergeh(kernel.
packet[1], kernel.
packet[9]);
2034 step1[3] = vec_mergel(kernel.
packet[1], kernel.
packet[9]);
2035 step1[4] = vec_mergeh(kernel.
packet[2], kernel.
packet[10]);
2036 step1[5] = vec_mergel(kernel.
packet[2], kernel.
packet[10]);
2037 step1[6] = vec_mergeh(kernel.
packet[3], kernel.
packet[11]);
2038 step1[7] = vec_mergel(kernel.
packet[3], kernel.
packet[11]);
2039 step1[8] = vec_mergeh(kernel.
packet[4], kernel.
packet[12]);
2040 step1[9] = vec_mergel(kernel.
packet[4], kernel.
packet[12]);
2041 step1[10] = vec_mergeh(kernel.
packet[5], kernel.
packet[13]);
2042 step1[11] = vec_mergel(kernel.
packet[5], kernel.
packet[13]);
2043 step1[12] = vec_mergeh(kernel.
packet[6], kernel.
packet[14]);
2044 step1[13] = vec_mergel(kernel.
packet[6], kernel.
packet[14]);
2045 step1[14] = vec_mergeh(kernel.
packet[7], kernel.
packet[15]);
2046 step1[15] = vec_mergel(kernel.
packet[7], kernel.
packet[15]);
2048 step2[0] = vec_mergeh(step1[0], step1[8]);
2049 step2[1] = vec_mergel(step1[0], step1[8]);
2050 step2[2] = vec_mergeh(step1[1], step1[9]);
2051 step2[3] = vec_mergel(step1[1], step1[9]);
2052 step2[4] = vec_mergeh(step1[2], step1[10]);
2053 step2[5] = vec_mergel(step1[2], step1[10]);
2054 step2[6] = vec_mergeh(step1[3], step1[11]);
2055 step2[7] = vec_mergel(step1[3], step1[11]);
2056 step2[8] = vec_mergeh(step1[4], step1[12]);
2057 step2[9] = vec_mergel(step1[4], step1[12]);
2058 step2[10] = vec_mergeh(step1[5], step1[13]);
2059 step2[11] = vec_mergel(step1[5], step1[13]);
2060 step2[12] = vec_mergeh(step1[6], step1[14]);
2061 step2[13] = vec_mergel(step1[6], step1[14]);
2062 step2[14] = vec_mergeh(step1[7], step1[15]);
2063 step2[15] = vec_mergel(step1[7], step1[15]);
2065 step3[0] = vec_mergeh(step2[0], step2[8]);
2066 step3[1] = vec_mergel(step2[0], step2[8]);
2067 step3[2] = vec_mergeh(step2[1], step2[9]);
2068 step3[3] = vec_mergel(step2[1], step2[9]);
2069 step3[4] = vec_mergeh(step2[2], step2[10]);
2070 step3[5] = vec_mergel(step2[2], step2[10]);
2071 step3[6] = vec_mergeh(step2[3], step2[11]);
2072 step3[7] = vec_mergel(step2[3], step2[11]);
2073 step3[8] = vec_mergeh(step2[4], step2[12]);
2074 step3[9] = vec_mergel(step2[4], step2[12]);
2075 step3[10] = vec_mergeh(step2[5], step2[13]);
2076 step3[11] = vec_mergel(step2[5], step2[13]);
2077 step3[12] = vec_mergeh(step2[6], step2[14]);
2078 step3[13] = vec_mergel(step2[6], step2[14]);
2079 step3[14] = vec_mergeh(step2[7], step2[15]);
2080 step3[15] = vec_mergel(step2[7], step2[15]);
2082 kernel.
packet[0] = vec_mergeh(step3[0], step3[8]);
2083 kernel.
packet[1] = vec_mergel(step3[0], step3[8]);
2084 kernel.
packet[2] = vec_mergeh(step3[1], step3[9]);
2085 kernel.
packet[3] = vec_mergel(step3[1], step3[9]);
2086 kernel.
packet[4] = vec_mergeh(step3[2], step3[10]);
2087 kernel.
packet[5] = vec_mergel(step3[2], step3[10]);
2088 kernel.
packet[6] = vec_mergeh(step3[3], step3[11]);
2089 kernel.
packet[7] = vec_mergel(step3[3], step3[11]);
2090 kernel.
packet[8] = vec_mergeh(step3[4], step3[12]);
2091 kernel.
packet[9] = vec_mergel(step3[4], step3[12]);
2092 kernel.
packet[10] = vec_mergeh(step3[5], step3[13]);
2093 kernel.
packet[11] = vec_mergel(step3[5], step3[13]);
2094 kernel.
packet[12] = vec_mergeh(step3[6], step3[14]);
2095 kernel.
packet[13] = vec_mergel(step3[6], step3[14]);
2096 kernel.
packet[14] = vec_mergeh(step3[7], step3[15]);
2097 kernel.
packet[15] = vec_mergel(step3[7], step3[15]);
2103 Packet4ui mask =
reinterpret_cast<Packet4ui
>(vec_cmpeq(reinterpret_cast<Packet4ui>(select), reinterpret_cast<Packet4ui>(p4i_ONE)));
2104 return vec_sel(elsePacket, thenPacket, mask);
2108 return pblend4<Packet4i>(ifPacket, thenPacket, elsePacket);
2112 return pblend4<Packet4f>(ifPacket, thenPacket, elsePacket);
2118 Packet8us mask =
reinterpret_cast<Packet8us
>(vec_cmpeq(select, p8us_ONE));
2119 Packet8s
result = vec_sel(elsePacket, thenPacket, mask);
2126 Packet8us mask =
reinterpret_cast<Packet8us
>(vec_cmpeq(reinterpret_cast<Packet8us>(select), p8us_ONE));
2127 return vec_sel(elsePacket, thenPacket, mask);
2131 return pblend<Packet8us>(ifPacket, thenPacket, elsePacket);
2140 Packet16uc mask =
reinterpret_cast<Packet16uc
>(vec_cmpeq(reinterpret_cast<Packet16uc>(select), p16uc_ONE));
2141 return vec_sel(elsePacket, thenPacket, mask);
2150 Packet16uc mask =
reinterpret_cast<Packet16uc
>(vec_cmpeq(reinterpret_cast<Packet16uc>(select), p16uc_ONE));
2151 return vec_sel(elsePacket, thenPacket, mask);
2191 return vec_cts(a,0);
2195 return vec_ctu(a,0);
2199 return vec_ctf(a,0);
2203 return vec_ctf(a,0);
2216 Packet4bi overflow_selector;
2217 if(vec_any_gt(int_even, p4ui_low_mask)){
2218 overflow_selector = vec_cmpgt(int_even, p4ui_low_mask);
2219 low_even = vec_sel(low_even, p4ui_low_mask, overflow_selector);
2221 if(vec_any_gt(int_odd, p4ui_low_mask)){
2222 overflow_selector = vec_cmpgt(int_odd, p4ui_low_mask);
2223 low_odd = vec_sel(low_even, p4ui_low_mask, overflow_selector);
2226 low_odd = plogical_shift_left<16>(low_odd);
2229 return reinterpret_cast<Packet8us
>(int_final);
2235 Packet4ui int_cast =
reinterpret_cast<Packet4ui
>(
a);
2237 Packet4ui int_odd = plogical_shift_right<16>(int_cast);
2240 return F32ToBf16(float_even, float_odd);
2245 return reinterpret_cast<Packet4i
>(
a);
2249 return reinterpret_cast<Packet4f
>(
a);
2257 typedef __vector
unsigned long long Packet2ul;
2258 typedef __vector
long long Packet2l;
2259 #if EIGEN_COMP_CLANG 2260 typedef Packet2ul Packet2bl;
2262 typedef __vector __bool
long Packet2bl;
2265 static Packet2l p2l_ONE = { 1, 1 };
2266 static Packet2l p2l_ZERO =
reinterpret_cast<Packet2l
>(p4i_ZERO);
2267 static Packet2ul p2ul_SIGN = { 0x8000000000000000ull, 0x8000000000000000ull };
2268 static Packet2ul p2ul_PREV0DOT5 = { 0x3FDFFFFFFFFFFFFFull, 0x3FDFFFFFFFFFFFFFull };
2269 static Packet2d
p2d_ONE = { 1.0, 1.0 };
2270 static Packet2d p2d_ZERO =
reinterpret_cast<Packet2d
>(p4f_ZERO);
2271 static Packet2d p2d_MZERO = {
numext::bit_cast<
double>(0x8000000000000000ull),
2272 numext::bit_cast<double>(0x8000000000000000ull) };
2275 static Packet2d
p2d_COUNTDOWN =
reinterpret_cast<Packet2d
>(vec_sld(reinterpret_cast<Packet4f>(p2d_ZERO), reinterpret_cast<Packet4f>(p2d_ONE), 8));
2277 static Packet2d p2d_COUNTDOWN =
reinterpret_cast<Packet2d
>(vec_sld(reinterpret_cast<Packet4f>(p2d_ONE), reinterpret_cast<Packet4f>(p2d_ZERO), 8));
2280 template<
int index> Packet2d vec_splat_dbl(Packet2d& a)
2282 return vec_splat(a, index);
2287 typedef Packet2d
type;
2288 typedef Packet2d
half;
2317 template<>
struct unpacket_traits<Packet2d> {
typedef double type;
enum {
size=2, alignment=
Aligned16, vectorizable=
true, masked_load_available=
false, masked_store_available=
false};
typedef Packet2d
half; };
2319 inline std::ostream &
operator <<(std::ostream &
s,
const Packet2l &
v)
2326 s << vt.n[0] <<
", " << vt.n[1];
2330 inline std::ostream &
operator <<(std::ostream & s,
const Packet2d & v)
2337 s << vt.n[0] <<
", " << vt.n[1];
2345 return vec_xl(0, const_cast<double *>(from));
2351 vec_xst(from, 0, to);
2355 Packet2d v = {from, from};
2360 Packet2l v = {
static_cast<long long>(from), static_cast<long long>(from)};
2361 return reinterpret_cast<Packet2d
>(
v);
2366 Packet2d& a0, Packet2d&
a1, Packet2d&
a2, Packet2d&
a3)
2378 af[0] = from[0*stride];
2379 af[1] = from[1*stride];
2386 to[0*stride] = af[0];
2387 to[1*stride] = af[1];
2404 template<>
EIGEN_STRONG_INLINE Packet2d
pmadd(
const Packet2d& a,
const Packet2d&
b,
const Packet2d&
c) {
return vec_madd(a, b, c); }
2410 __asm__ (
"xvcmpgedp %x0,%x1,%x2\n\txxsel %x0,%x1,%x2,%x0" :
"=&wa" (ret) :
"wa" (a),
"wa" (b));
2418 __asm__ (
"xvcmpgtdp %x0,%x2,%x1\n\txxsel %x0,%x1,%x2,%x0" :
"=&wa" (ret) :
"wa" (a),
"wa" (b));
2422 template<>
EIGEN_STRONG_INLINE Packet2d
pcmp_le(
const Packet2d& a,
const Packet2d& b) {
return reinterpret_cast<Packet2d
>(vec_cmple(a,b)); }
2423 template<>
EIGEN_STRONG_INLINE Packet2d
pcmp_lt(
const Packet2d& a,
const Packet2d& b) {
return reinterpret_cast<Packet2d
>(vec_cmplt(a,b)); }
2424 template<>
EIGEN_STRONG_INLINE Packet2d
pcmp_eq(
const Packet2d& a,
const Packet2d& b) {
return reinterpret_cast<Packet2d
>(vec_cmpeq(a,b)); }
2426 Packet2d c =
reinterpret_cast<Packet2d
>(vec_cmpge(a,b));
2427 return vec_nor(c,c);
2440 Packet2d
t = vec_add(reinterpret_cast<Packet2d>(vec_or(vec_and(reinterpret_cast<Packet2ul>(a), p2ul_SIGN), p2ul_PREV0DOT5)), a);
2443 __asm__(
"xvrdpiz %x0, %x1\n\t" 2455 __asm__(
"xvrdpic %x0, %x1\n\t" 2465 return vec_xl(0, const_cast<double*>(from));
2473 return vec_splat_dbl<0>(
p);
2479 vec_xst(from, 0, to);
2488 return reinterpret_cast<Packet2d
>(vec_perm(reinterpret_cast<Packet16uc>(a), reinterpret_cast<Packet16uc>(a), p16uc_REVERSE64));
2499 inline Packet2l pcast<Packet2d, Packet2l>(
const Packet2d&
x) {
2500 #if EIGEN_GNUC_AT_LEAST(5, 4) || \ 2501 (EIGEN_GNUC_AT(6, 1) && __GNUC_PATCHLEVEL__ >= 1) 2502 return vec_cts(
x, 0);
2505 memcpy(tmp, &
x,
sizeof(tmp));
2506 Packet2l
l = {
static_cast<long long>(tmp[0]),
2507 static_cast<long long>(tmp[1]) };
2513 inline Packet2d pcast<Packet2l, Packet2d>(
const Packet2l&
x) {
2514 unsigned long long tmp[2];
2515 memcpy(tmp, &
x,
sizeof(tmp));
2516 Packet2d
d = {
static_cast<double>(tmp[0]),
2517 static_cast<double>(tmp[1]) };
2528 #ifdef __POWER8_VECTOR__ 2532 const Packet2ul shift = {
N,
N };
2533 return vec_sl(a, shift);
2538 const Packet2ul shift = {
N,
N };
2539 return vec_sr(a, shift);
2547 static const Packet16uc
perm = {
2548 0x14, 0x15, 0x16, 0x17, 0x00, 0x01, 0x02, 0x03,
2549 0x1c, 0x1d, 0x1e, 0x1f, 0x08, 0x09, 0x0a, 0x0b };
2551 return vec_perm(p4i_ZERO, a, perm);
2553 return vec_perm(a, p4i_ZERO, perm);
2560 static const Packet16uc
perm = {
2561 0x04, 0x05, 0x06, 0x07, 0x10, 0x11, 0x12, 0x13,
2562 0x0c, 0x0d, 0x0e, 0x0f, 0x18, 0x19, 0x1a, 0x1b };
2564 return vec_perm(p4i_ZERO, a, perm);
2566 return vec_perm(a, p4i_ZERO, perm);
2570 template<
int N,
typename EnableIf =
void>
2571 struct plogical_shift_left_impl;
2574 struct plogical_shift_left_impl<N, typename enable_if<(N < 32) && (N >= 0)>::
type> {
2576 static const unsigned n =
static_cast<unsigned>(
N);
2577 const Packet4ui shift = {
n,
n,
n, n};
2578 const Packet4i ai =
reinterpret_cast<Packet4i
>(
a);
2579 static const unsigned m =
static_cast<unsigned>(32 -
N);
2580 const Packet4ui shift_right = {
m,
m,
m, m};
2581 const Packet4i out_hi = vec_sl(ai, shift);
2582 const Packet4i out_lo = shift_even_left(vec_sr(ai, shift_right));
2583 return reinterpret_cast<Packet2l
>(
por<Packet4i>(out_hi, out_lo));
2588 struct plogical_shift_left_impl<N, typename enable_if<(N >= 32)>::
type> {
2590 static const unsigned m =
static_cast<unsigned>(N - 32);
2591 const Packet4ui shift = {
m,
m,
m, m};
2592 const Packet4i ai =
reinterpret_cast<Packet4i
>(
a);
2593 return reinterpret_cast<Packet2l
>(shift_even_left(vec_sl(ai, shift)));
2602 template<
int N,
typename EnableIf =
void>
2603 struct plogical_shift_right_impl;
2606 struct plogical_shift_right_impl<N, typename enable_if<(N < 32) && (N >= 0)>::
type> {
2608 static const unsigned n =
static_cast<unsigned>(
N);
2609 const Packet4ui shift = {
n,
n,
n, n};
2610 const Packet4i ai =
reinterpret_cast<Packet4i
>(
a);
2611 static const unsigned m =
static_cast<unsigned>(32 -
N);
2613 const Packet4i out_lo = vec_sr(ai, shift);
2614 const Packet4i out_hi = shift_odd_right(vec_sl(ai, shift_left));
2615 return reinterpret_cast<Packet2l
>(
por<Packet4i>(out_hi, out_lo));
2620 struct plogical_shift_right_impl<N, typename enable_if<(N >= 32)>::
type> {
2622 static const unsigned m =
static_cast<unsigned>(N - 32);
2623 const Packet4ui shift = {
m,
m,
m, m};
2624 const Packet4i ai =
reinterpret_cast<Packet4i
>(
a);
2625 return reinterpret_cast<Packet2l
>(shift_odd_right(vec_sr(ai, shift)));
2638 const Packet2l
e = pcast<Packet2d, Packet2l>(
pmin(
pmax(exponent,
pnegate(max_exponent)), max_exponent));
2641 const Packet2l bias = { 1023, 1023 };
2642 Packet2l b = plogical_shift_right<2>(
e);
2643 Packet2d c =
reinterpret_cast<Packet2d
>(plogical_shift_left<52>(b + bias));
2646 c =
reinterpret_cast<Packet2d
>(plogical_shift_left<52>(b + bias));
2656 return pcast<Packet2l, Packet2d>(plogical_shift_right<52>(
reinterpret_cast<Packet2l
>(
pabs(a))));
2666 b =
reinterpret_cast<Packet2d
>(vec_sld(reinterpret_cast<Packet4f>(a), reinterpret_cast<Packet4f>(a), 8));
2675 return pfirst(
pmul(a, reinterpret_cast<Packet2d>(vec_sld(reinterpret_cast<Packet4ui>(a), reinterpret_cast<Packet4ui>(a), 8))));
2681 return pfirst(
pmin(a, reinterpret_cast<Packet2d>(vec_sld(reinterpret_cast<Packet4ui>(a), reinterpret_cast<Packet4ui>(a), 8))));
2687 return pfirst(
pmax(a, reinterpret_cast<Packet2d>(vec_sld(reinterpret_cast<Packet4ui>(a), reinterpret_cast<Packet4ui>(a), 8))));
2693 t0 = vec_perm(kernel.
packet[0], kernel.
packet[1], p16uc_TRANSPOSE64_HI);
2694 t1 = vec_perm(kernel.
packet[0], kernel.
packet[1], p16uc_TRANSPOSE64_LO);
2700 Packet2l select = { ifPacket.
select[0], ifPacket.
select[1] };
2701 Packet2bl mask =
reinterpret_cast<Packet2bl
>( vec_cmpeq(reinterpret_cast<Packet2d>(select), reinterpret_cast<Packet2d>(p2l_ONE)) );
2702 return vec_sel(elsePacket, thenPacket, mask);
2711 #endif // EIGEN_PACKET_MATH_ALTIVEC_H static Packet16uc p16uc_REVERSE64
EIGEN_STRONG_INLINE void pstore_common(__UNPACK_TYPE__(Packet) *to, const Packet &from)
EIGEN_STRONG_INLINE Packet8bf pxor< Packet8bf >(const Packet8bf &a, const Packet8bf &b)
EIGEN_STRONG_INLINE signed char pfirst< Packet16c >(const Packet16c &a)
EIGEN_STRONG_INLINE void pstoreu_common(__UNPACK_TYPE__(Packet) *to, const Packet &from)
EIGEN_STRONG_INLINE Packet4i ploaddup< Packet4i >(const int *from)
EIGEN_DEVICE_FUNC void pscatter< int, Packet4i >(int *to, const Packet4i &from, Index stride)
vector< MFAS::KeyPair > edges
EIGEN_STRONG_INLINE Packet16uc ploadu< Packet16uc >(const unsigned char *from)
EIGEN_STRONG_INLINE Packet8bf F32ToBf16(Packet4f p4f)
EIGEN_STRONG_INLINE Packet16c ploaddup< Packet16c >(const signed char *from)
#define EIGEN_ALWAYS_INLINE
static _EIGEN_DECLARE_CONST_FAST_Packet4i(ZERO, 0)
EIGEN_STRONG_INLINE Packet4f pset1frombits< Packet4f >(unsigned int from)
EIGEN_STRONG_INLINE Packet4f pxor< Packet4f >(const Packet4f &a, const Packet4f &b)
EIGEN_STRONG_INLINE Packet pset1_size8(const __UNPACK_TYPE__(Packet)&from)
EIGEN_STRONG_INLINE Packet4f pcmp_le< Packet4f >(const Packet4f &a, const Packet4f &b)
#define EIGEN_STRONG_INLINE
EIGEN_STRONG_INLINE Packet4f pround< Packet4f >(const Packet4f &a)
__vector unsigned char Packet16uc
EIGEN_STRONG_INLINE Packet8bf plset< Packet8bf >(const bfloat16 &a)
EIGEN_STRONG_INLINE Packet2d plset< Packet2d >(const double &a)
EIGEN_STRONG_INLINE void pstoreu< unsigned short int >(unsigned short int *to, const Packet8us &from)
EIGEN_STRONG_INLINE bool predux_any(const Packet4f &x)
EIGEN_STRONG_INLINE short int predux< Packet8s >(const Packet8s &a)
EIGEN_STRONG_INLINE int pfirst< Packet4i >(const Packet4i &a)
EIGEN_STRONG_INLINE Packet8s ploadu< Packet8s >(const short int *from)
static Packet16uc p16uc_DUPLICATE16_HI
EIGEN_STRONG_INLINE Packet16uc pset1< Packet16uc >(const unsigned char &from)
EIGEN_DEVICE_FUNC void pscatter< float, Packet4f >(float *to, const Packet4f &from, Index stride)
EIGEN_STRONG_INLINE double predux_min< Packet2d >(const Packet2d &a)
EIGEN_STRONG_INLINE Packet4i pload< Packet4i >(const int *from)
static Packet16uc p16uc_PSET32_WODD
EIGEN_STRONG_INLINE Packet2d pset1frombits< Packet2d >(uint64_t from)
EIGEN_STRONG_INLINE Packet8us pcast< Packet8bf, Packet8us >(const Packet8bf &a)
EIGEN_STRONG_INLINE Packet4f pfrexp< Packet4f >(const Packet4f &a, Packet4f &exponent)
EIGEN_STRONG_INLINE Packet4f pcast< Packet4ui, Packet4f >(const Packet4ui &a)
EIGEN_STRONG_INLINE Packet8s pset1< Packet8s >(const short int &from)
EIGEN_STRONG_INLINE Packet4d pfrexp_generic_get_biased_exponent(const Packet4d &a)
EIGEN_STRONG_INLINE double predux_max< Packet2d >(const Packet2d &a)
EIGEN_DEVICE_FUNC Packet16uc pgather< unsigned char, Packet16uc >(const unsigned char *from, Index stride)
EIGEN_STRONG_INLINE Packet4i plset< Packet4i >(const int &a)
#define EIGEN_DEBUG_UNALIGNED_LOAD
std::ofstream out("Result.txt")
EIGEN_STRONG_INLINE Packet4f pcmp_le(const Packet4f &a, const Packet4f &b)
EIGEN_STRONG_INLINE Packet16c ploadu< Packet16c >(const signed char *from)
EIGEN_DEVICE_FUNC void pscatter< bfloat16, Packet8bf >(bfloat16 *to, const Packet8bf &from, Index stride)
eigen_packet_wrapper< __vector unsigned short int, 0 > Packet8bf
EIGEN_STRONG_INLINE Packet8bf pand< Packet8bf >(const Packet8bf &a, const Packet8bf &b)
EIGEN_DEVICE_FUNC void pscatter< signed char, Packet16c >(signed char *to, const Packet16c &from, Index stride)
EIGEN_STRONG_INLINE Packet2d pceil< Packet2d >(const Packet2d &a)
static Packet16uc p16uc_REVERSE16
EIGEN_STRONG_INLINE Packet8bf pnegate< Packet8bf >(const Packet8bf &a)
EIGEN_STRONG_INLINE Packet8s ploadquad< Packet8s >(const short int *from)
EIGEN_STRONG_INLINE float pfirst< Packet4f >(const Packet4f &a)
static Packet16uc p16uc_TRANSPOSE64_LO
EIGEN_STRONG_INLINE Packet8bf pfrexp< Packet8bf >(const Packet8bf &a, Packet8bf &e)
static Packet8s p8s_COUNTDOWN
static Packet16c p16c_COUNTDOWN
EIGEN_STRONG_INLINE Packet8bf pset1< Packet8bf >(const bfloat16 &from)
EIGEN_STRONG_INLINE Packet8s pmul< Packet8s >(const Packet8s &a, const Packet8s &b)
static Packet16uc p16uc_COMPLEX32_REV2
EIGEN_STRONG_INLINE Packet8bf pload< Packet8bf >(const bfloat16 *from)
EIGEN_STRONG_INLINE Packet8f pzero(const Packet8f &)
static Packet16uc p16uc_COUNTDOWN
EIGEN_STRONG_INLINE Packet8s plset< Packet8s >(const short int &a)
static Packet16uc p16uc_QUADRUPLICATE16_HI
EIGEN_STRONG_INLINE Packet4f ploaddup< Packet4f >(const float *from)
EIGEN_STRONG_INLINE Packet8bf print< Packet8bf >(const Packet8bf &a)
EIGEN_STRONG_INLINE Packet4i parithmetic_shift_right(const Packet4i &a)
EIGEN_STRONG_INLINE Packet8s psub< Packet8s >(const Packet8s &a, const Packet8s &b)
EIGEN_STRONG_INLINE void pbroadcast4< Packet4f >(const float *a, Packet4f &a0, Packet4f &a1, Packet4f &a2, Packet4f &a3)
EIGEN_STRONG_INLINE int predux< Packet4i >(const Packet4i &a)
#define EIGEN_DEBUG_ALIGNED_STORE
__vector unsigned int Packet4ui
EIGEN_STRONG_INLINE Packet8us pxor< Packet8us >(const Packet8us &a, const Packet8us &b)
Namespace containing all symbols from the Eigen library.
EIGEN_STRONG_INLINE Packet4i ploadu< Packet4i >(const int *from)
EIGEN_STRONG_INLINE unsigned char pfirst< Packet16uc >(const Packet16uc &a)
EIGEN_STRONG_INLINE float predux_max< Packet4f >(const Packet4f &a)
EIGEN_STRONG_INLINE void pstoreu< bfloat16 >(bfloat16 *to, const Packet8bf &from)
EIGEN_STRONG_INLINE void pstoreu< short int >(short int *to, const Packet8s &from)
EIGEN_STRONG_INLINE Packet8s pmax< Packet8s >(const Packet8s &a, const Packet8s &b)
static Packet16uc p16uc_FORWARD
__vector signed char Packet16c
EIGEN_DEVICE_FUNC void pscatter_size8(__UNPACK_TYPE__(Packet) *to, const Packet &from, Index stride)
EIGEN_STRONG_INLINE Packet8bf pdiv< Packet8bf >(const Packet8bf &a, const Packet8bf &b)
EIGEN_DEVICE_FUNC unpacket_traits< Packet >::type predux(const Packet &a)
EIGEN_STRONG_INLINE bfloat16 predux< Packet8bf >(const Packet8bf &a)
#define EIGEN_DEBUG_UNALIGNED_STORE
EIGEN_STRONG_INLINE void pstore< signed char >(signed char *to, const Packet16c &from)
EIGEN_STRONG_INLINE Packet8bf psqrt< Packet8bf >(const Packet8bf &a)
static const Packet16uc p16uc_DUPLICATE16_ODD
EIGEN_STRONG_INLINE void prefetch< float >(const float *addr)
static Packet16uc p16uc_REVERSE32
EIGEN_STRONG_INLINE Packet4i pdiv< Packet4i >(const Packet4i &, const Packet4i &)
EIGEN_STRONG_INLINE Packet8bf pcast< Packet8us, Packet8bf >(const Packet8us &a)
EIGEN_STRONG_INLINE Packet16uc pmul< Packet16uc >(const Packet16uc &a, const Packet16uc &b)
EIGEN_STRONG_INLINE Packet8bf pmin< Packet8bf >(const Packet8bf &a, const Packet8bf &b)
EIGEN_STRONG_INLINE Packet8us por< Packet8us >(const Packet8us &a, const Packet8us &b)
EIGEN_STRONG_INLINE Packet8s por< Packet8s >(const Packet8s &a, const Packet8s &b)
EIGEN_STRONG_INLINE Packet8bf pmax< Packet8bf >(const Packet8bf &a, const Packet8bf &b)
EIGEN_STRONG_INLINE Packet4f preinterpret< Packet4f, Packet4i >(const Packet4i &a)
static Packet16uc p16uc_PSET32_WEVEN
EIGEN_STRONG_INLINE int predux_min< Packet4i >(const Packet4i &a)
static _EIGEN_DECLARE_CONST_FAST_Packet16uc(ONE, 1)
EIGEN_STRONG_INLINE void pbroadcast4_common(const __UNPACK_TYPE__(Packet) *a, Packet &a0, Packet &a1, Packet &a2, Packet &a3)
EIGEN_STRONG_INLINE void pstoreu< double >(double *to, const Packet4d &from)
EIGEN_DEVICE_FUNC Packet16c pgather< signed char, Packet16c >(const signed char *from, Index stride)
EIGEN_STRONG_INLINE Packet4i pcast< Packet4f, Packet4i >(const Packet4f &a)
__vector __bool int Packet4bi
EIGEN_STRONG_INLINE Packet2d pldexp< Packet2d >(const Packet2d &a, const Packet2d &exponent)
EIGEN_STRONG_INLINE Packet8s pload< Packet8s >(const short int *from)
EIGEN_STRONG_INLINE Packet8us pand< Packet8us >(const Packet8us &a, const Packet8us &b)
EIGEN_STRONG_INLINE Packet8us ploadquad< Packet8us >(const unsigned short int *from)
#define EIGEN_DEBUG_ALIGNED_LOAD
EIGEN_STRONG_INLINE unsigned short int predux< Packet8us >(const Packet8us &a)
EIGEN_DEVICE_FUNC Packet8bf pgather< bfloat16, Packet8bf >(const bfloat16 *from, Index stride)
#define EIGEN_PPC_PREFETCH(ADDR)
EIGEN_STRONG_INLINE Packet8us pmax< Packet8us >(const Packet8us &a, const Packet8us &b)
static Packet4f p4f_MZERO
EIGEN_STRONG_INLINE Packet4f pcmp_lt(const Packet4f &a, const Packet4f &b)
EIGEN_STRONG_INLINE Packet2d padd< Packet2d >(const Packet2d &a, const Packet2d &b)
EIGEN_DEVICE_FUNC Packet pgather_size16(const __UNPACK_TYPE__(Packet) *from, Index stride)
EIGEN_STRONG_INLINE signed char predux_mul< Packet16c >(const Packet16c &a)
EIGEN_STRONG_INLINE Packet16c pmul< Packet16c >(const Packet16c &a, const Packet16c &b)
EIGEN_STRONG_INLINE Packet16c pmin< Packet16c >(const Packet16c &a, const Packet16c &b)
EIGEN_STRONG_INLINE Packet2d ploaddup< Packet2d >(const double *from)
static Packet4i p4i_COUNTDOWN
EIGEN_STRONG_INLINE double predux_mul< Packet2d >(const Packet2d &a)
EIGEN_STRONG_INLINE Packet16uc padd< Packet16uc >(const Packet16uc &a, const Packet16uc &b)
EIGEN_STRONG_INLINE Packet8bf pround< Packet8bf >(const Packet8bf &a)
EIGEN_DEVICE_FUNC Packet4i pgather< int, Packet4i >(const int *from, Index stride)
EIGEN_STRONG_INLINE Packet4f pcast< Packet4i, Packet4f >(const Packet4i &a)
static Similarity3 align(const Point3Pairs &d_abPointPairs, const Rot3 &aRb, const Point3Pair ¢roids)
This method estimates the similarity transform from differences point pairs,.
EIGEN_STRONG_INLINE signed char predux_max< Packet16c >(const Packet16c &a)
EIGEN_STRONG_INLINE signed char predux_min< Packet16c >(const Packet16c &a)
EIGEN_DEFINE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS EIGEN_UNUSED Packet pexp_float(const Packet _x)
EIGEN_STRONG_INLINE Packet2d pdiv< Packet2d >(const Packet2d &a, const Packet2d &b)
EIGEN_DEVICE_FUNC const ExpReturnType exp() const
EIGEN_DEVICE_FUNC Packet pmin(const Packet &a, const Packet &b)
cout<< "Here is the matrix m:"<< endl<< m<< endl;Matrix< ptrdiff_t, 3, 1 > res
EIGEN_STRONG_INLINE Packet4i pmul< Packet4i >(const Packet4i &a, const Packet4i &b)
EIGEN_STRONG_INLINE Packet4f print< Packet4f >(const Packet4f &a)
EIGEN_STRONG_INLINE Packet2d pandnot< Packet2d >(const Packet2d &a, const Packet2d &b)
EIGEN_DEVICE_FUNC Packet8s pgather< short int, Packet8s >(const short int *from, Index stride)
EIGEN_STRONG_INLINE Packet4ui por< Packet4ui >(const Packet4ui &a, const Packet4ui &b)
EIGEN_STRONG_INLINE bfloat16 pfirst(const Packet8bf &a)
EIGEN_STRONG_INLINE void pstore< double >(double *to, const Packet4d &from)
EIGEN_STRONG_INLINE Packet4f pceil< Packet4f >(const Packet4f &a)
EIGEN_STRONG_INLINE Packet4f pdiv< Packet4f >(const Packet4f &a, const Packet4f &b)
EIGEN_STRONG_INLINE Packet ploaddup_common(const __UNPACK_TYPE__(Packet) *from)
static _EIGEN_DECLARE_CONST_FAST_Packet4f(ZERO, 0)
EIGEN_STRONG_INLINE Packet4f pmin< Packet4f >(const Packet4f &a, const Packet4f &b)
static const Line3 l(Rot3(), 1, 1)
EIGEN_STRONG_INLINE Packet2d pmin< Packet2d >(const Packet2d &a, const Packet2d &b)
EIGEN_DEFINE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS EIGEN_UNUSED Packet plog_float(const Packet _x)
EIGEN_STRONG_INLINE unsigned short int predux_mul< Packet8us >(const Packet8us &a)
EIGEN_STRONG_INLINE void prefetch< int >(const int *addr)
EIGEN_STRONG_INLINE Packet8us pmul< Packet8us >(const Packet8us &a, const Packet8us &b)
EIGEN_STRONG_INLINE Packet2d pfrexp< Packet2d >(const Packet2d &a, Packet2d &exponent)
EIGEN_DEVICE_FUNC void pscatter_size4(__UNPACK_TYPE__(Packet) *to, const Packet &from, Index stride)
EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC Packet pfrexp_generic(const Packet &a, Packet &exponent)
EIGEN_STRONG_INLINE Packet4i pand< Packet4i >(const Packet4i &a, const Packet4i &b)
EIGEN_STRONG_INLINE Packet16uc plset< Packet16uc >(const unsigned char &a)
EIGEN_STRONG_INLINE unsigned char predux< Packet16uc >(const Packet16uc &a)
EIGEN_STRONG_INLINE int predux_max< Packet4i >(const Packet4i &a)
#define BF16_TO_F32_UNARY_OP_WRAPPER(OP, A)
EIGEN_STRONG_INLINE Packet8us psub< Packet8us >(const Packet8us &a, const Packet8us &b)
EIGEN_STRONG_INLINE Packet2cf pcmp_eq(const Packet2cf &a, const Packet2cf &b)
EIGEN_STRONG_INLINE Packet4i pmin< Packet4i >(const Packet4i &a, const Packet4i &b)
EIGEN_STRONG_INLINE Packet4f ploadu< Packet4f >(const float *from)
EIGEN_STRONG_INLINE void ptranspose(PacketBlock< Packet2cf, 2 > &kernel)
EIGEN_STRONG_INLINE Packet4i pxor< Packet4i >(const Packet4i &a, const Packet4i &b)
EIGEN_STRONG_INLINE void pstoreu< int >(int *to, const Packet4i &from)
EIGEN_STRONG_INLINE Packet8bf pcos< Packet8bf >(const Packet8bf &a)
EIGEN_STRONG_INLINE void pstore< float >(float *to, const Packet4f &from)
EIGEN_DEVICE_FUNC void pscatter< unsigned short int, Packet8us >(unsigned short int *to, const Packet8us &from, Index stride)
EIGEN_DEVICE_FUNC Packet pgather_common(const __UNPACK_TYPE__(Packet) *from, Index stride)
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
EIGEN_DEVICE_FUNC void pscatter< double, Packet2d >(double *to, const Packet2d &from, Index stride)
EIGEN_STRONG_INLINE unsigned char predux_min< Packet16uc >(const Packet16uc &a)
Array< int, Dynamic, 1 > v
EIGEN_STRONG_INLINE Packet4f por< Packet4f >(const Packet4f &a, const Packet4f &b)
EIGEN_STRONG_INLINE Packet8us pload< Packet8us >(const unsigned short int *from)
EIGEN_STRONG_INLINE Packet8bf plog< Packet8bf >(const Packet8bf &a)
EIGEN_STRONG_INLINE Packet2d pmax< Packet2d >(const Packet2d &a, const Packet2d &b)
EIGEN_STRONG_INLINE Packet16uc pmin< Packet16uc >(const Packet16uc &a, const Packet16uc &b)
EIGEN_STRONG_INLINE Packet4i plogical_shift_right(const Packet4i &a)
EIGEN_STRONG_INLINE signed char predux< Packet16c >(const Packet16c &a)
EIGEN_STRONG_INLINE Packet8bf psub< Packet8bf >(const Packet8bf &a, const Packet8bf &b)
EIGEN_STRONG_INLINE Packet pblend4(const Selector< 4 > &ifPacket, const Packet &thenPacket, const Packet &elsePacket)
EIGEN_STRONG_INLINE bfloat16 predux_max< Packet8bf >(const Packet8bf &a)
EIGEN_STRONG_INLINE Packet8bf psin< Packet8bf >(const Packet8bf &a)
EIGEN_STRONG_INLINE Packet4f pcmp_lt_or_nan(const Packet4f &a, const Packet4f &b)
EIGEN_STRONG_INLINE Packet4f pldexp< Packet4f >(const Packet4f &a, const Packet4f &exponent)
EIGEN_STRONG_INLINE bfloat16 predux_mul< Packet8bf >(const Packet8bf &a)
idx_t idx_t idx_t idx_t idx_t * perm
EIGEN_STRONG_INLINE Packet16c padd< Packet16c >(const Packet16c &a, const Packet16c &b)
Array< double, 1, 3 > e(1./3., 0.5, 2.)
EIGEN_STRONG_INLINE Packet8us ploaddup< Packet8us >(const unsigned short int *from)
EIGEN_STRONG_INLINE Packet4f pandnot< Packet4f >(const Packet4f &a, const Packet4f &b)
static Packet16uc p16uc_COMPLEX32_REV
EIGEN_STRONG_INLINE short int predux_mul< Packet8s >(const Packet8s &a)
EIGEN_STRONG_INLINE void pbroadcast4< Packet2d >(const double *a, Packet2d &a0, Packet2d &a1, Packet2d &a2, Packet2d &a3)
EIGEN_STRONG_INLINE Packet8h pand(const Packet8h &a, const Packet8h &b)
EIGEN_DEVICE_FUNC void pscatter_size16(__UNPACK_TYPE__(Packet) *to, const Packet &from, Index stride)
EIGEN_STRONG_INLINE float predux< Packet4f >(const Packet4f &a)
EIGEN_STRONG_INLINE Packet2d pand< Packet2d >(const Packet2d &a, const Packet2d &b)
#define BF16_TO_F32_BINARY_OP_WRAPPER(OP, A, B)
EIGEN_DEVICE_FUNC void pscatter< short int, Packet8s >(short int *to, const Packet8s &from, Index stride)
EIGEN_DEFINE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS EIGEN_UNUSED Packet4f prsqrt< Packet4f >(const Packet4f &x)
EIGEN_STRONG_INLINE Packet2d ploadu< Packet2d >(const double *from)
EIGEN_STRONG_INLINE Packet2cf pconj(const Packet2cf &a)
EIGEN_STRONG_INLINE unsigned short int predux_min< Packet8us >(const Packet8us &a)
EIGEN_STRONG_INLINE float predux_min< Packet4f >(const Packet4f &a)
EIGEN_STRONG_INLINE Packet2d pload< Packet2d >(const double *from)
static _EIGEN_DECLARE_CONST_FAST_Packet8us(ONE, 1)
EIGEN_DEVICE_FUNC Packet8us pgather< unsigned short int, Packet8us >(const unsigned short int *from, Index stride)
EIGEN_STRONG_INLINE Packet4i plogical_shift_left(const Packet4i &a)
EIGEN_DEFINE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS EIGEN_UNUSED Packet psin_float(const Packet &x)
EIGEN_STRONG_INLINE Packet8us pset1< Packet8us >(const unsigned short int &from)
EIGEN_STRONG_INLINE Packet2d psub< Packet2d >(const Packet2d &a, const Packet2d &b)
EIGEN_STRONG_INLINE void pstoreu< float >(float *to, const Packet4f &from)
EIGEN_STRONG_INLINE Packet16uc pload< Packet16uc >(const unsigned char *from)
EIGEN_STRONG_INLINE Packet8us padd< Packet8us >(const Packet8us &a, const Packet8us &b)
static Packet8us p8us_COUNTDOWN
static Packet2d p2d_COUNTDOWN
EIGEN_STRONG_INLINE Packet16c pmax< Packet16c >(const Packet16c &a, const Packet16c &b)
EIGEN_STRONG_INLINE int predux_mul< Packet4i >(const Packet4i &a)
EIGEN_STRONG_INLINE Packet4f pmul< Packet4f >(const Packet4f &a, const Packet4f &b)
EIGEN_DEVICE_FUNC void pstore(Scalar *to, const Packet &from)
__vector short int Packet8s
EIGEN_STRONG_INLINE Packet4f Bf16ToF32Even(const Packet8bf &bf)
EIGEN_STRONG_INLINE Packet8us pmin< Packet8us >(const Packet8us &a, const Packet8us &b)
static Packet16uc p16uc_HALF64_0_16
EIGEN_STRONG_INLINE double predux< Packet2d >(const Packet2d &a)
EIGEN_STRONG_INLINE Packet4f pload< Packet4f >(const float *from)
EIGEN_STRONG_INLINE Packet8bf pfloor< Packet8bf >(const Packet8bf &a)
EIGEN_STRONG_INLINE Packet4i pmax< Packet4i >(const Packet4i &a, const Packet4i &b)
#define EIGEN_DEVICE_FUNC
EIGEN_STRONG_INLINE Packet4f Bf16ToF32Odd(const Packet8bf &bf)
EIGEN_STRONG_INLINE Packet8bf prsqrt< Packet8bf >(const Packet8bf &a)
EIGEN_STRONG_INLINE unsigned char predux_mul< Packet16uc >(const Packet16uc &a)
EIGEN_STRONG_INLINE void pstore< unsigned char >(unsigned char *to, const Packet16uc &from)
EIGEN_STRONG_INLINE Packet2d pxor< Packet2d >(const Packet2d &a, const Packet2d &b)
EIGEN_STRONG_INLINE Packet16uc psub< Packet16uc >(const Packet16uc &a, const Packet16uc &b)
static const Packet16uc p16uc_DUPLICATE16_EVEN
EIGEN_STRONG_INLINE Packet2cf pnegate(const Packet2cf &a)
EIGEN_STRONG_INLINE Packet pset1_size4(const __UNPACK_TYPE__(Packet)&from)
EIGEN_STRONG_INLINE Packet ploadu_common(const __UNPACK_TYPE__(Packet) *from)
EIGEN_STRONG_INLINE Packet16c pset1< Packet16c >(const signed char &from)
EIGEN_STRONG_INLINE void pstoreu< unsigned char >(unsigned char *to, const Packet16uc &from)
EIGEN_STRONG_INLINE Packet4i por< Packet4i >(const Packet4i &a, const Packet4i &b)
EIGEN_STRONG_INLINE Packet8bf ploadquad< Packet8bf >(const bfloat16 *from)
EIGEN_STRONG_INLINE Packet8s padd< Packet8s >(const Packet8s &a, const Packet8s &b)
EIGEN_STRONG_INLINE Packet4f pcmp_lt< Packet4f >(const Packet4f &a, const Packet4f &b)
static Packet4f p4f_COUNTDOWN
EIGEN_STRONG_INLINE bfloat16 predux_min< Packet8bf >(const Packet8bf &a)
EIGEN_STRONG_INLINE Packet4i padd< Packet4i >(const Packet4i &a, const Packet4i &b)
EIGEN_STRONG_INLINE short int predux_max< Packet8s >(const Packet8s &a)
EIGEN_STRONG_INLINE short int pfirst< Packet8s >(const Packet8s &a)
EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC Tgt bit_cast(const Src &src)
EIGEN_STRONG_INLINE void pstore< unsigned short int >(unsigned short int *to, const Packet8us &from)
EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR __bfloat16_raw raw_uint16_to_bfloat16(unsigned short value)
static Packet16uc p16uc_DUPLICATE8_HI
EIGEN_STRONG_INLINE Packet8bf por< Packet8bf >(const Packet8bf &a, const Packet8bf &b)
EIGEN_STRONG_INLINE Packet4f padd< Packet4f >(const Packet4f &a, const Packet4f &b)
EIGEN_STRONG_INLINE Packet8bf ploaddup< Packet8bf >(const bfloat16 *from)
EIGEN_STRONG_INLINE void pstore< int >(int *to, const Packet4i &from)
__vector unsigned short int Packet8us
EIGEN_STRONG_INLINE Packet4ui padd< Packet4ui >(const Packet4ui &a, const Packet4ui &b)
EIGEN_STRONG_INLINE Packet4ui pcast< Packet4f, Packet4ui >(const Packet4f &a)
EIGEN_STRONG_INLINE Packet4i pandnot< Packet4i >(const Packet4i &a, const Packet4i &b)
EIGEN_STRONG_INLINE Packet4f pfloor< Packet4f >(const Packet4f &a)
EIGEN_STRONG_INLINE void pbroadcast4< Packet4i >(const int *a, Packet4i &a0, Packet4i &a1, Packet4i &a2, Packet4i &a3)
static Packet16uc p16uc_DUPLICATE32_HI
EIGEN_STRONG_INLINE Packet4f pmadd(const Packet4f &a, const Packet4f &b, const Packet4f &c)
EIGEN_DEVICE_FUNC Packet psub(const Packet &a, const Packet &b)
EIGEN_STRONG_INLINE Packet16uc ploaddup< Packet16uc >(const unsigned char *from)
EIGEN_DEVICE_FUNC Packet pgather_size8(const __UNPACK_TYPE__(Packet) *from, Index stride)
EIGEN_STRONG_INLINE unsigned short int predux_max< Packet8us >(const Packet8us &a)
EIGEN_STRONG_INLINE Packet2d pround< Packet2d >(const Packet2d &a)
EIGEN_STRONG_INLINE Packet4f pselect(const Packet4f &mask, const Packet4f &a, const Packet4f &b)
EIGEN_STRONG_INLINE Packet2d pfloor< Packet2d >(const Packet2d &a)
EIGEN_STRONG_INLINE short int predux_min< Packet8s >(const Packet8s &a)
EIGEN_STRONG_INLINE Packet8us ploadu< Packet8us >(const unsigned short int *from)
EIGEN_STRONG_INLINE Packet2d pset1< Packet2d >(const double &from)
EIGEN_STRONG_INLINE Packet4f plset< Packet4f >(const float &a)
EIGEN_STRONG_INLINE Packet4ui pand< Packet4ui >(const Packet4ui &a, const Packet4ui &b)
static _EIGEN_DECLARE_CONST_FAST_Packet4ui(SIGN, 0x80000000u)
EIGEN_STRONG_INLINE Packet4f pcmp_eq< Packet4f >(const Packet4f &a, const Packet4f &b)
EIGEN_STRONG_INLINE Packet8s ploaddup< Packet8s >(const short int *from)
EIGEN_DEVICE_FUNC Packet2d pgather< double, Packet2d >(const double *from, Index stride)
EIGEN_STRONG_INLINE Packet pload_common(const __UNPACK_TYPE__(Packet) *from)
EIGEN_DEVICE_FUNC void pscatter< unsigned char, Packet16uc >(unsigned char *to, const Packet16uc &from, Index stride)
EIGEN_STRONG_INLINE Packet16uc pmax< Packet16uc >(const Packet16uc &a, const Packet16uc &b)
EIGEN_STRONG_INLINE Packet2d pmul< Packet2d >(const Packet2d &a, const Packet2d &b)
EIGEN_STRONG_INLINE Packet16c plset< Packet16c >(const signed char &a)
EIGEN_STRONG_INLINE Packet8bf pexp< Packet8bf >(const Packet8bf &a)
EIGEN_STRONG_INLINE Packet pset1_size16(const __UNPACK_TYPE__(Packet)&from)
EIGEN_STRONG_INLINE Packet8bf pmul< Packet8bf >(const Packet8bf &a, const Packet8bf &b)
EIGEN_STRONG_INLINE unsigned char predux_max< Packet16uc >(const Packet16uc &a)
EIGEN_STRONG_INLINE Packet8s pmin< Packet8s >(const Packet8s &a, const Packet8s &b)
EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC Packet pldexp_generic(const Packet &a, const Packet &exponent)
EIGEN_STRONG_INLINE Packet8bf ploadu< Packet8bf >(const bfloat16 *from)
EIGEN_STRONG_INLINE unsigned short int pfirst< Packet8us >(const Packet8us &a)
EIGEN_STRONG_INLINE __UNPACK_TYPE__(Packet) pfirst_common(const Packet &a)
EIGEN_STRONG_INLINE Packet8bf pceil< Packet8bf >(const Packet8bf &a)
EIGEN_STRONG_INLINE Packet4i preinterpret< Packet4i, Packet4f >(const Packet4f &a)
EIGEN_STRONG_INLINE void pstoreu< signed char >(signed char *to, const Packet16c &from)
EIGEN_STRONG_INLINE void pstore< short int >(short int *to, const Packet8s &from)
EIGEN_STRONG_INLINE Packet8bf F32ToBf16Bool(Packet4f even, Packet4f odd)
EIGEN_STRONG_INLINE Packet8us plset< Packet8us >(const unsigned short int &a)
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
EIGEN_STRONG_INLINE Packet4f pmax< Packet4f >(const Packet4f &a, const Packet4f &b)
static Packet16uc p16uc_PSET64_HI
EIGEN_STRONG_INLINE Packet4ui pandnot< Packet4ui >(const Packet4ui &a, const Packet4ui &b)
EIGEN_STRONG_INLINE Packet8bf padd< Packet8bf >(const Packet8bf &a, const Packet8bf &b)
static Packet16uc p16uc_REVERSE8
EIGEN_STRONG_INLINE Packet4f pset1< Packet4f >(const float &from)
#define BF16_TO_F32_BINARY_OP_WRAPPER_BOOL(OP, A, B)
EIGEN_DEFINE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS EIGEN_UNUSED Packet pcos_float(const Packet &x)
EIGEN_DEVICE_FUNC void ptranpose_common(PacketBlock< T, 4 > &kernel)
EIGEN_STRONG_INLINE double pfirst< Packet2d >(const Packet2d &a)
EIGEN_DEVICE_FUNC Packet pmul(const Packet &a, const Packet &b)
EIGEN_DEVICE_FUNC Packet4f pgather< float, Packet4f >(const float *from, Index stride)
EIGEN_STRONG_INLINE void prefetch< double >(const double *addr)
static Packet16uc p16uc_TRANSPOSE64_HI
std::ostream & operator<<(std::ostream &s, const Packet16c &v)
EIGEN_STRONG_INLINE Packet4i psub< Packet4i >(const Packet4i &a, const Packet4i &b)
EIGEN_STRONG_INLINE Packet4f psub< Packet4f >(const Packet4f &a, const Packet4f &b)
EIGEN_DEVICE_FUNC Packet pmax(const Packet &a, const Packet &b)
static Packet16uc p16uc_PSET64_LO
EIGEN_STRONG_INLINE Packet4i pblend(const Selector< 4 > &ifPacket, const Packet4i &thenPacket, const Packet4i &elsePacket)
EIGEN_STRONG_INLINE Packet16c psub< Packet16c >(const Packet16c &a, const Packet16c &b)
#define EIGEN_UNUSED_VARIABLE(var)
EIGEN_STRONG_INLINE Packet4i pset1< Packet4i >(const int &from)
EIGEN_STRONG_INLINE void pstore< bfloat16 >(bfloat16 *to, const Packet8bf &from)
EIGEN_STRONG_INLINE Packet8bf pldexp< Packet8bf >(const Packet8bf &a, const Packet8bf &exponent)
EIGEN_STRONG_INLINE Packet16c pload< Packet16c >(const signed char *from)
EIGEN_STRONG_INLINE Packet2d por< Packet2d >(const Packet2d &a, const Packet2d &b)
EIGEN_STRONG_INLINE Packet2cf preverse(const Packet2cf &a)
EIGEN_STRONG_INLINE float predux_mul< Packet4f >(const Packet4f &a)
EIGEN_STRONG_INLINE Packet4f pabs(const Packet4f &a)
const Product< Lhs, Rhs > prod(const Lhs &lhs, const Rhs &rhs)
EIGEN_STRONG_INLINE Packet4f pand< Packet4f >(const Packet4f &a, const Packet4f &b)
EIGEN_STRONG_INLINE Packet4f pcmp_lt_or_nan< Packet4f >(const Packet4f &a, const Packet4f &b)