Converts a sparse matrix in the CSR format to the coordinate format and vice versa (deprecated).

Syntax

void mkl_scsrcoo (const MKL_INT *job , const MKL_INT *n , float *acsr , MKL_INT *ja , MKL_INT *ia , MKL_INT *nnz , float *acoo , MKL_INT *rowind , MKL_INT *colind , MKL_INT *info );

void mkl_dcsrcoo (const MKL_INT *job , const MKL_INT *n , double *acsr , MKL_INT *ja , MKL_INT *ia , MKL_INT *nnz , double *acoo , MKL_INT *rowind , MKL_INT *colind , MKL_INT *info );

void mkl_ccsrcoo (const MKL_INT *job , const MKL_INT *n , MKL_Complex8 *acsr , MKL_INT *ja , MKL_INT *ia , MKL_INT *nnz , MKL_Complex8 *acoo , MKL_INT *rowind , MKL_INT *colind , MKL_INT *info );

void mkl_zcsrcoo (const MKL_INT *job , const MKL_INT *n , MKL_Complex16 *acsr , MKL_INT *ja , MKL_INT *ia , MKL_INT *nnz , MKL_Complex16 *acoo , MKL_INT *rowind , MKL_INT *colind , MKL_INT *info );

Include Files

  • mkl.h

Description

This routine is deprecated. Use the matrix manipulation routines from the Intel MKL Inspector-executor Sparse BLAS interface instead.

This routine converts a sparse matrix A stored in the compressed sparse row (CSR) format (3-array variation) to coordinate format and vice versa.

Input Parameters

job

Array, contains the following conversion parameters:

job[0]

If job[0]=0, the matrix in the CSR format is converted to the coordinate format;

if job[0]=1, the matrix in the coordinate format is converted to the CSR format.

if job[0]=2, the matrix in the coordinate format is converted to the CSR format, and the column indices in CSR representation are sorted in the increasing order within each row.

job[1]

If job[1]=0, zero-based indexing for the matrix in CSR format is used;

if job[1]=1, one-based indexing for the matrix in CSR format is used.

job[2]

If job[2]=0, zero-based indexing for the matrix in coordinate format is used;

if job[2]=1, one-based indexing for the matrix in coordinate format is used.

job[4]

job[4]=nzmax - maximum number of the non-zero elements allowed if job[0]=0.

job[5] - job indicator.

For conversion to the coordinate format:

If job[5]=1, only array rowind is filled in for the output storage.

If job[5]=2, arrays rowind, colind are filled in for the output storage.

If job[5]=3, all arrays rowind, colind, acoo are filled in for the output storage.

For conversion to the CSR format:

If job[5]=0, all arrays acsr, ja, ia are filled in for the output storage.

If job[5]=1, only array ia is filled in for the output storage.

If job[5]=2, then it is assumed that the routine already has been called with the job[5]=1, and the user allocated the required space for storing the output arrays acsr and ja.

n

Dimension of the matrix A.

nnz

Specifies the number of non-zero elements of the matrix A for job[0]0.

Refer to nnz description in Coordinate Format for more details.

acsr

(input/output)

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.

ja

(input/output). For job[1] = 1 (one-based indexing for the matrix in CSR format), array containing the column indices plus one for each non-zero element of the matrix A.

For job[1] = 0 (zero-based indexing for the matrix in CSR format), 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.

ia

(input/output). Array of length n + 1, containing indices of elements in the array acsr, such that ia[i] - ia[0] is the index in the array acsr of the first non-zero element from the row i. The value of the last element ia[n] - ia[0] is equal to the number of non-zeros plus one. Refer to rowIndex array description in Sparse Matrix Storage Formats for more details.

acoo

(input/output)

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.

rowind

(input/output). Array of length nnz, contains the row indices for each non-zero element of the matrix A.

Refer to rows array description in Coordinate Format for more details.

colind

(input/output). Array of length nnz, contains the column indices for each non-zero element of the matrix A. Refer to columns array description in Coordinate Format for more details.

Output Parameters

nnz

Returns the number of converted elements of the matrix A for job[0]=0.

info

Integer info indicator only for converting the matrix A from the CSR format.

If info=0, the execution is successful.

If info=1, the routine is interrupted because there is no space in the arrays acoo, rowind, colind according to the value nzmax.

Para obter informações mais completas sobre otimizações do compilador, consulte nosso aviso de otimização.
Selecione a cor do botão adesivo: 
Orange (only for download buttons)