Skip to content

Commit

Permalink
Add comments
Browse files Browse the repository at this point in the history
  • Loading branch information
uhetmaniuk committed Aug 6, 2021
1 parent 7a9f4dc commit 2cf01eb
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions example/wiki/sparse/KokkosSparse_wiki_bsrmatrix.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,19 @@ int main() {

Ordinal numRows = 10;

//
// This code will generate a tri-diagonal matrix
//
// [ 1 -1 0 ....... 0 ]
// [ -1 2 -1 0 ... 0 ]
// [ ... ]
// [ 0 ... 0 -1 2 -1 ]
// [ 0 ..... 0 -1 1 ]
//
// The matrix will be stored as `KokkosSparse_CrsMatrix` (10 x 10 matrix).
// Then we will construct a `KokkosSparse_BsrMatrix` with block size 2.
//

{
const Offset numNNZ = 2 + (numRows - 2) * 3 + 2;
typename row_map_type::non_const_type row_map("row pointers", numRows + 1);
Expand Down

0 comments on commit 2cf01eb

Please sign in to comment.