mkl::sparse::set_csr_data

Takes a matrix handle and the input CSR matrix arrays and fills the internal CSR data structure x.

Syntax

Using SYCL buffers:

void

mkl::sparse::set_csr_data (matrix_handle_t handle, intType num_rows, intType num_cols, mkl::index_base index, cl::sycl::buffer<intType, 1> & row_ptr, cl::sycl::buffer<intType, 1> & col_ind, cl::sycl::buffer<fp, 1> & val);

Using USM pointers:

void

mkl::sparse::set_csr_data (matrix_handle_t handle, intType num_rows, intType num_cols, mkl::index_base index, intType *row_ptr, intType *col_ind, fp *val);

Include Files

Description

The mkl::sparse::set_csr_data routine takes a matrix handle for a sparse matrix of dimensions num_rows-by-num_cols represented in the CSR format, and fills the internal CSR data structure.

Note

Refer to Supported Types for a list of supported <fp> and <intType>, and refer to Exceptions for a detailed description of the exceptions thrown.

Input Parameters

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.

mkl::index_base::zero

Zero-based (C-style) indexing: indices start at 0.

mkl::index_base::one

One-based (Fortran-style) indexing: indices start at 1.

row_ptr

SYCL or USM memory object containing an array of length m+1. This array contains row indices, such that row_ptr[i] - index is the first index of row i in the arrays val and col_ind. index takes 0 for zero-based indexing and 1 for one-based indexing. Refer to pointerB and pointerE array description in Sparse BLAS CSR Matrix Storage Format for more details.

Note

Refer to Three Array Variation of CSR Format for more details.

col_ind

SYCL or USM memory object which stores an array containing the column indices in index-based numbering (index takes 0 for zero-based indexing and 1 for one-based indexing) for each non-zero element of the input matrix. Its length is at least num_rows.

val

SYCL or USM memory object which stores an array containing non-zero elements of the input matrix. Its length is equal to length of the col_ind array. Refer to the values array description in Sparse BLAS CSR Matrix Storage Format for more details.

Output Parameters

handle

Handle to object containing sparse matrix and other internal data for subsequent Sycl Sparse BLAS operations.