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