Skip to content

Commit

Permalink
Change defined var calc
Browse files Browse the repository at this point in the history
  • Loading branch information
ThrudPrimrose committed Dec 2, 2024
1 parent 275d342 commit 8d6ca03
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions dace/codegen/targets/framecode.py
Original file line number Diff line number Diff line change
Expand Up @@ -955,13 +955,11 @@ def generate_code(self,
and config.Config.get('compiler', 'fpga', 'vendor').lower() == 'intel_fpga'):
# Emit OpenCL type
callsite_stream.write(f'{isvarType.ocltype} {isvarName};\n', sdfg)
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
assert isinstance(isvarName, str)
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)
self.dispatcher.defined_vars.add(isvarName, disp.DefinedType.Scalar, isvarType.ctype)
callsite_stream.write('\n', sdfg)

#######################################################################
Expand Down

0 comments on commit 8d6ca03

Please sign in to comment.