aboutsummaryrefslogtreecommitdiffhomepage
path: root/Eigen/src/SparseCore
diff options
context:
space:
mode:
authorGravatar Gael Guennebaud <g.gael@free.fr>2016-05-26 17:51:04 +0200
committerGravatar Gael Guennebaud <g.gael@free.fr>2016-05-26 17:51:04 +0200
commite8cef383b7100b29e32f3c5acfa8d54d9732d2d0 (patch)
tree76479a3d95d94ea3f3a9f16cc78f21549d9d1549 /Eigen/src/SparseCore
parent35df3a32eb7f41e8c6859c2e94490148145c069c (diff)
bug #1236: fix possible integer overflow in density estimation.
Diffstat (limited to 'Eigen/src/SparseCore')
-rw-r--r--Eigen/src/SparseCore/SparseSparseProductWithPruning.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/Eigen/src/SparseCore/SparseSparseProductWithPruning.h b/Eigen/src/SparseCore/SparseSparseProductWithPruning.h
index 20078f72c..21c419002 100644
--- a/Eigen/src/SparseCore/SparseSparseProductWithPruning.h
+++ b/Eigen/src/SparseCore/SparseSparseProductWithPruning.h
@@ -51,7 +51,7 @@ static void sparse_sparse_product_with_pruning_impl(const Lhs& lhs, const Rhs& r
Index estimated_nnz_prod = lhsEval.nonZerosEstimate() + rhsEval.nonZerosEstimate();
res.reserve(estimated_nnz_prod);
- double ratioColRes = double(estimated_nnz_prod)/double(lhs.rows()*rhs.cols());
+ double ratioColRes = double(estimated_nnz_prod)/(double(lhs.rows())*double(rhs.cols()));
for (Index j=0; j<cols; ++j)
{
// FIXME: