是否有一个稀疏矩阵库可以复制密集 BLAS 的功能?
我至少想要:
- 具有稀疏输入(可能还有密集输出)的高效 SYR 和 SYRK(rank-k 更新)、
- 稀疏对称存储选项、
- DOT、NRM2、转置和其他标准好东西。
不过,命名和 API 不需要以 BLAS 为中心,只要它能完成工作即可。首选 C 或 Fortran,但 C++ 也可以。
我查看了 MKL,scipy.sparse,uBLAS 和 Eigen3,但他们要么不支持我需要的东西,要么我不知道他们是否支持。
Is there a sparse matrix library that copies the functionality of dense BLAS?
I'd want at least:
- efficient SYR and SYRK (rank-k update) with sparse input (and possibly dense output),
- option for sparse symmetric storage,
- DOT, NRM2, transpose and other standard goodies.
The naming and API doesn't need to be BLAS-centric though, as long as it does the job. C or Fortran preferred, but C++ is also ok.
I looked at MKL, scipy.sparse, uBLAS and Eigen3, but they either didn't support what I need or I couldn't figure out whether they do.
发布评论
评论(2)
很抱歉让您失望了,但据我所知,恐怕答案是否定的。我对稀疏数据进行了广泛的研究,但没有找到任何用于稀疏矩阵操作的深层库(即 BLAS 级别)。比BLAS更高层次,有Matlab、R、Python等语言的广泛支持。
据我所知,这是由于稀疏矩阵的类型(分散矩阵、对称矩阵、带状矩阵或三对角矩阵、块对角矩阵)、其内容(二进制、整数、实数)及其数学属性(例如正定矩阵)的变化而产生的。 - 不保证,满级 - 不常见)等往往会使优化变得复杂。
相反,我倾向于编写自己的代码来处理稀疏矩阵,重新使用我可以使用的存储和乘法等简单计算。
随着时间的推移,一个好的低级库将会出现,但我还没有看到它。
I'm sorry to disappoint, but, as far as I can tell, I am afraid the answer is no. I've worked extensively with sparse data and have not found any deep libraries (i.e. BLAS-level) for sparse matrix manipulations. At a higher level than BLAS, there is extensive support in Matlab, R, Python, and other languages.
From what I've seen, this arises because of the variations in the types of sparse matrices (scattered, symmetric, banded or tridiagonal, block diagonal), their contents (binary, integer, real), and their mathematical properties (e.g. positive definite - not guaranteed, full rank - not common), etc. tends to complicate the optimizations.
Instead, I tend to write my own code for processing sparse matrices, re-using what I can for the storage and simple computations like multiplication.
In time, a good low-level library will arise, but I've not yet seen it.
有稀疏的 blas 实现
http://software.intel.com/sites/products/documentation/hpc/compilerpro/en-us/cpp/win/mkl/refman/bla/bla_SBLAS2-3.html
There are sparse blas implementations
http://software.intel.com/sites/products/documentation/hpc/compilerpro/en-us/cpp/win/mkl/refman/bla/bla_SBLAS2-3.html