Skip to content

Commit

Permalink
Replace __FUNCTION__ with __func__
Browse files Browse the repository at this point in the history
  • Loading branch information
Rbiessy committed Jul 2, 2024
1 parent 5c37ee3 commit 9dbd67b
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 26 deletions.
16 changes: 8 additions & 8 deletions src/sparse_blas/backends/mkl_common/mkl_handles.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ template <typename fpType>
void set_dense_vector_data(sycl::queue & /*queue*/,
oneapi::mkl::sparse::dense_vector_handle_t dvhandle, std::int64_t size,
sycl::buffer<fpType, 1> val) {
check_can_reset_value_handle<fpType>(__FUNCTION__, dvhandle, true);
check_can_reset_value_handle<fpType>(__func__, dvhandle, true);
dvhandle->size = size;
dvhandle->set_buffer(val);
}
Expand All @@ -61,7 +61,7 @@ template <typename fpType>
void set_dense_vector_data(sycl::queue & /*queue*/,
oneapi::mkl::sparse::dense_vector_handle_t dvhandle, std::int64_t size,
fpType *val) {
check_can_reset_value_handle<fpType>(__FUNCTION__, dvhandle, false);
check_can_reset_value_handle<fpType>(__func__, dvhandle, false);
dvhandle->size = size;
dvhandle->set_usm_ptr(val);
}
Expand Down Expand Up @@ -112,7 +112,7 @@ void set_dense_matrix_data(sycl::queue & /*queue*/,
oneapi::mkl::sparse::dense_matrix_handle_t dmhandle,
std::int64_t num_rows, std::int64_t num_cols, std::int64_t ld,
oneapi::mkl::layout dense_layout, sycl::buffer<fpType, 1> val) {
check_can_reset_value_handle<fpType>(__FUNCTION__, dmhandle, true);
check_can_reset_value_handle<fpType>(__func__, dmhandle, true);
dmhandle->num_rows = num_rows;
dmhandle->num_cols = num_cols;
dmhandle->ld = ld;
Expand All @@ -125,7 +125,7 @@ void set_dense_matrix_data(sycl::queue & /*queue*/,
oneapi::mkl::sparse::dense_matrix_handle_t dmhandle,
std::int64_t num_rows, std::int64_t num_cols, std::int64_t ld,
oneapi::mkl::layout dense_layout, fpType *val) {
check_can_reset_value_handle<fpType>(__FUNCTION__, dmhandle, false);
check_can_reset_value_handle<fpType>(__func__, dmhandle, false);
dmhandle->num_rows = num_rows;
dmhandle->num_cols = num_cols;
dmhandle->ld = ld;
Expand Down Expand Up @@ -217,7 +217,7 @@ void set_coo_matrix_data(sycl::queue &queue, oneapi::mkl::sparse::matrix_handle_
oneapi::mkl::index_base index, sycl::buffer<intType, 1> row_ind,
sycl::buffer<intType, 1> col_ind, sycl::buffer<fpType, 1> val) {
auto internal_smhandle = detail::get_internal_handle(smhandle);
check_can_reset_sparse_handle<fpType, intType>(__FUNCTION__, internal_smhandle, true);
check_can_reset_sparse_handle<fpType, intType>(__func__, internal_smhandle, true);
internal_smhandle->row_container.set_buffer(row_ind);
internal_smhandle->col_container.set_buffer(col_ind);
internal_smhandle->value_container.set_buffer(val);
Expand All @@ -236,7 +236,7 @@ void set_coo_matrix_data(sycl::queue &queue, oneapi::mkl::sparse::matrix_handle_
oneapi::mkl::index_base index, intType *row_ind, intType *col_ind,
fpType *val) {
auto internal_smhandle = detail::get_internal_handle(smhandle);
check_can_reset_sparse_handle<fpType, intType>(__FUNCTION__, internal_smhandle, false);
check_can_reset_sparse_handle<fpType, intType>(__func__, internal_smhandle, false);
internal_smhandle->row_container.set_usm_ptr(row_ind);
internal_smhandle->col_container.set_usm_ptr(col_ind);
internal_smhandle->value_container.set_usm_ptr(val);
Expand Down Expand Up @@ -309,7 +309,7 @@ void set_csr_matrix_data(sycl::queue &queue, oneapi::mkl::sparse::matrix_handle_
oneapi::mkl::index_base index, sycl::buffer<intType, 1> row_ptr,
sycl::buffer<intType, 1> col_ind, sycl::buffer<fpType, 1> val) {
auto internal_smhandle = detail::get_internal_handle(smhandle);
check_can_reset_sparse_handle<fpType, intType>(__FUNCTION__, internal_smhandle, true);
check_can_reset_sparse_handle<fpType, intType>(__func__, internal_smhandle, true);
internal_smhandle->row_container.set_buffer(row_ptr);
internal_smhandle->col_container.set_buffer(col_ind);
internal_smhandle->value_container.set_buffer(val);
Expand All @@ -329,7 +329,7 @@ void set_csr_matrix_data(sycl::queue &queue, oneapi::mkl::sparse::matrix_handle_
oneapi::mkl::index_base index, intType *row_ptr, intType *col_ind,
fpType *val) {
auto internal_smhandle = detail::get_internal_handle(smhandle);
check_can_reset_sparse_handle<fpType, intType>(__FUNCTION__, internal_smhandle, false);
check_can_reset_sparse_handle<fpType, intType>(__func__, internal_smhandle, false);
internal_smhandle->row_container.set_usm_ptr(row_ptr);
internal_smhandle->col_container.set_usm_ptr(col_ind);
internal_smhandle->value_container.set_usm_ptr(val);
Expand Down
12 changes: 6 additions & 6 deletions src/sparse_blas/backends/mkl_common/mkl_spmm.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ void spmm_buffer_size(sycl::queue &queue, oneapi::mkl::transpose opA,
oneapi::mkl::sparse::spmm_descr_t /*spmm_descr*/,
std::size_t &temp_buffer_size) {
// TODO: Add support for external workspace once the close-source oneMKL backend supports it.
check_valid_spmm(__FUNCTION__, queue, opA, A_view, A_handle, B_handle, C_handle, alpha, beta);
check_valid_spmm(__func__, queue, opA, A_view, A_handle, B_handle, C_handle, alpha, beta);
temp_buffer_size = 0;
}

Expand All @@ -100,10 +100,10 @@ void spmm_optimize(sycl::queue &queue, oneapi::mkl::transpose opA, oneapi::mkl::
oneapi::mkl::sparse::spmm_alg alg,
oneapi::mkl::sparse::spmm_descr_t /*spmm_descr*/,
sycl::buffer<std::uint8_t, 1> /*workspace*/) {
check_valid_spmm(__FUNCTION__, queue, opA, A_view, A_handle, B_handle, C_handle, alpha, beta);
check_valid_spmm(__func__, queue, opA, A_view, A_handle, B_handle, C_handle, alpha, beta);
auto internal_A_handle = detail::get_internal_handle(A_handle);
if (!internal_A_handle->all_use_buffer()) {
detail::throw_incompatible_container(__FUNCTION__);
detail::throw_incompatible_container(__func__);
}
if (alg == oneapi::mkl::sparse::spmm_alg::no_optimize_alg) {
return;
Expand All @@ -121,10 +121,10 @@ sycl::event spmm_optimize(sycl::queue &queue, oneapi::mkl::transpose opA,
oneapi::mkl::sparse::spmm_alg alg,
oneapi::mkl::sparse::spmm_descr_t /*spmm_descr*/, void * /*workspace*/,
const std::vector<sycl::event> &dependencies) {
check_valid_spmm(__FUNCTION__, queue, opA, A_view, A_handle, B_handle, C_handle, alpha, beta);
check_valid_spmm(__func__, queue, opA, A_view, A_handle, B_handle, C_handle, alpha, beta);
auto internal_A_handle = detail::get_internal_handle(A_handle);
if (internal_A_handle->all_use_buffer()) {
detail::throw_incompatible_container(__FUNCTION__);
detail::throw_incompatible_container(__func__);
}
if (alg == oneapi::mkl::sparse::spmm_alg::no_optimize_alg) {
return detail::collapse_dependencies(queue, dependencies);
Expand Down Expand Up @@ -174,7 +174,7 @@ sycl::event spmm(sycl::queue &queue, oneapi::mkl::transpose opA, oneapi::mkl::tr
oneapi::mkl::sparse::dense_matrix_handle_t C_handle,
oneapi::mkl::sparse::spmm_alg alg, oneapi::mkl::sparse::spmm_descr_t spmm_descr,
const std::vector<sycl::event> &dependencies) {
check_valid_spmm(__FUNCTION__, queue, opA, A_view, A_handle, B_handle, C_handle, alpha, beta);
check_valid_spmm(__func__, queue, opA, A_view, A_handle, B_handle, C_handle, alpha, beta);
auto value_type = detail::get_internal_handle(A_handle)->get_value_type();
DISPATCH_MKL_OPERATION("spmm", value_type, internal_spmm, queue, opA, opB, alpha, A_view,
A_handle, B_handle, beta, C_handle, alg, spmm_descr, dependencies);
Expand Down
12 changes: 6 additions & 6 deletions src/sparse_blas/backends/mkl_common/mkl_spmv.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ void spmv_buffer_size(sycl::queue &queue, oneapi::mkl::transpose opA, const void
oneapi::mkl::sparse::spmv_descr_t /*spmv_descr*/,
std::size_t &temp_buffer_size) {
// TODO: Add support for external workspace once the close-source oneMKL backend supports it.
check_valid_spmv(__FUNCTION__, queue, opA, A_view, A_handle, x_handle, y_handle, alpha, beta);
check_valid_spmv(__func__, queue, opA, A_view, A_handle, x_handle, y_handle, alpha, beta);
temp_buffer_size = 0;
}

Expand All @@ -93,10 +93,10 @@ void spmv_optimize(sycl::queue &queue, oneapi::mkl::transpose opA, const void *a
oneapi::mkl::sparse::spmv_alg alg,
oneapi::mkl::sparse::spmv_descr_t /*spmv_descr*/,
sycl::buffer<std::uint8_t, 1> /*workspace*/) {
check_valid_spmv(__FUNCTION__, queue, opA, A_view, A_handle, x_handle, y_handle, alpha, beta);
check_valid_spmv(__func__, queue, opA, A_view, A_handle, x_handle, y_handle, alpha, beta);
auto internal_A_handle = detail::get_internal_handle(A_handle);
if (!internal_A_handle->all_use_buffer()) {
detail::throw_incompatible_container(__FUNCTION__);
detail::throw_incompatible_container(__func__);
}
if (alg == oneapi::mkl::sparse::spmv_alg::no_optimize_alg) {
return;
Expand Down Expand Up @@ -127,10 +127,10 @@ sycl::event spmv_optimize(sycl::queue &queue, oneapi::mkl::transpose opA, const
oneapi::mkl::sparse::spmv_alg alg,
oneapi::mkl::sparse::spmv_descr_t /*spmv_descr*/, void * /*workspace*/,
const std::vector<sycl::event> &dependencies) {
check_valid_spmv(__FUNCTION__, queue, opA, A_view, A_handle, x_handle, y_handle, alpha, beta);
check_valid_spmv(__func__, queue, opA, A_view, A_handle, x_handle, y_handle, alpha, beta);
auto internal_A_handle = detail::get_internal_handle(A_handle);
if (internal_A_handle->all_use_buffer()) {
detail::throw_incompatible_container(__FUNCTION__);
detail::throw_incompatible_container(__func__);
}
if (alg == oneapi::mkl::sparse::spmv_alg::no_optimize_alg) {
return detail::collapse_dependencies(queue, dependencies);
Expand Down Expand Up @@ -210,7 +210,7 @@ sycl::event spmv(sycl::queue &queue, oneapi::mkl::transpose opA, const void *alp
oneapi::mkl::sparse::dense_vector_handle_t y_handle,
oneapi::mkl::sparse::spmv_alg alg, oneapi::mkl::sparse::spmv_descr_t spmv_descr,
const std::vector<sycl::event> &dependencies) {
check_valid_spmv(__FUNCTION__, queue, opA, A_view, A_handle, x_handle, y_handle, alpha, beta);
check_valid_spmv(__func__, queue, opA, A_view, A_handle, x_handle, y_handle, alpha, beta);
auto value_type = detail::get_internal_handle(A_handle)->get_value_type();
DISPATCH_MKL_OPERATION("spmv", value_type, internal_spmv, queue, opA, alpha, A_view, A_handle,
x_handle, beta, y_handle, alg, spmv_descr, dependencies);
Expand Down
12 changes: 6 additions & 6 deletions src/sparse_blas/backends/mkl_common/mkl_spsv.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ void spsv_buffer_size(sycl::queue &queue, oneapi::mkl::transpose /*opA*/, const
oneapi::mkl::sparse::spsv_descr_t /*spsv_descr*/,
std::size_t &temp_buffer_size) {
// TODO: Add support for external workspace once the close-source oneMKL backend supports it.
check_valid_spsv(__FUNCTION__, queue, A_view, A_handle, x_handle, y_handle, alpha, alg);
check_valid_spsv(__func__, queue, A_view, A_handle, x_handle, y_handle, alpha, alg);
temp_buffer_size = 0;
}

Expand All @@ -79,10 +79,10 @@ void spsv_optimize(sycl::queue &queue, oneapi::mkl::transpose opA, const void *a
oneapi::mkl::sparse::spsv_alg alg,
oneapi::mkl::sparse::spsv_descr_t /*spsv_descr*/,
sycl::buffer<std::uint8_t, 1> /*workspace*/) {
check_valid_spsv(__FUNCTION__, queue, A_view, A_handle, x_handle, y_handle, alpha, alg);
check_valid_spsv(__func__, queue, A_view, A_handle, x_handle, y_handle, alpha, alg);
auto internal_A_handle = detail::get_internal_handle(A_handle);
if (!internal_A_handle->all_use_buffer()) {
detail::throw_incompatible_container(__FUNCTION__);
detail::throw_incompatible_container(__func__);
}
if (alg == oneapi::mkl::sparse::spsv_alg::no_optimize_alg) {
return;
Expand All @@ -102,10 +102,10 @@ sycl::event spsv_optimize(sycl::queue &queue, oneapi::mkl::transpose opA, const
oneapi::mkl::sparse::spsv_alg alg,
oneapi::mkl::sparse::spsv_descr_t /*spsv_descr*/, void * /*workspace*/,
const std::vector<sycl::event> &dependencies) {
check_valid_spsv(__FUNCTION__, queue, A_view, A_handle, x_handle, y_handle, alpha, alg);
check_valid_spsv(__func__, queue, A_view, A_handle, x_handle, y_handle, alpha, alg);
auto internal_A_handle = detail::get_internal_handle(A_handle);
if (internal_A_handle->all_use_buffer()) {
detail::throw_incompatible_container(__FUNCTION__);
detail::throw_incompatible_container(__func__);
}
if (alg == oneapi::mkl::sparse::spsv_alg::no_optimize_alg) {
return detail::collapse_dependencies(queue, dependencies);
Expand Down Expand Up @@ -149,7 +149,7 @@ sycl::event spsv(sycl::queue &queue, oneapi::mkl::transpose opA, const void *alp
oneapi::mkl::sparse::dense_vector_handle_t y_handle,
oneapi::mkl::sparse::spsv_alg alg, oneapi::mkl::sparse::spsv_descr_t spsv_descr,
const std::vector<sycl::event> &dependencies) {
check_valid_spsv(__FUNCTION__, queue, A_view, A_handle, x_handle, y_handle, alpha, alg);
check_valid_spsv(__func__, queue, A_view, A_handle, x_handle, y_handle, alpha, alg);
auto value_type = detail::get_internal_handle(A_handle)->get_value_type();
DISPATCH_MKL_OPERATION("spsv", value_type, internal_spsv, queue, opA, alpha, A_view, A_handle,
x_handle, y_handle, alg, spsv_descr, dependencies);
Expand Down

0 comments on commit 9dbd67b

Please sign in to comment.