Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor out overlay type #180

Merged
merged 1 commit into from
Oct 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/overlays/avg_parallelism_overlay.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ import {
SDFGElement,
SDFGNode,
} from '../renderer/renderer_elements';
import { Point2D, SymbolMap } from '../types';
import { OverlayType, Point2D, SymbolMap } from '../types';
import { getGraphElementUUID } from '../utils/sdfg/sdfg_utils';
import { getTempColorHslString } from '../utils/utils';
import { GenericSdfgOverlay, OverlayType } from './generic_sdfg_overlay';
import { GenericSdfgOverlay } from './generic_sdfg_overlay';

export class AvgParallelismOverlay extends GenericSdfgOverlay {

Expand Down
4 changes: 2 additions & 2 deletions src/overlays/depth_overlay.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ import {
SDFGElement,
SDFGNode,
} from '../renderer/renderer_elements';
import { Point2D, SymbolMap } from '../types';
import { OverlayType, Point2D, SymbolMap } from '../types';
import { getGraphElementUUID } from '../utils/sdfg/sdfg_utils';
import { getTempColorHslString } from '../utils/utils';
import { GenericSdfgOverlay, OverlayType } from './generic_sdfg_overlay';
import { GenericSdfgOverlay } from './generic_sdfg_overlay';

export class DepthOverlay extends GenericSdfgOverlay {

Expand Down
4 changes: 2 additions & 2 deletions src/overlays/diff_overlay.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ import {
ControlFlowBlock,
} from '../renderer/renderer_elements';
import { DiffMap } from '../sdfg_diff_viewer';
import { Point2D } from '../types';
import { GenericSdfgOverlay, OverlayType } from './generic_sdfg_overlay';
import { OverlayType, Point2D } from '../types';
import { GenericSdfgOverlay } from './generic_sdfg_overlay';

export class DiffOverlay extends GenericSdfgOverlay {

Expand Down
8 changes: 1 addition & 7 deletions src/overlays/generic_sdfg_overlay.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,10 @@ import {
SDFGNode,
State,
} from '../renderer/renderer_elements';
import { Point2D, SimpleRect } from '../types';
import { Point2D, SimpleRect, OverlayType } from '../types';

declare const vscode: any;

export enum OverlayType {
NODE,
EDGE,
BOTH,
}

export class GenericSdfgOverlay {

public static readonly type: OverlayType = OverlayType.BOTH;
Expand Down
4 changes: 2 additions & 2 deletions src/overlays/logical_group_overlay.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ import {
ControlFlowBlock,
Edge,
} from '../renderer/renderer_elements';
import { Point2D } from '../types';
import { GenericSdfgOverlay, OverlayType } from './generic_sdfg_overlay';
import { OverlayType, Point2D } from '../types';
import { GenericSdfgOverlay } from './generic_sdfg_overlay';

export type LogicalGroup = {
name: string,
Expand Down
4 changes: 2 additions & 2 deletions src/overlays/memory_location_overlay.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ import {
SDFGElement,
SDFGNode,
} from '../renderer/renderer_elements';
import { Point2D } from '../types';
import { OverlayType, Point2D } from '../types';
import { KELLY_COLORS } from '../utils/utils';
import { GenericSdfgOverlay, OverlayType } from './generic_sdfg_overlay';
import { GenericSdfgOverlay } from './generic_sdfg_overlay';

// Available data storage types in the SDFG.
export enum StorageType {
Expand Down
4 changes: 2 additions & 2 deletions src/overlays/memory_volume_overlay.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ import {
SDFGElement,
State,
} from '../renderer/renderer_elements';
import { Point2D, SymbolMap } from '../types';
import { OverlayType, Point2D, SymbolMap } from '../types';
import { getTempColorHslString } from '../utils/utils';
import { GenericSdfgOverlay, OverlayType } from './generic_sdfg_overlay';
import { GenericSdfgOverlay } from './generic_sdfg_overlay';

export class MemoryVolumeOverlay extends GenericSdfgOverlay {

Expand Down
4 changes: 2 additions & 2 deletions src/overlays/operational_intensity_overlay.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ import {
SDFGElement,
SDFGNode,
} from '../renderer/renderer_elements';
import { Point2D, SymbolMap } from '../types';
import { OverlayType, Point2D, SymbolMap } from '../types';
import { getGraphElementUUID } from '../utils/sdfg/sdfg_utils';
import { getTempColorHslString } from '../utils/utils';
import { GenericSdfgOverlay, OverlayType } from './generic_sdfg_overlay';
import { GenericSdfgOverlay } from './generic_sdfg_overlay';

export class OperationalIntensityOverlay extends GenericSdfgOverlay {

Expand Down
2 changes: 1 addition & 1 deletion src/overlays/runtime_micro_seconds_overlay.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ import { getTempColorHslString } from '../utils/utils';
import { getGraphElementUUID } from '../utils/sdfg/sdfg_utils';
import {
GenericSdfgOverlay,
OverlayType,
RuntimeReportOverlay,
} from './generic_sdfg_overlay';
import { OverlayType } from '../types';


export class RuntimeMicroSecondsOverlay extends RuntimeReportOverlay {
Expand Down
4 changes: 2 additions & 2 deletions src/overlays/simulated_operational_intensity_overlay.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ import {
SDFGElement,
SDFGNode,
} from '../renderer/renderer_elements';
import { Point2D, SymbolMap } from '../types';
import { OverlayType, Point2D, SymbolMap } from '../types';
import { getGraphElementUUID } from '../utils/sdfg/sdfg_utils';
import { getTempColorHslString } from '../utils/utils';
import { GenericSdfgOverlay, OverlayType } from './generic_sdfg_overlay';
import { GenericSdfgOverlay } from './generic_sdfg_overlay';

export class SimulatedOperationalIntensityOverlay extends GenericSdfgOverlay {

Expand Down
4 changes: 2 additions & 2 deletions src/overlays/static_flops_overlay.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ import {
SDFGElement,
SDFGNode,
} from '../renderer/renderer_elements';
import { Point2D, SymbolMap } from '../types';
import { OverlayType, Point2D, SymbolMap } from '../types';
import { getGraphElementUUID } from '../utils/sdfg/sdfg_utils';
import { getTempColorHslString } from '../utils/utils';
import { GenericSdfgOverlay, OverlayType } from './generic_sdfg_overlay';
import { GenericSdfgOverlay } from './generic_sdfg_overlay';

export class StaticFlopsOverlay extends GenericSdfgOverlay {

Expand Down
6 changes: 6 additions & 0 deletions src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ export type SymbolMap = {
[symbol: string]: number | undefined,
};

export enum OverlayType {
NODE,
EDGE,
BOTH,
};

export type InvalidSDFGError = {
message: string | undefined,
sdfg_id: number | undefined,
Expand Down
Loading