-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathmain.cpp
More file actions
34 lines (27 loc) · 723 Bytes
/
main.cpp
File metadata and controls
34 lines (27 loc) · 723 Bytes
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
#include "Analyzer.h"
#include "DDT.h"
#include "Executor.h"
#include "GenerateCppSource.h"
#include "Input.h"
#include "Inspector.h"
#include <DDTUtils.h>
#include <algorithm>
int main(int argc, char** argv) {
// Parse program arguments
auto config = DDT::parseInput(argc, argv);
// Allocate memory and generate global object
auto d = DDT::init(config);
// Parse into run-time Codelets
auto cl = new std::vector<DDT::Codelet *>[config.nThread]();
DDT::inspectSerialTrace(d, cl, config);
// Execute codes
if (config.analyze) {
DDT::analyzeData(d, cl, config);
} else {
DDT::executeCodelets(cl, config);
// DDT::generateSource(d);
}
// Clean up
DDT::free(d);
return 0;
}