From 9ca50ddef3aacec6d8e7cec20d5576329c2ff035 Mon Sep 17 00:00:00 2001 From: muellch <60387010+muellch@users.noreply.github.com> Date: Wed, 12 Apr 2023 11:25:17 +0200 Subject: [PATCH] Fixed code generation bug in case there are no tolerance fields (#188) --- pyutils/src/icon4py/icon4pygen/bindings/codegen/header.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pyutils/src/icon4py/icon4pygen/bindings/codegen/header.py b/pyutils/src/icon4py/icon4pygen/bindings/codegen/header.py index 19da5f1866..321dae71c2 100644 --- a/pyutils/src/icon4py/icon4pygen/bindings/codegen/header.py +++ b/pyutils/src/icon4py/icon4pygen/bindings/codegen/header.py @@ -42,7 +42,11 @@ {%- for field in _this_node.out_fields -%} {{ field.renderer.render_ctype('c++') }} {{ field.renderer.render_pointer() }} {{ field.name }}_{{ suffix }}, {%- endfor -%} + {%- if _this_node.tol_fields -%} const int verticalStart, const int verticalEnd, const int horizontalStart, const int horizontalEnd, + {%- else -%} + const int verticalStart, const int verticalEnd, const int horizontalStart, const int horizontalEnd + {%- endif -%} {%- for field in _this_node.tol_fields -%} const double {{ field.name }}_rel_tol, const double {{ field.name }}_abs_tol