Bugzilla – Bug 1236
[SparseSparseProductWithPruning] Integer overflow in ratioColRes estimation
Last modified: 2016-05-26 15:52:38 UTC
On Eigen's latest stable version (3.2.8), I am encountering a signed integer overflow when using Sparse / Sparse products with pruning, namely on the following line:
double ratioColRes = double(estimated_nnz_prod)/double(lhs.rows()*rhs.cols());
And then the problem reported at the exectution:
SparseSparseProductWithPruning.h:51:68: runtime error: signed integer overflow: 56224 * 56224 cannot be represented in type 'int '
Now, I don't know what this 'int ' means, but this product would fit in a 'long long' or a double, so I guess the overflow could be avoided.
Thanks for the report, I've simply moved the conversion to double before the product.