Visible to Intel only — GUID: GUID-FEA51A46-F9CD-47FF-B96F-29C5259B36C1
Visible to Intel only — GUID: GUID-FEA51A46-F9CD-47FF-B96F-29C5259B36C1
oneapi::mkl::sparse::sort_matrix
Performs in-place sorting of user-provided matrix arrays in a matrix handle.
Description
The oneapi::mkl::sparse::sort_matrix API performs in-place sorting of user-provided sparse matrix arrays stored in a given sparse matrix handle.
API
Syntax
Using USM and SYCL buffers:
namespace oneapi::mkl::sparse {
sycl::event sort_matrix (
sycl::queue &queue,
oneapi::mkl::sparse::matrix_handle_t spMat,
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.
- spMat
-
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 case for <sparse_matrix_type> is csr. - dependencies
-
A vector of type std::vector<sycl::event> & containing the list of events that the oneapi::mkl::sparse::sort_matrix routine depends on.
Return Values
- sycl::event
-
SYCL event which can be waited upon or added as a dependency for the completion of the sort_matrix routine.
// Examples of API arguments and usage sycl::event ev_opt = sparse::sort_matrix(queue, spMat); // Allowed use in case of USM sycl::event ev_opt = sparse::sort_matrix(queue, spMat, {}); // Allowed use in case of USM sycl::event ev_opt = sparse::sort_matrix(queue, spMat, dependencies); // Allowed use in case of USM sparse::sort_matrix(queue, spMat); // Recommended use in case of sycl::buffer sparse::sort_matrix(queue, spMat, {}); // Not recommended in case of sycl::buffer, but supported; sparse::sort_matrix(queue, spMat, dependencies); // Not recommended in case of sycl::buffer, but supported; sycl::event ev_opt = sparse::sort_matrix(queue, spMat); // Not recommended in case of sycl::buffer, but supported. Note that most sycl::buffer oneMKL APIs do not have ability to pass in dependencies