Skip to content
Snippets Groups Projects
Commit 3bc599c3 authored by Rafael Ravedutti's avatar Rafael Ravedutti
Browse files

Fix generation of runtime variable copies


Signed-off-by: default avatarRafael Ravedutti <rafaelravedutti@gmail.com>
parent 6f8144c3
No related merge requests found
......@@ -300,9 +300,9 @@ class CGen:
var_name = ast_node.variable.name()
if ast_node.context() == Contexts.Device:
self.print(f"rv_{var_name}->copyToDevice();")
self.print(f"rv_{var_name}.copyToDevice();")
else:
self.print(f"rv_{var_name}->copyToHost();")
self.print(f"rv_{var_name}.copyToHost();")
if isinstance(ast_node, ClearArrayFlag):
array_id = ast_node.array.id()
......
......@@ -81,8 +81,8 @@ class Transformations:
self.lift_expressions_to_owner_blocks()
self.licm()
self.modularize()
self.add_device_copies()
self.add_device_kernels()
self.add_device_copies()
self.lower(True)
self.add_expression_declarations()
self.add_host_references_to_modules()
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment