-
Notifications
You must be signed in to change notification settings - Fork 63
/
main.cpp
62 lines (50 loc) · 1.19 KB
/
main.cpp
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
/*
* main.cpp
*/
#include <iostream>
#include <iomanip>
#include <memory>
#include <chrono>
#include <cstddef>
#include <new>
#include <cassert>
#include <type_traits>
#include <sstream>
#include <functional>
#include <cstring>
#include <cstdlib>
#include <sys/mman.h>
#if USE_BACKWARD_CPP
#include "backward-cpp/backward.hpp"
#endif
#include "stats.hpp"
#include "version.hpp"
#include "args.hxx"
#include "benchmark.hpp"
#include "timer-info.hpp"
#include "context.hpp"
#include "util.hpp"
#include "timers.hpp"
#include "isa-support.hpp"
#include "matchers.hpp"
using namespace std;
using namespace std::chrono;
using namespace Stats;
#if USE_BACKWARD_CPP
backward::SignalHandling sh;
#endif
int main(int argc, char **argv) {
cout << "Welcome to uarch-bench (" << GIT_VERSION << ")" << endl;
cout << "Supported CPU features: " + support_string() << endl;
try {
Context context(argc, argv, &std::cout);
context.run();
} catch (SilentSuccess& e) {
} catch (SilentFailure& e) {
return EXIT_FAILURE;
} catch (const std::exception& e) {
std::cerr << "ERROR: " << e.what() << std::endl;
return EXIT_FAILURE;
}
return EXIT_SUCCESS;
}