ttg 1.0.0
Template Task Graph (TTG): flowgraph-based programming model for high-performance distributed-memory algorithms
Loading...
Searching...
No Matches
make_index_sequence.hpp
Go to the documentation of this file.
1/*
2Copyright Barrett Adair 2016-2017
3
4Distributed under the Boost Software License, Version 1.0.
5(See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt)
6*/
7
8#ifndef BOOST_CLBL_TRTS_DETAIL_POLYFILLS_MAKE_INDEX_SEQUENCE_HPP
9#define BOOST_CLBL_TRTS_DETAIL_POLYFILLS_MAKE_INDEX_SEQUENCE_HPP
10
11#undef BOOST_CLBL_TRTS_IX_SEQ
12#define BOOST_CLBL_TRTS_IX_SEQ(...) \
13 ::boost::callable_traits::detail::index_sequence<__VA_ARGS__>
14
15#undef BOOST_CLBL_TRTS_MAKE_IX_SEQ
16#define BOOST_CLBL_TRTS_MAKE_IX_SEQ(...) \
17 ::boost::callable_traits::detail::make_index_sequence<__VA_ARGS__>
18
19namespace boost { namespace callable_traits { namespace detail {
20
21template<std::size_t...>
23
24template<typename, typename>
25struct concat;
26
27template<std::size_t... I1, std::size_t... I2>
28struct concat<index_sequence<I1...>, index_sequence<I2...>>
29 : index_sequence<I1..., (sizeof...(I1)+I2)...> {};
30
31template<std::size_t N>
33
34template<std::size_t N>
36 typename make_index_sequence_t<N/2>::type,
37 typename make_index_sequence_t<N - N/2>::type >::type {};
38
39template<>
41
42template<>
44
45template<std::size_t... I>
46using make_index_sequence = typename make_index_sequence_t<I...>::type;
47
48}}} // namespace boost::callable_traits::detail
49
50#endif // #ifndef BOOST_CLBL_TRTS_DETAIL_POLYFILLS_MAKE_INDEX_SEQUENCE_HPP
typename make_index_sequence_t< I... >::type make_index_sequence