mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
Replace calls to numext::fma with numext:madd.
This commit is contained in:
committed by
Rasmus Munk Larsen
parent
52f570a409
commit
2e8cc042a1
@@ -2026,38 +2026,38 @@ EIGEN_STRONG_INLINE Packet2d pblend(const Selector<2>& ifPacket, const Packet2d&
|
||||
}
|
||||
|
||||
// Scalar path for pmadd with FMA to ensure consistency with vectorized path.
|
||||
#ifdef EIGEN_VECTORIZE_FMA
|
||||
#if defined(EIGEN_VECTORIZE_FMA)
|
||||
template <>
|
||||
EIGEN_STRONG_INLINE float pmadd(const float& a, const float& b, const float& c) {
|
||||
return ::fmaf(a, b, c);
|
||||
return std::fmaf(a, b, c);
|
||||
}
|
||||
template <>
|
||||
EIGEN_STRONG_INLINE double pmadd(const double& a, const double& b, const double& c) {
|
||||
return ::fma(a, b, c);
|
||||
return std::fma(a, b, c);
|
||||
}
|
||||
template <>
|
||||
EIGEN_STRONG_INLINE float pmsub(const float& a, const float& b, const float& c) {
|
||||
return ::fmaf(a, b, -c);
|
||||
return std::fmaf(a, b, -c);
|
||||
}
|
||||
template <>
|
||||
EIGEN_STRONG_INLINE double pmsub(const double& a, const double& b, const double& c) {
|
||||
return ::fma(a, b, -c);
|
||||
return std::fma(a, b, -c);
|
||||
}
|
||||
template <>
|
||||
EIGEN_STRONG_INLINE float pnmadd(const float& a, const float& b, const float& c) {
|
||||
return ::fmaf(-a, b, c);
|
||||
return std::fmaf(-a, b, c);
|
||||
}
|
||||
template <>
|
||||
EIGEN_STRONG_INLINE double pnmadd(const double& a, const double& b, const double& c) {
|
||||
return ::fma(-a, b, c);
|
||||
return std::fma(-a, b, c);
|
||||
}
|
||||
template <>
|
||||
EIGEN_STRONG_INLINE float pnmsub(const float& a, const float& b, const float& c) {
|
||||
return ::fmaf(-a, b, -c);
|
||||
return std::fmaf(-a, b, -c);
|
||||
}
|
||||
template <>
|
||||
EIGEN_STRONG_INLINE double pnmsub(const double& a, const double& b, const double& c) {
|
||||
return ::fma(-a, b, -c);
|
||||
return std::fma(-a, b, -c);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user