Visible to Intel only — GUID: GUID-3600AF68-D33B-4003-9ADE-27A766F5EF0B
Visible to Intel only — GUID: GUID-3600AF68-D33B-4003-9ADE-27A766F5EF0B
oneapi::mkl::sparse::update_diagonal_values
Changes the values of the entries on the main diagonal of a sparse matrix. This routine also updates any data structures related to optimizations that have already been done (such as with oneapi::mkl::sparse::optimize_trsv or oneapi::mkl::sparse::optimize_gemv).
Description
The oneapi::mkl::sparse::update_diagonal_values routine changes the values of the entries on the main diagonal of a sparse matrix. The existing sparse structure must already have all diagonal entries included in the sparsity pattern.
API
Syntax
Using SYCL buffers:
namespace oneapi::mkl::sparse { void update_diagonal_values( sycl::queue &queue, oneapi::mkl::sparse::matrix_handle_t handle, sycl::buffer<DATA_TYPE, 1> &new_diag_values); }
Using USM pointers:
namespace oneapi::mkl::sparse { sycl::event update_diagonal_values( sycl::queue &queue, oneapi::mkl::sparse::matrix_handle_t handle, std::int64_t length, const DATA_TYPE* new_diag_values, const std::vector<sycl::event> &dependencies = {}); }
Include Files
oneapi/mkl/spblas.hpp
Input Parameters
- queue
-
Specifies the SYCL command queue which will be used for SYCL kernels execution.
- handle
-
Handle to object containing sparse matrix and other internal data. Created using one of the oneapi::mkl::sparse::set_<sparse_matrix_type>_data routines.
NOTE:Currently, the only supported matrix format for <sparse_matrix_type> is the csr format. - new_diag_values
-
SYCL buffer or device-accessible USM pointer of size at least equal to the smaller of the number of rows and number of columns of the input matrix.
- length
-
Length of the input vector new_diag_values. Must be at least equal to the smaller of the number of rows and number of columns of the input matrix.
- dependencies
-
A vector of type std::vector<sycl::event> containing the list of events that the oneapi::mkl::sparse::update_diagonal_values routine depends on.
Return Values (USM Only)
- sycl::event
-
SYCL event which can be waited upon or added as a dependency for the completion of the update_diagonal_values routine.