From 0356b5846d750cb0219951157bde5af8fffe2daa Mon Sep 17 00:00:00 2001 From: Nicolas Kruse Date: Sun, 12 Oct 2025 23:23:59 +0200 Subject: [PATCH] ALLOCATE_DATA fixed --- src/copapy/__init__.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/copapy/__init__.py b/src/copapy/__init__.py index 92e8aa8..7cc15a7 100644 --- a/src/copapy/__init__.py +++ b/src/copapy/__init__.py @@ -388,6 +388,10 @@ def compile_to_instruction_list(node_list: Iterable[Node], sdb: stencil_database dw.write_value(net.source.value, lengths) # print(f'+ {net.dtype} {net.source.value}') + # allocate program data + dw.write_com(binw.Command.ALLOCATE_CODE) + dw.write_int(0) + # write auxiliary_functions aux_function_names = sdb.get_sub_functions(node.name for _, node in extended_output_ops) aux_function_mem_layout, aux_function_lengths = get_aux_function_mem_layout(aux_function_names, sdb) @@ -436,10 +440,6 @@ def compile_to_instruction_list(node_list: Iterable[Node], sdb: stencil_database offset += len(data) # print('function_end', offset, data) - # allocate program data - dw.write_com(binw.Command.ALLOCATE_CODE) - dw.write_int(offset) - # write program data dw.write_com(binw.Command.COPY_CODE) dw.write_int(0)