From 0b52785e4ad1ba83989adf5da538e65832518961 Mon Sep 17 00:00:00 2001 From: Till Ehrengruber Date: Thu, 26 Mar 2026 15:02:05 +0100 Subject: [PATCH 1/3] Add specialization for 1d regular domains --- .../src/_pyghex/structured/regular/domain_descriptor.hpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/bindings/python/src/_pyghex/structured/regular/domain_descriptor.hpp b/bindings/python/src/_pyghex/structured/regular/domain_descriptor.hpp index 55813aab5..f6ddc9a9a 100644 --- a/bindings/python/src/_pyghex/structured/regular/domain_descriptor.hpp +++ b/bindings/python/src/_pyghex/structured/regular/domain_descriptor.hpp @@ -32,8 +32,9 @@ using domain_descriptor_specializations_ = gridtools::meta::transform< } // namespace using domain_descriptor_specializations = - gridtools::meta::concat, - domain_descriptor_specializations_<3>, domain_descriptor_specializations_<4>>; + gridtools::meta::concat, + domain_descriptor_specializations_<2>, domain_descriptor_specializations_<3>, + domain_descriptor_specializations_<4>>; } // namespace regular } // namespace structured From d2fc9441c9290a00df59d0af42fe2af879cad447 Mon Sep 17 00:00:00 2001 From: Till Ehrengruber Date: Thu, 26 Mar 2026 15:06:07 +0100 Subject: [PATCH 2/3] Fix format --- .../python/src/_pyghex/structured/regular/domain_descriptor.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bindings/python/src/_pyghex/structured/regular/domain_descriptor.hpp b/bindings/python/src/_pyghex/structured/regular/domain_descriptor.hpp index f6ddc9a9a..336b9bee4 100644 --- a/bindings/python/src/_pyghex/structured/regular/domain_descriptor.hpp +++ b/bindings/python/src/_pyghex/structured/regular/domain_descriptor.hpp @@ -34,7 +34,7 @@ using domain_descriptor_specializations_ = gridtools::meta::transform< using domain_descriptor_specializations = gridtools::meta::concat, domain_descriptor_specializations_<2>, domain_descriptor_specializations_<3>, - domain_descriptor_specializations_<4>>; + domain_descriptor_specializations_<4>>; } // namespace regular } // namespace structured From d955fb58dbb89503ee0c2d776f9359f97e9c33da Mon Sep 17 00:00:00 2001 From: tehrengruber Date: Thu, 26 Mar 2026 17:26:28 +0100 Subject: [PATCH 3/3] Now it actually works --- .../src/_pyghex/structured/regular/field_descriptor.hpp | 5 +++-- .../src/_pyghex/structured/regular/halo_generator.hpp | 5 +++-- bindings/python/src/_pyghex/structured/regular/pattern.hpp | 5 +++-- bindings/python/src/_pyghex/structured/types.hpp | 6 ++++++ 4 files changed, 15 insertions(+), 6 deletions(-) diff --git a/bindings/python/src/_pyghex/structured/regular/field_descriptor.hpp b/bindings/python/src/_pyghex/structured/regular/field_descriptor.hpp index dcc847293..942384a11 100644 --- a/bindings/python/src/_pyghex/structured/regular/field_descriptor.hpp +++ b/bindings/python/src/_pyghex/structured/regular/field_descriptor.hpp @@ -31,8 +31,9 @@ using field_descriptor_specializations_ = gridtools::meta::transform< field_descriptor_args_>; using field_descriptor_specializations = - gridtools::meta::concat, - field_descriptor_specializations_<3>, field_descriptor_specializations_<4>>; + gridtools::meta::concat, + field_descriptor_specializations_<2>, field_descriptor_specializations_<3>, + field_descriptor_specializations_<4>>; } // namespace } // namespace regular diff --git a/bindings/python/src/_pyghex/structured/regular/halo_generator.hpp b/bindings/python/src/_pyghex/structured/regular/halo_generator.hpp index 8b5824f16..b259d16a2 100644 --- a/bindings/python/src/_pyghex/structured/regular/halo_generator.hpp +++ b/bindings/python/src/_pyghex/structured/regular/halo_generator.hpp @@ -30,8 +30,9 @@ using halo_generator_specializations_ = gridtools::meta::transform< gridtools::meta::rename::template apply, halo_generator_args_>; -using halo_generator_specializations = gridtools::meta::concat, - halo_generator_specializations_<3>, halo_generator_specializations_<4>>; +using halo_generator_specializations = + gridtools::meta::concat, halo_generator_specializations_<2>, + halo_generator_specializations_<3>, halo_generator_specializations_<4>>; } // namespace } // namespace regular } // namespace structured diff --git a/bindings/python/src/_pyghex/structured/regular/pattern.hpp b/bindings/python/src/_pyghex/structured/regular/pattern.hpp index 3daee7b71..2a177e4b2 100644 --- a/bindings/python/src/_pyghex/structured/regular/pattern.hpp +++ b/bindings/python/src/_pyghex/structured/regular/pattern.hpp @@ -41,8 +41,9 @@ using make_pattern_traits_specializations_ = make_pattern_traits_args_>; using make_pattern_traits_specializations = - gridtools::meta::concat, - make_pattern_traits_specializations_<3>, make_pattern_traits_specializations_<4>>; + gridtools::meta::concat, + make_pattern_traits_specializations_<2>, make_pattern_traits_specializations_<3>, + make_pattern_traits_specializations_<4>>; } // namespace } // namespace regular diff --git a/bindings/python/src/_pyghex/structured/types.hpp b/bindings/python/src/_pyghex/structured/types.hpp index 1d401a01a..389e628fb 100644 --- a/bindings/python/src/_pyghex/structured/types.hpp +++ b/bindings/python/src/_pyghex/structured/types.hpp @@ -28,6 +28,12 @@ using dims = std::integral_constant; template struct layouts; +template<> +struct layouts<1> +{ + using list = gridtools::meta::list>; +}; + template<> struct layouts<2> {