XLPack 7.0
XLPack Numerical Library (C API) Reference Manual
Loading...
Searching...
No Matches

◆ z_dense_csr()

void z_dense_csr ( int  m,
int  n,
int  lda,
const doublecomplex  a[],
int  maxnnz,
doublecomplex  val[],
int  rowptr[],
int  colind[],
int  base,
int *  info 
)

Dense matrix -> CSR (Complex matrices)

Purpose
This routine converts the dense matrix to the sparse matrix in CSR format.
Parameters
[in]mNumber of rows of the matrix. (m >= 0) (if m = 0, returns without computation)
[in]nNumber of columns of the matrix. (n >= 0) (if n = 0, returns without computation)
[in]ldaLeading dimension of array a[][]. (lda >= m)
[in]a[][]Array a[la][lda] (la >= n)
Input matrix.
[in]maxnnzSize of arrays val[] and colind[] (must be greater than the number of nonzero elements of the input matrix). (maxnnz > 0)
[out]val[]Array val[lval] (lval >= maxnnz)
Values of nonzero elements of output matrix in CSR format.
[out]rowptr[]Array rowptr[lrowptr] (lrowptr >= m + 1)
Row pointers of output matrix in CSR format.
[out]colind[]Array colind[lcolind] (lcolind >= maxnnz)
Column indices of output matrix in CSR format.
[in]baseIndexing of rowptr[] and colind[].
= 0: Zero-based (C style) indexing: Starting index is 0.
= 1: One-based (Fortran style) indexing: Starting index is 1.
[out]info= 0: Successful exit.
= i < 0: The (-i)-th argument is invalid.
= 10: Insufficient outout array size (maxnnz is too small).