Developer Reference for Intel® oneAPI Math Kernel Library for C

ID 766684
Date 12/16/2022
Public

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

Document Table of Contents

mkl_?csrcsc

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

Syntax

void mkl_dcsrcsc (const MKL_INT *job , const MKL_INT *n , double *acsr , MKL_INT *ja , MKL_INT *ia , double *acsc , MKL_INT *ja1 , MKL_INT *ia1 , MKL_INT *info );

void mkl_scsrcsc (const MKL_INT *job , const MKL_INT *n , float *acsr , MKL_INT *ja , MKL_INT *ia , float *acsc , MKL_INT *ja1 , MKL_INT *ia1 , MKL_INT *info );

void mkl_ccsrcsc (const MKL_INT *job , const MKL_INT *n , MKL_Complex8 *acsr , MKL_INT *ja , MKL_INT *ia , MKL_Complex8 *acsc , MKL_INT *ja1 , MKL_INT *ia1 , MKL_INT *info );

void mkl_zcsrcsc (const MKL_INT *job , const MKL_INT *n , MKL_Complex16 *acsr , MKL_INT *ja , MKL_INT *ia , MKL_Complex16 *acsc , MKL_INT *ja1 , MKL_INT *ia1 , MKL_INT *info );

Include Files
  • mkl.h
Description

This routine is deprecated. Use the matrix manipulation routinesfrom the Intel® oneAPI Math Kernel Library Inspector-executor Sparse BLAS interface instead.

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

if job[0]=1, the matrix in the CSC 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 CSC format is used;

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

job[5] - job indicator.

For conversion to the CSC format:

If job[5]=0, only arrays ja1, ia1 are filled in for the output storage.

If job[5]≠0, all output arrays acsc, ja1, and ia1 are filled in for the output storage.

For conversion to the CSR format:

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

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

m

Dimension of the square matrix A.

acsr

(input/output)

Array containing non-zero elements of the square 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.

acsc

(input/output)

Array containing non-zero elements of the square 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.

ja1

(input/output). Array containing the row indices for each non-zero element of the matrix A.

Its length is equal to the length of the array acsc. Refer to columns array description in Sparse Matrix Storage Formats for more details.

ia1

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

Output Parameters
info

This parameter is not used now.