Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 936107
Collapse All | Expand All

(-)a/Eigen/Core (-1 / +1 lines)
Lines 346-352 Link Here
346
#include "src/Core/CoreIterators.h"
346
#include "src/Core/CoreIterators.h"
347
#include "src/Core/ConditionEstimator.h"
347
#include "src/Core/ConditionEstimator.h"
348
348
349
#if defined(EIGEN_VECTORIZE_ALTIVEC) || defined(EIGEN_VECTORIZE_VSX)
349
#if defined(EIGEN_VECTORIZE_VSX)
350
  #include "src/Core/arch/AltiVec/MatrixProduct.h"
350
  #include "src/Core/arch/AltiVec/MatrixProduct.h"
351
#elif defined EIGEN_VECTORIZE_NEON
351
#elif defined EIGEN_VECTORIZE_NEON
352
  #include "src/Core/arch/NEON/GeneralBlockPanelKernel.h"
352
  #include "src/Core/arch/NEON/GeneralBlockPanelKernel.h"
(-)a/Eigen/src/Core/arch/AltiVec/Complex.h (+2 lines)
Lines 100-105 Link Here
100
    HasAbs2   = 0,
100
    HasAbs2   = 0,
101
    HasMin    = 0,
101
    HasMin    = 0,
102
    HasMax    = 0,
102
    HasMax    = 0,
103
    HasSqrt   = 1,
103
#ifdef __VSX__
104
#ifdef __VSX__
104
    HasBlend  = 1,
105
    HasBlend  = 1,
105
#endif
106
#endif
Lines 320-325 Link Here
320
    HasAbs2   = 0,
321
    HasAbs2   = 0,
321
    HasMin    = 0,
322
    HasMin    = 0,
322
    HasMax    = 0,
323
    HasMax    = 0,
324
    HasSqrt   = 1,
323
    HasSetLinear = 0
325
    HasSetLinear = 0
324
  };
326
  };
325
};
327
};
(-)a/Eigen/src/Core/arch/AltiVec/MathFunctions.h (-3 / +21 lines)
Lines 40-55 Link Here
40
  return pcos_float(_x);
40
  return pcos_float(_x);
41
}
41
}
42
42
43
#ifdef __VSX__
43
#ifndef EIGEN_COMP_CLANG
44
#ifndef EIGEN_COMP_CLANG
44
template<> EIGEN_DEFINE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS EIGEN_UNUSED
45
template<> EIGEN_DEFINE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS EIGEN_UNUSED
45
Packet4f prsqrt<Packet4f>(const Packet4f& x)
46
Packet4f prsqrt<Packet4f>(const Packet4f& x)
46
{
47
{
47
  return  vec_rsqrt(x);
48
  return  vec_rsqrt(x);
48
}
49
}
49
#endif
50
50
51
#ifdef __VSX__
52
#ifndef EIGEN_COMP_CLANG
53
template<> EIGEN_DEFINE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS EIGEN_UNUSED
51
template<> EIGEN_DEFINE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS EIGEN_UNUSED
54
Packet2d prsqrt<Packet2d>(const Packet2d& x)
52
Packet2d prsqrt<Packet2d>(const Packet2d& x)
55
{
53
{
Lines 74-79 Link Here
74
{
72
{
75
  return pexp_double(_x);
73
  return pexp_double(_x);
76
}
74
}
75
76
template<> EIGEN_STRONG_INLINE Packet8bf psqrt<Packet8bf> (const Packet8bf& a){
77
  BF16_TO_F32_UNARY_OP_WRAPPER(psqrt<Packet4f>, a);
78
}
79
80
#ifndef EIGEN_COMP_CLANG
81
template<> EIGEN_STRONG_INLINE Packet8bf prsqrt<Packet8bf> (const Packet8bf& a){
82
  BF16_TO_F32_UNARY_OP_WRAPPER(prsqrt<Packet4f>, a);
83
}
84
#endif
85
#else
86
template<> EIGEN_DEFINE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS
87
Packet4f psqrt<Packet4f>(const Packet4f& x)
88
{
89
  Packet4f a;
90
  for (Index i = 0; i < packet_traits<float>::size; i++) {
91
    a[i] = numext::sqrt(x[i]);
92
  }
93
  return a;
94
}
77
#endif
95
#endif
78
96
79
// Hyperbolic Tangent function.
97
// Hyperbolic Tangent function.
(-)a/Eigen/src/Core/arch/AltiVec/PacketMath.h (-12 / +24 lines)
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);

Return to bug 936107