mkl_graph_matrix_set_csr
mkl_graph_matrix_set_csr
Updates a graph matrix with the data in CSR format.
Syntax
mkl_graph_status_t
mkl_graph_matrix_set_csr (mkl_graph_matrix_t
A
,
int64_t
nrows
,
int64_t
ncols
,
void
*rows_start
,
mkl_graph_type_t
rows_start_type
,
void
*col_indx
,
mkl_graph_type_t
col_indx_type
,
void
*values
,
mkl_graph_type_t
values_type
);
Include Files
- mkl_graph.h
Description
The
mkl_graph_matrix_set_csr
routine updates CSR 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 CSR arrays rows_start
, col_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 never deallocates user-allocated memory.
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® oneAPI Math Kernel Library
Refer to Sparse Matrix Storage Formats for further details on the CSR format.
The graph matrix must be created via a call to
mkl_graph_matrix_create
before calling mkl_graph_matrix_set_csr
.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.
- rows_start
- A pointer to the start of therows_startarray. The array must be of length at least (nrows+1). The array contains row indices such thatrows_start[i] is the index of the first non-zero entry in rowiin the arrayscol_indxandvalues. Or, in other words,rows_start[i+1] -rows_start[i] is always the number of non-zero elements in rowiand the valuerows_start[nrows]-rows_start[0] should be the total number of non-zero entries in the matrix. The type of the array elements is derived from therows_start_typeargument.Ignored if NULL.Refer topointerBarray description in CSR Format for more details.
- rows_start_type
- Type of the elements inrows_startarray. Refer to Graph API Glossary for a list of possible options. Ignored ifrows_startis NULL.
- col_indx
- A pointer to the start of thecol_indxarray. The array must be of length at leastrows_start[nrows]-rows_start[0]. The array contains zero-based column indices for the non-zero entries of the matrixA. The type of the array elements is derived from thecol_indx_typeargument. Ignored if NULL.Refer tocolumnsarray description in CSR Format for more details.
- col_indx_type
- Type of the elements ofcol_indxarray. Refer to Graph API Glossary for a list of possible options. Ignored ifcol_indxis NULL.
- values
- A pointer to the start of thevaluesarray. The array must be of length at leastrows_start[nrows]-rows_start[0]. The array contains values for the non-zero entries of the matrixA. The type of the array elements is derived from thevalues_typeargument. Ignored if NULL.Refer tovaluesarray description in CSR Format for more details.
- values_type
- Type of the elements of thevaluesarray. Refer to Graph API Glossary for a list of possible options. Ignored if NULL is passed forvalues.
Output Parameters
- A
- A graph matrix with the updated data in CSR 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.