Skip to content

Commit

Permalink
Fix arrays not showing up in sidebar
Browse files Browse the repository at this point in the history
Closes #156
  • Loading branch information
phschaad committed Oct 30, 2024
1 parent 9cbcd3d commit 9944b47
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions src/sdfv_ui.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import {
Edge,
Memlet,
NestedSDFG,
SDFG,
SDFGElement,
} from './renderer/renderer_elements';
import type { DagreGraph, SDFGRenderer } from './renderer/renderer';
Expand Down Expand Up @@ -235,6 +236,10 @@ export class SDFVWebUI implements ISDFVUserInterface {
switch (attr[0]) {
case 'layout':
case 'sdfg':
case '_arrays':
case 'orig_sdfg':
case 'transformation_hist':
case 'position':
continue;
default:
contents.append($('<b>', {
Expand All @@ -250,6 +255,34 @@ export class SDFVWebUI implements ISDFVUserInterface {
}
}
}

// For SDFGs and nested SDFGs, add information about the SDFG's data
// descriptors.
let descriptors = undefined;
if (elem instanceof SDFG)
descriptors = elem.attributes()._arrays;
else if (elem instanceof NestedSDFG)
descriptors = elem.attributes().sdfg.attributes._arrays;

if (descriptors) {
contents.append($('<hr>'));
contents.append($('<b>', {
html: 'Data containers:&nbsp;&nbsp;',
}));
contents.append($('<hr>'));
for (const desc in descriptors) {
contents.append($('<b>', {
html: desc + ':&nbsp;&nbsp;',
}));
contents.append($('<span>', {
html: sdfg_property_to_string(
descriptors[desc], renderer.view_settings()
),
}));
contents.append($('<br>'));
}
contents.append($('<hr>'));
}
}

}

0 comments on commit 9944b47

Please sign in to comment.