From f690774005d5c170c5b87ed447eff314d67c3141 Mon Sep 17 00:00:00 2001 From: Stephan Seitz <stephan.seitz@fau.de> Date: Tue, 10 Dec 2019 14:24:10 +0100 Subject: [PATCH] Add DataTransfer.__str__, Swap.__str__ --- pystencils/datahandling/graph_datahandling.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pystencils/datahandling/graph_datahandling.py b/pystencils/datahandling/graph_datahandling.py index adae10213..650bf51f6 100644 --- a/pystencils/datahandling/graph_datahandling.py +++ b/pystencils/datahandling/graph_datahandling.py @@ -42,6 +42,9 @@ class DataTransfer: self.field = field self.kind = kind + def __str__(self): + return f'DataTransferKind: {self.kind} with {self.field}' + class Swap(DataTransfer): def __init__(self, source, destination, gpu): @@ -49,6 +52,9 @@ class Swap(DataTransfer): self.field = source self.destination = destination + def __str__(self): + return f'Swap: {self.field} with {self.destination}' + class Communication(DataTransfer): def __init__(self, field, stencil, gpu): -- GitLab