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

Function main

benchmark/transform/execute.std.array.erb.cpp:11–26  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

9
10
11int main () {
12 boost::hana::benchmark::measure([] {
13 long long result = 0;
14 for (int iteration = 0; iteration < 1 << 10; ++iteration) {
15 std::array<int, <%= input_size %>> values = {{
16 <%= input_size.times.map { 'std::rand()' }.join(', ') %>
17 }};
18
19 std::array<long long, <%= input_size %>> results{};
20
21 std::transform(values.begin(), values.end(), results.begin(), [&](auto t) {
22 return result += t;
23 });
24 }
25 });
26}

Callers

nothing calls this directly

Calls 5

measureFunction · 0.85
transformClass · 0.85
beginMethod · 0.80
endMethod · 0.80
joinFunction · 0.50

Tested by

no test coverage detected