Developer Reference for Intel® oneAPI Math Kernel Library for Fortran

ID 766686
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

call mkl_scsrsky(job, m, acsr, ja, ia, asky, pointers, info)

call mkl_dcsrsky(job, m, acsr, ja, ia, asky, pointers, info)

call mkl_ccsrsky(job, m, acsr, ja, ia, asky, pointers, info)

call mkl_zcsrsky(job, m, acsr, ja, ia, asky, pointers, info)

Include Files

  • mkl.fi

Description

This routine is deprecated, but no replacement is available yet in the Inspector-Executor Sparse BLAS API interfaces. Either write your own 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

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.

job

INTEGER

Array, contains the following conversion parameters:

job(1)

If job(1)=0, the matrix in the CSR format is converted to the skyline format;

if job(1)=1, the matrix in the skyline format is converted to the CSR format.

job(2)

If job(2)=0, zero-based indexing for the matrix in CSR format is used;

if job(2)=1, one-based indexing for the matrix in CSR format is used.

job(3)

If job(3)=0, zero-based indexing for the matrix in the skyline format is used;

if job(3)=1, one-based indexing for the matrix in the skyline format is used.

job(4)

For conversion to the skyline format:

If job(4)=0, the upper part of the matrix A in the CSR format is converted.

If job(4)=1, the lower part of the matrix A in the CSR format is converted.

For conversion to the CSR format:

If job(4)=0, the matrix is converted to the upper part of the matrix A in the CSR format.

If job(4)=1, the matrix is converted to the lower part of the matrix A in the CSR format.

job(5)

job(5)=nzmax - maximum number of the non-zero elements of the matrix A if job(1)=0.

job(6) - job indicator.

Only for conversion to the skyline format:

If job(6)=0, only arrays pointers is filled in for the output storage.

If job(6)=1, all output arrays asky and pointers are filled in for the output storage.

m

INTEGER. Dimension of the matrix A.

acsr

(input/output)

REAL for mkl_scsrsky.

DOUBLE PRECISION for mkl_dcsrsky.

COMPLEX for mkl_ccsrsky.

DOUBLE COMPLEX for mkl_zcsrsky.

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)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.

ia

(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 elementia(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.

asky

(input/output)

REAL for mkl_scsrsky.

DOUBLE PRECISION for mkl_dcsrsky.

COMPLEX for mkl_ccsrsky.

DOUBLE COMPLEX for mkl_zcsrsky.

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)INTEGER.

Array with dimension (m+1), where m is number of rows for lower triangle (columns for upper triangle), pointers(i) - pointers(1) + 1 gives the index of element in the array asky that is first non-zero element in row (column)i . The value of pointers(m + 1) is set to nnz + pointers(1), 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. 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.

Interfaces

FORTRAN 77:

SUBROUTINE mkl_scsrsky(job, m, acsr, ja, ia, asky, pointers, info)
  INTEGER      job(8)
  INTEGER      m, info
  INTEGER      ja(*), ia(m+1), pointers(m+1)
  REAL         acsr(*), asky(*)

SUBROUTINE mkl_dcsrsky(job, m, acsr, ja, ia, asky, pointers, info)
  INTEGER      job(8)
  INTEGER      m, info
  INTEGER      ja(*), ia(m+1), pointers(m+1)
  DOUBLE PRECISION       acsr(*), asky(*)

SUBROUTINE mkl_ccsrsky(job, m, acsr, ja, ia, asky, pointers, info)
  INTEGER      job(8)
  INTEGER      m, info
  INTEGER      ja(*), ia(m+1), pointers(m+1)
  COMPLEX      acsr(*), asky(*)

SUBROUTINE mkl_zcsrsky(job, m, acsr, ja, ia, asky, pointers, info)
  INTEGER      job(8)
  INTEGER      m, info
  INTEGER      ja(*), ia(m+1), pointers(m+1)
  DOUBLE COMPLEX       acsr(*), asky(*)