diff options
author | Gael Guennebaud <g.gael@free.fr> | 2009-09-04 10:17:28 +0200 |
---|---|---|
committer | Gael Guennebaud <g.gael@free.fr> | 2009-09-04 10:17:28 +0200 |
commit | 6902ef0824221391d159d153285f3d2142fdcd5b (patch) | |
tree | 1862be6dda74aea522c89804c6640108369e9c1b /Eigen/src/Core/DiagonalProduct.h | |
parent | a7ed998d523287e790142f4d3ff3d7f8e37e4d17 (diff) |
extend mixingtype test to check diagonal products and fix the later for real*complex products
Diffstat (limited to 'Eigen/src/Core/DiagonalProduct.h')
-rw-r--r-- | Eigen/src/Core/DiagonalProduct.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Eigen/src/Core/DiagonalProduct.h b/Eigen/src/Core/DiagonalProduct.h index b838d1b31..7eaa380eb 100644 --- a/Eigen/src/Core/DiagonalProduct.h +++ b/Eigen/src/Core/DiagonalProduct.h @@ -29,7 +29,7 @@ template<typename MatrixType, typename DiagonalType, int ProductOrder> struct ei_traits<DiagonalProduct<MatrixType, DiagonalType, ProductOrder> > { - typedef typename MatrixType::Scalar Scalar; + typedef typename ei_scalar_product_traits<typename MatrixType::Scalar, typename DiagonalType::Scalar>::ReturnType Scalar; enum { RowsAtCompileTime = MatrixType::RowsAtCompileTime, ColsAtCompileTime = MatrixType::ColsAtCompileTime, @@ -62,7 +62,7 @@ class DiagonalProduct : ei_no_assignment_operator, { return m_diagonal.diagonal().coeff(ProductOrder == DiagonalOnTheLeft ? row : col) * m_matrix.coeff(row, col); } - + template<int LoadMode> EIGEN_STRONG_INLINE PacketScalar packet(int row, int col) const { @@ -72,7 +72,7 @@ class DiagonalProduct : ei_no_assignment_operator, DiagonalVectorPacketLoadMode = (LoadMode == Aligned && ((InnerSize%16) == 0)) ? Aligned : Unaligned }; const int indexInDiagonalVector = ProductOrder == DiagonalOnTheLeft ? row : col; - + if((int(StorageOrder) == RowMajor && int(ProductOrder) == DiagonalOnTheLeft) ||(int(StorageOrder) == ColMajor && int(ProductOrder) == DiagonalOnTheRight)) { |