aboutsummaryrefslogtreecommitdiffhomepage
path: root/Eigen/src/Core/Dot.h
diff options
context:
space:
mode:
authorGravatar Gael Guennebaud <g.gael@free.fr>2010-07-07 10:00:08 +0200
committerGravatar Gael Guennebaud <g.gael@free.fr>2010-07-07 10:00:08 +0200
commite38fc9692dfac3596331c6f7b9e50a0fb7dbcfe9 (patch)
tree24cd97101328cd1e9d4e66b802b14b57d938ccb4 /Eigen/src/Core/Dot.h
parentf8d3b4c0606683bb19ae2cf037e6fd637002954a (diff)
add a conj_product functor and optimize dot products
Diffstat (limited to 'Eigen/src/Core/Dot.h')
-rw-r--r--Eigen/src/Core/Dot.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/Eigen/src/Core/Dot.h b/Eigen/src/Core/Dot.h
index 8eaa62185..9fc2fb60e 100644
--- a/Eigen/src/Core/Dot.h
+++ b/Eigen/src/Core/Dot.h
@@ -41,7 +41,7 @@ struct ei_dot_nocheck
{
static inline typename ei_traits<T>::Scalar run(const MatrixBase<T>& a, const MatrixBase<U>& b)
{
- return a.conjugate().cwiseProduct(b).sum();
+ return a.template binaryExpr<ei_scalar_conj_product_op<typename ei_traits<T>::Scalar> >(b).sum();
}
};
@@ -50,7 +50,7 @@ struct ei_dot_nocheck<T, U, true>
{
static inline typename ei_traits<T>::Scalar run(const MatrixBase<T>& a, const MatrixBase<U>& b)
{
- return a.adjoint().cwiseProduct(b).sum();
+ return a.transpose().template binaryExpr<ei_scalar_conj_product_op<typename ei_traits<T>::Scalar> >(b).sum();
}
};