/[escript]/trunk/cusplibrary/README.md
ViewVC logotype

Annotation of /trunk/cusplibrary/README.md

Parent Directory Parent Directory | Revision Log Revision Log


Revision 5148 - (hide annotations)
Mon Sep 15 01:25:23 2014 UTC (6 years, 2 months ago) by caltinay
File size: 1289 byte(s)
Merging ripley diagonal storage + CUDA support into trunk.
Options file version has been incremented due to new options
'cuda' and 'nvccflags'.

1 caltinay 4955 CUSP : A C++ Templated Sparse Matrix Library
2     ============================================
3    
4     Cusp is a library for sparse linear algebra and graph computations on CUDA. Cusp provides a flexible,
5     high-level interface for manipulating sparse matrices and solving sparse linear systems.
6    
7     Examples
8     --------
9    
10     ```c++
11     #include <cusp/hyb_matrix.h>
12     #include <cusp/io/matrix_market.h>
13     #include <cusp/krylov/cg.h>
14    
15     int main(void)
16     {
17     // create an empty sparse matrix structure (HYB format)
18     cusp::hyb_matrix<int, float, cusp::device_memory> A;
19    
20     // load a matrix stored in MatrixMarket format
21     cusp::io::read_matrix_market_file(A, "5pt_10x10.mtx");
22    
23     // allocate storage for solution (x) and right hand side (b)
24     cusp::array1d<float, cusp::device_memory> x(A.num_rows, 0);
25     cusp::array1d<float, cusp::device_memory> b(A.num_rows, 1);
26    
27     // solve the linear system A * x = b with the Conjugate Gradient method
28     cusp::krylov::cg(A, x, b);
29    
30     return 0;
31     }
32     ```
33    
34     Refer to the [Quick Start Guide](https://github.com/cusplibrary/cusplibrary/wiki/Quick-Start-Guide) page for further information and examples.
35    
36     Contributors
37     ------------
38    
39     The primary developers of Cusp are [Steven Dalton](http://github.com/sdalton1) and [Nathan Bell](http://research.nvidia.com/users/nathan-bell).

  ViewVC Help
Powered by ViewVC 1.1.26