diff --git a/Eigen/src/Core/arch/AltiVec/MatrixProductCommon.h b/Eigen/src/Core/arch/AltiVec/MatrixProductCommon.h index 226f425b4..cb18311e1 100644 --- a/Eigen/src/Core/arch/AltiVec/MatrixProductCommon.h +++ b/Eigen/src/Core/arch/AltiVec/MatrixProductCommon.h @@ -102,7 +102,7 @@ EIGEN_ALWAYS_INLINE void outputVecColResults(Packet4f (&acc)[num_acc][size], flo template EIGEN_ALWAYS_INLINE void outputVecResults(Packet4f (&acc)[num_acc][size], float *result, Packet4f pAlpha); -template> +template EIGEN_ALWAYS_INLINE Packet8bf loadColData(RhsMapper& rhs, Index j); template diff --git a/Eigen/src/Core/arch/AltiVec/MatrixVectorProduct.h b/Eigen/src/Core/arch/AltiVec/MatrixVectorProduct.h index 480a48abc..b8e1ab604 100644 --- a/Eigen/src/Core/arch/AltiVec/MatrixVectorProduct.h +++ b/Eigen/src/Core/arch/AltiVec/MatrixVectorProduct.h @@ -521,16 +521,30 @@ EIGEN_ALWAYS_INLINE void multVecVSX(Packet4f (&acc)[num_acc][2], Packet4f (&a0)[ } } -template = true> -EIGEN_ALWAYS_INLINE Packet8bf loadColData(RhsMapper& rhs, Index j) +template +struct loadColData_impl { - return rhs.template loadPacket(j + 0); -} + // linear == false + static EIGEN_ALWAYS_INLINE Packet8bf run(RhsMapper& rhs, Index j) + { + return pgather(&rhs(j + 0, 0), rhs.stride()); + } +}; -template = true> +template +struct loadColData_impl +{ + // linear == true + static EIGEN_ALWAYS_INLINE Packet8bf run(RhsMapper& rhs, Index j) + { + return rhs.template loadPacket(j + 0); + } +}; + +template EIGEN_ALWAYS_INLINE Packet8bf loadColData(RhsMapper& rhs, Index j) { - return pgather(&rhs(j + 0, 0), rhs.stride()); + return loadColData_impl::run(rhs, j); } template