-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
25 lines (22 loc) · 740 Bytes
/
main.cpp
File metadata and controls
25 lines (22 loc) · 740 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
#include <iostream>
#include <ica/benchmarks/ICABenchmarkFunctions.h>
#include <ica/solver_serial.h>
#include <ica/solver_smp.h>
#include <ica/solver_opencl.h>
int main(int argc, char **args) {
auto cfg = solver::load_config("../configs/ica.cfg");
for (size_t i = 0; i < benchmark::BenchmarkFunc::TOTAL_FUNCTIONS; ++i) {
auto setup = benchmark::BenchmarkFunc::create_solver(cfg, i);
std::cout << "Benchmark function = " << benchmark::BenchmarkFunc::get_func_name(i) << "\n";
if (cfg.methods[0]) {
solve_serial(setup);
}
if (cfg.methods[1]) {
solve_smp(setup);
}
if (cfg.methods[2]) {
solve_opencl(setup);
}
}
return 0;
}