From bc6bd6c30d046ab0007d522e48bd9e0232ae4567 Mon Sep 17 00:00:00 2001 From: "romain.biessy" Date: Fri, 4 Oct 2024 14:32:32 +0200 Subject: [PATCH] clang-format --- .../backends/cusparse/cusparse_handles.cpp | 20 +++++++++++-------- .../backends/mkl_common/mkl_handles.cxx | 20 +++++++++++-------- 2 files changed, 24 insertions(+), 16 deletions(-) diff --git a/src/sparse_blas/backends/cusparse/cusparse_handles.cpp b/src/sparse_blas/backends/cusparse/cusparse_handles.cpp index 09bade903..bbd64cf08 100644 --- a/src/sparse_blas/backends/cusparse/cusparse_handles.cpp +++ b/src/sparse_blas/backends/cusparse/cusparse_handles.cpp @@ -263,8 +263,9 @@ void init_coo_matrix(sycl::queue &queue, matrix_handle_t *p_smhandle, std::int64 CUSPARSE_ERR_FUNC(cusparseCreateCoo, &cu_smhandle, num_rows, num_cols, nnz, sc.get_mem(row_acc), sc.get_mem(col_acc), sc.get_mem(val_acc), cuda_index_type, cuda_index_base, cuda_value_type); - *p_smhandle = new matrix_handle(cu_smhandle, row_ind, col_ind, val, detail::sparse_format::COO, - num_rows, num_cols, nnz, index); + *p_smhandle = + new matrix_handle(cu_smhandle, row_ind, col_ind, val, detail::sparse_format::COO, + num_rows, num_cols, nnz, index); }); }); event.wait_and_throw(); @@ -284,8 +285,9 @@ void init_coo_matrix(sycl::queue &queue, matrix_handle_t *p_smhandle, std::int64 cusparseSpMatDescr_t cu_smhandle; CUSPARSE_ERR_FUNC(cusparseCreateCoo, &cu_smhandle, num_rows, num_cols, nnz, row_ind, col_ind, val, cuda_index_type, cuda_index_base, cuda_value_type); - *p_smhandle = new matrix_handle(cu_smhandle, row_ind, col_ind, val, detail::sparse_format::COO, - num_rows, num_cols, nnz, index); + *p_smhandle = + new matrix_handle(cu_smhandle, row_ind, col_ind, val, detail::sparse_format::COO, + num_rows, num_cols, nnz, index); }); }); event.wait_and_throw(); @@ -388,8 +390,9 @@ void init_csr_matrix(sycl::queue &queue, matrix_handle_t *p_smhandle, std::int64 CUSPARSE_ERR_FUNC(cusparseCreateCsr, &cu_smhandle, num_rows, num_cols, nnz, sc.get_mem(row_acc), sc.get_mem(col_acc), sc.get_mem(val_acc), cuda_index_type, cuda_index_type, cuda_index_base, cuda_value_type); - *p_smhandle = new matrix_handle(cu_smhandle, row_ptr, col_ind, val, detail::sparse_format::CSR, - num_rows, num_cols, nnz, index); + *p_smhandle = + new matrix_handle(cu_smhandle, row_ptr, col_ind, val, detail::sparse_format::CSR, + num_rows, num_cols, nnz, index); }); }); event.wait_and_throw(); @@ -410,8 +413,9 @@ void init_csr_matrix(sycl::queue &queue, matrix_handle_t *p_smhandle, std::int64 CUSPARSE_ERR_FUNC(cusparseCreateCsr, &cu_smhandle, num_rows, num_cols, nnz, row_ptr, col_ind, val, cuda_index_type, cuda_index_type, cuda_index_base, cuda_value_type); - *p_smhandle = new matrix_handle(cu_smhandle, row_ptr, col_ind, val, detail::sparse_format::CSR, - num_rows, num_cols, nnz, index); + *p_smhandle = + new matrix_handle(cu_smhandle, row_ptr, col_ind, val, detail::sparse_format::CSR, + num_rows, num_cols, nnz, index); }); }); event.wait_and_throw(); diff --git a/src/sparse_blas/backends/mkl_common/mkl_handles.cxx b/src/sparse_blas/backends/mkl_common/mkl_handles.cxx index 6ddbd43ef..eaada017d 100644 --- a/src/sparse_blas/backends/mkl_common/mkl_handles.cxx +++ b/src/sparse_blas/backends/mkl_common/mkl_handles.cxx @@ -109,8 +109,9 @@ void init_coo_matrix(sycl::queue &queue, oneapi::mkl::sparse::matrix_handle_t *p sycl::buffer col_ind, sycl::buffer val) { oneapi::mkl::sparse::matrix_handle_t mkl_handle; oneapi::mkl::sparse::init_matrix_handle(&mkl_handle); - auto internal_smhandle = new detail::sparse_matrix_handle( - mkl_handle, row_ind, col_ind, val, detail::sparse_format::COO, num_rows, num_cols, nnz, index); + auto internal_smhandle = new detail::sparse_matrix_handle(mkl_handle, row_ind, col_ind, val, + detail::sparse_format::COO, num_rows, + num_cols, nnz, index); // The backend handle must use the buffers from the internal handle as they will be kept alive until the handle is released. oneapi::mkl::sparse::set_coo_data(queue, mkl_handle, static_cast(num_rows), static_cast(num_cols), static_cast(nnz), @@ -127,8 +128,9 @@ void init_coo_matrix(sycl::queue &queue, oneapi::mkl::sparse::matrix_handle_t *p fpType *val) { oneapi::mkl::sparse::matrix_handle_t mkl_handle; oneapi::mkl::sparse::init_matrix_handle(&mkl_handle); - auto internal_smhandle = new detail::sparse_matrix_handle( - mkl_handle, row_ind, col_ind, val, detail::sparse_format::COO, num_rows, num_cols, nnz, index); + auto internal_smhandle = new detail::sparse_matrix_handle(mkl_handle, row_ind, col_ind, val, + detail::sparse_format::COO, num_rows, + num_cols, nnz, index); auto event = oneapi::mkl::sparse::set_coo_data( queue, mkl_handle, static_cast(num_rows), static_cast(num_cols), static_cast(nnz), index, row_ind, col_ind, val); @@ -189,8 +191,9 @@ void init_csr_matrix(sycl::queue &queue, oneapi::mkl::sparse::matrix_handle_t *p sycl::buffer col_ind, sycl::buffer val) { oneapi::mkl::sparse::matrix_handle_t mkl_handle; oneapi::mkl::sparse::init_matrix_handle(&mkl_handle); - auto internal_smhandle = new detail::sparse_matrix_handle( - mkl_handle, row_ptr, col_ind, val, detail::sparse_format::CSR, num_rows, num_cols, nnz, index); + auto internal_smhandle = new detail::sparse_matrix_handle(mkl_handle, row_ptr, col_ind, val, + detail::sparse_format::CSR, num_rows, + num_cols, nnz, index); // The backend deduces nnz from row_ptr. // The backend handle must use the buffers from the internal handle as they will be kept alive until the handle is released. oneapi::mkl::sparse::set_csr_data(queue, mkl_handle, static_cast(num_rows), @@ -208,8 +211,9 @@ void init_csr_matrix(sycl::queue &queue, oneapi::mkl::sparse::matrix_handle_t *p fpType *val) { oneapi::mkl::sparse::matrix_handle_t mkl_handle; oneapi::mkl::sparse::init_matrix_handle(&mkl_handle); - auto internal_smhandle = new detail::sparse_matrix_handle( - mkl_handle, row_ptr, col_ind, val, detail::sparse_format::CSR, num_rows, num_cols, nnz, index); + auto internal_smhandle = new detail::sparse_matrix_handle(mkl_handle, row_ptr, col_ind, val, + detail::sparse_format::CSR, num_rows, + num_cols, nnz, index); // The backend deduces nnz from row_ptr. auto event = oneapi::mkl::sparse::set_csr_data( queue, mkl_handle, static_cast(num_rows), static_cast(num_cols), index,