]>
git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/hana/benchmark/fold_left/execute.hana.tuple.erb.cpp
622d74f887ead19966e8b805fd12ef5008971155
1 // Copyright Louis Dionne 2013-2017
2 // Copyright Zach Laine 2014
3 // Distributed under the Boost Software License, Version 1.0.
4 // (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt)
6 #include <boost/hana/fold_left.hpp>
7 #include <boost/hana/tuple.hpp>
14 boost::hana::benchmark::measure([] {
15 long double result
= 0;
16 for (int iteration
= 0; iteration
< 1 << 10; ++iteration
) {
17 auto values
= boost::hana::make_tuple(
18 <%= input_size
.times
.map
{ 'std::rand()' }.join(', ') %>
21 result
+= boost::hana::fold_left(values
, 0, [](auto state
, auto t
) {