FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

modified main.cpp of benchmarks · fcccode/cpp-taskflow@996ad7a · GitHub

Repository navigation

Commit 996ad7a

Browse files
Tsung-Wei Huang
committed
modified main.cpp of benchmarks
1 parent 902317f commit 996ad7a

2 files changed

Lines changed: 15 additions & 13 deletions

File tree

‎benchmark/graph_traversal/main.cpp‎

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,6 @@ int main(int argc, char* argv[]) {
88
num_threads = std::atoi(argv[1]);
99
}
1010

11-
double omp_time {0.0};
12-
double tbb_time {0.0};
13-
double tf_time {0.0};
1411
int rounds {5};
1512

1613
std::cout << std::setw(12) << "|V|+|E|"
@@ -23,6 +20,10 @@ int main(int argc, char* argv[]) {
2320

2421
for(int i=1; i<=451; i += 15) {
2522

23+
double omp_time {0.0};
24+
double tbb_time {0.0};
25+
double tf_time {0.0};
26+
2627
LevelGraph graph(i, i);
2728

2829
for(int j=0; j<rounds; ++j) {
@@ -37,9 +38,9 @@ int main(int argc, char* argv[]) {
3738
}
3839

3940
std::cout << std::setw(12) << graph.graph_size()
40-
<< std::setw(12) << omp_time / rounds / 1e6
41-
<< std::setw(12) << tbb_time / rounds / 1e6
42-
<< std::setw(12) << tf_time / rounds / 1e6
41+
<< std::setw(12) << omp_time / rounds / 1e3
42+
<< std::setw(12) << tbb_time / rounds / 1e3
43+
<< std::setw(12) << tf_time / rounds / 1e3
4344
<< std::setw(12) << omp_time / tf_time
4445
<< std::setw(12) << tbb_time / tf_time
4546
<< std::endl;

‎benchmark/wavefront/main.cpp‎

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,6 @@ int main(int argc, char* argv[]) {
88
num_threads = std::atoi(argv[1]);
99
}
1010

11-
double omp_time {0.0};
12-
double tbb_time {0.0};
13-
double tf_time {0.0};
1411
int rounds {5};
1512

1613
std::cout << std::setw(12) << "# blocks"
@@ -21,12 +18,16 @@ int main(int argc, char* argv[]) {
2118
<< std::setw(12) << "speedup2"
2219
<< '\n';
2320

24-
for(int S=128; S<=4096; S += 128) {
21+
for(int S=1; S<=4096; S += 128) {
2522

2623
M = N = S;
2724
B = 8;
2825
MB = (M/B) + (M%B>0);
2926
NB = (N/B) + (N%B>0);
27+
28+
double omp_time {0.0};
29+
double tbb_time {0.0};
30+
double tf_time {0.0};
3031

3132
init_matrix();
3233

@@ -39,9 +40,9 @@ int main(int argc, char* argv[]) {
3940
destroy_matrix();
4041

4142
std::cout << std::setw(12) << MB*NB
42-
<< std::setw(12) << omp_time / rounds / 1e6
43-
<< std::setw(12) << tbb_time / rounds / 1e6
44-
<< std::setw(12) << tf_time / rounds / 1e6
43+
<< std::setw(12) << omp_time / rounds / 1e3
44+
<< std::setw(12) << tbb_time / rounds / 1e3
45+
<< std::setw(12) << tf_time / rounds / 1e3
4546
<< std::setw(12) << omp_time / tf_time
4647
<< std::setw(12) << tbb_time / tf_time
4748
<< std::endl;

0 commit comments

Comments
 (0)

Back | FazBrowse Home | New Git URL