mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-04-24 02:29:33 +08:00
Get rid of DiagonalProduct
This commit is contained in:
parent
2d136d3d7f
commit
551bf5c66a
@ -13,6 +13,7 @@
|
||||
|
||||
namespace Eigen {
|
||||
|
||||
#ifndef EIGEN_TEST_EVALUATORS
|
||||
namespace internal {
|
||||
template<typename MatrixType, typename DiagonalType, int ProductOrder>
|
||||
struct traits<DiagonalProduct<MatrixType, DiagonalType, ProductOrder> >
|
||||
@ -124,6 +125,17 @@ MatrixBase<Derived>::operator*(const DiagonalBase<DiagonalDerived> &a_diagonal)
|
||||
{
|
||||
return DiagonalProduct<Derived, DiagonalDerived, OnTheRight>(derived(), a_diagonal.derived());
|
||||
}
|
||||
#else // EIGEN_TEST_EVALUATORS
|
||||
/** \returns the diagonal matrix product of \c *this by the diagonal matrix \a diagonal.
|
||||
*/
|
||||
template<typename Derived>
|
||||
template<typename DiagonalDerived>
|
||||
inline const Product<Derived, DiagonalDerived, LazyProduct>
|
||||
MatrixBase<Derived>::operator*(const DiagonalBase<DiagonalDerived> &a_diagonal) const
|
||||
{
|
||||
return Product<Derived, DiagonalDerived, LazyProduct>(derived(),a_diagonal.derived());
|
||||
}
|
||||
#endif // EIGEN_TEST_EVALUATORS
|
||||
|
||||
} // end namespace Eigen
|
||||
|
||||
|
@ -215,10 +215,17 @@ template<typename Derived> class MatrixBase
|
||||
template<typename OtherDerived>
|
||||
void applyOnTheRight(const EigenBase<OtherDerived>& other);
|
||||
|
||||
#ifndef EIGEN_TEST_EVALUATORS
|
||||
template<typename DiagonalDerived>
|
||||
EIGEN_DEVICE_FUNC
|
||||
const DiagonalProduct<Derived, DiagonalDerived, OnTheRight>
|
||||
operator*(const DiagonalBase<DiagonalDerived> &diagonal) const;
|
||||
#else // EIGEN_TEST_EVALUATORS
|
||||
template<typename DiagonalDerived>
|
||||
EIGEN_DEVICE_FUNC
|
||||
const Product<Derived, DiagonalDerived, LazyProduct>
|
||||
operator*(const DiagonalBase<DiagonalDerived> &diagonal) const;
|
||||
#endif // EIGEN_TEST_EVALUATORS
|
||||
|
||||
template<typename OtherDerived>
|
||||
EIGEN_DEVICE_FUNC
|
||||
|
Loading…
x
Reference in New Issue
Block a user