Visible to Intel only — GUID: GUID-2CE3D175-F875-4567-9E07-53C8571DE876
Visible to Intel only — GUID: GUID-2CE3D175-F875-4567-9E07-53C8571DE876
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 handle, 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. - 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, handle); // Allowed use in case of USM sycl::event ev_opt = sparse::sort_matrix(queue, handle, {}); // Allowed use in case of USM sycl::event ev_opt = sparse::sort_matrix(queue, handle, dependencies); // Allowed use in case of USM sparse::sort_matrix(queue, handle); // Recommended use in case of sycl::buffer sparse::sort_matrix(queue, handle, {}); // Not recommended in case of sycl::buffer, but supported; sparse::sort_matrix(queue, handle, dependencies); // Not recommended in case of sycl::buffer, but supported; sycl::event ev_opt = sparse::sort_matrix(queue, handle); // Not recommended in case of sycl::buffer, but supported. Note that most sycl::buffer oneMKL APIs do not have ability to pass in dependencies