Skip to content

Commit

Permalink
clang-format
Browse files Browse the repository at this point in the history
  • Loading branch information
Rbiessy committed Sep 5, 2024
1 parent 01e7444 commit b7aacb4
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 17 deletions.
20 changes: 9 additions & 11 deletions src/sparse_blas/backends/rocsparse/operations/rocsparse_spmm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -114,14 +114,12 @@ void spmm_buffer_size(sycl::queue& queue, oneapi::mkl::transpose opA, oneapi::mk
spmm_descr->buffer_size_called = true;
}

inline void common_spmm_optimize(oneapi::mkl::transpose opA, oneapi::mkl::transpose opB,
bool is_alpha_host_accessible, oneapi::mkl::sparse::matrix_view A_view,
oneapi::mkl::sparse::matrix_handle_t A_handle,
oneapi::mkl::sparse::dense_matrix_handle_t B_handle,
bool is_beta_host_accessible,
oneapi::mkl::sparse::dense_matrix_handle_t C_handle,
oneapi::mkl::sparse::spmm_alg alg,
oneapi::mkl::sparse::spmm_descr_t spmm_descr) {
inline void common_spmm_optimize(
oneapi::mkl::transpose opA, oneapi::mkl::transpose opB, bool is_alpha_host_accessible,
oneapi::mkl::sparse::matrix_view A_view, oneapi::mkl::sparse::matrix_handle_t A_handle,
oneapi::mkl::sparse::dense_matrix_handle_t B_handle, bool is_beta_host_accessible,
oneapi::mkl::sparse::dense_matrix_handle_t C_handle, oneapi::mkl::sparse::spmm_alg alg,
oneapi::mkl::sparse::spmm_descr_t spmm_descr) {
A_handle->throw_if_already_used("spmm_optimize");
detail::check_valid_spmm_common("spmm_optimize", A_view, A_handle, B_handle, C_handle,
is_alpha_host_accessible, is_beta_host_accessible);
Expand Down Expand Up @@ -300,7 +298,7 @@ sycl::event spmm(sycl::queue& queue, oneapi::mkl::transpose opA, oneapi::mkl::tr
sycl::accessor<std::uint8_t, 1> workspace_placeholder_acc(
spmm_descr->workspace.get_buffer<std::uint8_t>());
return dispatch_submit_native_ext(__func__, queue, functor_buffer, A_handle,
workspace_placeholder_acc, B_handle, C_handle);
workspace_placeholder_acc, B_handle, C_handle);
}
else {
// The same dispatch_submit can be used for USM or buffers if no
Expand All @@ -310,8 +308,8 @@ sycl::event spmm(sycl::queue& queue, oneapi::mkl::transpose opA, oneapi::mkl::tr
auto functor_usm = [=](RocsparseScopedContextHandler& sc) {
compute_functor(sc, workspace_ptr);
};
return dispatch_submit_native_ext(__func__, queue, dependencies, functor_usm, A_handle, B_handle,
C_handle);
return dispatch_submit_native_ext(__func__, queue, dependencies, functor_usm, A_handle,
B_handle, C_handle);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -303,8 +303,8 @@ sycl::event spmv(sycl::queue &queue, oneapi::mkl::transpose opA, const void *alp
auto functor_usm = [=](RocsparseScopedContextHandler &sc) {
compute_functor(sc, workspace_ptr);
};
return dispatch_submit_native_ext(__func__, queue, dependencies, functor_usm, A_handle, x_handle,
y_handle);
return dispatch_submit_native_ext(__func__, queue, dependencies, functor_usm, A_handle,
x_handle, y_handle);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -278,8 +278,8 @@ sycl::event spsv(sycl::queue &queue, oneapi::mkl::transpose opA, const void *alp
auto functor_usm = [=](RocsparseScopedContextHandler &sc) {
compute_functor(sc, workspace_ptr);
};
return dispatch_submit_native_ext(__func__, queue, dependencies, functor_usm, A_handle, x_handle,
y_handle);
return dispatch_submit_native_ext(__func__, queue, dependencies, functor_usm, A_handle,
x_handle, y_handle);
}
}

Expand Down
5 changes: 3 additions & 2 deletions src/sparse_blas/backends/rocsparse/rocsparse_scope_handle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,9 @@ namespace oneapi::mkl::sparse::rocsparse {
* the one being emplaced (keys in a map container are unique).
*/
#ifdef ONEAPI_ONEMKL_PI_INTERFACE_REMOVED
thread_local rocsparse_handle_container<ur_context_handle_t> RocsparseScopedContextHandler::handle_helper =
rocsparse_handle_container<ur_context_handle_t>{};
thread_local rocsparse_handle_container<ur_context_handle_t>
RocsparseScopedContextHandler::handle_helper =
rocsparse_handle_container<ur_context_handle_t>{};
#else
thread_local rocsparse_handle_container<pi_context> RocsparseScopedContextHandler::handle_helper =
rocsparse_handle_container<pi_context>{};
Expand Down

0 comments on commit b7aacb4

Please sign in to comment.