Developer Reference

  • 2020.2
  • 07/15/2020
  • Public Content
Contents

mkl_graph_matrix_set_csc

Updates a graph matrix with the data in CSC format.

Syntax

mkl_graph_status_t
mkl_graph_matrix_set_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_set_csc
routine updates CSC data (in the 3-array variation) associated with a graph matrix
A
. All arguments except the input graph matrix
A
and the matrix dimensions
nrows
and
ncols
are optional and will not be used if they are not set. This means that if NULL is passed for one of the CSC arrays
cols_start
,
row_indx
or
values
, this argument, as well as the corresponding argument of type
mkl_graph_type_t
, will be ignored.
The library assumes any buffers passed as arguments to
mkl_graph_?_set_?
routines persist for the life of the input graph object or until the next call to an
mkl_graph_?_set_?
routine for an existing format. Calling a set routine on an existing format resets the data of the graph object to the new data. After destroying the graph object or resetting its data, you can safely deallocate data used as input to an
mkl_graph_?_set_?
routine.
Intel® MKL
never deallocates user-allocated memory.
Refer to Sparse Matrix Storage Formats for further details on the CSC format.
The graph matrix must be created via a call to
mkl_graph_matrix_create
before calling
mkl_graph_matrix_set_csc
.
If the matrix already has the specified format on entry to the routine, the existing data is replaced by the new data and existing internal optimized data is deallocated. To create new optimized data after changing the matrix data, call a corresponding
mkl_graph_optimize_?
routine.
Input Parameters
A
A graph matrix to be modified.
nrows
Number of rows in the matrix.
ncols
Number of columns in the matrix.
cols_start
A pointer to the start of the
cols_start
array. The array must be of length at least (
ncols
+
1
). The value
cols_start
[j]
is the index of the first non-zero entry in column j in the arrays
row_indx
and
values
. Or, in other words,
cols_start
[j+1]
-
cols_start
[j]
is the number of non-zero elements in the column
j
and the value
cols_start
[
ncols
]-
cols_start
[0]
should be the total number of non-zero entries in the matrix. The type of the array elements is derived from the
cols_start_type
argument.
Ignored if NULL.
Refer to
pointerB
array description in CSC Format for more details.
cols_start_type
Type of the elements in
cols_start
array. Refer to Graph API Glossary for a list of possible options. Ignored if
cols_start
is NULL.
row_indx
A pointer to the start of the
row_indx
array. The array must be of length at least
cols_start
[
ncols
]-
cols_start
[
0
]. The array contains zero-based row indices for the non-zero entries of the matrix
A
. The type of the array elements is derived from the
row_indx_type
argument. Ignored if NULL.
Refer to
rows
array description in CSC Format for more details.
row_indx_type
Type of the elements of
row_indx
array. Refer to Graph API Glossary for a list of possible options. Ignored if
row_indx
is NULL.
values
A pointer to the start of the
values
array. The array must be of length at least
cols_start
[
ncols
]-
cols_start
[
0
]. The array contains values for the non-zero entries of the matrix
A
. The type of the array elements is derived from the
values_type
argument. Ignored if NULL.
Refer to
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 for
values
.
Output Parameters
A
A graph matrix with the updated data in CSC Format.
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.
Optimization Notice
Intel's compilers may or may not optimize to the same degree for non-Intel microprocessors for optimizations that are not unique to Intel microprocessors. These optimizations include SSE2, SSE3, and SSSE3 instruction sets and other optimizations. Intel does not guarantee the availability, functionality, or effectiveness of any optimization on microprocessors not manufactured by Intel. Microprocessor-dependent optimizations in this product are intended for use with Intel microprocessors. Certain optimizations not specific to Intel microarchitecture are reserved for Intel microprocessors. Please refer to the applicable product User and Reference Guides for more information regarding the specific instruction sets covered by this notice.
Notice revision #20110804
This notice covers the following instruction sets: SSE2, SSE4.2, AVX2, AVX-512.

Product and Performance Information

1

Intel's compilers may or may not optimize to the same degree for non-Intel microprocessors for optimizations that are not unique to Intel microprocessors. These optimizations include SSE2, SSE3, and SSSE3 instruction sets and other optimizations. Intel does not guarantee the availability, functionality, or effectiveness of any optimization on microprocessors not manufactured by Intel. Microprocessor-dependent optimizations in this product are intended for use with Intel microprocessors. Certain optimizations not specific to Intel microarchitecture are reserved for Intel microprocessors. Please refer to the applicable product User and Reference Guides for more information regarding the specific instruction sets covered by this notice.

Notice revision #20110804