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

Function main

compute/perf/perf_stl_stable_partition.cpp:28–47  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

26}
27
28int main(int argc, char *argv[])
29{
30 perf_parse_args(argc, argv);
31 std::cout << "size: " << PERF_N << std::endl;
32
33 // create vector of random numbers on the host
34 std::vector<int> host_vector(PERF_N);
35 std::generate(host_vector.begin(), host_vector.end(), rand_int);
36
37 perf_timer t;
38 for(size_t trial = 0; trial < PERF_TRIALS; trial++){
39 t.start();
40 std::stable_partition(host_vector.begin(), host_vector.end(),
41 less_than_10);
42 t.stop();
43 }
44 std::cout << "time: " << t.min_time() / 1e6 << " ms" << std::endl;
45
46 return 0;
47}

Callers

nothing calls this directly

Calls 8

perf_parse_argsFunction · 0.85
stable_partitionFunction · 0.85
startMethod · 0.80
stopMethod · 0.80
min_timeMethod · 0.80
generateFunction · 0.50
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected