diff --git a/dace/codegen/targets/cpu.py b/dace/codegen/targets/cpu.py index ab6b5f3d81..8b7724d59e 100644 --- a/dace/codegen/targets/cpu.py +++ b/dace/codegen/targets/cpu.py @@ -494,7 +494,7 @@ def allocate_array(self, sdfg: SDFG, cfg: ControlFlowRegion, dfg: StateSubgraphV if not declared: declaration_stream.write(f'{nodedesc.dtype.ctype} *{name};\n', cfg, state_id, node) allocation_stream.write( - "%s = static_cast<{nodedesc.dtype.ctype}*>(std::aligned_alloc(64, %s * sizeof(%s)));\n" % (alloc_name, cpp.sym2cpp(arrsize), nodedesc.dtype.ctype), cfg, + "%s = static_cast<%s*>(std::aligned_alloc(64, %s * sizeof(%s)));\n" % (nodedesc.dtype.ctype, alloc_name, cpp.sym2cpp(arrsize), nodedesc.dtype.ctype), cfg, state_id, node) define_var(name, DefinedType.Pointer, ctypedef) diff --git a/dace/runtime/include/dace/dace.h b/dace/runtime/include/dace/dace.h index 960aece94c..4e9cbf2cc0 100644 --- a/dace/runtime/include/dace/dace.h +++ b/dace/runtime/include/dace/dace.h @@ -8,6 +8,7 @@ #include #include #include +#include // The order in which these are included matters - sorting them // alphabetically causes compilation to fail.