From a25a3eae1fe673e06009fdf5ae5e29297cbea811 Mon Sep 17 00:00:00 2001 From: Tal Ben-Nun Date: Sat, 12 Oct 2024 02:27:03 -0700 Subject: [PATCH] Make memlet label more descriptive (#174) 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) {