aboutsummaryrefslogtreecommitdiffhomepage
path: root/Eigen
diff options
context:
space:
mode:
authorGravatar Gael Guennebaud <g.gael@free.fr>2010-07-07 10:52:59 +0200
committerGravatar Gael Guennebaud <g.gael@free.fr>2010-07-07 10:52:59 +0200
commitc851044eae0b0c4be639f6b4fd09825c8ed64d16 (patch)
tree62bc6bba07d000dc8f958f03e74a50de0186cc78 /Eigen
parent55495dcbaefbd25d8d97a260ca2de921357a137c (diff)
fix row cwise-prod column in coeff based products...
I really don't know why this worked so far...
Diffstat (limited to 'Eigen')
-rw-r--r--Eigen/src/Core/products/CoeffBasedProduct.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/Eigen/src/Core/products/CoeffBasedProduct.h b/Eigen/src/Core/products/CoeffBasedProduct.h
index a17ce901b..1474bc1bb 100644
--- a/Eigen/src/Core/products/CoeffBasedProduct.h
+++ b/Eigen/src/Core/products/CoeffBasedProduct.h
@@ -318,7 +318,7 @@ struct ei_product_coeff_vectorized_dyn_selector
typedef typename Lhs::Index Index;
EIGEN_STRONG_INLINE static void run(Index row, Index col, const Lhs& lhs, const Rhs& rhs, typename Lhs::Scalar &res)
{
- res = lhs.row(row).cwiseProduct(rhs.col(col)).sum();
+ res = lhs.row(row).transpose().cwiseProduct(rhs.col(col)).sum();
}
};
@@ -330,7 +330,7 @@ struct ei_product_coeff_vectorized_dyn_selector<Lhs,Rhs,1,RhsCols>
typedef typename Lhs::Index Index;
EIGEN_STRONG_INLINE static void run(Index /*row*/, Index col, const Lhs& lhs, const Rhs& rhs, typename Lhs::Scalar &res)
{
- res = lhs.cwiseProduct(rhs.col(col)).sum();
+ res = lhs.transpose().cwiseProduct(rhs.col(col)).sum();
}
};
@@ -340,7 +340,7 @@ struct ei_product_coeff_vectorized_dyn_selector<Lhs,Rhs,LhsRows,1>
typedef typename Lhs::Index Index;
EIGEN_STRONG_INLINE static void run(Index row, Index /*col*/, const Lhs& lhs, const Rhs& rhs, typename Lhs::Scalar &res)
{
- res = lhs.row(row).cwiseProduct(rhs).sum();
+ res = lhs.row(row).transpose().cwiseProduct(rhs).sum();
}
};
@@ -350,7 +350,7 @@ struct ei_product_coeff_vectorized_dyn_selector<Lhs,Rhs,1,1>
typedef typename Lhs::Index Index;
EIGEN_STRONG_INLINE static void run(Index /*row*/, Index /*col*/, const Lhs& lhs, const Rhs& rhs, typename Lhs::Scalar &res)
{
- res = lhs.cwiseProduct(rhs).sum();
+ res = lhs.transpose().cwiseProduct(rhs).sum();
}
};