Developer Reference for Intel® oneAPI Math Kernel Library for C

ID 766684
Date 3/31/2023
Public

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

Document Table of Contents

mkl_graph_matrix_get_csc

Exports a CSC representation of a graph matrix.

Syntax

mkl_graph_status_t mkl_graph_matrix_get_csc (mkl_graph_matrix_t A, int64_t *nrows, int64_t *ncols, void **cols_start, mkl_graph_type_t *cols_start_type, void **row_indx, mkl_graph_type_t *row_indx_type, void **values, mkl_graph_type_t *values_type);

Include Files
  • mkl_graph.h

Description

The mkl_graph_matrix_get_csc routine exports the CSC representation of a graph matrix in the 3-array variation. All output arguments are optional and will not be used if NULL pointers are passed. For each array in the 3-array CSC format (cols_start, row_indx or values) the type of the elements can be obtained from a corresponding parameter of type mkl_graph_type_t.

Refer to Sparse Matrix Storage Formats for further details on the CSC format.

NOTE:

The routine mkl_graph_matrix_get_csc does not change the ownership of the data. In particular, you should not directly deallocate the returned pointers. A call to mkl_graph_matrix_destroy handles freeing any data allocated by Intel® oneAPI Math Kernel Library.

NOTE:

If only information about the number of rows or the number of columns is needed, mkl_graph_matrix_get_property can be used instead of mkl_graph_matrix_get_csc.

Input Parameters
A

A graph matrix from which data are retrieved.

Output Parameters
nrows

Number of rows in the matrix. Ignored if NULL is passed.

ncols

Number of columns in the matrix. Ignored if NULL is passed.

cols_start

A pointer to an array of length at least (n+1), where n is the number of columns in the matrix. The value of cols_start[j] is the index of the first non-zero entry in column j in the arrays row_indx and values. The value cols_start[n]- cols_start[0] will be the total number of non-zero entries in the matrix. Type of the array elements can be deduced from cols_start_type.

Ignored if NULL.

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

cols_start_type

Type of the elements of the cols_start array. Refer to Graph API Glossary for a list of possible options. Ignored if NULL is passed.

row_indx

A pointer to an array which contains zero-based column indices for the non-zero entries of the matrix A. Type of the array elements can be deduced from row_indx_type. Ignored if NULL.

Refer to the rows array description in CSC Format for more details.

row_indx_type

Type of the elements of the row_indx array. Refer to Graph API Glossary for a list of possible options. Ignored if NULL is passed.

values

A pointer to an array which contains values for the nonzero entries of the matrix A. The type of the array elements can be deduced from values_type.

Ignored if NULL.

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

values_type

Type of the elements of the values array. Refer to Graph API Glossary for a list of possible options. Ignored if NULL is passed.

Return Values

The function returns a value indicating whether the operation was successful or not and why. Refer to Graph API Glossary for a list of possible options.

Product and Performance Information

Performance varies by use, configuration and other factors. Learn more at www.Intel.com/PerformanceIndex.

Notice revision #20201201