fixed aux function alignment in get_aux_function_mem_layout

This commit is contained in:
Nicolas 2025-11-11 09:10:54 +01:00
parent 37c68bc13d
commit f345d02120
1 changed files with 2 additions and 2 deletions

View File

@ -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