Skip to content

Commit

Permalink
changed spelling to summarize
Browse files Browse the repository at this point in the history
  • Loading branch information
LeandroTreu committed Apr 24, 2024
1 parent 8bebdc8 commit d35ad78
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 20 deletions.
26 changes: 13 additions & 13 deletions src/renderer/renderer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3046,8 +3046,8 @@ export class SDFGRenderer extends EventEmitter {
if (obj.hovered && hover_changed) {
// Setting these to false will cause the summary symbol
// not to be drawn in renderer_elements.ts
obj.summarise_in_edges = false;
obj.summarise_out_edges = false;
obj.summarize_in_edges = false;
obj.summarize_out_edges = false;
const state = obj.parentElem;
if (state && state instanceof State && state.data) {
const state_json = state.data.state;
Expand All @@ -3063,8 +3063,8 @@ export class SDFGRenderer extends EventEmitter {
}
}
else if (!obj.hovered && hover_changed) {
obj.summarise_in_edges = true;
obj.summarise_out_edges = true;
obj.summarize_in_edges = true;
obj.summarize_out_edges = true;
const state = obj.parentElem;
if (state && state instanceof State && state.data) {
const state_json = state.data.state;
Expand Down Expand Up @@ -4239,17 +4239,17 @@ function relayoutSDFGState(
return;
}

// Summarise edges for NestedSDFGs and ScopeNodes
// Summarize edges for NestedSDFGs and ScopeNodes
if (gnode instanceof NestedSDFG || gnode instanceof ScopeNode) {
const n_of_in_connectors = gnode.in_connectors.length;
const n_of_out_connectors = gnode.out_connectors.length;

if (n_of_in_connectors > 10) {
gnode.summarise_in_edges = true;
gnode.summarize_in_edges = true;
gnode.in_summary_has_effect = true;
}
if (n_of_out_connectors > 10) {
gnode.summarise_out_edges = true;
gnode.summarize_out_edges = true;
gnode.out_summary_has_effect = true;
}
}
Expand All @@ -4269,10 +4269,10 @@ function relayoutSDFGState(
state.edges.forEach((edge: JsonSDFGEdge, id: number) => {
if (edge.dst === gnode.id.toString() && edge.dst_connector === c.data.name) {

// If in-edges are to be summarised, set Memlet.summarised
// If in-edges are to be summarized, set Memlet.summarized
const gedge = g.edge(edge.src, edge.dst, id.toString()) as Memlet;
if (gedge && gnode.summarise_in_edges) {
gedge.summarised = true;
if (gedge && gnode.summarize_in_edges) {
gedge.summarized = true;
}

const source_node: SDFGNode = g.node(edge.src);
Expand Down Expand Up @@ -4313,14 +4313,14 @@ function relayoutSDFGState(
}
}

// For out_connectors set Memlet.summarised for all out-edges if needed
if (gnode.summarise_out_edges) {
// For out_connectors set Memlet.summarized for all out-edges if needed
if (gnode.summarize_out_edges) {
for (const c of gnode.out_connectors) {
state.edges.forEach((edge: JsonSDFGEdge, id: number) => {
if (edge.src === gnode.id.toString() && edge.src_connector === c.data.name) {
const gedge = g.edge(edge.src, edge.dst, id.toString()) as Memlet;
if (gedge) {
gedge.summarised = true;
gedge.summarized = true;
}
}
});
Expand Down
14 changes: 7 additions & 7 deletions src/renderer/renderer_elements.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ export class SDFGElement {
// These two fields get set in the layouter, depending on the number of in/out_connectors
// of a node. They also get toggled in the mousehandler when the hover status changes.
// Currently only used for NestedSDFGs and ScopeNodes.
public summarise_in_edges: boolean = false;
public summarise_out_edges: boolean = false;
public summarize_in_edges: boolean = false;
public summarize_out_edges: boolean = false;
// Used in draw_edge_summary to decide if edge summary is applicable. Set in the layouter
// only for NestedSDFGs and ScopeNodes. This prevents the summary to get toggled on
// by the mousehandler when it is not applicable.
Expand Down Expand Up @@ -304,7 +304,7 @@ export class SDFGElement {
ctx.fill();
}

if (this.summarise_in_edges && this.in_summary_has_effect) {
if (this.summarize_in_edges && this.in_summary_has_effect) {
// Find the left most and right most connector coordinates
if (this.in_connectors.length > 0) {
let min_connector_x = Number.MAX_SAFE_INTEGER;
Expand All @@ -324,7 +324,7 @@ export class SDFGElement {
topleft.y - 8, true);
}
}
if (this.summarise_out_edges && this.out_summary_has_effect) {
if (this.summarize_out_edges && this.out_summary_has_effect) {
// Find the left most and right most connector coordinates
if (this.out_connectors.length > 0) {
let min_connector_x = Number.MAX_SAFE_INTEGER;
Expand Down Expand Up @@ -1229,7 +1229,7 @@ export class Memlet extends Edge {

// Currently used for Memlets to decide if they need to be drawn or not.
// Set in the layouter.
public summarised: boolean = false;
public summarized: boolean = false;

public create_arrow_line(ctx: CanvasRenderingContext2D): void {
// Draw memlet edges with quadratic curves through the arrow points.
Expand Down Expand Up @@ -2712,8 +2712,8 @@ function batchedDrawEdges(
deferredEdges.push(edge);
return;
}
// Dont draw if Memlet is summarised
else if (edge instanceof Memlet && edge.summarised) {
// Dont draw if Memlet is summarized
else if (edge instanceof Memlet && edge.summarized) {
return;
}

Expand Down

0 comments on commit d35ad78

Please sign in to comment.