mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-07-09 14:41:49 +08:00
Fix errors on older compilers (gcc 7.5 - lack of vec_neg, clang10 - can not use const pointers with vec_xl).
(cherry picked from commit 413bc491f1721afdb9802553b13a5b7aba67ed3b)
This commit is contained in:
parent
338924602d
commit
13d7658c5d
@ -74,7 +74,7 @@ struct Packet2cf
|
|||||||
return Packet2cf(*this) -= b;
|
return Packet2cf(*this) -= b;
|
||||||
}
|
}
|
||||||
EIGEN_STRONG_INLINE Packet2cf operator-(void) const {
|
EIGEN_STRONG_INLINE Packet2cf operator-(void) const {
|
||||||
return Packet2cf(vec_neg(v));
|
return Packet2cf(-v);
|
||||||
}
|
}
|
||||||
|
|
||||||
Packet4f v;
|
Packet4f v;
|
||||||
@ -294,7 +294,7 @@ struct Packet1cd
|
|||||||
return Packet1cd(*this) -= b;
|
return Packet1cd(*this) -= b;
|
||||||
}
|
}
|
||||||
EIGEN_STRONG_INLINE Packet1cd operator-(void) const {
|
EIGEN_STRONG_INLINE Packet1cd operator-(void) const {
|
||||||
return Packet1cd(vec_neg(v));
|
return Packet1cd(-v);
|
||||||
}
|
}
|
||||||
|
|
||||||
Packet2d v;
|
Packet2d v;
|
||||||
|
@ -433,7 +433,7 @@ EIGEN_STRONG_INLINE Packet pload_common(const __UNPACK_TYPE__(Packet)* from)
|
|||||||
EIGEN_UNUSED_VARIABLE(from);
|
EIGEN_UNUSED_VARIABLE(from);
|
||||||
EIGEN_DEBUG_ALIGNED_LOAD
|
EIGEN_DEBUG_ALIGNED_LOAD
|
||||||
#ifdef __VSX__
|
#ifdef __VSX__
|
||||||
return vec_xl(0, from);
|
return vec_xl(0, const_cast<__UNPACK_TYPE__(Packet)*>(from));
|
||||||
#else
|
#else
|
||||||
return vec_ld(0, from);
|
return vec_ld(0, from);
|
||||||
#endif
|
#endif
|
||||||
@ -952,7 +952,7 @@ template<typename Packet> EIGEN_STRONG_INLINE Packet ploadu_common(const __UNPAC
|
|||||||
return (Packet) vec_perm(MSQ, LSQ, mask); // align the data
|
return (Packet) vec_perm(MSQ, LSQ, mask); // align the data
|
||||||
#else
|
#else
|
||||||
EIGEN_DEBUG_UNALIGNED_LOAD
|
EIGEN_DEBUG_UNALIGNED_LOAD
|
||||||
return vec_xl(0, from);
|
return vec_xl(0, const_cast<__UNPACK_TYPE__(Packet)*>(from));
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2453,7 +2453,7 @@ template<> EIGEN_STRONG_INLINE Packet2d print<Packet2d>(const Packet2d& a)
|
|||||||
template<> EIGEN_STRONG_INLINE Packet2d ploadu<Packet2d>(const double* from)
|
template<> EIGEN_STRONG_INLINE Packet2d ploadu<Packet2d>(const double* from)
|
||||||
{
|
{
|
||||||
EIGEN_DEBUG_UNALIGNED_LOAD
|
EIGEN_DEBUG_UNALIGNED_LOAD
|
||||||
return vec_xl(0, from);
|
return vec_xl(0, const_cast<double*>(from));
|
||||||
}
|
}
|
||||||
|
|
||||||
template<> EIGEN_STRONG_INLINE Packet2d ploaddup<Packet2d>(const double* from)
|
template<> EIGEN_STRONG_INLINE Packet2d ploaddup<Packet2d>(const double* from)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user