Lines 175-190
Link Here
|
175 |
#else |
175 |
#else |
176 |
HasRsqrt = 0, |
176 |
HasRsqrt = 0, |
177 |
#endif |
177 |
#endif |
|
|
178 |
HasTanh = EIGEN_FAST_MATH, |
179 |
HasErf = EIGEN_FAST_MATH, |
180 |
HasRint = 1, |
178 |
#else |
181 |
#else |
179 |
HasSqrt = 0, |
182 |
HasSqrt = 0, |
180 |
HasRsqrt = 0, |
183 |
HasRsqrt = 0, |
181 |
HasTanh = EIGEN_FAST_MATH, |
184 |
HasTanh = 0, |
182 |
HasErf = EIGEN_FAST_MATH, |
185 |
HasErf = 0, |
|
|
186 |
HasRint = 0, |
183 |
#endif |
187 |
#endif |
184 |
HasRound = 1, |
188 |
HasRound = 1, |
185 |
HasFloor = 1, |
189 |
HasFloor = 1, |
186 |
HasCeil = 1, |
190 |
HasCeil = 1, |
187 |
HasRint = 1, |
|
|
188 |
HasNegate = 1, |
191 |
HasNegate = 1, |
189 |
HasBlend = 1 |
192 |
HasBlend = 1 |
190 |
}; |
193 |
}; |
Lines 217-232
Link Here
|
217 |
#else |
220 |
#else |
218 |
HasRsqrt = 0, |
221 |
HasRsqrt = 0, |
219 |
#endif |
222 |
#endif |
|
|
223 |
HasRint = 1, |
220 |
#else |
224 |
#else |
221 |
HasSqrt = 0, |
225 |
HasSqrt = 0, |
222 |
HasRsqrt = 0, |
226 |
HasRsqrt = 0, |
223 |
HasTanh = EIGEN_FAST_MATH, |
227 |
HasRint = 0, |
224 |
HasErf = EIGEN_FAST_MATH, |
|
|
225 |
#endif |
228 |
#endif |
|
|
229 |
HasTanh = 0, |
230 |
HasErf = 0, |
226 |
HasRound = 1, |
231 |
HasRound = 1, |
227 |
HasFloor = 1, |
232 |
HasFloor = 1, |
228 |
HasCeil = 1, |
233 |
HasCeil = 1, |
229 |
HasRint = 1, |
|
|
230 |
HasNegate = 1, |
234 |
HasNegate = 1, |
231 |
HasBlend = 1 |
235 |
HasBlend = 1 |
232 |
}; |
236 |
}; |
Lines 872-890
Link Here
|
872 |
return vec_nor(c,c); |
876 |
return vec_nor(c,c); |
873 |
} |
877 |
} |
874 |
|
878 |
|
|
|
879 |
#ifdef __VSX__ |
875 |
template<> EIGEN_STRONG_INLINE Packet4i pcmp_le(const Packet4i& a, const Packet4i& b) { return reinterpret_cast<Packet4i>(vec_cmple(a,b)); } |
880 |
template<> EIGEN_STRONG_INLINE Packet4i pcmp_le(const Packet4i& a, const Packet4i& b) { return reinterpret_cast<Packet4i>(vec_cmple(a,b)); } |
|
|
881 |
#endif |
876 |
template<> EIGEN_STRONG_INLINE Packet4i pcmp_lt(const Packet4i& a, const Packet4i& b) { return reinterpret_cast<Packet4i>(vec_cmplt(a,b)); } |
882 |
template<> EIGEN_STRONG_INLINE Packet4i pcmp_lt(const Packet4i& a, const Packet4i& b) { return reinterpret_cast<Packet4i>(vec_cmplt(a,b)); } |
877 |
template<> EIGEN_STRONG_INLINE Packet4i pcmp_eq(const Packet4i& a, const Packet4i& b) { return reinterpret_cast<Packet4i>(vec_cmpeq(a,b)); } |
883 |
template<> EIGEN_STRONG_INLINE Packet4i pcmp_eq(const Packet4i& a, const Packet4i& b) { return reinterpret_cast<Packet4i>(vec_cmpeq(a,b)); } |
|
|
884 |
#ifdef __VSX__ |
878 |
template<> EIGEN_STRONG_INLINE Packet8s pcmp_le(const Packet8s& a, const Packet8s& b) { return reinterpret_cast<Packet8s>(vec_cmple(a,b)); } |
885 |
template<> EIGEN_STRONG_INLINE Packet8s pcmp_le(const Packet8s& a, const Packet8s& b) { return reinterpret_cast<Packet8s>(vec_cmple(a,b)); } |
|
|
886 |
#endif |
879 |
template<> EIGEN_STRONG_INLINE Packet8s pcmp_lt(const Packet8s& a, const Packet8s& b) { return reinterpret_cast<Packet8s>(vec_cmplt(a,b)); } |
887 |
template<> EIGEN_STRONG_INLINE Packet8s pcmp_lt(const Packet8s& a, const Packet8s& b) { return reinterpret_cast<Packet8s>(vec_cmplt(a,b)); } |
880 |
template<> EIGEN_STRONG_INLINE Packet8s pcmp_eq(const Packet8s& a, const Packet8s& b) { return reinterpret_cast<Packet8s>(vec_cmpeq(a,b)); } |
888 |
template<> EIGEN_STRONG_INLINE Packet8s pcmp_eq(const Packet8s& a, const Packet8s& b) { return reinterpret_cast<Packet8s>(vec_cmpeq(a,b)); } |
|
|
889 |
#ifdef __VSX__ |
881 |
template<> EIGEN_STRONG_INLINE Packet8us pcmp_le(const Packet8us& a, const Packet8us& b) { return reinterpret_cast<Packet8us>(vec_cmple(a,b)); } |
890 |
template<> EIGEN_STRONG_INLINE Packet8us pcmp_le(const Packet8us& a, const Packet8us& b) { return reinterpret_cast<Packet8us>(vec_cmple(a,b)); } |
|
|
891 |
#endif |
882 |
template<> EIGEN_STRONG_INLINE Packet8us pcmp_lt(const Packet8us& a, const Packet8us& b) { return reinterpret_cast<Packet8us>(vec_cmplt(a,b)); } |
892 |
template<> EIGEN_STRONG_INLINE Packet8us pcmp_lt(const Packet8us& a, const Packet8us& b) { return reinterpret_cast<Packet8us>(vec_cmplt(a,b)); } |
883 |
template<> EIGEN_STRONG_INLINE Packet8us pcmp_eq(const Packet8us& a, const Packet8us& b) { return reinterpret_cast<Packet8us>(vec_cmpeq(a,b)); } |
893 |
template<> EIGEN_STRONG_INLINE Packet8us pcmp_eq(const Packet8us& a, const Packet8us& b) { return reinterpret_cast<Packet8us>(vec_cmpeq(a,b)); } |
|
|
894 |
#ifdef __VSX__ |
884 |
template<> EIGEN_STRONG_INLINE Packet16c pcmp_le(const Packet16c& a, const Packet16c& b) { return reinterpret_cast<Packet16c>(vec_cmple(a,b)); } |
895 |
template<> EIGEN_STRONG_INLINE Packet16c pcmp_le(const Packet16c& a, const Packet16c& b) { return reinterpret_cast<Packet16c>(vec_cmple(a,b)); } |
|
|
896 |
#endif |
885 |
template<> EIGEN_STRONG_INLINE Packet16c pcmp_lt(const Packet16c& a, const Packet16c& b) { return reinterpret_cast<Packet16c>(vec_cmplt(a,b)); } |
897 |
template<> EIGEN_STRONG_INLINE Packet16c pcmp_lt(const Packet16c& a, const Packet16c& b) { return reinterpret_cast<Packet16c>(vec_cmplt(a,b)); } |
886 |
template<> EIGEN_STRONG_INLINE Packet16c pcmp_eq(const Packet16c& a, const Packet16c& b) { return reinterpret_cast<Packet16c>(vec_cmpeq(a,b)); } |
898 |
template<> EIGEN_STRONG_INLINE Packet16c pcmp_eq(const Packet16c& a, const Packet16c& b) { return reinterpret_cast<Packet16c>(vec_cmpeq(a,b)); } |
|
|
899 |
#ifdef __VSX__ |
887 |
template<> EIGEN_STRONG_INLINE Packet16uc pcmp_le(const Packet16uc& a, const Packet16uc& b) { return reinterpret_cast<Packet16uc>(vec_cmple(a,b)); } |
900 |
template<> EIGEN_STRONG_INLINE Packet16uc pcmp_le(const Packet16uc& a, const Packet16uc& b) { return reinterpret_cast<Packet16uc>(vec_cmple(a,b)); } |
|
|
901 |
#endif |
888 |
template<> EIGEN_STRONG_INLINE Packet16uc pcmp_lt(const Packet16uc& a, const Packet16uc& b) { return reinterpret_cast<Packet16uc>(vec_cmplt(a,b)); } |
902 |
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)); } |
903 |
template<> EIGEN_STRONG_INLINE Packet16uc pcmp_eq(const Packet16uc& a, const Packet16uc& b) { return reinterpret_cast<Packet16uc>(vec_cmpeq(a,b)); } |
890 |
|
904 |
|
Lines 937-942
Link Here
|
937 |
} |
951 |
} |
938 |
template<> EIGEN_STRONG_INLINE Packet4f pceil<Packet4f>(const Packet4f& a) { return vec_ceil(a); } |
952 |
template<> EIGEN_STRONG_INLINE Packet4f pceil<Packet4f>(const Packet4f& a) { return vec_ceil(a); } |
939 |
template<> EIGEN_STRONG_INLINE Packet4f pfloor<Packet4f>(const Packet4f& a) { return vec_floor(a); } |
953 |
template<> EIGEN_STRONG_INLINE Packet4f pfloor<Packet4f>(const Packet4f& a) { return vec_floor(a); } |
|
|
954 |
#ifdef __VSX__ |
940 |
template<> EIGEN_STRONG_INLINE Packet4f print<Packet4f>(const Packet4f& a) |
955 |
template<> EIGEN_STRONG_INLINE Packet4f print<Packet4f>(const Packet4f& a) |
941 |
{ |
956 |
{ |
942 |
Packet4f res; |
957 |
Packet4f res; |
Lines 947-952
Link Here
|
947 |
|
962 |
|
948 |
return res; |
963 |
return res; |
949 |
} |
964 |
} |
|
|
965 |
#endif |
950 |
|
966 |
|
951 |
template<typename Packet> EIGEN_STRONG_INLINE Packet ploadu_common(const __UNPACK_TYPE__(Packet)* from) |
967 |
template<typename Packet> EIGEN_STRONG_INLINE Packet ploadu_common(const __UNPACK_TYPE__(Packet)* from) |
952 |
{ |
968 |
{ |
Lines 1341-1352
Link Here
|
1341 |
BF16_TO_F32_BINARY_OP_WRAPPER(psub<Packet4f>, a, b); |
1357 |
BF16_TO_F32_BINARY_OP_WRAPPER(psub<Packet4f>, a, b); |
1342 |
} |
1358 |
} |
1343 |
|
1359 |
|
1344 |
template<> EIGEN_STRONG_INLINE Packet8bf psqrt<Packet8bf> (const Packet8bf& a){ |
|
|
1345 |
BF16_TO_F32_UNARY_OP_WRAPPER(vec_sqrt, a); |
1346 |
} |
1347 |
template<> EIGEN_STRONG_INLINE Packet8bf prsqrt<Packet8bf> (const Packet8bf& a){ |
1348 |
BF16_TO_F32_UNARY_OP_WRAPPER(prsqrt<Packet4f>, a); |
1349 |
} |
1350 |
template<> EIGEN_STRONG_INLINE Packet8bf pexp<Packet8bf> (const Packet8bf& a){ |
1360 |
template<> EIGEN_STRONG_INLINE Packet8bf pexp<Packet8bf> (const Packet8bf& a){ |
1351 |
BF16_TO_F32_UNARY_OP_WRAPPER(pexp_float, a); |
1361 |
BF16_TO_F32_UNARY_OP_WRAPPER(pexp_float, a); |
1352 |
} |
1362 |
} |
Lines 1390-1398
Link Here
|
1390 |
template<> EIGEN_STRONG_INLINE Packet8bf pround<Packet8bf> (const Packet8bf& a){ |
1400 |
template<> EIGEN_STRONG_INLINE Packet8bf pround<Packet8bf> (const Packet8bf& a){ |
1391 |
BF16_TO_F32_UNARY_OP_WRAPPER(pround<Packet4f>, a); |
1401 |
BF16_TO_F32_UNARY_OP_WRAPPER(pround<Packet4f>, a); |
1392 |
} |
1402 |
} |
|
|
1403 |
#ifdef __VSX__ |
1393 |
template<> EIGEN_STRONG_INLINE Packet8bf print<Packet8bf> (const Packet8bf& a){ |
1404 |
template<> EIGEN_STRONG_INLINE Packet8bf print<Packet8bf> (const Packet8bf& a){ |
1394 |
BF16_TO_F32_UNARY_OP_WRAPPER(print<Packet4f>, a); |
1405 |
BF16_TO_F32_UNARY_OP_WRAPPER(print<Packet4f>, a); |
1395 |
} |
1406 |
} |
|
|
1407 |
#endif |
1396 |
template<> EIGEN_STRONG_INLINE Packet8bf pmadd(const Packet8bf& a, const Packet8bf& b, const Packet8bf& c) { |
1408 |
template<> EIGEN_STRONG_INLINE Packet8bf pmadd(const Packet8bf& a, const Packet8bf& b, const Packet8bf& c) { |
1397 |
Packet4f a_even = Bf16ToF32Even(a); |
1409 |
Packet4f a_even = Bf16ToF32Even(a); |
1398 |
Packet4f a_odd = Bf16ToF32Odd(a); |
1410 |
Packet4f a_odd = Bf16ToF32Odd(a); |