Community
cancel
Showing results for 
Search instead for 
Did you mean: 
JBervel
Beginner
39 Views

Zero Matrix CSR Format

Hi,

in order to implement a generic algorithm, I need to define the zero matrix in CSR format. Is it possible?

I have defined it with null arrays for elements, rows, etc.... but when I try to call the function mkl_sparse_d_add it crashes with  SPARSE_STATUS_NOT_INITIALIZED error.

How can I define the zero matrix in csr format?

Thanks in advance,

Joaquin

0 Kudos
1 Reply
mecej4
Black Belt
39 Views

I have defined it with null arrays for elements, rows, etc.

That would not work. There is a difference between a matrix that has no rows, columns or values and a matrix of a known size with zero values.

At the least, specify the matrix size correctly, provide correct index values (row index, columns) and provide as many zero values for as many matrix entries as the sparse representation requires. For example, some sparse matrix routines in MKL require that all diagonal entries of symmetric matrices be supplied, including those that are zero.