What you need to know to use these subprograms

Consider, for example, the 5 x 4 matrix:

Table 4-9

5 x 4 Matrix

 

 

 

 

11

12

0

14

 

21

22

0

0

 

0

0

33

34

 

0

0

0

44

 

51

52

0

54

This matrix could be represented in DIA format (using ndiag = 6) as:

Table 4-10 DIA Format Matrix

idiag=

-4

-3

-1

0

1

3

val=

-

-

21

11

12

14

 

-

-

0

22

0

-

 

-

0

0

33

34

0

 

51

52

54

44

-

-

ELL- Ellpack-Itpack.Given a sparse m-by-kmatrix A with maxnz nonzero elements in any row, the ELL format stores the nonzero entries of A row by row. Two arrays are required for the ELL representation:

val( lda,*) - Two dimensional lda-by-maxnzscalar array where lda is greater or equal to m. The first entries in row val( i, :) consist of nonzero elements in row i of A.

indx( lda, *) - Two dimensional lda-by-maxnzinteger array where row indx( i, :) stores column indices for row i of A: indx( i, j) corresponds to the column index of val( i, j). If a row has t nonzero elements with t less than maxnz, then indx( i, t+1) is set to a negative value.

Chapter 4 Sparse BLAS Operations 429