From f345d021206f9449e31c39d52e1fb95ee53717ce Mon Sep 17 00:00:00 2001 From: Nicolas Date: Tue, 11 Nov 2025 09:10:54 +0100 Subject: [PATCH] fixed aux function alignment in get_aux_function_mem_layout --- src/copapy/_compiler.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/copapy/_compiler.py b/src/copapy/_compiler.py index 0a5d355..519b99d 100644 --- a/src/copapy/_compiler.py +++ b/src/copapy/_compiler.py @@ -184,7 +184,7 @@ def get_data_layout(variable_list: Iterable[Net], sdb: stencil_database, offset: for variable in variable_list: lengths = sdb.get_type_size(transl_type(variable.dtype)) - offset = (offset + lengths - 1) // lengths * lengths # align variables to there own size + offset = (offset + lengths - 1) // lengths * lengths # align variables to their own size object_list.append((variable, offset, lengths)) offset += lengths @@ -233,8 +233,8 @@ def get_aux_function_mem_layout(function_names: Iterable[str], sdb: stencil_data for name in function_names: lengths = sdb.get_symbol_size(name) + offset = (offset + 15) // 16 * 16 function_list.append((name, offset, lengths)) - offset += (lengths + 15) // 16 * 16 offset += lengths return function_list, offset