Convert a sparse matrix in dense representation to the CSR format and vice versa.
Fortran:
call mkl_sdnscsr(job, m, n, adns, lda, acsr, ja, ia, info)
call mkl_ddnscsr(job, m, n, adns, lda, acsr, ja, ia, info)
call mkl_cdnscsr(job, m, n, adns, lda, acsr, ja, ia, info)
call mkl_zdnscsr(job, m, n, adns, lda, acsr, ja, ia, info)
C:
mkl_sdnscsr(job, &m, &n, adns, &lda, acsr, ja, ia, &info);
mkl_ddnscsr(job, &m, &n, adns, &lda, acsr, ja, ia, &info);
mkl_cdnscsr(job, &m, &n, adns, &lda, acsr, ja, ia, &info);
mkl_zdnscsr(job, &m, &n, adns, &lda, acsr, ja, ia, &info);
The FORTRAN 77 interfaces are specified in the mkl_spblas.fi include file and the C interfaces are specified in the mkl_spblas.h include file.
This routine converts an sparse matrix stored as a rectangular m-by-n matrix A (dense representation) to the compressed sparse row (CSR) format (3-array variation) and vice versa.
Parameter descriptions are common for all implemented interfaces with the exception of data types that refer here to the FORTRAN 77 standard types. Data types specific to the different interfaces are described in the section "Interfaces" below.
INTEGER
Array, contains the following conversion parameters:
job(1)
If job(1)=0, the rectangular matrix A is converted to the CSR format;
if job(1)=1, the rectangular matrix A is restored from the CSR format.
job(2)
If job(2)=0, zero-based indexing for the rectangular matrix A is used;
if job(2)=1, one-based indexing for the rectangular matrix A is used.
job(3)
If job(3)=0, zero-based indexing for the matrix in CSR format is used;
if job(3)=1, one-based indexing for the matrix in CSR format is used.
job(4)
If job(4)=0, adns is a lower triangular part of matrix A;
If job(4)=1, adns is an upper triangular part of matrix A;
If job(4)=2, adns is a whole matrix A.
job(5)
job(5)=nzmax - maximum number of the non-zero elements allowed if job(1)=0.
job(6) - job indicator for conversion to CSR format.
If job(6)=0, only array ia is generated for the output storage.
If job(6)>0, arrays acsr, ia, ja are generated for the output storage.
INTEGER. Number of rows of the matrix A.
INTEGER. Number of columns of the matrix A.
(input/output)
REAL for mkl_sdnscsr.
DOUBLE PRECISION for mkl_ddnscsr.
COMPLEX for mkl_cdnscsr.
DOUBLE COMPLEX for mkl_zdnscsr.
Array containing non-zero elements of the matrix A.
(input/output)INTEGER. Specifies the leading dimension of adns as declared in the calling (sub)program, must be at least max(1, m).
(input/output)
REAL for mkl_sdnscsr.
DOUBLE PRECISION for mkl_ddnscsr.
COMPLEX for mkl_cdnscsr.
DOUBLE COMPLEX for mkl_zdnscsr.
Array containing non-zero elements of the matrix A. Its length is equal to the number of non-zero elements in the matrix A. Refer to values array description in Sparse Matrix Storage Formats for more details.
(input/output)INTEGER. Array containing the column indices for each non-zero element of the matrix A.
Its length is equal to the length of the array acsr. Refer to columns array description in Sparse Matrix Storage Formats for more details.
(input/output)INTEGER. Array of length m + 1, containing indices of elements in the array acsr, such that ia(I) is the index in the array acsr of the first non-zero element from the row I. The value of the last element ia(m + 1) is equal to the number of non-zeros plus one. Refer to rowIndex array description in Sparse Matrix Storage Formats for more details.
INTEGER. Integer info indicator only for restoring the matrix A from the CSR format.
If info=0, the execution is successful.
If info=i, the routine is interrupted processing the i-th row because there is no space in the arrays adns and ja according to the value nzmax.
SUBROUTINE mkl_sdnscsr(job, m, n, adns, lda, acsr, ja, ia, info)
INTEGER job(8)
INTEGER m, n, lda, info
INTEGER ja(*), ia(m+1)
REAL adns(*), acsr(*)
SUBROUTINE mkl_ddnscsr(job, m, n, adns, lda, acsr, ja, ia, info)
INTEGER job(8)
INTEGER m, n, lda, info
INTEGER ja(*), ia(m+1)
DOUBLE PRECISION adns(*), acsr(*)
SUBROUTINE mkl_cdnscsr(job, m, n, adns, lda, acsr, ja, ia, info)
INTEGER job(8)
INTEGER m, n, lda, info
INTEGER ja(*), ia(m+1)
COMPLEX adns(*), acsr(*)
SUBROUTINE mkl_zdnscsr(job, m, n, adns, lda, acsr, ja, ia, info)
INTEGER job(8)
INTEGER m, n, lda, info
INTEGER ja(*), ia(m+1)
DOUBLE COMPLEX adns(*), acsr(*)
void mkl_sdnscsr(int *job, int *m, int *n, float *adns,
int *lda, float *acsr, int *ja, int *ia, int *info);
void mkl_ddnscsr(int *job, int *m, int *n, double *adns,
int *lda, double *acsr, int *ja, int *ia, int *info);
void mkl_cdnscsr(int *job, int *m, int *n, MKL_Complex8 *adns,
int *lda, MKL_Complex8 *acsr, int *ja, int *ia, int *info);
void mkl_zdnscsr(int *job, int *m, int *n, MKL_Complex16 *adns,
int *lda, MKL_Complex16 *acsr, int *ja, int *ia, int *info);
Copyright © 1994 - 2011, Intel Corporation. All rights reserved.