mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-07-05 04:35:46 +08:00
Get rid of DiagonalProduct
This commit is contained in:
parent
2d136d3d7f
commit
551bf5c66a
@ -13,6 +13,7 @@
|
|||||||
|
|
||||||
namespace Eigen {
|
namespace Eigen {
|
||||||
|
|
||||||
|
#ifndef EIGEN_TEST_EVALUATORS
|
||||||
namespace internal {
|
namespace internal {
|
||||||
template<typename MatrixType, typename DiagonalType, int ProductOrder>
|
template<typename MatrixType, typename DiagonalType, int ProductOrder>
|
||||||
struct traits<DiagonalProduct<MatrixType, DiagonalType, 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());
|
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
|
} // end namespace Eigen
|
||||||
|
|
||||||
|
@ -215,10 +215,17 @@ template<typename Derived> class MatrixBase
|
|||||||
template<typename OtherDerived>
|
template<typename OtherDerived>
|
||||||
void applyOnTheRight(const EigenBase<OtherDerived>& other);
|
void applyOnTheRight(const EigenBase<OtherDerived>& other);
|
||||||
|
|
||||||
|
#ifndef EIGEN_TEST_EVALUATORS
|
||||||
template<typename DiagonalDerived>
|
template<typename DiagonalDerived>
|
||||||
EIGEN_DEVICE_FUNC
|
EIGEN_DEVICE_FUNC
|
||||||
const DiagonalProduct<Derived, DiagonalDerived, OnTheRight>
|
const DiagonalProduct<Derived, DiagonalDerived, OnTheRight>
|
||||||
operator*(const DiagonalBase<DiagonalDerived> &diagonal) const;
|
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>
|
template<typename OtherDerived>
|
||||||
EIGEN_DEVICE_FUNC
|
EIGEN_DEVICE_FUNC
|
||||||
|
Loading…
x
Reference in New Issue
Block a user