diff --git a/Eigen/src/Core/arch/AltiVec/PacketMath.h b/Eigen/src/Core/arch/AltiVec/PacketMath.h index 27f61a49b..9022a71e0 100755 --- a/Eigen/src/Core/arch/AltiVec/PacketMath.h +++ b/Eigen/src/Core/arch/AltiVec/PacketMath.h @@ -224,29 +224,25 @@ inline std::ostream & operator <<(std::ostream & s, const Packet4ui & v) return s; } -template -EIGEN_STRONG_INLINE Packet pload_common(const __UNPACK_TYPE__(Packet)* from) +template +EIGEN_STRONG_INLINE Packet pload_common(const Scalar* from) { // some versions of GCC throw "unused-but-set-parameter". // ignoring these warnings for now. EIGEN_UNUSED_VARIABLE(from); EIGEN_DEBUG_ALIGNED_LOAD -#ifdef __VSX__ - return vec_xl(0, const_cast<__UNPACK_TYPE__(Packet)*>(from)); -#else return vec_ld(0, from); -#endif } // Need to define them first or we get specialization after instantiation errors template<> EIGEN_STRONG_INLINE Packet4f pload(const float* from) { - return pload_common(from); + return pload_common(from); } template<> EIGEN_STRONG_INLINE Packet4i pload(const int* from) { - return pload_common(from); + return pload_common(from); } template @@ -455,15 +451,11 @@ template<> EIGEN_STRONG_INLINE Packet4f pfloor(const Packet4f& a) { re template EIGEN_STRONG_INLINE Packet ploadu_common(const __UNPACK_TYPE__(Packet)* from) { EIGEN_DEBUG_UNALIGNED_LOAD -#ifdef __VSX__ - return vec_xl(0, const_cast<__UNPACK_TYPE__(Packet)*>(from)); -#else Packet16uc mask = vec_lvsl(0, from); // create the permute mask Packet16uc MSQ = vec_ld(0, (unsigned char *)from); // most significant quadword Packet16uc LSQ = vec_ld(15, (unsigned char *)from); // least significant quadword //TODO: Add static_cast here return (Packet) vec_perm(MSQ, LSQ, mask); // align the data -#endif } template<> EIGEN_STRONG_INLINE Packet4f ploadu(const float* from)