aboutsummaryrefslogtreecommitdiffhomepage
path: root/Eigen/src/Core/arch/AltiVec/MatrixProductMMA.h
diff options
context:
space:
mode:
authorGravatar Chip-Kerchner <chip.kerchner@ibm.com>2021-02-24 14:46:04 -0600
committerGravatar Chip Kerchner <chip.kerchner@ibm.com>2021-02-24 20:49:15 +0000
commit8523d447a137f20de5485fbdd28aafc3d0774153 (patch)
tree1d40ce81563ff518a944327158e5a72f978fd28c /Eigen/src/Core/arch/AltiVec/MatrixProductMMA.h
parent5908aeeaba8f768bcce467849d1d41be5ac96599 (diff)
Fixes to support old and new versions of the compilers for built-ins. Cast to non-const when using vector_pair with certain built-ins.
Diffstat (limited to 'Eigen/src/Core/arch/AltiVec/MatrixProductMMA.h')
-rw-r--r--Eigen/src/Core/arch/AltiVec/MatrixProductMMA.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/Eigen/src/Core/arch/AltiVec/MatrixProductMMA.h b/Eigen/src/Core/arch/AltiVec/MatrixProductMMA.h
index a91ec3204..888f7cd08 100644
--- a/Eigen/src/Core/arch/AltiVec/MatrixProductMMA.h
+++ b/Eigen/src/Core/arch/AltiVec/MatrixProductMMA.h
@@ -12,6 +12,10 @@
#pragma GCC target("cpu=power10")
+#if !__has_builtin(__builtin_vsx_assemble_pair)
+#define __builtin_vsx_assemble_pair __builtin_mma_assemble_pair
+#endif
+
namespace Eigen {
namespace internal {
@@ -193,13 +197,13 @@ EIGEN_STRONG_INLINE void pgerMMA<Packet2d, PacketBlock<Packet2d, 2>, true>(__vec
template<>
EIGEN_STRONG_INLINE void pgerMMA<Packet2d, __vector_pair, false>(__vector_quad *acc, const __vector_pair& a, const Packet2d& b)
{
- __builtin_mma_xvf64gerpp(acc, a, (__vector unsigned char)b);
+ __builtin_mma_xvf64gerpp(acc, (__vector_pair)a, (__vector unsigned char)b);
}
template<>
EIGEN_STRONG_INLINE void pgerMMA<Packet2d, __vector_pair, true>(__vector_quad *acc, const __vector_pair& a, const Packet2d& b)
{
- __builtin_mma_xvf64gernp(acc, a, (__vector unsigned char)b);
+ __builtin_mma_xvf64gernp(acc, (__vector_pair)a, (__vector unsigned char)b);
}
template<>
@@ -231,7 +235,7 @@ EIGEN_STRONG_INLINE void ploadRhsMMA<double, PacketBlock<Packet2d, 2> >(const do
template<>
EIGEN_STRONG_INLINE void ploadRhsMMA<double, __vector_pair>(const double *rhs, __vector_pair &rhsV)
{
- __builtin_mma_assemble_pair(&rhsV, (__vector unsigned char)(*(((Packet2d *)rhs) + 1)), (__vector unsigned char)(*((Packet2d *)rhs)));
+ __builtin_vsx_assemble_pair(&rhsV, (__vector unsigned char)(*(((Packet2d *)rhs) + 1)), (__vector unsigned char)(*((Packet2d *)rhs)));
}
template<typename Scalar, typename Packet, typename DataMapper, typename Index, const Index accRows>