多尺度力学分享 http://blog.sciencenet.cn/u/thomaschoo2011 多尺度力学学习者

博文

Sparse Matrix 动态链接库精选

已有 2173 次阅读 2011-4-5 22:12 |个人分类:开源库|系统分类:科研笔记

Many people doing "serious" matrix stuff, rely on BLAS, adding LaPack / ATLAS (normal matrices) orUMFPACK (sparse matrices) for more advanced math. The reason is that this code is well-tested, stable, reliable, and quite fast. Furthermore, you can buy them directly from a vendor (e.g. Intel MKL) tuned towards your architecture, but also get them for free. uBLAS mentioned in Manuel's answer is probably the standard C++ wrapper around BLAS. And if you need something like LaPack later on, there arebindings to do so.
However, none of these classes ticks your box for being templated and easy to use. Actually, I must admit, that I tend to call the C / Fortran interface directly when I use a BLAS / LaPack implementation, since I don't see much advantage in the C++ wrapper.
If I a need a simple-to-use, general-purpose C++ matrix library, I tend to use Eigen (I used to use NewMatin the past). Advantages:
quite fast on Intel architecture, probably the fastest for smaller matricesnice interfacealmost everything you expect from a matrix libraryyou can easily add new typesDisadvantages (IMO):
single-processorslower for larger matrices and some advanced math than ATLAS (e.g. LU decomposition)only experimental support for sparse matrices.

SparseLib++ is a C++ class library for efficient sparse matrix computations across various computational platforms. The software package consists of matrix classes encompassing several sparse storage formats (e.g. compressed row, compressed column and coordinate formats), and providing basic functionality for managing sparse matrices. The Sparse BLAS Toolkit is used to for efficient kernel mathematical operations (e.g. sparse matrix-vector multiply) and to enhance portability and performance across a wide range of computer architectures. Included in the package are various preconditioners commonly used in iterative solvers for linear systems of equations. The focus is on computational support for iterative methods (for example, see IML++), but the sparse matrix objects presented here can be used in their own right.
SparseLib++ matrices can be built out of nearly any C++ matrix/vector classes; it is shipped with the MV++ classes by default.


https://wap.sciencenet.cn/blog-535627-429999.html


下一篇:如何创建C++库和调用C++库
收藏 IP: 222.26.180.*| 热度|

0

发表评论 评论 (0 个评论)

数据加载中...

Archiver|手机版|科学网 ( 京ICP备07017567号-12 )

GMT+8, 2024-5-24 06:27

Powered by ScienceNet.cn

Copyright © 2007- 中国科学报社

返回顶部