aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/product.h
diff options
context:
space:
mode:
authorGravatar Gael Guennebaud <g.gael@free.fr>2010-06-24 17:51:25 +0200
committerGravatar Gael Guennebaud <g.gael@free.fr>2010-06-24 17:51:25 +0200
commitb22fc6cdc316a11a5bc15870f05472e9b0613298 (patch)
treebea4ccbf0ffb94cd4c773ba2c16e0802d6c1a3c8 /test/product.h
parent7e836ccb4c973269905c0e819b6930b89bd5a662 (diff)
bug fix in gemv:
solution always use a temporary in dst.innerStride != 1 even though this is not needed when packet_size == 1....
Diffstat (limited to 'test/product.h')
-rw-r--r--test/product.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/test/product.h b/test/product.h
index 5365a7dc6..804ce131d 100644
--- a/test/product.h
+++ b/test/product.h
@@ -45,7 +45,7 @@ template<typename MatrixType> void product(const MatrixType& m)
typedef Matrix<Scalar, MatrixType::RowsAtCompileTime, MatrixType::RowsAtCompileTime> RowSquareMatrixType;
typedef Matrix<Scalar, MatrixType::ColsAtCompileTime, MatrixType::ColsAtCompileTime> ColSquareMatrixType;
typedef Matrix<Scalar, MatrixType::RowsAtCompileTime, MatrixType::ColsAtCompileTime,
- MatrixType::Flags&RowMajorBit> OtherMajorMatrixType;
+ MatrixType::Flags&RowMajorBit?ColMajor:RowMajor> OtherMajorMatrixType;
Index rows = m.rows();
Index cols = m.cols();
@@ -152,6 +152,9 @@ template<typename MatrixType> void product(const MatrixType& m)
VERIFY(areNotApprox(res2,square2 + m2.transpose() * m1));
}
+ VERIFY_IS_APPROX(res.col(r).noalias() = square.adjoint() * square.col(r), (square.adjoint() * square.col(r)).eval());
+ VERIFY_IS_APPROX(res.col(r).noalias() = square * square.col(r), (square * square.col(r)).eval());
+
// inner product
Scalar x = square2.row(c) * square2.col(c2);
VERIFY_IS_APPROX(x, square2.row(c).transpose().cwiseProduct(square2.col(c2)).sum());