Skip to content

Made it multi-threading: ColMajor sparsematrix * RowMajor sparsematrix.

Notifications You must be signed in to change notification settings

chanket/EigenSparseProduct

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

EigenSparseProduct

Made it multi-threading: C = A * B, where A is an Eigen::ColMajor sparsematrix and B is an Eigen::RowMajor sparsematrix.
实现了Eigen::ColMajor稀疏矩阵乘Eigen::RowMajor稀疏矩阵的多线程乘法。

Benckmark

Here we made 2 test cases:

  • A is 471538*941014, B is 941014*471538, with 0.00127% nonzero values.
  • A is 235771*235771, B is 235771*235771, with 0.00296% nonzero values.

The machine has an Intel Core-i7 6700K CPU @ 4.38GHz, with 16GiB 2400MHz DDR4 memory (single channel) on Windows 10.0.17134.407. We made the product of each case continuously for 4 times, and logged the total time consumed as following.

Method Case 1st 2nd 3rd 4th
Eigen's 1 1141ms 1176ms 1162ms 1162ms
Ours 1 345ms 298ms 313ms 298ms
Eigen's 2 471ms 479ms 476ms 475ms
Ours 2 140ms 115ms 121ms 120ms

This method turns out to perform a little worse for the 1st product due to memory allocation, but it becomes faster for the following. The overall speed-up ratio is 3.30 ~ 4.16 on this 4 cored machine, according to the table.

About

Made it multi-threading: ColMajor sparsematrix * RowMajor sparsematrix.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages