/[escript]/branches/4.0fordebian/cusplibrary/README.md
ViewVC logotype

Contents of /branches/4.0fordebian/cusplibrary/README.md

Parent Directory Parent Directory | Revision Log Revision Log


Revision 5566 - (show annotations)
Fri Mar 27 00:35:24 2015 UTC (4 years ago) by jfenwick
File size: 1289 byte(s)
Branch for changes dealing with hopefully debian packaging.

1 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