From 131a87348f9bac230406480b9f6dfc68bae4c1e1 Mon Sep 17 00:00:00 2001 From: Tal Ben-Nun Date: Fri, 11 Oct 2024 13:56:12 -0700 Subject: [PATCH] Make memlet label more descriptive If the directionality of the memlet is different, print the label inverted. --- src/renderer/renderer_elements.ts | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/renderer/renderer_elements.ts b/src/renderer/renderer_elements.ts index d136427..fc17b31 100644 --- a/src/renderer/renderer_elements.ts +++ b/src/renderer/renderer_elements.ts @@ -1702,9 +1702,16 @@ export class Memlet extends Edge { contents += sdfg_property_to_string(attr.subset, dsettings); if (attr.other_subset) { - contents += ' -> ' + sdfg_property_to_string( - attr.other_subset, dsettings - ); + // TODO: Obtain other data name, if possible + if (attr.is_data_src) { + contents += ' -> ' + sdfg_property_to_string( + attr.other_subset, dsettings + ); + } else { + contents = sdfg_property_to_string( + attr.other_subset, dsettings + ) + ' -> ' + contents; + } } if (attr.wcr) {