Developer Reference

  • 0.10
  • 10/21/2020
  • Public Content
Contents

mkl_graph_vector_set_sparse

Updates a graph vector with the data in a sparse format.

Syntax

mkl_graph_status_t
mkl_graph_vector_set_sparse (mkl_graph_vector_t
v
,
int64_t
dim
,
int64_t
nnz
,
void *
indices
,
mkl_graph_type_t
indices_type
,
void *
values
,
mkl_graph_type_t
values_type
);
Include Files
  • mkl_graph.h
Description
The
mkl_graph_vector_set_sparse
routine updates sparse data (indices and values of the entries present) associated with a graph vector
v
. The sparse representation of a vector comprises two arrays, one of the indices and one of the values of the non-zero entries.
All arguments except the input graph vector
v
, vector’s dimension
dim
and the number of non-zero elements
nnz
are optional and will not be used if they are not set. This means that if NULL is passed for one of the array's
indices
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
never deallocates user-allocated memory.
The input graph vector must be created via a call to
mkl_graph_vector_create
before calling
mkl_graph_vector_set_sparse
.
If the vector already has the specified format on entry to the routine, the existing data is replaced by the new data.
Input Parameters
v
A graph vector to be modified.
dim
Dimension of the vector.
nnz
Number of non-zero entries in the vector.
indices
A pointer to the start of the
indices
array. The array must be of length at least
nnz
. The array contains zero-based indices for the non-zero entries in the vector
v
. The type of the array elements is derived from the
indices_type
argument. Ignored if NULL.
indices_type
Type of the elements of
indices
array. Refer to Graph API Glossary for a list of possible options. Ignored if NULL is passed for
indices
.
values
A pointer to the start of the
values
array. The array must be of length at least
nnz
. The array contains values for the non-zero entries in the vector
v
. The type of the array elements is derived from the
values_type
argument. Ignored if NULL.
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
v
A graph vector with the updated data in the sparse 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