Skip to content
Snippets Groups Projects
Commit df7f69df authored by Stephan Seitz's avatar Stephan Seitz
Browse files

Bug fix!!!

parent 354877bb
No related branches found
No related tags found
1 merge request!98WIP: Graph datahandling
...@@ -7,13 +7,13 @@ ...@@ -7,13 +7,13 @@
""" """
""" """
from enum import Enum from enum import Enum
import numpy as np import numpy as np
import pystencils.datahandling import pystencils.datahandling
import pystencils.kernel_wrapper import pystencils.kernel_wrapper
import pystencils.timeloop
from pystencils.field import FieldType from pystencils.field import FieldType
...@@ -181,7 +181,7 @@ class GraphDataHandling(pystencils.datahandling.SerialDataHandling): ...@@ -181,7 +181,7 @@ class GraphDataHandling(pystencils.datahandling.SerialDataHandling):
def synchronization_function(self, names, stencil=None, target=None, **_): def synchronization_function(self, names, stencil=None, target=None, **_):
for name in names: for name in names:
gpu = target == 'cpu' gpu = target == 'gpu'
self.call_queue.append(Communication(self._fields[name], stencil, gpu)) self.call_queue.append(Communication(self._fields[name], stencil, gpu))
super().synchronization_function(names, stencil=None, target=None, **_) super().synchronization_function(names, stencil=None, target=None, **_)
......
...@@ -76,9 +76,9 @@ def create_kernel(assignments, ...@@ -76,9 +76,9 @@ def create_kernel(assignments,
[0., 4., 4., 4., 0.], [0., 4., 4., 4., 0.],
[0., 0., 0., 0., 0.]]) [0., 0., 0., 0., 0.]])
""" """
#save the original assignments # save the original assignments
assign = assignments assign = assignments
# ---- Normalizing parameters # ---- Normalizing parameters
split_groups = () split_groups = ()
if isinstance(assignments, AssignmentCollection): if isinstance(assignments, AssignmentCollection):
...@@ -187,7 +187,7 @@ def create_indexed_kernel(assignments, ...@@ -187,7 +187,7 @@ def create_indexed_kernel(assignments,
""" """
assign = assignments assign = assignments
indF = index_fields indF = index_fields
if isinstance(assignments, Assignment): if isinstance(assignments, Assignment):
assignments = [assignments] assignments = [assignments]
elif isinstance(assignments, AssignmentCollection): elif isinstance(assignments, AssignmentCollection):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment