Developer Reference for Intel® oneAPI Math Kernel Library for Fortran

ID 766686
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_sparse_?_create_csc

Creates a handle for a CSC format matrix.

Syntax

stat = mkl_sparse_s_create_csc (A, indexing, rows, cols, cols_start, cols_end, row_indx, values)

stat = mkl_sparse_d_create_csc (A, indexing, rows, cols, cols_start, cols_end, row_indx, values)stat = mkl_sparse_c_create_csc (A, indexing, rows, cols, cols_start, cols_end, row_indx, values)stat = mkl_sparse_z_create_csc (A, indexing, rows, cols, cols_start, cols_end, row_indx, values)

Include Files
  • mkl_spblas.f90
Description

The mkl_sparse_?_create_csc routine creates a handle for an m-by-k matrix A in CSC format.

NOTE:

The input arrays provided are left unchanged except for the call to mkl_sparse_order, which performs ordering of column indexes of the matrix. To avoid any changes to the input data, use mkl_sparse_copy.

Input Parameters
<!-- -->indexing

sparse_index_base_t.

Indicates how input arrays are indexed.

SPARSE_INDEX_BASE_ZERO

Zero-based (C-style) indexing: indices start at 0.

SPARSE_INDEX_BASE_ONE

One-based (Fortran-style) indexing: indices start at 1.

rows

C_INT.

Number of rows of the matrix A.

cols

C_INT.

Number of columns of the matrix A.

cols_start

C_INT.

Array of length at least m. This array contains col indices, such that cols_start(i) - ind is the first index of col i in the arrays values and row_indx. ind takes 0 for zero-based indexing and 1 for one-based indexing.

Refer to pointerB array description in CSC Format for more details.

cols_end

C_INT.

Array of at least length m. This array contains col indices, such that cols_end(i) - ind - 1 is the last index of col i in the arrays values and row_indx. ind takes 0 for zero-based indexing and 1 for one-based indexing.

Refer to pointerE array description in CSC Format for more details.

row_indx

C_INT.

For one-based indexing, array containing the row indices plus one for each non-zero element of the matrix A. For zero-based indexing, array containing the row indices for each non-zero element of the matrix A. Its length is at least cols_end(cols - 1) - ind. ind takes 0 for zero-based indexing and 1 for one-based indexing.

values

C_FLOAT for mkl_sparse_s_create_csc

C_DOUBLE for mkl_sparse_d_create_csc

C_FLOAT_COMPLEX for mkl_sparse_c_create_csc

C_DOUBLE_COMPLEX for mkl_sparse_z_create_csc

Array containing non-zero elements of the matrix A. Its length is equal to length of the row_indx array.

Refer to values array description in CSC Format for more details.

Output Parameters
A

SPARSE_MATRIX_T.

Handle containing internal data.

stat

INTEGER

Value indicating whether the operation was successful or not, and why:

SPARSE_STATUS_SUCCESS

The operation was successful.

SPARSE_STATUS_NOT_INITIALIZED

The routine encountered an empty handle or matrix array.

SPARSE_STATUS_ALLOC_FAILED

Internal memory allocation failed.

SPARSE_STATUS_INVALID_VALUE

The input parameters contain an invalid value.

SPARSE_STATUS_EXECUTION_FAILED

Execution failed.

SPARSE_STATUS_INTERNAL_ERROR

An error in algorithm implementation occurred.

SPARSE_STATUS_NOT_SUPPORTED

The requested operation is not supported.