]> git.proxmox.com Git - ceph.git/blame - ceph/src/boost/libs/hana/benchmark/reverse/move.fusion.vector.erb.cpp
update sources to v12.2.3
[ceph.git] / ceph / src / boost / libs / hana / benchmark / reverse / move.fusion.vector.erb.cpp
CommitLineData
b32b8144 1// Copyright Louis Dionne 2013-2017
7c673cae
FG
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)
4
5<% if input_size > 10 %>
6 #define FUSION_MAX_VECTOR_SIZE <%= ((input_size + 9) / 10) * 10 %>
7<% end %>
8
9#include <boost/fusion/include/as_vector.hpp>
10#include <boost/fusion/include/make_vector.hpp>
11#include <boost/fusion/include/reverse.hpp>
12
13#include "measure.hpp"
14#include <cstdlib>
15#include <string>
16#include <utility>
17namespace fusion = boost::fusion;
18namespace hana = boost::hana;
19
20
21int main () {
22 std::string s(1000, 'x');
23 hana::benchmark::measure([&] {
24 for (int iteration = 0; iteration < 1 << 5; ++iteration) {
25 auto values = fusion::make_vector(
26 <%= input_size.times.map { 's' }.join(', ') %>
27 );
28
29 auto result = fusion::as_vector(fusion::reverse(std::move(values)));
30 (void)result;
31 }
32 });
33}