MCPcopy Create free account
hub / github.com/antmachineintelligence/mtgbmcode / main

Function main

compute/perf/perf_tbb_merge.cpp:74–95  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

72}
73
74int main(int argc, char *argv[])
75{
76 perf_parse_args(argc, argv);
77
78 std::cout << "size: " << PERF_N << std::endl;
79 std::vector<int> v1 = generate_random_vector<int>(PERF_N / 2);
80 std::vector<int> v2 = generate_random_vector<int>(PERF_N / 2);
81 std::vector<int> v3(PERF_N);
82
83 std::sort(v1.begin(), v1.end());
84 std::sort(v2.begin(), v2.end());
85
86 perf_timer t;
87 for(size_t trial = 0; trial < PERF_TRIALS; trial++){
88 t.start();
89 ParallelMerge(v1.begin(), v1.end(), v2.begin(), v2.end(), v3.begin());
90 t.stop();
91 }
92 std::cout << "time: " << t.min_time() / 1e6 << " ms" << std::endl;
93
94 return 0;
95}

Callers

nothing calls this directly

Calls 8

perf_parse_argsFunction · 0.85
sortFunction · 0.85
ParallelMergeFunction · 0.85
startMethod · 0.80
stopMethod · 0.80
min_timeMethod · 0.80
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected