Skip to content

Commit

Permalink
Use free symbols instead of arglist
Browse files Browse the repository at this point in the history
  • Loading branch information
ThrudPrimrose committed Nov 21, 2024
1 parent 51e8404 commit 0b31f9a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions dace/codegen/targets/framecode.py
Original file line number Diff line number Diff line change
Expand Up @@ -896,7 +896,7 @@ def generate_code(self,
# Allocate outer-level transients
self.allocate_arrays_in_scope(sdfg, sdfg, sdfg, global_stream, callsite_stream)

global_args = sdfg.arglist()
outside_symbols = sdfg.free_symbols

# Define constants as top-level-allocated
for cname, (ctype, _) in sdfg.constants_prop.items():
Expand Down Expand Up @@ -956,7 +956,7 @@ def generate_code(self,
self.dispatcher.defined_vars.add(isvarName, disp.DefinedType.Scalar, isvarType.ctype)
else:
# If the variable is passed as an input argument to the SDFG, do not need to declare it
if isvarName not in global_args:
if isvarName not in outside_symbols:
callsite_stream.write('%s;\n' % (isvar.as_arg(with_types=True, name=isvarName)), sdfg)
self.dispatcher.defined_vars.add(isvarName, disp.DefinedType.Scalar, isvarType.ctype)
callsite_stream.write('\n', sdfg)
Expand Down

0 comments on commit 0b31f9a

Please sign in to comment.