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) 2018 Wave Computing, Inc.
5// Written by:
6// Chris Larsen
7// Alexey Frunze (afrunze@wavecomp.com)
8//
9// This Source Code Form is subject to the terms of the Mozilla
10// Public License v. 2.0. If a copy of the MPL was not distributed
11// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
12
13#ifndef EIGEN_PACKET_MATH_MSA_H
14#define EIGEN_PACKET_MATH_MSA_H
15
16#include <iostream>
17#include <string>
18
19namespace Eigen {
20
21namespace internal {
22
23#ifndef EIGEN_CACHEFRIENDLY_PRODUCT_THRESHOLD
24#define EIGEN_CACHEFRIENDLY_PRODUCT_THRESHOLD 8
25#endif
26
27#ifndef EIGEN_HAS_SINGLE_INSTRUCTION_MADD
28#define EIGEN_HAS_SINGLE_INSTRUCTION_MADD
29#endif
30
31#ifndef EIGEN_ARCH_DEFAULT_NUMBER_OF_REGISTERS
32#define EIGEN_ARCH_DEFAULT_NUMBER_OF_REGISTERS 32
33#endif
34
35#if 0
36#define EIGEN_MSA_DEBUG \
37 static bool firstTime = true; \
38 do { \
39 if (firstTime) { \
40 std::cout << __FILE__ << ':' << __LINE__ << ':' << __FUNCTION__ << std::endl; \
41 firstTime = false; \
42 } \
43 } while (0)
44#else
45#define EIGEN_MSA_DEBUG
46#endif
47
48#define EIGEN_MSA_SHF_I8(a, b, c, d) (((d) << 6) | ((c) << 4) | ((b) << 2) | (a))
49
50typedef v4f32 Packet4f;
51typedef v4i32 Packet4i;
52typedef v4u32 Packet4ui;
53
54#define _EIGEN_DECLARE_CONST_Packet4f(NAME, X) const Packet4f p4f_##NAME = { X, X, X, X }
55#define _EIGEN_DECLARE_CONST_Packet4i(NAME, X) const Packet4i p4i_##NAME = { X, X, X, X }
56#define _EIGEN_DECLARE_CONST_Packet4ui(NAME, X) const Packet4ui p4ui_##NAME = { X, X, X, X }
57
58inline std::ostream& operator<<(std::ostream& os, const Packet4f& value) {
59 os << "[ " << value[0] << ", " << value[1] << ", " << value[2] << ", " << value[3] << " ]";
60 return os;
61}
62
63inline std::ostream& operator<<(std::ostream& os, const Packet4i& value) {
64 os << "[ " << value[0] << ", " << value[1] << ", " << value[2] << ", " << value[3] << " ]";
65 return os;
66}
67
68inline std::ostream& operator<<(std::ostream& os, const Packet4ui& value) {
69 os << "[ " << value[0] << ", " << value[1] << ", " << value[2] << ", " << value[3] << " ]";
70 return os;
71}
72
73template <>
74struct packet_traits<float> : default_packet_traits {
75 typedef Packet4f type;
76 typedef Packet4f half; // Packet2f intrinsics not implemented yet
77 enum {
78 Vectorizable = 1,
80 size = 4,
81 HasHalfPacket = 0, // Packet2f intrinsics not implemented yet
82 // FIXME check the Has*
83 HasDiv = 1,
88 HasLog = 1,
89 HasExp = 1,
90 HasSqrt = 1,
91 HasRsqrt = 1,
92 HasRound = 1,
93 HasFloor = 1,
94 HasCeil = 1,
95 HasBlend = 1
96 };
97};
98
99template <>
101 typedef Packet4i type;
102 typedef Packet4i half; // Packet2i intrinsics not implemented yet
103 enum {
106 size = 4,
107 HasHalfPacket = 0, // Packet2i intrinsics not implemented yet
108 // FIXME check the Has*
110 HasBlend = 1
111 };
112};
113
114template <>
115struct unpacket_traits<Packet4f> {
116 typedef float type;
118 typedef Packet4f half;
119};
120
121template <>
123 typedef int32_t type;
125 typedef Packet4i half;
126};
127
128template <>
131
132 Packet4f v = { from, from, from, from };
133 return v;
134}
135
136template <>
142
143template <>
146
147 float f = *from;
148 Packet4f v = { f, f, f, f };
149 return v;
150}
151
152template <>
158
159template <>
165
166template <>
172
173template <>
176
177 static const Packet4f countdown = { 0.0f, 1.0f, 2.0f, 3.0f };
178 return padd(pset1<Packet4f>(a), countdown);
179}
180
181template <>
184
185 static const Packet4i countdown = { 0, 1, 2, 3 };
186 return padd(pset1<Packet4i>(a), countdown);
187}
188
189template <>
195
196template <>
202
203template <>
209
210template <>
216
217template <>
220
221 return a;
222}
223
224template <>
227
228 return a;
229}
230
231template <>
237
238template <>
244
245template <>
251
252template <>
258
259template <>
262
263 return __builtin_msa_fmadd_w(c, a, b);
264}
265
266template <>
269
270 // Use "asm" construct to avoid __builtin_msa_maddv_w GNU C bug.
271 Packet4i value = c;
272 __asm__("maddv.w %w[value], %w[a], %w[b]\n"
273 // Outputs
274 : [value] "+f"(value)
275 // Inputs
276 : [a] "f"(a), [b] "f"(b));
277 return value;
278}
279
280template <>
286
287template <>
293
294template <>
300
301template <>
307
308template <>
314
315template <>
321
322template <>
328
329template <>
335
336template <>
339
340#if EIGEN_FAST_MATH
341 // This prefers numbers to NaNs.
342 return __builtin_msa_fmin_w(a, b);
343#else
344 // This prefers NaNs to numbers.
348#endif
349}
350
351template <>
357
358template <>
361
362#if EIGEN_FAST_MATH
363 // This prefers numbers to NaNs.
364 return __builtin_msa_fmax_w(a, b);
365#else
366 // This prefers NaNs to numbers.
370#endif
371}
372
373template <>
379
380template <>
386
387template <>
390
391 EIGEN_DEBUG_ALIGNED_LOAD return __builtin_msa_ld_w(const_cast<int32_t*>(from), 0);
392}
393
394template <>
400
401template <>
407
408template <>
411
412 float f0 = from[0], f1 = from[1];
413 Packet4f v0 = { f0, f0, f0, f0 };
414 Packet4f v1 = { f1, f1, f1, f1 };
416}
417
418template <>
421
422 int32_t i0 = from[0], i1 = from[1];
423 Packet4i v0 = { i0, i0, i0, i0 };
424 Packet4i v1 = { i1, i1, i1, i1 };
426}
427
428template <>
434
435template <>
441
442template <>
448
449template <>
455
456template <>
459
460 float f = *from;
461 Packet4f v = { f, f, f, f };
462 v[1] = from[stride];
463 v[2] = from[2 * stride];
464 v[3] = from[3 * stride];
465 return v;
466}
467
468template <>
471
472 int32_t i = *from;
473 Packet4i v = { i, i, i, i };
474 v[1] = from[stride];
475 v[2] = from[2 * stride];
476 v[3] = from[3 * stride];
477 return v;
478}
479
480template <>
482 Index stride) {
484
485 *to = from[0];
486 to += stride;
487 *to = from[1];
488 to += stride;
489 *to = from[2];
490 to += stride;
491 *to = from[3];
492}
493
494template <>
496 Index stride) {
498
499 *to = from[0];
500 to += stride;
501 *to = from[1];
502 to += stride;
503 *to = from[2];
504 to += stride;
505 *to = from[3];
506}
507
508template <>
514
515template <>
521
522template <>
525
526 return a[0];
527}
528
529template <>
532
533 return a[0];
534}
535
536template <>
542
543template <>
549
550template <>
556
557template <>
564
565template <>
573
574
575template <>
578
580 s = padd(s, __builtin_msa_shf_w(s, EIGEN_MSA_SHF_I8(1, 0, 3, 2)));
581 return s[0];
582}
583
584// Other reduction functions:
585// mul
586template <>
594
595template <>
598
600 p = pmul(p, __builtin_msa_shf_w(p, EIGEN_MSA_SHF_I8(1, 0, 3, 2)));
601 return p[0];
602}
603
604// min
605template <>
608
609 // Swap 64-bit halves of a.
611#if !EIGEN_FAST_MATH
612 // Detect presence of NaNs from pairs a[0]-a[2] and a[1]-a[3] as two 32-bit
613 // masks of all zeroes/ones in low 64 bits.
615 // Combine the two masks into one: 64 ones if no NaNs, otherwise 64 zeroes.
617#endif
618 // Continue with min computation.
622#if !EIGEN_FAST_MATH
623 // Based on the mask select between v and 4 qNaNs.
624 v16u8 qnans = (v16u8)__builtin_msa_fill_w(0x7FC00000);
626#endif
627 return v[0];
628}
629
630template <>
633
635 m = pmin(m, __builtin_msa_shf_w(m, EIGEN_MSA_SHF_I8(1, 0, 3, 2)));
636 return m[0];
637}
638
639// max
640template <>
643
644 // Swap 64-bit halves of a.
646#if !EIGEN_FAST_MATH
647 // Detect presence of NaNs from pairs a[0]-a[2] and a[1]-a[3] as two 32-bit
648 // masks of all zeroes/ones in low 64 bits.
650 // Combine the two masks into one: 64 ones if no NaNs, otherwise 64 zeroes.
652#endif
653 // Continue with max computation.
657#if !EIGEN_FAST_MATH
658 // Based on the mask select between v and 4 qNaNs.
659 v16u8 qnans = (v16u8)__builtin_msa_fill_w(0x7FC00000);
661#endif
662 return v[0];
663}
664
665template <>
668
670 m = pmax(m, __builtin_msa_shf_w(m, EIGEN_MSA_SHF_I8(1, 0, 3, 2)));
671 return m[0];
672}
673
674inline std::ostream& operator<<(std::ostream& os, const PacketBlock<Packet4f, 4>& value) {
675 os << "[ " << value.packet[0] << "," << std::endl
676 << " " << value.packet[1] << "," << std::endl
677 << " " << value.packet[2] << "," << std::endl
678 << " " << value.packet[3] << " ]";
679 return os;
680}
681
682EIGEN_DEVICE_FUNC inline void ptranspose(PacketBlock<Packet4f, 4>& kernel) {
684
685 v4i32 tmp1, tmp2, tmp3, tmp4;
686
687 tmp1 = __builtin_msa_ilvr_w((v4i32)kernel.packet[1], (v4i32)kernel.packet[0]);
688 tmp2 = __builtin_msa_ilvr_w((v4i32)kernel.packet[3], (v4i32)kernel.packet[2]);
689 tmp3 = __builtin_msa_ilvl_w((v4i32)kernel.packet[1], (v4i32)kernel.packet[0]);
690 tmp4 = __builtin_msa_ilvl_w((v4i32)kernel.packet[3], (v4i32)kernel.packet[2]);
691
692 kernel.packet[0] = (Packet4f)__builtin_msa_ilvr_d((v2i64)tmp2, (v2i64)tmp1);
693 kernel.packet[1] = (Packet4f)__builtin_msa_ilvod_d((v2i64)tmp2, (v2i64)tmp1);
694 kernel.packet[2] = (Packet4f)__builtin_msa_ilvr_d((v2i64)tmp4, (v2i64)tmp3);
695 kernel.packet[3] = (Packet4f)__builtin_msa_ilvod_d((v2i64)tmp4, (v2i64)tmp3);
696}
697
698inline std::ostream& operator<<(std::ostream& os, const PacketBlock<Packet4i, 4>& value) {
699 os << "[ " << value.packet[0] << "," << std::endl
700 << " " << value.packet[1] << "," << std::endl
701 << " " << value.packet[2] << "," << std::endl
702 << " " << value.packet[3] << " ]";
703 return os;
704}
705
706EIGEN_DEVICE_FUNC inline void ptranspose(PacketBlock<Packet4i, 4>& kernel) {
708
709 v4i32 tmp1, tmp2, tmp3, tmp4;
710
711 tmp1 = __builtin_msa_ilvr_w(kernel.packet[1], kernel.packet[0]);
712 tmp2 = __builtin_msa_ilvr_w(kernel.packet[3], kernel.packet[2]);
713 tmp3 = __builtin_msa_ilvl_w(kernel.packet[1], kernel.packet[0]);
714 tmp4 = __builtin_msa_ilvl_w(kernel.packet[3], kernel.packet[2]);
715
716 kernel.packet[0] = (Packet4i)__builtin_msa_ilvr_d((v2i64)tmp2, (v2i64)tmp1);
717 kernel.packet[1] = (Packet4i)__builtin_msa_ilvod_d((v2i64)tmp2, (v2i64)tmp1);
718 kernel.packet[2] = (Packet4i)__builtin_msa_ilvr_d((v2i64)tmp4, (v2i64)tmp3);
719 kernel.packet[3] = (Packet4i)__builtin_msa_ilvod_d((v2i64)tmp4, (v2i64)tmp3);
720}
721
722template <>
728
729template <>
732
733#if EIGEN_FAST_MATH
735#else
737 return pdiv(ones, psqrt(a));
738#endif
739}
740
741template <>
743 Packet4f v = a;
744 int32_t old_mode, new_mode;
745 asm volatile(
746 "cfcmsa %[old_mode], $1\n"
747 "ori %[new_mode], %[old_mode], 3\n" // 3 = round towards -INFINITY.
748 "ctcmsa $1, %[new_mode]\n"
749 "frint.w %w[v], %w[v]\n"
750 "ctcmsa $1, %[old_mode]\n"
751 : // outputs
752 [old_mode] "=r"(old_mode), [new_mode] "=r"(new_mode),
753 [v] "+f"(v)
754 : // inputs
755 : // clobbers
756 );
757 return v;
758}
759
760template <>
762 Packet4f v = a;
763 int32_t old_mode, new_mode;
764 asm volatile(
765 "cfcmsa %[old_mode], $1\n"
766 "ori %[new_mode], %[old_mode], 3\n"
767 "xori %[new_mode], %[new_mode], 1\n" // 2 = round towards +INFINITY.
768 "ctcmsa $1, %[new_mode]\n"
769 "frint.w %w[v], %w[v]\n"
770 "ctcmsa $1, %[old_mode]\n"
771 : // outputs
772 [old_mode] "=r"(old_mode), [new_mode] "=r"(new_mode),
773 [v] "+f"(v)
774 : // inputs
775 : // clobbers
776 );
777 return v;
778}
779
780template <>
782 Packet4f v = a;
783 int32_t old_mode, new_mode;
784 asm volatile(
785 "cfcmsa %[old_mode], $1\n"
786 "ori %[new_mode], %[old_mode], 3\n"
787 "xori %[new_mode], %[new_mode], 3\n" // 0 = round to nearest, ties to even.
788 "ctcmsa $1, %[new_mode]\n"
789 "frint.w %w[v], %w[v]\n"
790 "ctcmsa $1, %[old_mode]\n"
791 : // outputs
792 [old_mode] "=r"(old_mode), [new_mode] "=r"(new_mode),
793 [v] "+f"(v)
794 : // inputs
795 : // clobbers
796 );
797 return v;
798}
799
800template <>
802 const Packet4f& elsePacket) {
803 Packet4ui select = { ifPacket.select[0], ifPacket.select[1], ifPacket.select[2],
804 ifPacket.select[3] };
805 Packet4i mask = __builtin_msa_ceqi_w((Packet4i)select, 0);
807}
808
809template <>
811 const Packet4i& elsePacket) {
812 Packet4ui select = { ifPacket.select[0], ifPacket.select[1], ifPacket.select[2],
813 ifPacket.select[3] };
814 Packet4i mask = __builtin_msa_ceqi_w((Packet4i)select, 0);
816}
817
818//---------- double ----------
819
823
824#define _EIGEN_DECLARE_CONST_Packet2d(NAME, X) const Packet2d p2d_##NAME = { X, X }
825#define _EIGEN_DECLARE_CONST_Packet2l(NAME, X) const Packet2l p2l_##NAME = { X, X }
826#define _EIGEN_DECLARE_CONST_Packet2ul(NAME, X) const Packet2ul p2ul_##NAME = { X, X }
827
828inline std::ostream& operator<<(std::ostream& os, const Packet2d& value) {
829 os << "[ " << value[0] << ", " << value[1] << " ]";
830 return os;
831}
832
833inline std::ostream& operator<<(std::ostream& os, const Packet2l& value) {
834 os << "[ " << value[0] << ", " << value[1] << " ]";
835 return os;
836}
837
838inline std::ostream& operator<<(std::ostream& os, const Packet2ul& value) {
839 os << "[ " << value[0] << ", " << value[1] << " ]";
840 return os;
841}
842
843template <>
844struct packet_traits<double> : default_packet_traits {
845 typedef Packet2d type;
846 typedef Packet2d half;
847 enum {
848 Vectorizable = 1,
849 AlignedOnScalar = 1,
850 size = 2,
851 HasHalfPacket = 0,
852 // FIXME check the Has*
853 HasDiv = 1,
854 HasExp = 1,
855 HasSqrt = 1,
856 HasRsqrt = 1,
857 HasRound = 1,
858 HasFloor = 1,
859 HasCeil = 1,
860 HasBlend = 1
861 };
862};
863
864template <>
866 typedef double type;
868 typedef Packet2d half;
869};
870
871template <>
874
875 Packet2d value = { from, from };
876 return value;
877}
878
879template <>
885
886template <>
889
890 static const Packet2d countdown = { 0.0, 1.0 };
891 return padd(pset1<Packet2d>(a), countdown);
892}
893
894template <>
900
901template <>
907
908template <>
911
912 return a;
913}
914
915template <>
921
922template <>
928
929template <>
932
933 return __builtin_msa_fmadd_d(c, a, b);
934}
935
936// Logical Operations are not supported for float, so we have to reinterpret casts using MSA
937// intrinsics
938template <>
944
945template <>
951
952template <>
958
959template <>
965
966template <>
972
973template <>
976
977#if EIGEN_FAST_MATH
978 // This prefers numbers to NaNs.
979 return __builtin_msa_fmin_d(a, b);
980#else
981 // This prefers NaNs to numbers.
985#endif
986}
987
988template <>
991
992#if EIGEN_FAST_MATH
993 // This prefers numbers to NaNs.
994 return __builtin_msa_fmax_d(a, b);
995#else
996 // This prefers NaNs to numbers.
1000#endif
1001}
1002
1003template <>
1006
1007 EIGEN_DEBUG_UNALIGNED_LOAD return (Packet2d)__builtin_msa_ld_d(const_cast<double*>(from), 0);
1008}
1009
1010template <>
1013
1014 Packet2d value = { *from, *from };
1015 return value;
1016}
1017
1018template <>
1024
1025template <>
1031
1032template <>
1035
1036 Packet2d value;
1037 value[0] = *from;
1038 from += stride;
1039 value[1] = *from;
1040 return value;
1041}
1042
1043template <>
1045 Index stride) {
1047
1048 *to = from[0];
1049 to += stride;
1050 *to = from[1];
1051}
1052
1053template <>
1059
1060template <>
1063
1064 return a[0];
1065}
1066
1067template <>
1073
1074template <>
1080
1081template <>
1084
1085 Packet2d s = padd(a, preverse(a));
1086 return s[0];
1087}
1088
1089// Other reduction functions:
1090// mul
1091template <>
1094
1095 Packet2d p = pmul(a, preverse(a));
1096 return p[0];
1097}
1098
1099// min
1100template <>
1103
1104#if EIGEN_FAST_MATH
1107 return v[0];
1108#else
1109 double a0 = a[0], a1 = a[1];
1110 return ((numext::isnan)(a0) || a0 < a1) ? a0 : a1;
1111#endif
1112}
1113
1114// max
1115template <>
1118
1119#if EIGEN_FAST_MATH
1122 return v[0];
1123#else
1124 double a0 = a[0], a1 = a[1];
1125 return ((numext::isnan)(a0) || a0 > a1) ? a0 : a1;
1126#endif
1127}
1128
1129template <>
1135
1136template <>
1139
1140#if EIGEN_FAST_MATH
1141 return __builtin_msa_frsqrt_d(a);
1142#else
1144 return pdiv(ones, psqrt(a));
1145#endif
1146}
1147
1148inline std::ostream& operator<<(std::ostream& os, const PacketBlock<Packet2d, 2>& value) {
1149 os << "[ " << value.packet[0] << "," << std::endl << " " << value.packet[1] << " ]";
1150 return os;
1151}
1152
1155
1156 Packet2d trn1 = (Packet2d)__builtin_msa_ilvev_d((v2i64)kernel.packet[1], (v2i64)kernel.packet[0]);
1157 Packet2d trn2 = (Packet2d)__builtin_msa_ilvod_d((v2i64)kernel.packet[1], (v2i64)kernel.packet[0]);
1158 kernel.packet[0] = trn1;
1159 kernel.packet[1] = trn2;
1160}
1161
1162template <>
1164 Packet2d v = a;
1165 int32_t old_mode, new_mode;
1166 asm volatile(
1167 "cfcmsa %[old_mode], $1\n"
1168 "ori %[new_mode], %[old_mode], 3\n" // 3 = round towards -INFINITY.
1169 "ctcmsa $1, %[new_mode]\n"
1170 "frint.d %w[v], %w[v]\n"
1171 "ctcmsa $1, %[old_mode]\n"
1172 : // outputs
1173 [old_mode] "=r"(old_mode), [new_mode] "=r"(new_mode),
1174 [v] "+f"(v)
1175 : // inputs
1176 : // clobbers
1177 );
1178 return v;
1179}
1180
1181template <>
1183 Packet2d v = a;
1184 int32_t old_mode, new_mode;
1185 asm volatile(
1186 "cfcmsa %[old_mode], $1\n"
1187 "ori %[new_mode], %[old_mode], 3\n"
1188 "xori %[new_mode], %[new_mode], 1\n" // 2 = round towards +INFINITY.
1189 "ctcmsa $1, %[new_mode]\n"
1190 "frint.d %w[v], %w[v]\n"
1191 "ctcmsa $1, %[old_mode]\n"
1192 : // outputs
1193 [old_mode] "=r"(old_mode), [new_mode] "=r"(new_mode),
1194 [v] "+f"(v)
1195 : // inputs
1196 : // clobbers
1197 );
1198 return v;
1199}
1200
1201template <>
1203 Packet2d v = a;
1204 int32_t old_mode, new_mode;
1205 asm volatile(
1206 "cfcmsa %[old_mode], $1\n"
1207 "ori %[new_mode], %[old_mode], 3\n"
1208 "xori %[new_mode], %[new_mode], 3\n" // 0 = round to nearest, ties to even.
1209 "ctcmsa $1, %[new_mode]\n"
1210 "frint.d %w[v], %w[v]\n"
1211 "ctcmsa $1, %[old_mode]\n"
1212 : // outputs
1213 [old_mode] "=r"(old_mode), [new_mode] "=r"(new_mode),
1214 [v] "+f"(v)
1215 : // inputs
1216 : // clobbers
1217 );
1218 return v;
1219}
1220
1221template <>
1223 const Packet2d& elsePacket) {
1224 Packet2ul select = { ifPacket.select[0], ifPacket.select[1] };
1225 Packet2l mask = __builtin_msa_ceqi_d((Packet2l)select, 0);
1227}
1228
1229} // end namespace internal
1230
1231} // end namespace Eigen
1232
1233#endif // EIGEN_PACKET_MATH_MSA_H
Matrix3f m
Definition AngleAxis_mimic_euler.cpp:1
ArrayXXi a
Definition Array_initializer_list_23_cxx11.cpp:1
Array< int, Dynamic, 1 > v
Definition Array_initializer_list_vector_cxx11.cpp:1
int i
Definition BiCGSTAB_step_by_step.cpp:9
MatrixXcf ones
Definition ComplexEigenSolver_eigenvalues.cpp:1
#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_MSA_SHF_I8(a, b, c, d)
Definition PacketMath.h:48
#define EIGEN_MSA_DEBUG
Definition PacketMath.h:45
#define EIGEN_DEVICE_FUNC
Definition Macros.h:976
#define EIGEN_FAST_MATH
Definition Macros.h:49
#define EIGEN_STRONG_INLINE
Definition Macros.h:917
float * p
Definition Tutorial_Map_using.cpp:9
M1<< 1, 2, 3, 4, 5, 6, 7, 8, 9;Map< RowVectorXf > v1(M1.data(), M1.size())
Scalar Scalar * c
Definition benchVecAdd.cpp:17
Scalar * b
Definition benchVecAdd.cpp:17
@ Aligned16
Definition Constants.h:235
RealScalar s
Definition level1_cplx_impl.h:126
EIGEN_STRONG_INLINE Packet4f pandnot< Packet4f >(const Packet4f &a, const Packet4f &b)
Definition PacketMath.h:914
v2f64 Packet2d
Definition PacketMath.h:820
EIGEN_STRONG_INLINE void pstoreu< double >(double *to, const Packet4d &from)
Definition PacketMath.h:627
EIGEN_STRONG_INLINE double predux< Packet2d >(const Packet2d &a)
Definition PacketMath.h:1082
EIGEN_STRONG_INLINE Packet2cf pconj(const Packet2cf &a)
Definition Complex.h:167
v2i64 Packet2l
Definition PacketMath.h:821
EIGEN_DEVICE_FUNC Packet padd(const Packet &a, const Packet &b)
Definition GenericPacketMath.h:215
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
EIGEN_STRONG_INLINE Packet4i pload1< Packet4i >(const int32_t *from)
Definition PacketMath.h:153
__vector int Packet4i
Definition PacketMath.h:31
EIGEN_STRONG_INLINE Packet4f padd< Packet4f >(const Packet4f &a, const Packet4f &b)
Definition PacketMath.h:774
EIGEN_STRONG_INLINE Packet4i por< Packet4i >(const Packet4i &a, const Packet4i &b)
Definition PacketMath.h:901
EIGEN_STRONG_INLINE Packet4i pset1< Packet4i >(const int &from)
Definition PacketMath.h:551
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 void ptranspose(PacketBlock< Packet2cf, 2 > &kernel)
Definition Complex.h:224
EIGEN_STRONG_INLINE Packet4i ploaddup< Packet4i >(const int *from)
Definition PacketMath.h:1008
EIGEN_STRONG_INLINE float predux_max< Packet4f >(const Packet4f &a)
Definition PacketMath.h:1693
EIGEN_STRONG_INLINE Packet2d ploaddup< Packet2d >(const double *from)
Definition PacketMath.h:1011
EIGEN_STRONG_INLINE Packet2d pxor< Packet2d >(const Packet2d &a, const Packet2d &b)
Definition PacketMath.h:953
EIGEN_DEVICE_FUNC Packet pdiv(const Packet &a, const Packet &b)
Definition GenericPacketMath.h:244
EIGEN_STRONG_INLINE Packet2d por< Packet2d >(const Packet2d &a, const Packet2d &b)
Definition PacketMath.h:946
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_STRONG_INLINE void prefetch< int32_t >(const int32_t *addr)
Definition PacketMath.h:516
EIGEN_STRONG_INLINE int predux_min< Packet4i >(const Packet4i &a)
Definition PacketMath.h:1618
EIGEN_STRONG_INLINE Packet4i pxor< Packet4i >(const Packet4i &a, const Packet4i &b)
Definition PacketMath.h:909
EIGEN_STRONG_INLINE double predux_max< Packet2d >(const Packet2d &a)
Definition PacketMath.h:1116
EIGEN_STRONG_INLINE Packet4f pmul< Packet4f >(const Packet4f &a, const Packet4f &b)
Definition PacketMath.h:795
EIGEN_STRONG_INLINE Packet4f pload1< Packet4f >(const float *from)
Definition PacketMath.h:144
EIGEN_DEVICE_FUNC Packet pmax(const Packet &a, const Packet &b)
Definition GenericPacketMath.h:524
EIGEN_STRONG_INLINE Packet4i pblend(const Selector< 4 > &ifPacket, const Packet4i &thenPacket, const Packet4i &elsePacket)
Definition PacketMath.h:2107
EIGEN_DEVICE_FUNC Packet4f pgather< float, Packet4f >(const float *from, Index stride)
Definition PacketMath.h:613
EIGEN_STRONG_INLINE Packet2d pset1< Packet2d >(const double &from)
Definition PacketMath.h:872
EIGEN_STRONG_INLINE Packet4f pload< Packet4f >(const float *from)
Definition PacketMath.h:443
EIGEN_STRONG_INLINE int predux_mul< Packet4i >(const Packet4i &a)
Definition PacketMath.h:1540
EIGEN_STRONG_INLINE Packet8h por(const Packet8h &a, const Packet8h &b)
Definition PacketMath.h:1042
__vector unsigned int Packet4ui
Definition PacketMath.h:32
EIGEN_STRONG_INLINE Packet2cf preverse(const Packet2cf &a)
Definition Complex.h:184
EIGEN_STRONG_INLINE void pstore< double >(double *to, const Packet4d &from)
Definition PacketMath.h:623
EIGEN_STRONG_INLINE Packet4i padd< Packet4i >(const Packet4i &a, const Packet4i &b)
Definition PacketMath.h:775
EIGEN_STRONG_INLINE Packet4f pfloor< Packet4f >(const Packet4f &a)
Definition PacketMath.h:939
EIGEN_STRONG_INLINE Packet4f pmadd(const Packet4f &a, const Packet4f &b, const Packet4f &c)
Definition PacketMath.h:827
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_DEVICE_FUNC Packet pmin(const Packet &a, const Packet &b)
Definition GenericPacketMath.h:512
EIGEN_STRONG_INLINE Packet4f pdiv< Packet4f >(const Packet4f &a, const Packet4f &b)
Definition PacketMath.h:803
EIGEN_STRONG_INLINE Packet2d pload< Packet2d >(const double *from)
Definition PacketMath.h:967
EIGEN_STRONG_INLINE Packet2d pmul< Packet2d >(const Packet2d &a, const Packet2d &b)
Definition PacketMath.h:916
EIGEN_STRONG_INLINE Packet2cf pnegate(const Packet2cf &a)
Definition Complex.h:166
EIGEN_STRONG_INLINE float predux_mul< Packet4f >(const Packet4f &a)
Definition PacketMath.h:1533
EIGEN_STRONG_INLINE void prefetch< float >(const float *addr)
Definition PacketMath.h:1117
EIGEN_DEVICE_FUNC void pscatter< double, Packet2d >(double *to, const Packet2d &from, Index stride)
Definition PacketMath.h:1044
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
EIGEN_STRONG_INLINE Packet2d pdiv< Packet2d >(const Packet2d &a, const Packet2d &b)
Definition PacketMath.h:923
EIGEN_STRONG_INLINE double predux_min< Packet2d >(const Packet2d &a)
Definition PacketMath.h:1101
EIGEN_STRONG_INLINE Packet4f pset1< Packet4f >(const float &from)
Definition PacketMath.h:547
EIGEN_STRONG_INLINE Packet4i psub< Packet4i >(const Packet4i &a, const Packet4i &b)
Definition PacketMath.h:783
EIGEN_DEVICE_FUNC void pscatter< float, Packet4f >(float *to, const Packet4f &from, Index stride)
Definition PacketMath.h:695
EIGEN_STRONG_INLINE Packet2d plset< Packet2d >(const double &a)
Definition PacketMath.h:887
EIGEN_STRONG_INLINE Packet4f pceil< Packet4f >(const Packet4f &a)
Definition PacketMath.h:938
EIGEN_STRONG_INLINE void pstore< float >(float *to, const Packet4f &from)
Definition PacketMath.h:491
EIGEN_STRONG_INLINE Packet4f pabs(const Packet4f &a)
Definition PacketMath.h:1176
std::ostream & operator<<(std::ostream &s, const Packet16c &v)
Definition PacketMath.h:371
EIGEN_STRONG_INLINE Packet2d ploadu< Packet2d >(const double *from)
Definition PacketMath.h:1004
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_STRONG_INLINE Packet4i pmin< Packet4i >(const Packet4i &a, const Packet4i &b)
Definition PacketMath.h:843
EIGEN_STRONG_INLINE Packet4f psqrt(const Packet4f &a)
Definition PacketMath.h:723
EIGEN_STRONG_INLINE Packet8h pand(const Packet8h &a, const Packet8h &b)
Definition PacketMath.h:1050
EIGEN_STRONG_INLINE void pstore< int32_t >(int32_t *to, const Packet4i &from)
Definition PacketMath.h:436
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 float predux< Packet4f >(const Packet4f &a)
Definition PacketMath.h:1444
EIGEN_STRONG_INLINE Packet2d pceil< Packet2d >(const Packet2d &a)
Definition PacketMath.h:1182
EIGEN_STRONG_INLINE Packet4f ploadu< Packet4f >(const float *from)
Definition PacketMath.h:968
EIGEN_STRONG_INLINE Packet4i pmul< Packet4i >(const Packet4i &a, const Packet4i &b)
Definition PacketMath.h:796
EIGEN_STRONG_INLINE Packet4i pand< Packet4i >(const Packet4i &a, const Packet4i &b)
Definition PacketMath.h:892
EIGEN_STRONG_INLINE Packet2d pmin< Packet2d >(const Packet2d &a, const Packet2d &b)
Definition PacketMath.h:974
EIGEN_STRONG_INLINE int predux< Packet4i >(const Packet4i &a)
Definition PacketMath.h:1454
EIGEN_STRONG_INLINE Packet4f pand< Packet4f >(const Packet4f &a, const Packet4f &b)
Definition PacketMath.h:891
EIGEN_STRONG_INLINE int predux_max< Packet4i >(const Packet4i &a)
Definition PacketMath.h:1698
EIGEN_DEVICE_FUNC Packet2d pgather< double, Packet2d >(const double *from, Index stride)
Definition PacketMath.h:1033
EIGEN_STRONG_INLINE Packet4i pmax< Packet4i >(const Packet4i &a, const Packet4i &b)
Definition PacketMath.h:861
EIGEN_STRONG_INLINE Packet4i pdiv< Packet4i >(const Packet4i &, const Packet4i &)
Definition PacketMath.h:821
EIGEN_STRONG_INLINE Packet4i pload< Packet4i >(const int *from)
Definition PacketMath.h:448
__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 Packet4f psub< Packet4f >(const Packet4f &a, const Packet4f &b)
Definition PacketMath.h:782
EIGEN_STRONG_INLINE Packet4f prsqrt(const Packet4f &a)
Definition PacketMath.h:730
EIGEN_STRONG_INLINE Packet4f plset< Packet4f >(const float &a)
Definition PacketMath.h:767
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 pround< Packet4f >(const Packet4f &a)
Definition PacketMath.h:921
EIGEN_STRONG_INLINE Packet2d pround< Packet2d >(const Packet2d &a)
Definition PacketMath.h:1202
EIGEN_STRONG_INLINE double pfirst< Packet2d >(const Packet2d &a)
Definition PacketMath.h:1061
v2u64 Packet2ul
Definition PacketMath.h:822
EIGEN_STRONG_INLINE Packet2d pfloor< Packet2d >(const Packet2d &a)
Definition PacketMath.h:1163
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_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_DEVICE_FUNC EIGEN_ALWAYS_INLINE bool() isnan(const Eigen::bfloat16 &h)
Definition BFloat16.h:659
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
Definition BandTriangularSolver.h:13
Definition GenericPacketMath.h:43
@ HasRsqrt
Definition GenericPacketMath.h:67
@ HasSin
Definition GenericPacketMath.h:75
@ HasBlend
Definition GenericPacketMath.h:60
@ HasCos
Definition GenericPacketMath.h:76
@ HasCeil
Definition GenericPacketMath.h:101
@ HasExp
Definition GenericPacketMath.h:68
@ HasRound
Definition GenericPacketMath.h:98
@ HasSqrt
Definition GenericPacketMath.h:66
@ HasErf
Definition GenericPacketMath.h:88
@ HasLog
Definition GenericPacketMath.h:70
@ HasTanh
Definition GenericPacketMath.h:83
@ HasFloor
Definition GenericPacketMath.h:100
@ HasDiv
Definition GenericPacketMath.h:65
Packet2d half
Definition PacketMath.h:846
Packet2d type
Definition PacketMath.h:845
Packet4f type
Definition PacketMath.h:75
Packet4f half
Definition PacketMath.h:76
Packet4i half
Definition PacketMath.h:102
Packet4i type
Definition PacketMath.h:101
Definition GenericPacketMath.h:107
@ HasHalfPacket
Definition GenericPacketMath.h:114
@ size
Definition GenericPacketMath.h:112
@ AlignedOnScalar
Definition GenericPacketMath.h:113
@ Vectorizable
Definition GenericPacketMath.h:111
Definition ForwardDeclarations.h:17
double type
Definition PacketMath.h:866
Packet2d half
Definition PacketMath.h:868
Packet4f half
Definition PacketMath.h:118
float type
Definition PacketMath.h:116
int32_t type
Definition PacketMath.h:123
Packet4i half
Definition PacketMath.h:125
Definition GenericPacketMath.h:133
@ 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
EIGEN_DONT_INLINE Scalar zero()
Definition svd_common.h:296