-
Notifications
You must be signed in to change notification settings - Fork 3
/
Helpers.h
39 lines (29 loc) · 1.31 KB
/
Helpers.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#pragma once
#include "HPCParallelPattern.h"
#include "PatternGraph.h"
#include <vector>
/**
* GraphSearchDirection for recursive descent.
*/
enum GraphSearchDirection
{
DIR_Children, DIR_Parents
};
namespace PatternHelpers
{
extern std::vector<PatternOccurrence*> GetPatternOccurrences(std::vector<PatternCodeRegion*> CodeRegions, bool MakeUnique);
}
namespace GraphAlgorithms
{
extern void MarkConnectedComponents();
extern void MarkConnectedComponents(PatternGraphNode* Node, int ComponentID);
extern void FindParentPatternCodeRegions(PatternCodeRegion* Start, std::vector<PatternCodeRegion*>& Parents, int maxdepth);
extern void FindChildPatternCodeRegions(PatternCodeRegion* Start, std::vector<PatternCodeRegion*>& Children, int maxdepth);
extern void FindNeighbourPatternCodeRegions(PatternGraphNode* Current, std::vector<PatternCodeRegion*>& Results, GraphSearchDirection dir, int depth, int maxdepth);
extern void FindNeighbourPatternCodeRegionss(PatternGraphNode* Current, std::vector<PatternCodeRegion*>& Results, GraphSearchDirection dir, int * depth, int maxdepth);
}
namespace SetAlgorithms
{
extern std::vector<PatternOccurrence*> GetUniquePatternOccList(std::vector<PatternOccurrence*> PatternOccs);
extern std::vector<HPCParallelPattern*> GetUniquePatternList(std::vector<HPCParallelPattern*> Patterns);
}