Developer Reference for Intel® oneAPI Math Kernel Library for C

ID 766684
Date 3/22/2024
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

mkl_?csrsky

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

Syntax

void mkl_dcsrsky (const MKL_INT *job , const MKL_INT *m , double *acsr , MKL_INT *ja , MKL_INT *ia , double *asky , MKL_INT *pointers , MKL_INT *info );

void mkl_scsrsky (const MKL_INT *job , const MKL_INT *m , float *acsr , MKL_INT *ja , MKL_INT *ia , float *asky , MKL_INT *pointers , MKL_INT *info );

void mkl_ccsrsky (const MKL_INT *job , const MKL_INT *m , MKL_Complex8 *acsr , MKL_INT *ja , MKL_INT *ia , MKL_Complex8 *asky , MKL_INT *pointers , MKL_INT *info );

void mkl_zcsrsky (const MKL_INT *job , const MKL_INT *m , MKL_Complex16 *acsr , MKL_INT *ja , MKL_INT *ia , MKL_Complex16 *asky , MKL_INT *pointers , MKL_INT *info );

Include Files

  • mkl.h

Description

This routine is deprecated, but no replacement is available yet in the Inspector-Executor Sparse BLAS API interfaces. Either write your own (see the examples/c/sparse_blas/source/sparse_converters.c example for hints) or continue using this routine until a replacement is provided and this can be fully removed.

This routine converts a sparse matrix A stored in the compressed sparse row (CSR) format (3-array variation) to the skyline 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 skyline format;

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

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 the skyline format is used;

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

job[3]

For conversion to the skyline format:

If job[3]=0, the upper part of the matrix A in the CSR format is converted.

If job[3]=1, the lower part of the matrix A in the CSR format is converted.

For conversion to the CSR format:

If job[3]=0, the matrix is converted to the upper part of the matrix A in the CSR format.

If job[3]=1, the matrix is converted to the lower part of the matrix A in the CSR format.

job[4]

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

job[5] - job indicator.

Only for conversion to the skyline format:

If job[5]=0, only arrays pointers is filled in for the output storage.

If job[5]=1, all output arrays asky and pointers are filled in for the output storage.

m

Dimension of the matrix A.

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). 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 m + 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 ia[m] - ia[0] is equal to the number of non-zeros. Refer to rowIndex array description in Sparse Matrix Storage Formats for more details.

asky

(input/output)

Array, for a lower triangular part of A it contains the set of elements from each row starting from the first none-zero element to and including the diagonal element. For an upper triangular matrix it contains the set of elements from each column of the matrix starting with the first non-zero element down to and including the diagonal element. Encountered zero elements are included in the sets. Refer to values array description in Skyline Storage Format for more details.

pointers

(input/output).

Array with dimension (m+1), where m is number of rows for lower triangle (columns for upper triangle), pointers[i-1] - pointers[0] gives the index of element in the array asky that is first non-zero element in row (column)i . The value of pointers[m] is set to nnz + pointers[0], where nnz is the number of elements in the array asky. Refer to pointers array description in Skyline Storage Format for more details

Output Parameters

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 array asky according to the value nzmax.