diff --git a/include/gridtools/fn/common_interface.hpp b/include/gridtools/fn/common_interface.hpp index cac90e102..6add42347 100644 --- a/include/gridtools/fn/common_interface.hpp +++ b/include/gridtools/fn/common_interface.hpp @@ -11,6 +11,7 @@ #include +#include "../common/hymap.hpp" #include "../common/tuple.hpp" #include "../common/tuple_util.hpp" #include "../stencil/positional.hpp" @@ -29,7 +30,7 @@ namespace gridtools::fn { } template - GT_FUNCTION tuple...> make_tuple(Args &&...args) { + GT_FUNCTION tuple...> make_tuple(Args &&... args) { return {std::forward(args)...}; } @@ -38,4 +39,12 @@ namespace gridtools::fn { return gridtools::stencil::positional(); } + // TODO(tehrengruber): `typename sid::lower_bounds_type, typename sid::upper_bounds_type` + // fails as type used for index calculations in gtfn differs + template + GT_FUNCTION tuple get_domain(S &&sid, D) { + return {host_device::at_key(gridtools::sid::get_lower_bounds(sid)), + host_device::at_key(gridtools::sid::get_upper_bounds(sid))}; + } + } // namespace gridtools::fn