diff options
author | Jack Lloyd <[email protected]> | 2017-12-16 11:02:59 -0500 |
---|---|---|
committer | Jack Lloyd <[email protected]> | 2017-12-16 11:02:59 -0500 |
commit | d420b61ec604e5117a126ea1a6c6c9f6777fd0da (patch) | |
tree | 21414f2fb3dbdc6eb1942950b40c615437f216e2 /src/lib/pubkey/xmss/xmss_tools.cpp | |
parent | b6fa65d38fa9b8a95d8028e0ec811b44808e11a8 (diff) |
Clean up XMSS self-benchmark
Clang complained that the lambda was capturing unnecessary variables.
Diffstat (limited to 'src/lib/pubkey/xmss/xmss_tools.cpp')
-rw-r--r-- | src/lib/pubkey/xmss/xmss_tools.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/lib/pubkey/xmss/xmss_tools.cpp b/src/lib/pubkey/xmss/xmss_tools.cpp index 7a34dc0a9..9b71ab36c 100644 --- a/src/lib/pubkey/xmss/xmss_tools.cpp +++ b/src/lib/pubkey/xmss/xmss_tools.cpp @@ -44,13 +44,11 @@ size_t XMSS_Tools::bench_threads() { auto& hs = hash[i]; auto& d = data[i]; - threads.emplace_back( - std::thread([&BENCH_ITERATIONS, &i, &cc, &hs, &d]() + + const size_t n_iters = BENCH_ITERATIONS * (std::thread::hardware_concurrency() / cc); + threads.emplace_back(std::thread([n_iters, &hs, &d]() { - for(size_t n = 0; - n < BENCH_ITERATIONS * (std::thread::hardware_concurrency() / - cc); - n++) + for(size_t n = 0; n < n_iters; n++) { hs.h(d, d, d); } |