From 648baa28fda602f78da937303e7bc2cbc695d9ca Mon Sep 17 00:00:00 2001 From: ginkgo-bot Date: Sun, 8 Oct 2023 10:16:10 +0000 Subject: [PATCH] Format files Co-authored-by: Pratik Nayak --- dpcpp/matrix/batch_ell_kernels.dp.cpp | 54 +++++++++---------- .../ginkgo/core/base/batch_multi_vector.hpp | 4 +- include/ginkgo/core/matrix/batch_ell.hpp | 8 +-- include/ginkgo/ginkgo.hpp | 1 + 4 files changed, 34 insertions(+), 33 deletions(-) diff --git a/dpcpp/matrix/batch_ell_kernels.dp.cpp b/dpcpp/matrix/batch_ell_kernels.dp.cpp index 1ed83d79630..1d1210cc270 100644 --- a/dpcpp/matrix/batch_ell_kernels.dp.cpp +++ b/dpcpp/matrix/batch_ell_kernels.dp.cpp @@ -100,17 +100,17 @@ void simple_apply(std::shared_ptr exec, // Launch a kernel that has nbatches blocks, each block has max group size (exec->get_queue())->submit([&](sycl::handler& cgh) { cgh.parallel_for( - sycl_nd_range(grid, block), [= - ](sycl::nd_item<3> item_ct1) [[sycl::reqd_sub_group_size( - config::warp_size)]] { - auto group = item_ct1.get_group(); - auto group_id = group.get_group_linear_id(); - const auto mat_b = - batch::matrix::extract_batch_item(mat_ub, group_id); - const auto b_b = batch::extract_batch_item(b_ub, group_id); - const auto x_b = batch::extract_batch_item(x_ub, group_id); - simple_apply_kernel(mat_b, b_b, x_b, item_ct1); - }); + sycl_nd_range(grid, block), + [=](sycl::nd_item<3> item_ct1) + [[sycl::reqd_sub_group_size(config::warp_size)]] { + auto group = item_ct1.get_group(); + auto group_id = group.get_group_linear_id(); + const auto mat_b = + batch::matrix::extract_batch_item(mat_ub, group_id); + const auto b_b = batch::extract_batch_item(b_ub, group_id); + const auto x_b = batch::extract_batch_item(x_ub, group_id); + simple_apply_kernel(mat_b, b_b, x_b, item_ct1); + }); }); } @@ -147,22 +147,22 @@ void advanced_apply(std::shared_ptr exec, // Launch a kernel that has nbatches blocks, each block has max group size (exec->get_queue())->submit([&](sycl::handler& cgh) { cgh.parallel_for( - sycl_nd_range(grid, block), [= - ](sycl::nd_item<3> item_ct1) [[sycl::reqd_sub_group_size( - config::warp_size)]] { - auto group = item_ct1.get_group(); - auto group_id = group.get_group_linear_id(); - const auto mat_b = - batch::matrix::extract_batch_item(mat_ub, group_id); - const auto b_b = batch::extract_batch_item(b_ub, group_id); - const auto x_b = batch::extract_batch_item(x_ub, group_id); - const auto alpha_b = - batch::extract_batch_item(alpha_ub, group_id); - const auto beta_b = - batch::extract_batch_item(beta_ub, group_id); - advanced_apply_kernel(alpha_b, mat_b, b_b, beta_b, x_b, - item_ct1); - }); + sycl_nd_range(grid, block), + [=](sycl::nd_item<3> item_ct1) + [[sycl::reqd_sub_group_size(config::warp_size)]] { + auto group = item_ct1.get_group(); + auto group_id = group.get_group_linear_id(); + const auto mat_b = + batch::matrix::extract_batch_item(mat_ub, group_id); + const auto b_b = batch::extract_batch_item(b_ub, group_id); + const auto x_b = batch::extract_batch_item(x_ub, group_id); + const auto alpha_b = + batch::extract_batch_item(alpha_ub, group_id); + const auto beta_b = + batch::extract_batch_item(beta_ub, group_id); + advanced_apply_kernel(alpha_b, mat_b, b_b, beta_b, x_b, + item_ct1); + }); }); } diff --git a/include/ginkgo/core/base/batch_multi_vector.hpp b/include/ginkgo/core/base/batch_multi_vector.hpp index 42d8516dc13..637ad335c90 100644 --- a/include/ginkgo/core/base/batch_multi_vector.hpp +++ b/include/ginkgo/core/base/batch_multi_vector.hpp @@ -213,8 +213,8 @@ class MultiVector * significantly more memory efficient than the non-constant version, * so always prefer this version. */ - const value_type* get_const_values_for_item(size_type batch_id) const - noexcept + const value_type* get_const_values_for_item( + size_type batch_id) const noexcept { GKO_ASSERT(batch_id < this->get_num_batch_items()); return values_.get_const_data() + diff --git a/include/ginkgo/core/matrix/batch_ell.hpp b/include/ginkgo/core/matrix/batch_ell.hpp index f16c6f58225..1a8d4bf2471 100644 --- a/include/ginkgo/core/matrix/batch_ell.hpp +++ b/include/ginkgo/core/matrix/batch_ell.hpp @@ -214,8 +214,8 @@ class Ell final * significantly more memory efficient than the non-constant version, * so always prefer this version. */ - const index_type* get_const_col_idxs_for_item(size_type batch_id) const - noexcept + const index_type* get_const_col_idxs_for_item( + size_type batch_id) const noexcept { GKO_ASSERT(batch_id < this->get_num_batch_items()); return col_idxs_.get_const_data(); @@ -243,8 +243,8 @@ class Ell final * significantly more memory efficient than the non-constant version, * so always prefer this version. */ - const value_type* get_const_values_for_item(size_type batch_id) const - noexcept + const value_type* get_const_values_for_item( + size_type batch_id) const noexcept { GKO_ASSERT(batch_id < this->get_num_batch_items()); return values_.get_const_data() + diff --git a/include/ginkgo/ginkgo.hpp b/include/ginkgo/ginkgo.hpp index 96dbba2e924..0892cf1e360 100644 --- a/include/ginkgo/ginkgo.hpp +++ b/include/ginkgo/ginkgo.hpp @@ -111,6 +111,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include #include +#include #include #include #include