diff --git a/include/gridtools/common/hymap.hpp b/include/gridtools/common/hymap.hpp index 6c93c6f46a..58d31f0e91 100644 --- a/include/gridtools/common/hymap.hpp +++ b/include/gridtools/common/hymap.hpp @@ -305,7 +305,7 @@ namespace gridtools { using apply = typename get_from_keys_values>::template apply; }; } // namespace impl_ - } // namespace hymap + } // namespace hymap } // namespace gridtools #define GT_FILENAME @@ -464,11 +464,11 @@ namespace gridtools { template GT_TARGET GT_FORCE_INLINE constexpr decltype(auto) source() const { - return tuple_util::GT_TARGET_NAMESPACE_NAME::get < is_primary_index::value ? 0 : 1 > (base()); + return tuple_util::GT_TARGET_NAMESPACE_NAME::get::value ? 0 : 1>(base()); } template GT_TARGET GT_FORCE_INLINE constexpr decltype(auto) source() { - return tuple_util::GT_TARGET_NAMESPACE_NAME::get < is_primary_index::value ? 0 : 1 > (base()); + return tuple_util::GT_TARGET_NAMESPACE_NAME::get::value ? 0 : 1>(base()); } template diff --git a/include/gridtools/common/int_vector.hpp b/include/gridtools/common/int_vector.hpp index c372380778..ada35aac3b 100644 --- a/include/gridtools/common/int_vector.hpp +++ b/include/gridtools/common/int_vector.hpp @@ -99,7 +99,7 @@ namespace gridtools { * The keys of the resulting `int_vector` are the union of the keys of the operands. */ template - GT_FUNCTION constexpr auto plus(Vecs && ...vecs) { + GT_FUNCTION constexpr auto plus(Vecs &&...vecs) { using merged_meta_map_t = meta::mp_make...>>; using keys_t = meta::transform; using generators = meta::transform; @@ -111,7 +111,7 @@ namespace gridtools { * @brief Returns `int_vector` with elements multiplied by an integral scalar */ template - GT_FUNCTION constexpr auto multiply(Vec && vec, Scalar scalar) { + GT_FUNCTION constexpr auto multiply(Vec &&vec, Scalar scalar) { return tuple_util::host_device::transform([scalar](auto v) { return v * scalar; }, std::forward(vec)); } @@ -119,7 +119,7 @@ namespace gridtools { * @brief Returns `int_vector` with elements removed that are `integral_constant` */ template - GT_FUNCTION constexpr auto prune_zeros(Vec && vec) { + GT_FUNCTION constexpr auto prune_zeros(Vec &&vec) { using filtered_map_t = meta::filter::apply, hymap::to_meta_map>; using keys_t = meta::transform; using generators = meta::transform; @@ -173,5 +173,5 @@ namespace gridtools { } } // namespace arithmetic - } // namespace int_vector + } // namespace int_vector } // namespace gridtools diff --git a/include/gridtools/common/integral_constant.hpp b/include/gridtools/common/integral_constant.hpp index a1a579a4d0..9c2e756a9d 100644 --- a/include/gridtools/common/integral_constant.hpp +++ b/include/gridtools/common/integral_constant.hpp @@ -165,7 +165,7 @@ namespace gridtools { template constexpr GT_FUNCTION integral_constant::value> - operator"" _c() { + operator""_c() { return {}; } } // namespace literals diff --git a/include/gridtools/common/tuple_util.hpp b/include/gridtools/common/tuple_util.hpp index 3863a8e333..099e58be2d 100644 --- a/include/gridtools/common/tuple_util.hpp +++ b/include/gridtools/common/tuple_util.hpp @@ -137,27 +137,27 @@ #define GT_STRUCT_TUPLE_IMPL_DECL_(r, data, elem) GT_PP_TUPLE_ELEM(0, elem) GT_PP_TUPLE_ELEM(1, elem); #define GT_STRUCT_TUPLE_IMPL_TYPE_(s, data, elem) GT_PP_TUPLE_ELEM(0, elem) -#define GT_STRUCT_TUPLE_IMPL_GETS_(s, name, i, elem) \ +#define GT_STRUCT_TUPLE_IMPL_GETS_(s, name, i, elem) \ template <::std::size_t I, ::std::enable_if_t = 0, class T = GT_PP_TUPLE_ELEM(0, elem)> \ - static constexpr GT_FUNCTION T const &get(name const &obj) { \ + static constexpr GT_FUNCTION T const &get(name const &obj) { \ return obj.GT_PP_TUPLE_ELEM(1, elem); \ - } \ + } \ template <::std::size_t I, ::std::enable_if_t = 0, class T = GT_PP_TUPLE_ELEM(0, elem)> \ - static constexpr GT_FUNCTION T &get(name &obj) { \ + static constexpr GT_FUNCTION T &get(name &obj) { \ return obj.GT_PP_TUPLE_ELEM(1, elem); \ - } \ + } \ template <::std::size_t I, ::std::enable_if_t = 0, class T = GT_PP_TUPLE_ELEM(0, elem)> \ - static constexpr GT_FUNCTION T &&get(name &&obj) { \ + static constexpr GT_FUNCTION T &&get(name &&obj) { \ return static_cast(obj.GT_PP_TUPLE_ELEM(1, elem)); \ } -#define GT_STRUCT_TUPLE_IMPL_(name, members) \ - GT_PP_SEQ_FOR_EACH(GT_STRUCT_TUPLE_IMPL_DECL_, _, members) \ - struct gt_##name##_tuple_getter { \ - GT_PP_SEQ_FOR_EACH_I(GT_STRUCT_TUPLE_IMPL_GETS_, name, members) \ - }; \ - friend gt_##name##_tuple_getter tuple_getter(name); \ +#define GT_STRUCT_TUPLE_IMPL_(name, members) \ + GT_PP_SEQ_FOR_EACH(GT_STRUCT_TUPLE_IMPL_DECL_, _, members) \ + struct gt_##name##_tuple_getter { \ + GT_PP_SEQ_FOR_EACH_I(GT_STRUCT_TUPLE_IMPL_GETS_, name, members) \ + }; \ + friend gt_##name##_tuple_getter tuple_getter(name); \ friend ::gridtools::meta::list \ - tuple_to_types(name); \ + tuple_to_types(name); \ friend ::gridtools::meta::always tuple_from_types(name) /* @@ -466,7 +466,8 @@ namespace gridtools { concept tuple_like = is_tuple_like::value; template - concept tuple_like_of = tuple_like && + concept tuple_like_of = + tuple_like && std::is_same_v>, meta::list>; } // namespace concepts #endif diff --git a/include/gridtools/fn/neighbor_table.hpp b/include/gridtools/fn/neighbor_table.hpp index 682505b5ad..da360700f5 100644 --- a/include/gridtools/fn/neighbor_table.hpp +++ b/include/gridtools/fn/neighbor_table.hpp @@ -61,8 +61,8 @@ namespace gridtools::fn::neighbor_table { } template - GT_FUNCTION constexpr auto neighbors( - NeighborTable const &nt, int index) -> decltype(neighbor_table_neighbors(nt, index)) { + GT_FUNCTION constexpr auto neighbors(NeighborTable const &nt, int index) + -> decltype(neighbor_table_neighbors(nt, index)) { return neighbor_table_neighbors(nt, index); } diff --git a/include/gridtools/gcl/high_level/call_generic.hpp b/include/gridtools/gcl/high_level/call_generic.hpp index 6f2ecce04f..30d9a6aceb 100644 --- a/include/gridtools/gcl/high_level/call_generic.hpp +++ b/include/gridtools/gcl/high_level/call_generic.hpp @@ -37,8 +37,8 @@ template void GCL_PACK_F_NAME(GCL_KERNEL_TYPE)( - GT_PP_ENUM_BINARY_PARAMS(GCL_NOI, FOTF_T, const &field), void **d_msgbufTab, const int *d_msgsize) { - // GCL_PRINT_FIELDS(GCL_NOI); + GT_PP_ENUM_BINARY_PARAMS(GCL_NOI, FOTF_T, const &field), void **d_msgbufTab, const int *d_msgsize){ +// GCL_PRINT_FIELDS(GCL_NOI); #define GCL_QUOTE(x) #x #define _GCL_QUOTE(x) GCL_QUOTE(x) diff --git a/include/gridtools/gcl/high_level/descriptor_generic_manual.hpp b/include/gridtools/gcl/high_level/descriptor_generic_manual.hpp index 60113aec0f..2d5c9f88dd 100644 --- a/include/gridtools/gcl/high_level/descriptor_generic_manual.hpp +++ b/include/gridtools/gcl/high_level/descriptor_generic_manual.hpp @@ -794,5 +794,5 @@ namespace gridtools { #include "non_vect_interface.hpp" }; #endif // cudacc - } // namespace gcl + } // namespace gcl } // namespace gridtools diff --git a/include/gridtools/gcl/high_level/descriptors.hpp b/include/gridtools/gcl/high_level/descriptors.hpp index 68bf8f230f..8d7bed86e6 100644 --- a/include/gridtools/gcl/high_level/descriptors.hpp +++ b/include/gridtools/gcl/high_level/descriptors.hpp @@ -60,12 +60,12 @@ namespace gridtools { template void pack(array const &eta, iterator_in const *field_ptr, iterator_out *&it) const { for (int k = halos[2].loop_low_bound_inside(eta[2]); k <= halos[2].loop_high_bound_inside(eta[2]); - ++k) { + ++k) { for (int j = halos[1].loop_low_bound_inside(eta[1]); j <= halos[1].loop_high_bound_inside(eta[1]); - ++j) { + ++j) { for (int i = halos[0].loop_low_bound_inside(eta[0]); - i <= halos[0].loop_high_bound_inside(eta[0]); - ++i) { + i <= halos[0].loop_high_bound_inside(eta[0]); + ++i) { *(reinterpret_cast(it)) = field_ptr[access(i, j, k, halos[0].total_length(), halos[1].total_length())]; reinterpret_cast(it) += sizeof(iterator_in); @@ -77,12 +77,12 @@ namespace gridtools { template void unpack(array const &eta, iterator_in *field_ptr, iterator_out *&it) const { for (int k = halos[2].loop_low_bound_outside(eta[2]); k <= halos[2].loop_high_bound_outside(eta[2]); - ++k) { + ++k) { for (int j = halos[1].loop_low_bound_outside(eta[1]); j <= halos[1].loop_high_bound_outside(eta[1]); - ++j) { + ++j) { for (int i = halos[0].loop_low_bound_outside(eta[0]); - i <= halos[0].loop_high_bound_outside(eta[0]); - ++i) { + i <= halos[0].loop_high_bound_outside(eta[0]); + ++i) { field_ptr[access(i, j, k, halos[0].total_length(), halos[1].total_length())] = *(reinterpret_cast(it)); reinterpret_cast(it) += sizeof(iterator_in); @@ -420,8 +420,8 @@ namespace gridtools { \param[in] _pid Integer identifier of the process calling the constructor */ explicit hndlr_dynamic_ut(typename grid_type::period_type const &c, int _P, int _pid) - : halo(), base_type::m_haloexch(grid_type(c, _P, _pid)), send_buffer{nullptr}, - recv_buffer{nullptr}, send_size{0}, recv_size{0} {} + : halo(), base_type::m_haloexch(grid_type(c, _P, _pid)), send_buffer{nullptr}, recv_buffer{nullptr}, + send_size{0}, recv_size{0} {} /** Constructor @@ -429,8 +429,8 @@ namespace gridtools { \param[in] g A processor grid that will execute the pattern */ explicit hndlr_dynamic_ut(grid_type const &g) - : halo(), base_type::m_haloexch(g), send_buffer{nullptr}, recv_buffer{nullptr}, send_size{0}, recv_size{ - 0} {} + : halo(), base_type::m_haloexch(g), send_buffer{nullptr}, recv_buffer{nullptr}, send_size{0}, + recv_size{0} {} /** Function to setup internal data structures for data exchange and preparing eventual underlying layers diff --git a/include/gridtools/meta/combine.hpp b/include/gridtools/meta/combine.hpp index 9c22c73b25..580a91a6ff 100644 --- a/include/gridtools/meta/combine.hpp +++ b/include/gridtools/meta/combine.hpp @@ -53,8 +53,7 @@ namespace gridtools { using type = F; }; template