]>
git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/hana/benchmark/transform/execute.fusion.vector.erb.cpp
5fac408f7311d75ef3e163474aca694bb9b36b00
1 // Copyright Louis Dionne 2013-2016
2 // Distributed under the Boost Software License, Version 1.0.
3 // (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt)
5 <% if input_size
> 10 %>
6 #define FUSION_MAX_VECTOR_SIZE <%= ((input_size + 9) / 10) * 10 %>
9 #include <boost/fusion/include/as_vector.hpp>
10 #include <boost/fusion/include/make_vector.hpp>
11 #include <boost/fusion/include/transform.hpp>
13 #include "measure.hpp"
15 namespace fusion
= boost::fusion
;
16 namespace hana
= boost::hana
;
20 hana::benchmark::measure([] {
22 for (int iteration
= 0; iteration
< 1 << 10; ++iteration
) {
23 auto values
= fusion::make_vector(
24 <%= input_size
.times
.map
{ 'std::rand()' }.join(', ') %>
27 auto transformed
= fusion::as_vector(fusion::transform(values
, [&](auto t
) {