MCPcopy Create free account
hub / github.com/boostorg/compute / main

Function main

perf/perf_stl_partial_sum.cpp:23–42  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 8

perf_parse_argsFunction · 0.85
generateFunction · 0.85
partial_sumFunction · 0.85
startMethod · 0.80
stopMethod · 0.80
min_timeMethod · 0.80
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected