Visible to Intel only — GUID: GUID-9ADD21ED-60EC-4637-8948-41B3D73D7C0A
Visible to Intel only — GUID: GUID-9ADD21ED-60EC-4637-8948-41B3D73D7C0A
oneapi::mkl::sparse::set_csr_data
Takes a matrix handle and the user-provided Compressed Sparse Row (CSR) matrix arrays and fills the internal CSR data structure of the matrix handle.
Description
The oneapi::mkl::sparse::set_csr_data routine takes a sparse::matrix_handle_t for a sparse matrix of dimensions num_rows -by- num_cols represented in the CSR format, and fills the internal state of the matrix handle with the user provided arrays in CSR format. Please familiarize yourself with the user/library contract surrounding use of the sparse::matrix_handle_t object.
API
Syntax
Using SYCL buffers:
namespace oneapi::mkl:sparse { void set_csr_data ( sycl::queue &queue, oneapi::mkl::sparse::matrix_handle_t handle, const intType num_rows, const intType num_cols, oneapi::mkl::index_base index, sycl::buffer<intType, 1> &row_ptr, sycl::buffer<intType, 1> &col_ind, sycl::buffer<fp, 1> &val); //deprecated in 2023.0 void set_csr_data ( oneapi::mkl::sparse::matrix_handle_t handle, const intType num_rows, const intType num_cols, oneapi::mkl::index_base index, sycl::buffer<intType, 1> &row_ptr, sycl::buffer<intType, 1> &col_ind, sycl::buffer<fp, 1> &val); }
Using USM pointers:
namespace oneapi::mkl:sparse { sycl::event set_csr_data ( sycl::queue &queue, oneapi::mkl::sparse::matrix_handle_t handle, const intType num_rows, const intType num_cols, oneapi::mkl::index_base index, intType *row_ptr, intType *col_ind, fp *val, std::vector<sycl::event> &dependencies = {} ); // deprecated in 2023.0 void set_csr_data ( oneapi::mkl::sparse::matrix_handle_t handle, const intType num_rows, const intType num_cols, oneapi::mkl::index_base index, intType *row_ptr, intType *col_ind, fp *val); }
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 for subsequent Sparse BLAS operations.
- num_rows
-
Number of rows of the input matrix.
- num_cols
-
Number of columns of the input matrix.
- index
-
Indicates how input arrays are indexed.
oneapi::mkl::index_base::zero
Zero-based (C-style) indexing: indices start at 0.
oneapi::mkl::index_base::one
One-based (Fortran-style) indexing: indices start at 1.
- row_ptr
-
SYCL memory object containing an array of length num_rows+1. Could be a SYCL buffer or a device-accessible USM pointer. Refer to Sparse Storage Formats for a detailed description of row_ptr.
- col_ind
-
SYCL memory object which stores an array containing the column indices in index-based numbering. Could be a SYCL buffer or a device-accessible USM pointer. Refer to Sparse Storage Formats for a detailed description of col_ind.
- val
-
SYCL memory object which stores an array containing the non-zero elements of the input matrix. Could be a SYCL buffer or a device-accessible USM pointer. Refer to Sparse Storage Formats for a detailed description of val.
- dependencies
-
USM API only. A vector of type std::vector<sycl::event> containing the list of events that the oneapi::mkl::sparse::set_csr_data routine depends on.
Output Parameters
- handle
-
Handle to object containing sparse matrix and other internal data for subsequent DPC++ Sparse BLAS operations.
- sycl::event
-
USM API only. A sycl::event that can be used to track the completion of asynchronous events that were enqueued during the API call that continue the chain of events from the input dependencies.
Did you find the information on this page useful?
Feedback Message
Characters remaining: