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,
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.