Developer Reference

  • 0.9
  • 09/09/2020
  • Public Content
Contents

mkl_sparse_?_update_values

Changes all or selected matrix values in internal representation.

Syntax

This routine is supported for sparse matrices in BSR format only.
sparse_status_t
mkl_sparse_s_update_values
(
sparse_matrix_t
A
,
MKL_INT
nvalues
,
MKL_INT
*indx
,
MKL_INT
*indy
,
float
*values
);
sparse_status_t
mkl_sparse_d_update_values
(
sparse_matrix_t
A
,
MKL_INT
nvalues
,
MKL_INT
*indx
,
MKL_INT
*indy
,
double
*values
);
sparse_status_t
mkl_sparse_c_update_values
(
sparse_matrix_t
A
,
MKL_INT
nvalues
,
MKL_INT
*indx
,
MKL_INT
*indy
,
MKL_Complex8
*values
);
sparse_status_t
mkl_sparse_z_update_values
(
sparse_matrix_t
A
,
MKL_INT
nvalues
,
MKL_INT
*indx
,
MKL_INT
*indy
,
MKL_Complex16
*values
);
Include Files
  • mkl_spblas.h
Description
Use the
mkl_sparse_?_update_values
routine to change all or selected values of a matrix in the internal Inspector-Executor Sparse BLAS format.
The values to be updated should already be present in the matrix structure.
  • To change selected values, you must provide an array values (with new values) and also the corresponding row and column indices for each value via
    indx
    and
    indy
    arrays as well as the overall number of changed elements
    nvalues
    .
    So that, for example, to change A(0, 0) to 1 and A(0, 1) to 2, pass the following input parameters:
    nvalues
    = 2,
    indx
    = {0, 0},
    indy
    = {0, 1} and
    values
    = {1, 2}.
  • To change all the values in the matrix, one can simply provide the
    values
    array, no need to supply
    indx
    and
    indy
    arrays.
Input Parameters
A
Specifies handle containing internal data.
nvalues
Total number of elements changed.
indx
Row indices for the new values.
Currently, only updating the full matrix is supported. Set
indx
and
indy
as NULL.
indy
Column indices for the new values.
Currently, only updating the full matrix is supported. Set
indx
and
indy
as NULL.
values
New values.
Output Parameters
A
Handle containing modified internal data.
Return Values
The function returns a value indicating whether the operation was successful or not, and why.
SPARSE_STATUS_SUCCESS
The operation was successful.
SPARSE_STATUS_NOT_INITIALIZED
The routine encountered an empty handle or matrix array.
SPARSE_STATUS_ALLOC_FAILED
Internal memory allocation failed.
SPARSE_STATUS_INVALID_VALUE
The input parameters contain an invalid value.
SPARSE_STATUS_EXECUTION_FAILED
Execution failed.
SPARSE_STATUS_INTERNAL_ERROR
An error in algorithm implementation occurred.
SPARSE_STATUS_NOT_SUPPORTED
The requested operation is not supported.

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