Visible to Intel only — GUID: GUID-79EDA19D-D340-4D33-AB7F-638629D79CFE
Visible to Intel only — GUID: GUID-79EDA19D-D340-4D33-AB7F-638629D79CFE
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® oneAPI Math Kernel Library (oneMKL) 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.
Product and Performance Information |
---|
Performance varies by use, configuration and other factors. Learn more at www.Intel.com/PerformanceIndex. Notice revision #20201201 |