MCPcopy Create free account
hub / github.com/ashvardanian/less_slow.cpp / pipeline_cpp11_lambdas

Function pipeline_cpp11_lambdas

less_slow.cpp:3654–3664  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3652}
3653
3654static void pipeline_cpp11_lambdas(bm::State &state) {
3655 std::uint64_t sum = 0, count = 0;
3656 for (auto _ : state) {
3657 sum = 0, count = 0;
3658 for (std::uint64_t value = pipe_start; value <= pipe_end; ++value) {
3659 if (!is_power_of_two(value) && !is_power_of_three(value))
3660 prime_factors_lambdas(value, [&](std::uint64_t factor) { sum += factor, count++; });
3661 }
3662 if (count != 84 || sum != 645) state.SkipWithError("Incorrect result");
3663 }
3664}
3665
3666BENCHMARK(pipeline_cpp11_lambdas);
3667

Callers

nothing calls this directly

Calls 3

is_power_of_twoFunction · 0.85
is_power_of_threeFunction · 0.85
prime_factors_lambdasFunction · 0.85

Tested by

no test coverage detected