This forum has been archived. All content is frozen. Please use KDE Discuss instead.

MemoryError: std::bad_alloc in Sparse matrix multiplication

Tags: None
(comma "," separated)
leilyr
Registered Member
Posts
1
Karma
0
Hi,
I am trying to do the following sparse matrix multiplication but it fails.

Eigen::SparseMatrix<double,Eigen::ColMajor> A; //Where A is a square matrix with rows = columns = ~4million
Eigen::SparseVector<double> x; //where rows are equal to A.rows()
I am interested in:
Eigen::SparseMatrix<double,Eigen::ColMajor> output;
output = A.colwise(x*x.transpose());
but it fails with a memory error.
Could you please tell me how to solve this issue.


Bookmarks



Who is online

Registered users: Bing [Bot], Evergrowing, Google [Bot], rblackwell