-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
27 lines (21 loc) · 700 Bytes
/
main.cpp
File metadata and controls
27 lines (21 loc) · 700 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
#include <iostream>
#include <omp.h>
#include <memory>
#include <cstdio>
#include "prototype.h"
#include "num_threads.h"
#include "run_experements.hpp"
int main(int argc, char** argv){
for (auto &funk : functions){
auto filename = "output/" + std::string(funk.first) + ".csv";
auto file = fopen(filename.c_str(), "w");
fprintf(file, "Thread,match,time,speedup,efficiency\n");
auto result = run_experiment(funk.second, N);
for (auto &item : result){
fprintf(file, p, item.T, item.match, item.time, item.speedup, item.efficiency);
}
fclose(file);
std::cout << funk.first << " is end \n";
}
return 0;
}