stabilize build system: depends, installer, boost/bdb fixes, cross targets groundwork
This commit is contained in:
@@ -0,0 +1,45 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2001-2011 Joel de Guzman
|
||||
Copyright (c) 2015 Kohei Takahashi
|
||||
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
==============================================================================*/
|
||||
#if !defined(FUSION_ACCUMULATE_09172005_1032)
|
||||
#define FUSION_ACCUMULATE_09172005_1032
|
||||
|
||||
#include <boost/fusion/support/config.hpp>
|
||||
#include <boost/fusion/algorithm/iteration/accumulate_fwd.hpp>
|
||||
#include <boost/fusion/algorithm/iteration/fold.hpp>
|
||||
|
||||
namespace boost { namespace fusion
|
||||
{
|
||||
struct void_;
|
||||
|
||||
namespace result_of
|
||||
{
|
||||
template <typename Sequence, typename State, typename F>
|
||||
struct accumulate
|
||||
: result_of::fold<Sequence, State, F>
|
||||
{};
|
||||
}
|
||||
|
||||
template <typename Sequence, typename State, typename F>
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
inline typename result_of::accumulate<Sequence, State const, F>::type
|
||||
accumulate(Sequence& seq, State const& state, F f)
|
||||
{
|
||||
return fusion::fold(seq, state, f);
|
||||
}
|
||||
|
||||
template <typename Sequence, typename State, typename F>
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
inline typename result_of::accumulate<Sequence const, State const, F>::type
|
||||
accumulate(Sequence const& seq, State const& state, F f)
|
||||
{
|
||||
return fusion::fold(seq, state, f);
|
||||
}
|
||||
}}
|
||||
|
||||
#endif
|
||||
|
||||
+33
@@ -0,0 +1,33 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2011 Eric Niebler
|
||||
Copyright (c) 2015 Kohei Takahashi
|
||||
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
==============================================================================*/
|
||||
#if !defined(BOOST_FUSION_ACCUMULATE_FWD_HPP_INCLUDED)
|
||||
#define BOOST_FUSION_ACCUMULATE_FWD_HPP_INCLUDED
|
||||
|
||||
#include <boost/fusion/support/config.hpp>
|
||||
|
||||
namespace boost { namespace fusion
|
||||
{
|
||||
namespace result_of
|
||||
{
|
||||
template <typename Sequence, typename State, typename F>
|
||||
struct accumulate;
|
||||
}
|
||||
|
||||
template <typename Sequence, typename State, typename F>
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
inline typename result_of::accumulate<Sequence, State const, F>::type
|
||||
accumulate(Sequence& seq, State const& state, F f);
|
||||
|
||||
template <typename Sequence, typename State, typename F>
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
inline typename result_of::accumulate<Sequence const, State const, F>::type
|
||||
accumulate(Sequence const& seq, State const& state, F f);
|
||||
}}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,294 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2001-2011 Joel de Guzman
|
||||
Copyright (c) 2006 Dan Marsden
|
||||
Copyright (c) 2009-2010 Christopher Schmidt
|
||||
Copyright (c) 2015 Kohei Takahashi
|
||||
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
==============================================================================*/
|
||||
#include <boost/preprocessor/cat.hpp>
|
||||
|
||||
#define FUSION_HASH #
|
||||
|
||||
#ifdef BOOST_FUSION_REVERSE_FOLD
|
||||
# ifdef BOOST_FUSION_ITER_FOLD
|
||||
# define BOOST_FUSION_FOLD_NAME reverse_iter_fold
|
||||
# else
|
||||
# define BOOST_FUSION_FOLD_NAME reverse_fold
|
||||
# endif
|
||||
|
||||
# define BOOST_FUSION_FOLD_IMPL_FIRST_IT_FUNCTION end
|
||||
# define BOOST_FUSION_FOLD_IMPL_NEXT_IT_FUNCTION prior
|
||||
# define BOOST_FUSION_FOLD_IMPL_FIRST_IT_META_TRANSFORM(IT) \
|
||||
typename fusion::result_of::prior<IT>::type
|
||||
# define BOOST_FUSION_FOLD_IMPL_FIRST_IT_TRANSFORM(IT) fusion::prior(IT)
|
||||
#else
|
||||
# ifdef BOOST_FUSION_ITER_FOLD
|
||||
# define BOOST_FUSION_FOLD_NAME iter_fold
|
||||
# else
|
||||
# define BOOST_FUSION_FOLD_NAME fold
|
||||
# endif
|
||||
|
||||
# define BOOST_FUSION_FOLD_IMPL_FIRST_IT_FUNCTION begin
|
||||
# define BOOST_FUSION_FOLD_IMPL_NEXT_IT_FUNCTION next
|
||||
# define BOOST_FUSION_FOLD_IMPL_FIRST_IT_META_TRANSFORM(IT) IT
|
||||
# define BOOST_FUSION_FOLD_IMPL_FIRST_IT_TRANSFORM(IT) IT
|
||||
#endif
|
||||
#ifdef BOOST_FUSION_ITER_FOLD
|
||||
# define BOOST_FUSION_FOLD_IMPL_INVOKE_IT_META_TRANSFORM(IT) IT&
|
||||
# define BOOST_FUSION_FOLD_IMPL_INVOKE_IT_TRANSFORM(IT) IT
|
||||
#else
|
||||
# define BOOST_FUSION_FOLD_IMPL_INVOKE_IT_META_TRANSFORM(IT) \
|
||||
typename fusion::result_of::deref<IT>::type
|
||||
# define BOOST_FUSION_FOLD_IMPL_INVOKE_IT_TRANSFORM(IT) fusion::deref(IT)
|
||||
#endif
|
||||
|
||||
#if (defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES))
|
||||
FUSION_HASH if BOOST_WORKAROUND BOOST_PREVENT_MACRO_SUBSTITUTION (BOOST_MSVC, < 1500)
|
||||
FUSION_HASH define BOOST_FUSION_FOLD_IMPL_ENABLER(T) void
|
||||
FUSION_HASH else
|
||||
FUSION_HASH define BOOST_FUSION_FOLD_IMPL_ENABLER(T) typename T::type
|
||||
FUSION_HASH endif
|
||||
#else
|
||||
# if BOOST_WORKAROUND(BOOST_MSVC, < 1500)
|
||||
# define BOOST_FUSION_FOLD_IMPL_ENABLER(T) void
|
||||
# else
|
||||
# define BOOST_FUSION_FOLD_IMPL_ENABLER(T) typename T::type
|
||||
# endif
|
||||
#endif
|
||||
|
||||
namespace boost { namespace fusion
|
||||
{
|
||||
namespace detail
|
||||
{
|
||||
template<int SeqSize, typename It, typename State, typename F, typename = void
|
||||
#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES)
|
||||
FUSION_HASH if BOOST_WORKAROUND BOOST_PREVENT_MACRO_SUBSTITUTION (BOOST_MSVC, < 1500)
|
||||
#endif
|
||||
#if BOOST_WORKAROUND(BOOST_MSVC, < 1500) || \
|
||||
(defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES))
|
||||
// Dirty hack: those compilers cannot choose exactly one partial specialization.
|
||||
, bool = SeqSize == 0
|
||||
#endif
|
||||
#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES)
|
||||
FUSION_HASH endif
|
||||
#endif
|
||||
>
|
||||
struct BOOST_PP_CAT(result_of_it_,BOOST_FUSION_FOLD_NAME)
|
||||
{};
|
||||
|
||||
template<typename It, typename State, typename F>
|
||||
struct BOOST_PP_CAT(result_of_it_,BOOST_FUSION_FOLD_NAME)<0,It,State,F
|
||||
, typename boost::enable_if_has_type<BOOST_FUSION_FOLD_IMPL_ENABLER(State)>::type
|
||||
#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES)
|
||||
FUSION_HASH if BOOST_WORKAROUND BOOST_PREVENT_MACRO_SUBSTITUTION (BOOST_MSVC, < 1500)
|
||||
#endif
|
||||
#if BOOST_WORKAROUND(BOOST_MSVC, < 1500) || \
|
||||
(defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES))
|
||||
, true
|
||||
#endif
|
||||
#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES)
|
||||
FUSION_HASH endif
|
||||
#endif
|
||||
>
|
||||
{
|
||||
typedef typename State::type type;
|
||||
};
|
||||
|
||||
template<int SeqSize, typename It, typename State, typename F>
|
||||
struct BOOST_PP_CAT(result_of_it_,BOOST_FUSION_FOLD_NAME)<SeqSize,It,State,F
|
||||
, typename boost::enable_if_has_type<
|
||||
#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES)
|
||||
FUSION_HASH if BOOST_WORKAROUND BOOST_PREVENT_MACRO_SUBSTITUTION (BOOST_MSVC, >= 1500)
|
||||
#endif
|
||||
#if BOOST_WORKAROUND(BOOST_MSVC, >= 1500) || \
|
||||
(defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES))
|
||||
// Following SFINAE enables to avoid MSVC 9's partial specialization
|
||||
// ambiguous bug but MSVC 8 don't compile, and moreover MSVC 8 style
|
||||
// workaround won't work with MSVC 9.
|
||||
typename boost::disable_if_c<SeqSize == 0, State>::type::type
|
||||
#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES)
|
||||
FUSION_HASH else
|
||||
BOOST_FUSION_FOLD_IMPL_ENABLER(State)
|
||||
#endif
|
||||
#else
|
||||
BOOST_FUSION_FOLD_IMPL_ENABLER(State)
|
||||
#endif
|
||||
#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES)
|
||||
FUSION_HASH endif
|
||||
#endif
|
||||
>::type
|
||||
#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES)
|
||||
FUSION_HASH if BOOST_WORKAROUND BOOST_PREVENT_MACRO_SUBSTITUTION (BOOST_MSVC, < 1500)
|
||||
#endif
|
||||
#if BOOST_WORKAROUND(BOOST_MSVC, < 1500) || \
|
||||
(defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES))
|
||||
, false
|
||||
#endif
|
||||
#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES)
|
||||
FUSION_HASH endif
|
||||
#endif
|
||||
>
|
||||
: BOOST_PP_CAT(result_of_it_,BOOST_FUSION_FOLD_NAME)<
|
||||
SeqSize-1
|
||||
, typename result_of::BOOST_FUSION_FOLD_IMPL_NEXT_IT_FUNCTION<It>::type
|
||||
, boost::result_of<
|
||||
F(
|
||||
typename add_reference<typename State::type>::type,
|
||||
BOOST_FUSION_FOLD_IMPL_INVOKE_IT_META_TRANSFORM(It const)
|
||||
)
|
||||
>
|
||||
, F
|
||||
>
|
||||
{};
|
||||
|
||||
template<typename It, typename State, typename F>
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
inline typename BOOST_PP_CAT(result_of_it_,BOOST_FUSION_FOLD_NAME)<
|
||||
0
|
||||
, It
|
||||
, State
|
||||
, F
|
||||
>::type
|
||||
BOOST_PP_CAT(it_,BOOST_FUSION_FOLD_NAME)(mpl::int_<0>, It const&, typename State::type state, F&)
|
||||
{
|
||||
return state;
|
||||
}
|
||||
|
||||
template<typename It, typename State, typename F, int SeqSize>
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
inline typename lazy_enable_if_c<
|
||||
SeqSize != 0
|
||||
, BOOST_PP_CAT(result_of_it_,BOOST_FUSION_FOLD_NAME)<
|
||||
SeqSize
|
||||
, It
|
||||
, State
|
||||
, F
|
||||
>
|
||||
>::type
|
||||
BOOST_PP_CAT(it_,BOOST_FUSION_FOLD_NAME)(mpl::int_<SeqSize>, It const& it, typename State::type state, F& f)
|
||||
{
|
||||
return BOOST_PP_CAT(it_,BOOST_FUSION_FOLD_NAME)<
|
||||
typename result_of::BOOST_FUSION_FOLD_IMPL_NEXT_IT_FUNCTION<It>::type
|
||||
, boost::result_of<
|
||||
F(
|
||||
typename add_reference<typename State::type>::type,
|
||||
BOOST_FUSION_FOLD_IMPL_INVOKE_IT_META_TRANSFORM(It const)
|
||||
)
|
||||
>
|
||||
, F
|
||||
>(
|
||||
mpl::int_<SeqSize-1>()
|
||||
, fusion::BOOST_FUSION_FOLD_IMPL_NEXT_IT_FUNCTION(it)
|
||||
, f(state, BOOST_FUSION_FOLD_IMPL_INVOKE_IT_TRANSFORM(it))
|
||||
, f
|
||||
);
|
||||
}
|
||||
|
||||
template<typename Seq, typename State, typename F
|
||||
, bool = traits::is_sequence<Seq>::value
|
||||
, bool = traits::is_segmented<Seq>::value>
|
||||
struct BOOST_PP_CAT(result_of_,BOOST_FUSION_FOLD_NAME)
|
||||
{};
|
||||
|
||||
template<typename Seq, typename State, typename F>
|
||||
struct BOOST_PP_CAT(result_of_,BOOST_FUSION_FOLD_NAME)<Seq, State, F, true, false>
|
||||
: BOOST_PP_CAT(result_of_it_,BOOST_FUSION_FOLD_NAME)<
|
||||
result_of::size<Seq>::value
|
||||
, BOOST_FUSION_FOLD_IMPL_FIRST_IT_META_TRANSFORM(
|
||||
typename result_of::BOOST_FUSION_FOLD_IMPL_FIRST_IT_FUNCTION<Seq>::type
|
||||
)
|
||||
, add_reference<State>
|
||||
, F
|
||||
>
|
||||
{};
|
||||
|
||||
template<typename Seq, typename State, typename F>
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
inline typename BOOST_PP_CAT(result_of_,BOOST_FUSION_FOLD_NAME)<Seq, State, F>::type
|
||||
BOOST_FUSION_FOLD_NAME(Seq& seq, State& state, F& f)
|
||||
{
|
||||
return BOOST_PP_CAT(it_,BOOST_FUSION_FOLD_NAME)<
|
||||
BOOST_FUSION_FOLD_IMPL_FIRST_IT_META_TRANSFORM(
|
||||
typename result_of::BOOST_FUSION_FOLD_IMPL_FIRST_IT_FUNCTION<Seq>::type
|
||||
)
|
||||
, add_reference<State>
|
||||
, F
|
||||
>(
|
||||
typename result_of::size<Seq>::type()
|
||||
, BOOST_FUSION_FOLD_IMPL_FIRST_IT_TRANSFORM(
|
||||
fusion::BOOST_FUSION_FOLD_IMPL_FIRST_IT_FUNCTION(seq)
|
||||
)
|
||||
, state
|
||||
, f
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
namespace result_of
|
||||
{
|
||||
template<typename Seq, typename State, typename F>
|
||||
struct BOOST_FUSION_FOLD_NAME
|
||||
: detail::BOOST_PP_CAT(result_of_,BOOST_FUSION_FOLD_NAME)<Seq, State, F>
|
||||
{};
|
||||
}
|
||||
|
||||
template<typename Seq, typename State, typename F>
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
inline typename result_of::BOOST_FUSION_FOLD_NAME<
|
||||
Seq
|
||||
, State const
|
||||
, F
|
||||
>::type
|
||||
BOOST_FUSION_FOLD_NAME(Seq& seq, State const& state, F f)
|
||||
{
|
||||
return detail::BOOST_FUSION_FOLD_NAME<Seq, State const, F>(seq, state, f);
|
||||
}
|
||||
|
||||
template<typename Seq, typename State, typename F>
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
inline typename result_of::BOOST_FUSION_FOLD_NAME<
|
||||
Seq const
|
||||
, State const
|
||||
, F
|
||||
>::type
|
||||
BOOST_FUSION_FOLD_NAME(Seq const& seq, State const& state, F f)
|
||||
{
|
||||
return detail::BOOST_FUSION_FOLD_NAME<Seq const, State const, F>(seq, state, f);
|
||||
}
|
||||
|
||||
template<typename Seq, typename State, typename F>
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
inline typename result_of::BOOST_FUSION_FOLD_NAME<
|
||||
Seq
|
||||
, State
|
||||
, F
|
||||
>::type
|
||||
BOOST_FUSION_FOLD_NAME(Seq& seq, State& state, F f)
|
||||
{
|
||||
return detail::BOOST_FUSION_FOLD_NAME<Seq, State, F>(seq, state, f);
|
||||
}
|
||||
|
||||
template<typename Seq, typename State, typename F>
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
inline typename result_of::BOOST_FUSION_FOLD_NAME<
|
||||
Seq const
|
||||
, State
|
||||
, F
|
||||
>::type
|
||||
BOOST_FUSION_FOLD_NAME(Seq const& seq, State& state, F f)
|
||||
{
|
||||
return detail::BOOST_FUSION_FOLD_NAME<Seq const, State, F>(seq, state, f);
|
||||
}
|
||||
}}
|
||||
|
||||
#undef BOOST_FUSION_FOLD_NAME
|
||||
#undef BOOST_FUSION_FOLD_IMPL_ENABLER
|
||||
#undef BOOST_FUSION_FOLD_IMPL_FIRST_IT_FUNCTION
|
||||
#undef BOOST_FUSION_FOLD_IMPL_NEXT_IT_FUNCTION
|
||||
#undef BOOST_FUSION_FOLD_IMPL_FIRST_IT_META_TRANSFORM
|
||||
#undef BOOST_FUSION_FOLD_IMPL_FIRST_IT_TRANSFORM
|
||||
#undef BOOST_FUSION_FOLD_IMPL_INVOKE_IT_META_TRANSFORM
|
||||
#undef BOOST_FUSION_FOLD_IMPL_INVOKE_IT_TRANSFORM
|
||||
#undef FUSION_HASH
|
||||
+149
@@ -0,0 +1,149 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2001-2011 Joel de Guzman
|
||||
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
==============================================================================*/
|
||||
#if !defined(FUSION_FOR_EACH_05052005_1028)
|
||||
#define FUSION_FOR_EACH_05052005_1028
|
||||
|
||||
#include <boost/fusion/support/config.hpp>
|
||||
#include <boost/fusion/sequence/intrinsic/begin.hpp>
|
||||
#include <boost/fusion/sequence/intrinsic/end.hpp>
|
||||
#include <boost/fusion/iterator/equal_to.hpp>
|
||||
#include <boost/fusion/iterator/next.hpp>
|
||||
#include <boost/fusion/iterator/deref.hpp>
|
||||
#include <boost/fusion/iterator/distance.hpp>
|
||||
#include <boost/fusion/support/category_of.hpp>
|
||||
#include <boost/mpl/bool.hpp>
|
||||
|
||||
namespace boost { namespace fusion {
|
||||
namespace detail
|
||||
{
|
||||
template <typename First, typename Last, typename F>
|
||||
BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
inline void
|
||||
for_each_linear(First const&, Last const&, F const&, mpl::true_)
|
||||
{
|
||||
}
|
||||
|
||||
template <typename First, typename Last, typename F>
|
||||
BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
inline void
|
||||
for_each_linear(First const& first, Last const& last, F const& f, mpl::false_)
|
||||
{
|
||||
f(*first);
|
||||
detail::for_each_linear(fusion::next(first), last, f,
|
||||
result_of::equal_to<typename result_of::next<First>::type, Last>());
|
||||
}
|
||||
|
||||
|
||||
template <typename Sequence, typename F, typename Tag>
|
||||
BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
inline void
|
||||
for_each_dispatch(Sequence& seq, F const& f, Tag)
|
||||
{
|
||||
detail::for_each_linear(
|
||||
fusion::begin(seq)
|
||||
, fusion::end(seq)
|
||||
, f
|
||||
, result_of::equal_to<
|
||||
typename result_of::begin<Sequence>::type
|
||||
, typename result_of::end<Sequence>::type>());
|
||||
}
|
||||
|
||||
template<int N>
|
||||
struct for_each_unrolled
|
||||
{
|
||||
template<typename I0, typename F>
|
||||
BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
static void call(I0 const& i0, F const& f)
|
||||
{
|
||||
f(*i0);
|
||||
typedef typename result_of::next<I0>::type I1;
|
||||
I1 i1(fusion::next(i0));
|
||||
f(*i1);
|
||||
typedef typename result_of::next<I1>::type I2;
|
||||
I2 i2(fusion::next(i1));
|
||||
f(*i2);
|
||||
typedef typename result_of::next<I2>::type I3;
|
||||
I3 i3(fusion::next(i2));
|
||||
f(*i3);
|
||||
for_each_unrolled<N-4>::call(fusion::next(i3), f);
|
||||
}
|
||||
};
|
||||
|
||||
template<>
|
||||
struct for_each_unrolled<3>
|
||||
{
|
||||
template<typename I0, typename F>
|
||||
BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
static void call(I0 const& i0, F const& f)
|
||||
{
|
||||
f(*i0);
|
||||
typedef typename result_of::next<I0>::type I1;
|
||||
I1 i1(fusion::next(i0));
|
||||
f(*i1);
|
||||
typedef typename result_of::next<I1>::type I2;
|
||||
I2 i2(fusion::next(i1));
|
||||
f(*i2);
|
||||
}
|
||||
};
|
||||
|
||||
template<>
|
||||
struct for_each_unrolled<2>
|
||||
{
|
||||
template<typename I0, typename F>
|
||||
BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
static void call(I0 const& i0, F const& f)
|
||||
{
|
||||
f(*i0);
|
||||
typedef typename result_of::next<I0>::type I1;
|
||||
I1 i1(fusion::next(i0));
|
||||
f(*i1);
|
||||
}
|
||||
};
|
||||
|
||||
template<>
|
||||
struct for_each_unrolled<1>
|
||||
{
|
||||
template<typename I0, typename F>
|
||||
BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
static void call(I0 const& i0, F const& f)
|
||||
{
|
||||
f(*i0);
|
||||
}
|
||||
};
|
||||
|
||||
template<>
|
||||
struct for_each_unrolled<0>
|
||||
{
|
||||
template<typename It, typename F>
|
||||
BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
static void call(It const&, F const&)
|
||||
{
|
||||
}
|
||||
};
|
||||
|
||||
template <typename Sequence, typename F>
|
||||
BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
inline void
|
||||
for_each_dispatch(Sequence& seq, F const& f, random_access_traversal_tag)
|
||||
{
|
||||
typedef typename result_of::begin<Sequence>::type begin;
|
||||
typedef typename result_of::end<Sequence>::type end;
|
||||
for_each_unrolled<result_of::distance<begin, end>::type::value>::call(fusion::begin(seq), f);
|
||||
}
|
||||
|
||||
template <typename Sequence, typename F>
|
||||
BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
inline void
|
||||
for_each(Sequence& seq, F const& f, mpl::false_) // unsegmented implementation
|
||||
{
|
||||
detail::for_each_dispatch(seq, f, typename traits::category_of<Sequence>::type());
|
||||
}
|
||||
}}}
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
+189
@@ -0,0 +1,189 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2001-2011 Joel de Guzman
|
||||
Copyright (c) 2007 Dan Marsden
|
||||
Copyright (c) 2009-2010 Christopher Schmidt
|
||||
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
This is an auto-generated file. Do not edit!
|
||||
==============================================================================*/
|
||||
# if BOOST_WORKAROUND (BOOST_MSVC, < 1500)
|
||||
# define BOOST_FUSION_FOLD_IMPL_ENABLER(T) void
|
||||
# else
|
||||
# define BOOST_FUSION_FOLD_IMPL_ENABLER(T) typename T::type
|
||||
# endif
|
||||
namespace boost { namespace fusion
|
||||
{
|
||||
namespace detail
|
||||
{
|
||||
template<int SeqSize, typename It, typename State, typename F, typename = void
|
||||
# if BOOST_WORKAROUND (BOOST_MSVC, < 1500)
|
||||
|
||||
, bool = SeqSize == 0
|
||||
# endif
|
||||
>
|
||||
struct result_of_it_fold
|
||||
{};
|
||||
template<typename It, typename State, typename F>
|
||||
struct result_of_it_fold<0,It,State,F
|
||||
, typename boost::enable_if_has_type<BOOST_FUSION_FOLD_IMPL_ENABLER(State)>::type
|
||||
# if BOOST_WORKAROUND (BOOST_MSVC, < 1500)
|
||||
, true
|
||||
# endif
|
||||
>
|
||||
{
|
||||
typedef typename State::type type;
|
||||
};
|
||||
template<int SeqSize, typename It, typename State, typename F>
|
||||
struct result_of_it_fold<SeqSize,It,State,F
|
||||
, typename boost::enable_if_has_type<
|
||||
# if BOOST_WORKAROUND (BOOST_MSVC, >= 1500)
|
||||
|
||||
|
||||
|
||||
typename boost::disable_if_c<SeqSize == 0, State>::type::type
|
||||
# else
|
||||
BOOST_FUSION_FOLD_IMPL_ENABLER(State)
|
||||
# endif
|
||||
>::type
|
||||
# if BOOST_WORKAROUND (BOOST_MSVC, < 1500)
|
||||
, false
|
||||
# endif
|
||||
>
|
||||
: result_of_it_fold<
|
||||
SeqSize-1
|
||||
, typename result_of::next<It>::type
|
||||
, boost::result_of<
|
||||
F(
|
||||
typename add_reference<typename State::type>::type,
|
||||
typename fusion::result_of::deref<It const>::type
|
||||
)
|
||||
>
|
||||
, F
|
||||
>
|
||||
{};
|
||||
template<typename It, typename State, typename F>
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
inline typename result_of_it_fold<
|
||||
0
|
||||
, It
|
||||
, State
|
||||
, F
|
||||
>::type
|
||||
it_fold(mpl::int_<0>, It const&, typename State::type state, F&)
|
||||
{
|
||||
return state;
|
||||
}
|
||||
template<typename It, typename State, typename F, int SeqSize>
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
inline typename lazy_enable_if_c<
|
||||
SeqSize != 0
|
||||
, result_of_it_fold<
|
||||
SeqSize
|
||||
, It
|
||||
, State
|
||||
, F
|
||||
>
|
||||
>::type
|
||||
it_fold(mpl::int_<SeqSize>, It const& it, typename State::type state, F& f)
|
||||
{
|
||||
return it_fold<
|
||||
typename result_of::next<It>::type
|
||||
, boost::result_of<
|
||||
F(
|
||||
typename add_reference<typename State::type>::type,
|
||||
typename fusion::result_of::deref<It const>::type
|
||||
)
|
||||
>
|
||||
, F
|
||||
>(
|
||||
mpl::int_<SeqSize-1>()
|
||||
, fusion::next(it)
|
||||
, f(state, fusion::deref(it))
|
||||
, f
|
||||
);
|
||||
}
|
||||
template<typename Seq, typename State, typename F
|
||||
, bool = traits::is_sequence<Seq>::value
|
||||
, bool = traits::is_segmented<Seq>::value>
|
||||
struct result_of_fold
|
||||
{};
|
||||
template<typename Seq, typename State, typename F>
|
||||
struct result_of_fold<Seq, State, F, true, false>
|
||||
: result_of_it_fold<
|
||||
result_of::size<Seq>::value
|
||||
, typename result_of::begin<Seq>::type
|
||||
, add_reference<State>
|
||||
, F
|
||||
>
|
||||
{};
|
||||
template<typename Seq, typename State, typename F>
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
inline typename result_of_fold<Seq, State, F>::type
|
||||
fold(Seq& seq, State& state, F& f)
|
||||
{
|
||||
return it_fold<
|
||||
typename result_of::begin<Seq>::type
|
||||
, add_reference<State>
|
||||
, F
|
||||
>(
|
||||
typename result_of::size<Seq>::type()
|
||||
, fusion::begin(seq)
|
||||
, state
|
||||
, f
|
||||
);
|
||||
}
|
||||
}
|
||||
namespace result_of
|
||||
{
|
||||
template<typename Seq, typename State, typename F>
|
||||
struct fold
|
||||
: detail::result_of_fold<Seq, State, F>
|
||||
{};
|
||||
}
|
||||
template<typename Seq, typename State, typename F>
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
inline typename result_of::fold<
|
||||
Seq
|
||||
, State const
|
||||
, F
|
||||
>::type
|
||||
fold(Seq& seq, State const& state, F f)
|
||||
{
|
||||
return detail::fold<Seq, State const, F>(seq, state, f);
|
||||
}
|
||||
template<typename Seq, typename State, typename F>
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
inline typename result_of::fold<
|
||||
Seq const
|
||||
, State const
|
||||
, F
|
||||
>::type
|
||||
fold(Seq const& seq, State const& state, F f)
|
||||
{
|
||||
return detail::fold<Seq const, State const, F>(seq, state, f);
|
||||
}
|
||||
template<typename Seq, typename State, typename F>
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
inline typename result_of::fold<
|
||||
Seq
|
||||
, State
|
||||
, F
|
||||
>::type
|
||||
fold(Seq& seq, State& state, F f)
|
||||
{
|
||||
return detail::fold<Seq, State, F>(seq, state, f);
|
||||
}
|
||||
template<typename Seq, typename State, typename F>
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
inline typename result_of::fold<
|
||||
Seq const
|
||||
, State
|
||||
, F
|
||||
>::type
|
||||
fold(Seq const& seq, State& state, F f)
|
||||
{
|
||||
return detail::fold<Seq const, State, F>(seq, state, f);
|
||||
}
|
||||
}}
|
||||
+188
@@ -0,0 +1,188 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2010 Christopher Schmidt
|
||||
Copyright (c) 2001-2011 Joel de Guzman
|
||||
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
This is an auto-generated file. Do not edit!
|
||||
==============================================================================*/
|
||||
# if BOOST_WORKAROUND (BOOST_MSVC, < 1500)
|
||||
# define BOOST_FUSION_FOLD_IMPL_ENABLER(T) void
|
||||
# else
|
||||
# define BOOST_FUSION_FOLD_IMPL_ENABLER(T) typename T::type
|
||||
# endif
|
||||
namespace boost { namespace fusion
|
||||
{
|
||||
namespace detail
|
||||
{
|
||||
template<int SeqSize, typename It, typename State, typename F, typename = void
|
||||
# if BOOST_WORKAROUND (BOOST_MSVC, < 1500)
|
||||
|
||||
, bool = SeqSize == 0
|
||||
# endif
|
||||
>
|
||||
struct result_of_it_iter_fold
|
||||
{};
|
||||
template<typename It, typename State, typename F>
|
||||
struct result_of_it_iter_fold<0,It,State,F
|
||||
, typename boost::enable_if_has_type<BOOST_FUSION_FOLD_IMPL_ENABLER(State)>::type
|
||||
# if BOOST_WORKAROUND (BOOST_MSVC, < 1500)
|
||||
, true
|
||||
# endif
|
||||
>
|
||||
{
|
||||
typedef typename State::type type;
|
||||
};
|
||||
template<int SeqSize, typename It, typename State, typename F>
|
||||
struct result_of_it_iter_fold<SeqSize,It,State,F
|
||||
, typename boost::enable_if_has_type<
|
||||
# if BOOST_WORKAROUND (BOOST_MSVC, >= 1500)
|
||||
|
||||
|
||||
|
||||
typename boost::disable_if_c<SeqSize == 0, State>::type::type
|
||||
# else
|
||||
BOOST_FUSION_FOLD_IMPL_ENABLER(State)
|
||||
# endif
|
||||
>::type
|
||||
# if BOOST_WORKAROUND (BOOST_MSVC, < 1500)
|
||||
, false
|
||||
# endif
|
||||
>
|
||||
: result_of_it_iter_fold<
|
||||
SeqSize-1
|
||||
, typename result_of::next<It>::type
|
||||
, boost::result_of<
|
||||
F(
|
||||
typename add_reference<typename State::type>::type,
|
||||
It const&
|
||||
)
|
||||
>
|
||||
, F
|
||||
>
|
||||
{};
|
||||
template<typename It, typename State, typename F>
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
inline typename result_of_it_iter_fold<
|
||||
0
|
||||
, It
|
||||
, State
|
||||
, F
|
||||
>::type
|
||||
it_iter_fold(mpl::int_<0>, It const&, typename State::type state, F&)
|
||||
{
|
||||
return state;
|
||||
}
|
||||
template<typename It, typename State, typename F, int SeqSize>
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
inline typename lazy_enable_if_c<
|
||||
SeqSize != 0
|
||||
, result_of_it_iter_fold<
|
||||
SeqSize
|
||||
, It
|
||||
, State
|
||||
, F
|
||||
>
|
||||
>::type
|
||||
it_iter_fold(mpl::int_<SeqSize>, It const& it, typename State::type state, F& f)
|
||||
{
|
||||
return it_iter_fold<
|
||||
typename result_of::next<It>::type
|
||||
, boost::result_of<
|
||||
F(
|
||||
typename add_reference<typename State::type>::type,
|
||||
It const&
|
||||
)
|
||||
>
|
||||
, F
|
||||
>(
|
||||
mpl::int_<SeqSize-1>()
|
||||
, fusion::next(it)
|
||||
, f(state, it)
|
||||
, f
|
||||
);
|
||||
}
|
||||
template<typename Seq, typename State, typename F
|
||||
, bool = traits::is_sequence<Seq>::value
|
||||
, bool = traits::is_segmented<Seq>::value>
|
||||
struct result_of_iter_fold
|
||||
{};
|
||||
template<typename Seq, typename State, typename F>
|
||||
struct result_of_iter_fold<Seq, State, F, true, false>
|
||||
: result_of_it_iter_fold<
|
||||
result_of::size<Seq>::value
|
||||
, typename result_of::begin<Seq>::type
|
||||
, add_reference<State>
|
||||
, F
|
||||
>
|
||||
{};
|
||||
template<typename Seq, typename State, typename F>
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
inline typename result_of_iter_fold<Seq, State, F>::type
|
||||
iter_fold(Seq& seq, State& state, F& f)
|
||||
{
|
||||
return it_iter_fold<
|
||||
typename result_of::begin<Seq>::type
|
||||
, add_reference<State>
|
||||
, F
|
||||
>(
|
||||
typename result_of::size<Seq>::type()
|
||||
, fusion::begin(seq)
|
||||
, state
|
||||
, f
|
||||
);
|
||||
}
|
||||
}
|
||||
namespace result_of
|
||||
{
|
||||
template<typename Seq, typename State, typename F>
|
||||
struct iter_fold
|
||||
: detail::result_of_iter_fold<Seq, State, F>
|
||||
{};
|
||||
}
|
||||
template<typename Seq, typename State, typename F>
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
inline typename result_of::iter_fold<
|
||||
Seq
|
||||
, State const
|
||||
, F
|
||||
>::type
|
||||
iter_fold(Seq& seq, State const& state, F f)
|
||||
{
|
||||
return detail::iter_fold<Seq, State const, F>(seq, state, f);
|
||||
}
|
||||
template<typename Seq, typename State, typename F>
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
inline typename result_of::iter_fold<
|
||||
Seq const
|
||||
, State const
|
||||
, F
|
||||
>::type
|
||||
iter_fold(Seq const& seq, State const& state, F f)
|
||||
{
|
||||
return detail::iter_fold<Seq const, State const, F>(seq, state, f);
|
||||
}
|
||||
template<typename Seq, typename State, typename F>
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
inline typename result_of::iter_fold<
|
||||
Seq
|
||||
, State
|
||||
, F
|
||||
>::type
|
||||
iter_fold(Seq& seq, State& state, F f)
|
||||
{
|
||||
return detail::iter_fold<Seq, State, F>(seq, state, f);
|
||||
}
|
||||
template<typename Seq, typename State, typename F>
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
inline typename result_of::iter_fold<
|
||||
Seq const
|
||||
, State
|
||||
, F
|
||||
>::type
|
||||
iter_fold(Seq const& seq, State& state, F f)
|
||||
{
|
||||
return detail::iter_fold<Seq const, State, F>(seq, state, f);
|
||||
}
|
||||
}}
|
||||
+188
@@ -0,0 +1,188 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2009-2010 Christopher Schmidt
|
||||
Copyright (c) 2001-2011 Joel de Guzman
|
||||
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
This is an auto-generated file. Do not edit!
|
||||
==============================================================================*/
|
||||
# if BOOST_WORKAROUND (BOOST_MSVC, < 1500)
|
||||
# define BOOST_FUSION_FOLD_IMPL_ENABLER(T) void
|
||||
# else
|
||||
# define BOOST_FUSION_FOLD_IMPL_ENABLER(T) typename T::type
|
||||
# endif
|
||||
namespace boost { namespace fusion
|
||||
{
|
||||
namespace detail
|
||||
{
|
||||
template<int SeqSize, typename It, typename State, typename F, typename = void
|
||||
# if BOOST_WORKAROUND (BOOST_MSVC, < 1500)
|
||||
|
||||
, bool = SeqSize == 0
|
||||
# endif
|
||||
>
|
||||
struct result_of_it_reverse_fold
|
||||
{};
|
||||
template<typename It, typename State, typename F>
|
||||
struct result_of_it_reverse_fold<0,It,State,F
|
||||
, typename boost::enable_if_has_type<BOOST_FUSION_FOLD_IMPL_ENABLER(State)>::type
|
||||
# if BOOST_WORKAROUND (BOOST_MSVC, < 1500)
|
||||
, true
|
||||
# endif
|
||||
>
|
||||
{
|
||||
typedef typename State::type type;
|
||||
};
|
||||
template<int SeqSize, typename It, typename State, typename F>
|
||||
struct result_of_it_reverse_fold<SeqSize,It,State,F
|
||||
, typename boost::enable_if_has_type<
|
||||
# if BOOST_WORKAROUND (BOOST_MSVC, >= 1500)
|
||||
|
||||
|
||||
|
||||
typename boost::disable_if_c<SeqSize == 0, State>::type::type
|
||||
# else
|
||||
BOOST_FUSION_FOLD_IMPL_ENABLER(State)
|
||||
# endif
|
||||
>::type
|
||||
# if BOOST_WORKAROUND (BOOST_MSVC, < 1500)
|
||||
, false
|
||||
# endif
|
||||
>
|
||||
: result_of_it_reverse_fold<
|
||||
SeqSize-1
|
||||
, typename result_of::prior<It>::type
|
||||
, boost::result_of<
|
||||
F(
|
||||
typename add_reference<typename State::type>::type,
|
||||
typename fusion::result_of::deref<It const>::type
|
||||
)
|
||||
>
|
||||
, F
|
||||
>
|
||||
{};
|
||||
template<typename It, typename State, typename F>
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
inline typename result_of_it_reverse_fold<
|
||||
0
|
||||
, It
|
||||
, State
|
||||
, F
|
||||
>::type
|
||||
it_reverse_fold(mpl::int_<0>, It const&, typename State::type state, F&)
|
||||
{
|
||||
return state;
|
||||
}
|
||||
template<typename It, typename State, typename F, int SeqSize>
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
inline typename lazy_enable_if_c<
|
||||
SeqSize != 0
|
||||
, result_of_it_reverse_fold<
|
||||
SeqSize
|
||||
, It
|
||||
, State
|
||||
, F
|
||||
>
|
||||
>::type
|
||||
it_reverse_fold(mpl::int_<SeqSize>, It const& it, typename State::type state, F& f)
|
||||
{
|
||||
return it_reverse_fold<
|
||||
typename result_of::prior<It>::type
|
||||
, boost::result_of<
|
||||
F(
|
||||
typename add_reference<typename State::type>::type,
|
||||
typename fusion::result_of::deref<It const>::type
|
||||
)
|
||||
>
|
||||
, F
|
||||
>(
|
||||
mpl::int_<SeqSize-1>()
|
||||
, fusion::prior(it)
|
||||
, f(state, fusion::deref(it))
|
||||
, f
|
||||
);
|
||||
}
|
||||
template<typename Seq, typename State, typename F
|
||||
, bool = traits::is_sequence<Seq>::value
|
||||
, bool = traits::is_segmented<Seq>::value>
|
||||
struct result_of_reverse_fold
|
||||
{};
|
||||
template<typename Seq, typename State, typename F>
|
||||
struct result_of_reverse_fold<Seq, State, F, true, false>
|
||||
: result_of_it_reverse_fold<
|
||||
result_of::size<Seq>::value
|
||||
, typename fusion::result_of::prior< typename result_of::end<Seq>::type >::type
|
||||
, add_reference<State>
|
||||
, F
|
||||
>
|
||||
{};
|
||||
template<typename Seq, typename State, typename F>
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
inline typename result_of_reverse_fold<Seq, State, F>::type
|
||||
reverse_fold(Seq& seq, State& state, F& f)
|
||||
{
|
||||
return it_reverse_fold<
|
||||
typename fusion::result_of::prior< typename result_of::end<Seq>::type >::type
|
||||
, add_reference<State>
|
||||
, F
|
||||
>(
|
||||
typename result_of::size<Seq>::type()
|
||||
, fusion::prior( fusion::end(seq) )
|
||||
, state
|
||||
, f
|
||||
);
|
||||
}
|
||||
}
|
||||
namespace result_of
|
||||
{
|
||||
template<typename Seq, typename State, typename F>
|
||||
struct reverse_fold
|
||||
: detail::result_of_reverse_fold<Seq, State, F>
|
||||
{};
|
||||
}
|
||||
template<typename Seq, typename State, typename F>
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
inline typename result_of::reverse_fold<
|
||||
Seq
|
||||
, State const
|
||||
, F
|
||||
>::type
|
||||
reverse_fold(Seq& seq, State const& state, F f)
|
||||
{
|
||||
return detail::reverse_fold<Seq, State const, F>(seq, state, f);
|
||||
}
|
||||
template<typename Seq, typename State, typename F>
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
inline typename result_of::reverse_fold<
|
||||
Seq const
|
||||
, State const
|
||||
, F
|
||||
>::type
|
||||
reverse_fold(Seq const& seq, State const& state, F f)
|
||||
{
|
||||
return detail::reverse_fold<Seq const, State const, F>(seq, state, f);
|
||||
}
|
||||
template<typename Seq, typename State, typename F>
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
inline typename result_of::reverse_fold<
|
||||
Seq
|
||||
, State
|
||||
, F
|
||||
>::type
|
||||
reverse_fold(Seq& seq, State& state, F f)
|
||||
{
|
||||
return detail::reverse_fold<Seq, State, F>(seq, state, f);
|
||||
}
|
||||
template<typename Seq, typename State, typename F>
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
inline typename result_of::reverse_fold<
|
||||
Seq const
|
||||
, State
|
||||
, F
|
||||
>::type
|
||||
reverse_fold(Seq const& seq, State& state, F f)
|
||||
{
|
||||
return detail::reverse_fold<Seq const, State, F>(seq, state, f);
|
||||
}
|
||||
}}
|
||||
+188
@@ -0,0 +1,188 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2010 Christopher Schmidt
|
||||
Copyright (c) 2001-2011 Joel de Guzman
|
||||
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
This is an auto-generated file. Do not edit!
|
||||
==============================================================================*/
|
||||
# if BOOST_WORKAROUND (BOOST_MSVC, < 1500)
|
||||
# define BOOST_FUSION_FOLD_IMPL_ENABLER(T) void
|
||||
# else
|
||||
# define BOOST_FUSION_FOLD_IMPL_ENABLER(T) typename T::type
|
||||
# endif
|
||||
namespace boost { namespace fusion
|
||||
{
|
||||
namespace detail
|
||||
{
|
||||
template<int SeqSize, typename It, typename State, typename F, typename = void
|
||||
# if BOOST_WORKAROUND (BOOST_MSVC, < 1500)
|
||||
|
||||
, bool = SeqSize == 0
|
||||
# endif
|
||||
>
|
||||
struct result_of_it_reverse_iter_fold
|
||||
{};
|
||||
template<typename It, typename State, typename F>
|
||||
struct result_of_it_reverse_iter_fold<0,It,State,F
|
||||
, typename boost::enable_if_has_type<BOOST_FUSION_FOLD_IMPL_ENABLER(State)>::type
|
||||
# if BOOST_WORKAROUND (BOOST_MSVC, < 1500)
|
||||
, true
|
||||
# endif
|
||||
>
|
||||
{
|
||||
typedef typename State::type type;
|
||||
};
|
||||
template<int SeqSize, typename It, typename State, typename F>
|
||||
struct result_of_it_reverse_iter_fold<SeqSize,It,State,F
|
||||
, typename boost::enable_if_has_type<
|
||||
# if BOOST_WORKAROUND (BOOST_MSVC, >= 1500)
|
||||
|
||||
|
||||
|
||||
typename boost::disable_if_c<SeqSize == 0, State>::type::type
|
||||
# else
|
||||
BOOST_FUSION_FOLD_IMPL_ENABLER(State)
|
||||
# endif
|
||||
>::type
|
||||
# if BOOST_WORKAROUND (BOOST_MSVC, < 1500)
|
||||
, false
|
||||
# endif
|
||||
>
|
||||
: result_of_it_reverse_iter_fold<
|
||||
SeqSize-1
|
||||
, typename result_of::prior<It>::type
|
||||
, boost::result_of<
|
||||
F(
|
||||
typename add_reference<typename State::type>::type,
|
||||
It const&
|
||||
)
|
||||
>
|
||||
, F
|
||||
>
|
||||
{};
|
||||
template<typename It, typename State, typename F>
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
inline typename result_of_it_reverse_iter_fold<
|
||||
0
|
||||
, It
|
||||
, State
|
||||
, F
|
||||
>::type
|
||||
it_reverse_iter_fold(mpl::int_<0>, It const&, typename State::type state, F&)
|
||||
{
|
||||
return state;
|
||||
}
|
||||
template<typename It, typename State, typename F, int SeqSize>
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
inline typename lazy_enable_if_c<
|
||||
SeqSize != 0
|
||||
, result_of_it_reverse_iter_fold<
|
||||
SeqSize
|
||||
, It
|
||||
, State
|
||||
, F
|
||||
>
|
||||
>::type
|
||||
it_reverse_iter_fold(mpl::int_<SeqSize>, It const& it, typename State::type state, F& f)
|
||||
{
|
||||
return it_reverse_iter_fold<
|
||||
typename result_of::prior<It>::type
|
||||
, boost::result_of<
|
||||
F(
|
||||
typename add_reference<typename State::type>::type,
|
||||
It const&
|
||||
)
|
||||
>
|
||||
, F
|
||||
>(
|
||||
mpl::int_<SeqSize-1>()
|
||||
, fusion::prior(it)
|
||||
, f(state, it)
|
||||
, f
|
||||
);
|
||||
}
|
||||
template<typename Seq, typename State, typename F
|
||||
, bool = traits::is_sequence<Seq>::value
|
||||
, bool = traits::is_segmented<Seq>::value>
|
||||
struct result_of_reverse_iter_fold
|
||||
{};
|
||||
template<typename Seq, typename State, typename F>
|
||||
struct result_of_reverse_iter_fold<Seq, State, F, true, false>
|
||||
: result_of_it_reverse_iter_fold<
|
||||
result_of::size<Seq>::value
|
||||
, typename fusion::result_of::prior< typename result_of::end<Seq>::type >::type
|
||||
, add_reference<State>
|
||||
, F
|
||||
>
|
||||
{};
|
||||
template<typename Seq, typename State, typename F>
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
inline typename result_of_reverse_iter_fold<Seq, State, F>::type
|
||||
reverse_iter_fold(Seq& seq, State& state, F& f)
|
||||
{
|
||||
return it_reverse_iter_fold<
|
||||
typename fusion::result_of::prior< typename result_of::end<Seq>::type >::type
|
||||
, add_reference<State>
|
||||
, F
|
||||
>(
|
||||
typename result_of::size<Seq>::type()
|
||||
, fusion::prior( fusion::end(seq) )
|
||||
, state
|
||||
, f
|
||||
);
|
||||
}
|
||||
}
|
||||
namespace result_of
|
||||
{
|
||||
template<typename Seq, typename State, typename F>
|
||||
struct reverse_iter_fold
|
||||
: detail::result_of_reverse_iter_fold<Seq, State, F>
|
||||
{};
|
||||
}
|
||||
template<typename Seq, typename State, typename F>
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
inline typename result_of::reverse_iter_fold<
|
||||
Seq
|
||||
, State const
|
||||
, F
|
||||
>::type
|
||||
reverse_iter_fold(Seq& seq, State const& state, F f)
|
||||
{
|
||||
return detail::reverse_iter_fold<Seq, State const, F>(seq, state, f);
|
||||
}
|
||||
template<typename Seq, typename State, typename F>
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
inline typename result_of::reverse_iter_fold<
|
||||
Seq const
|
||||
, State const
|
||||
, F
|
||||
>::type
|
||||
reverse_iter_fold(Seq const& seq, State const& state, F f)
|
||||
{
|
||||
return detail::reverse_iter_fold<Seq const, State const, F>(seq, state, f);
|
||||
}
|
||||
template<typename Seq, typename State, typename F>
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
inline typename result_of::reverse_iter_fold<
|
||||
Seq
|
||||
, State
|
||||
, F
|
||||
>::type
|
||||
reverse_iter_fold(Seq& seq, State& state, F f)
|
||||
{
|
||||
return detail::reverse_iter_fold<Seq, State, F>(seq, state, f);
|
||||
}
|
||||
template<typename Seq, typename State, typename F>
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
inline typename result_of::reverse_iter_fold<
|
||||
Seq const
|
||||
, State
|
||||
, F
|
||||
>::type
|
||||
reverse_iter_fold(Seq const& seq, State& state, F f)
|
||||
{
|
||||
return detail::reverse_iter_fold<Seq const, State, F>(seq, state, f);
|
||||
}
|
||||
}}
|
||||
+64
@@ -0,0 +1,64 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2011 Eric Niebler
|
||||
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
==============================================================================*/
|
||||
#if !defined(BOOST_FUSION_FOLD_S_HPP_INCLUDED)
|
||||
#define BOOST_FUSION_FOLD_S_HPP_INCLUDED
|
||||
|
||||
#include <boost/fusion/support/config.hpp>
|
||||
#include <boost/fusion/algorithm/iteration/fold_fwd.hpp>
|
||||
#include <boost/fusion/support/segmented_fold_until.hpp>
|
||||
#include <boost/mpl/bool.hpp>
|
||||
|
||||
namespace boost { namespace fusion { namespace detail
|
||||
{
|
||||
template <typename Fun>
|
||||
struct segmented_fold_fun
|
||||
{
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
explicit segmented_fold_fun(Fun const& f)
|
||||
: fun(f)
|
||||
{}
|
||||
|
||||
Fun const& fun;
|
||||
|
||||
template <typename Sequence, typename State, typename Context>
|
||||
struct apply
|
||||
{
|
||||
typedef typename result_of::fold<Sequence, State, Fun>::type type;
|
||||
typedef mpl::true_ continue_type;
|
||||
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
static type call(Sequence& seq, State const& state, Context const&, segmented_fold_fun const& fun)
|
||||
{
|
||||
return fusion::fold(seq, state, fun.fun);
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
// The default implementation of this lives in detail/fold.hpp
|
||||
template <typename Sequence, typename State, typename Fun, bool IsSequence, bool IsSegmented>
|
||||
struct result_of_fold;
|
||||
|
||||
template <typename Sequence, typename State, typename Fun>
|
||||
struct result_of_fold<Sequence, State, Fun, true, true>
|
||||
{
|
||||
typedef
|
||||
typename result_of::segmented_fold_until<
|
||||
Sequence,
|
||||
State,
|
||||
segmented_fold_fun<Fun>
|
||||
>::type
|
||||
type;
|
||||
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
static type call(Sequence& seq, State& state, Fun& fun)
|
||||
{
|
||||
return fusion::segmented_fold_until(seq, state, segmented_fold_fun<Fun>(fun));
|
||||
}
|
||||
};
|
||||
}}}
|
||||
|
||||
#endif
|
||||
+52
@@ -0,0 +1,52 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2011 Eric Niebler
|
||||
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
==============================================================================*/
|
||||
#if !defined(BOOST_FUSION_SEGMENTED_FOR_EACH_HPP_INCLUDED)
|
||||
#define BOOST_FUSION_SEGMENTED_FOR_EACH_HPP_INCLUDED
|
||||
|
||||
#include <boost/fusion/support/config.hpp>
|
||||
#include <boost/mpl/bool.hpp>
|
||||
#include <boost/fusion/support/void.hpp>
|
||||
#include <boost/fusion/algorithm/iteration/for_each_fwd.hpp>
|
||||
#include <boost/fusion/support/segmented_fold_until.hpp>
|
||||
|
||||
namespace boost { namespace fusion { namespace detail
|
||||
{
|
||||
template <typename Fun>
|
||||
struct segmented_for_each_fun
|
||||
{
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
explicit segmented_for_each_fun(Fun const& f)
|
||||
: fun(f)
|
||||
{}
|
||||
|
||||
Fun const& fun;
|
||||
|
||||
template <typename Sequence, typename State, typename Context>
|
||||
struct apply
|
||||
{
|
||||
typedef void_ type;
|
||||
typedef mpl::true_ continue_type;
|
||||
|
||||
BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
static type call(Sequence& seq, State const&, Context const&, segmented_for_each_fun const& fun)
|
||||
{
|
||||
fusion::for_each(seq, fun.fun);
|
||||
return void_();
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
template <typename Sequence, typename F>
|
||||
BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
inline void
|
||||
for_each(Sequence& seq, F const& f, mpl::true_) // segmented implementation
|
||||
{
|
||||
fusion::segmented_fold_until(seq, void_(), segmented_for_each_fun<F>(f));
|
||||
}
|
||||
}}}
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,59 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2001-2011 Joel de Guzman
|
||||
Copyright (c) 2007 Dan Marsden
|
||||
Copyright (c) 2009-2010 Christopher Schmidt
|
||||
Copyright (c) 2015 Kohei Takahashi
|
||||
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
==============================================================================*/
|
||||
#ifndef BOOST_FUSION_ALGORITHM_ITERATION_FOLD_HPP
|
||||
#define BOOST_FUSION_ALGORITHM_ITERATION_FOLD_HPP
|
||||
|
||||
#include <boost/fusion/support/config.hpp>
|
||||
#include <boost/fusion/algorithm/iteration/fold_fwd.hpp>
|
||||
#include <boost/config.hpp>
|
||||
#include <boost/fusion/sequence/intrinsic/begin.hpp>
|
||||
#include <boost/fusion/sequence/intrinsic/size.hpp>
|
||||
#include <boost/fusion/support/is_segmented.hpp>
|
||||
#include <boost/fusion/support/is_sequence.hpp>
|
||||
#include <boost/fusion/iterator/deref.hpp>
|
||||
#include <boost/fusion/iterator/value_of.hpp>
|
||||
#include <boost/fusion/iterator/next.hpp>
|
||||
#include <boost/utility/result_of.hpp>
|
||||
#include <boost/core/enable_if.hpp>
|
||||
#include <boost/type_traits/add_reference.hpp>
|
||||
|
||||
#if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES)
|
||||
#include <boost/fusion/algorithm/iteration/detail/preprocessed/fold.hpp>
|
||||
#else
|
||||
#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES)
|
||||
#pragma wave option(preserve: 2, line: 0, output: "detail/preprocessed/fold.hpp")
|
||||
#endif
|
||||
|
||||
/*=============================================================================
|
||||
Copyright (c) 2001-2011 Joel de Guzman
|
||||
Copyright (c) 2007 Dan Marsden
|
||||
Copyright (c) 2009-2010 Christopher Schmidt
|
||||
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
This is an auto-generated file. Do not edit!
|
||||
==============================================================================*/
|
||||
|
||||
#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES)
|
||||
#pragma wave option(preserve: 1)
|
||||
#endif
|
||||
|
||||
#include <boost/fusion/algorithm/iteration/detail/fold.hpp>
|
||||
|
||||
#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES)
|
||||
#pragma wave option(output: null)
|
||||
#endif
|
||||
|
||||
#endif // BOOST_FUSION_DONT_USE_PREPROCESSED_FILES
|
||||
|
||||
#include <boost/fusion/algorithm/iteration/detail/segmented_fold.hpp>
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,56 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2011 Eric Niebler
|
||||
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
==============================================================================*/
|
||||
|
||||
#ifndef BOOST_FUSION_ALGORITHM_ITERATION_FOLD_FWD_HPP
|
||||
#define BOOST_FUSION_ALGORITHM_ITERATION_FOLD_FWD_HPP
|
||||
|
||||
namespace boost { namespace fusion
|
||||
{
|
||||
namespace result_of
|
||||
{
|
||||
template<typename Seq, typename State, typename F>
|
||||
struct fold;
|
||||
}
|
||||
|
||||
template<typename Seq, typename State, typename F>
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
inline typename result_of::fold<
|
||||
Seq
|
||||
, State const
|
||||
, F
|
||||
>::type
|
||||
fold(Seq& seq, State const& state, F f);
|
||||
|
||||
template<typename Seq, typename State, typename F>
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
inline typename result_of::fold<
|
||||
Seq const
|
||||
, State const
|
||||
, F
|
||||
>::type
|
||||
fold(Seq const& seq, State const& state, F f);
|
||||
|
||||
template<typename Seq, typename State, typename F>
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
inline typename result_of::fold<
|
||||
Seq
|
||||
, State
|
||||
, F
|
||||
>::type
|
||||
fold(Seq& seq, State& state, F f);
|
||||
|
||||
template<typename Seq, typename State, typename F>
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
inline typename result_of::fold<
|
||||
Seq const
|
||||
, State
|
||||
, F
|
||||
>::type
|
||||
fold(Seq const& seq, State& state, F f);
|
||||
}}
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,54 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2001-2007 Joel de Guzman
|
||||
Copyright (c) 2007 Dan Marsden
|
||||
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
==============================================================================*/
|
||||
#if !defined(BOOST_FUSION_FOR_EACH_20070527_0943)
|
||||
#define BOOST_FUSION_FOR_EACH_20070527_0943
|
||||
|
||||
#include <boost/fusion/support/config.hpp>
|
||||
#include <boost/fusion/algorithm/iteration/detail/for_each.hpp>
|
||||
#include <boost/fusion/algorithm/iteration/detail/segmented_for_each.hpp>
|
||||
#include <boost/fusion/support/is_segmented.hpp>
|
||||
#include <boost/fusion/support/is_sequence.hpp>
|
||||
#include <boost/utility/enable_if.hpp>
|
||||
|
||||
namespace boost { namespace fusion
|
||||
{
|
||||
namespace result_of
|
||||
{
|
||||
template <typename Sequence, typename F>
|
||||
struct for_each
|
||||
{
|
||||
typedef void type;
|
||||
};
|
||||
}
|
||||
|
||||
template <typename Sequence, typename F>
|
||||
BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
inline typename
|
||||
enable_if<
|
||||
traits::is_sequence<Sequence>
|
||||
, void
|
||||
>::type
|
||||
for_each(Sequence& seq, F const& f)
|
||||
{
|
||||
detail::for_each(seq, f, typename traits::is_segmented<Sequence>::type());
|
||||
}
|
||||
|
||||
template <typename Sequence, typename F>
|
||||
BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
inline typename
|
||||
enable_if<
|
||||
traits::is_sequence<Sequence>
|
||||
, void
|
||||
>::type
|
||||
for_each(Sequence const& seq, F const& f)
|
||||
{
|
||||
detail::for_each(seq, f, typename traits::is_segmented<Sequence>::type());
|
||||
}
|
||||
}}
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,41 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2011 Eric Niebler
|
||||
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
==============================================================================*/
|
||||
#if !defined(BOOST_FUSION_FOR_EACH_FWD_HPP_INCLUDED)
|
||||
#define BOOST_FUSION_FOR_EACH_FWD_HPP_INCLUDED
|
||||
|
||||
#include <boost/fusion/support/config.hpp>
|
||||
#include <boost/fusion/support/is_sequence.hpp>
|
||||
#include <boost/utility/enable_if.hpp>
|
||||
|
||||
namespace boost { namespace fusion
|
||||
{
|
||||
namespace result_of
|
||||
{
|
||||
template <typename Sequence, typename F>
|
||||
struct for_each;
|
||||
}
|
||||
|
||||
template <typename Sequence, typename F>
|
||||
BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
inline typename
|
||||
enable_if<
|
||||
traits::is_sequence<Sequence>
|
||||
, void
|
||||
>::type
|
||||
for_each(Sequence& seq, F const& f);
|
||||
|
||||
template <typename Sequence, typename F>
|
||||
BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
inline typename
|
||||
enable_if<
|
||||
traits::is_sequence<Sequence>
|
||||
, void
|
||||
>::type
|
||||
for_each(Sequence const& seq, F const& f);
|
||||
}}
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,60 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2010 Christopher Schmidt
|
||||
Copyright (c) 2001-2011 Joel de Guzman
|
||||
Copyright (c) 2015 Kohei Takahashi
|
||||
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
==============================================================================*/
|
||||
|
||||
#ifndef BOOST_FUSION_ALGORITHM_ITERATION_ITER_FOLD_HPP
|
||||
#define BOOST_FUSION_ALGORITHM_ITERATION_ITER_FOLD_HPP
|
||||
|
||||
#include <boost/fusion/support/config.hpp>
|
||||
#include <boost/fusion/algorithm/iteration/iter_fold_fwd.hpp>
|
||||
#include <boost/config.hpp>
|
||||
#include <boost/fusion/sequence/intrinsic/begin.hpp>
|
||||
#include <boost/fusion/sequence/intrinsic/size.hpp>
|
||||
#include <boost/fusion/support/is_segmented.hpp>
|
||||
#include <boost/fusion/support/is_sequence.hpp>
|
||||
#include <boost/fusion/iterator/deref.hpp>
|
||||
#include <boost/fusion/iterator/value_of.hpp>
|
||||
#include <boost/fusion/iterator/next.hpp>
|
||||
#include <boost/utility/result_of.hpp>
|
||||
#include <boost/core/enable_if.hpp>
|
||||
#include <boost/type_traits/add_reference.hpp>
|
||||
|
||||
#define BOOST_FUSION_ITER_FOLD
|
||||
|
||||
#if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES)
|
||||
#include <boost/fusion/algorithm/iteration/detail/preprocessed/iter_fold.hpp>
|
||||
#else
|
||||
#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES)
|
||||
#pragma wave option(preserve: 2, line: 0, output: "detail/preprocessed/iter_fold.hpp")
|
||||
#endif
|
||||
|
||||
/*=============================================================================
|
||||
Copyright (c) 2010 Christopher Schmidt
|
||||
Copyright (c) 2001-2011 Joel de Guzman
|
||||
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
This is an auto-generated file. Do not edit!
|
||||
==============================================================================*/
|
||||
|
||||
#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES)
|
||||
#pragma wave option(preserve: 1)
|
||||
#endif
|
||||
|
||||
#include <boost/fusion/algorithm/iteration/detail/fold.hpp>
|
||||
|
||||
#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES)
|
||||
#pragma wave option(output: null)
|
||||
#endif
|
||||
|
||||
#endif // BOOST_FUSION_DONT_USE_PREPROCESSED_FILES
|
||||
|
||||
#undef BOOST_FUSION_ITER_FOLD
|
||||
|
||||
#endif
|
||||
+56
@@ -0,0 +1,56 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2011 Eric Niebler
|
||||
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
==============================================================================*/
|
||||
|
||||
#ifndef BOOST_FUSION_ALGORITHM_ITERATION_ITER_FOLD_FWD_HPP
|
||||
#define BOOST_FUSION_ALGORITHM_ITERATION_ITER_FOLD_FWD_HPP
|
||||
|
||||
namespace boost { namespace fusion
|
||||
{
|
||||
namespace result_of
|
||||
{
|
||||
template<typename Seq, typename State, typename F>
|
||||
struct iter_fold;
|
||||
}
|
||||
|
||||
template<typename Seq, typename State, typename F>
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
inline typename result_of::iter_fold<
|
||||
Seq
|
||||
, State const
|
||||
, F
|
||||
>::type
|
||||
iter_fold(Seq& seq, State const& state, F f);
|
||||
|
||||
template<typename Seq, typename State, typename F>
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
inline typename result_of::iter_fold<
|
||||
Seq const
|
||||
, State const
|
||||
, F
|
||||
>::type
|
||||
iter_fold(Seq const& seq, State const& state, F f);
|
||||
|
||||
template<typename Seq, typename State, typename F>
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
inline typename result_of::iter_fold<
|
||||
Seq
|
||||
, State
|
||||
, F
|
||||
>::type
|
||||
iter_fold(Seq& seq, State& state, F f);
|
||||
|
||||
template<typename Seq, typename State, typename F>
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
inline typename result_of::iter_fold<
|
||||
Seq const
|
||||
, State
|
||||
, F
|
||||
>::type
|
||||
iter_fold(Seq const& seq, State& state, F f);
|
||||
}}
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,60 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2010 Christopher Schmidt
|
||||
Copyright (c) 2001-2011 Joel de Guzman
|
||||
Copyright (c) 2015 Kohei Takahashi
|
||||
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
==============================================================================*/
|
||||
|
||||
#ifndef BOOST_FUSION_ALGORITHM_ITERATION_REVERSE_FOLD_HPP
|
||||
#define BOOST_FUSION_ALGORITHM_ITERATION_REVERSE_FOLD_HPP
|
||||
|
||||
#include <boost/fusion/support/config.hpp>
|
||||
#include <boost/fusion/algorithm/iteration/reverse_fold_fwd.hpp>
|
||||
#include <boost/config.hpp>
|
||||
#include <boost/fusion/sequence/intrinsic/end.hpp>
|
||||
#include <boost/fusion/sequence/intrinsic/size.hpp>
|
||||
#include <boost/fusion/support/is_segmented.hpp>
|
||||
#include <boost/fusion/support/is_sequence.hpp>
|
||||
#include <boost/fusion/iterator/deref.hpp>
|
||||
#include <boost/fusion/iterator/value_of.hpp>
|
||||
#include <boost/fusion/iterator/prior.hpp>
|
||||
#include <boost/utility/result_of.hpp>
|
||||
#include <boost/core/enable_if.hpp>
|
||||
#include <boost/type_traits/add_reference.hpp>
|
||||
|
||||
#define BOOST_FUSION_REVERSE_FOLD
|
||||
|
||||
#if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES)
|
||||
#include <boost/fusion/algorithm/iteration/detail/preprocessed/reverse_fold.hpp>
|
||||
#else
|
||||
#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES)
|
||||
#pragma wave option(preserve: 2, line: 0, output: "detail/preprocessed/reverse_fold.hpp")
|
||||
#endif
|
||||
|
||||
/*=============================================================================
|
||||
Copyright (c) 2009-2010 Christopher Schmidt
|
||||
Copyright (c) 2001-2011 Joel de Guzman
|
||||
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
This is an auto-generated file. Do not edit!
|
||||
==============================================================================*/
|
||||
|
||||
#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES)
|
||||
#pragma wave option(preserve: 1)
|
||||
#endif
|
||||
|
||||
#include <boost/fusion/algorithm/iteration/detail/fold.hpp>
|
||||
|
||||
#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES)
|
||||
#pragma wave option(output: null)
|
||||
#endif
|
||||
|
||||
#endif // BOOST_FUSION_DONT_USE_PREPROCESSED_FILES
|
||||
|
||||
#undef BOOST_FUSION_REVERSE_FOLD
|
||||
|
||||
#endif
|
||||
+56
@@ -0,0 +1,56 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2011 Eric Niebler
|
||||
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
==============================================================================*/
|
||||
|
||||
#ifndef BOOST_FUSION_ALGORITHM_ITERATION_REVERSE_FOLD_FWD_HPP
|
||||
#define BOOST_FUSION_ALGORITHM_ITERATION_REVERSE_FOLD_FWD_HPP
|
||||
|
||||
namespace boost { namespace fusion
|
||||
{
|
||||
namespace result_of
|
||||
{
|
||||
template<typename Seq, typename State, typename F>
|
||||
struct reverse_fold;
|
||||
}
|
||||
|
||||
template<typename Seq, typename State, typename F>
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
inline typename result_of::reverse_fold<
|
||||
Seq
|
||||
, State const
|
||||
, F
|
||||
>::type
|
||||
reverse_fold(Seq& seq, State const& state, F f);
|
||||
|
||||
template<typename Seq, typename State, typename F>
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
inline typename result_of::reverse_fold<
|
||||
Seq const
|
||||
, State const
|
||||
, F
|
||||
>::type
|
||||
reverse_fold(Seq const& seq, State const& state, F f);
|
||||
|
||||
template<typename Seq, typename State, typename F>
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
inline typename result_of::reverse_fold<
|
||||
Seq
|
||||
, State
|
||||
, F
|
||||
>::type
|
||||
reverse_fold(Seq& seq, State& state, F f);
|
||||
|
||||
template<typename Seq, typename State, typename F>
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
inline typename result_of::reverse_fold<
|
||||
Seq const
|
||||
, State
|
||||
, F
|
||||
>::type
|
||||
reverse_fold(Seq const& seq, State& state, F f);
|
||||
}}
|
||||
|
||||
#endif
|
||||
+61
@@ -0,0 +1,61 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2010 Christopher Schmidt
|
||||
Copyright (c) 2001-2011 Joel de Guzman
|
||||
Copyright (c) 2015 Kohei Takahashi
|
||||
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
==============================================================================*/
|
||||
#ifndef BOOST_FUSION_ALGORITHM_ITERATION_REVERSE_ITER_FOLD_HPP
|
||||
#define BOOST_FUSION_ALGORITHM_ITERATION_REVERSE_ITER_FOLD_HPP
|
||||
|
||||
#include <boost/fusion/support/config.hpp>
|
||||
#include <boost/fusion/algorithm/iteration/reverse_iter_fold_fwd.hpp>
|
||||
#include <boost/config.hpp>
|
||||
#include <boost/fusion/sequence/intrinsic/end.hpp>
|
||||
#include <boost/fusion/sequence/intrinsic/size.hpp>
|
||||
#include <boost/fusion/support/is_segmented.hpp>
|
||||
#include <boost/fusion/support/is_sequence.hpp>
|
||||
#include <boost/fusion/iterator/deref.hpp>
|
||||
#include <boost/fusion/iterator/value_of.hpp>
|
||||
#include <boost/fusion/iterator/prior.hpp>
|
||||
#include <boost/utility/result_of.hpp>
|
||||
#include <boost/core/enable_if.hpp>
|
||||
#include <boost/type_traits/add_reference.hpp>
|
||||
|
||||
#define BOOST_FUSION_REVERSE_FOLD
|
||||
#define BOOST_FUSION_ITER_FOLD
|
||||
|
||||
#if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES)
|
||||
#include <boost/fusion/algorithm/iteration/detail/preprocessed/reverse_iter_fold.hpp>
|
||||
#else
|
||||
#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES)
|
||||
#pragma wave option(preserve: 2, line: 0, output: "detail/preprocessed/reverse_iter_fold.hpp")
|
||||
#endif
|
||||
|
||||
/*=============================================================================
|
||||
Copyright (c) 2010 Christopher Schmidt
|
||||
Copyright (c) 2001-2011 Joel de Guzman
|
||||
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
This is an auto-generated file. Do not edit!
|
||||
==============================================================================*/
|
||||
|
||||
#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES)
|
||||
#pragma wave option(preserve: 1)
|
||||
#endif
|
||||
|
||||
#include <boost/fusion/algorithm/iteration/detail/fold.hpp>
|
||||
|
||||
#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES)
|
||||
#pragma wave option(output: null)
|
||||
#endif
|
||||
|
||||
#endif // BOOST_FUSION_DONT_USE_PREPROCESSED_FILES
|
||||
|
||||
#undef BOOST_FUSION_REVERSE_FOLD
|
||||
#undef BOOST_FUSION_ITER_FOLD
|
||||
|
||||
#endif
|
||||
+56
@@ -0,0 +1,56 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2011 Eric Niebler
|
||||
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
==============================================================================*/
|
||||
|
||||
#ifndef BOOST_FUSION_ALGORITHM_ITERATION_REVERSE_ITER_FOLD_FWD_HPP
|
||||
#define BOOST_FUSION_ALGORITHM_ITERATION_REVERSE_ITER_FOLD_FWD_HPP
|
||||
|
||||
namespace boost { namespace fusion
|
||||
{
|
||||
namespace result_of
|
||||
{
|
||||
template<typename Seq, typename State, typename F>
|
||||
struct reverse_iter_fold;
|
||||
}
|
||||
|
||||
template<typename Seq, typename State, typename F>
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
inline typename result_of::reverse_iter_fold<
|
||||
Seq
|
||||
, State const
|
||||
, F
|
||||
>::type
|
||||
reverse_iter_fold(Seq& seq, State const& state, F f);
|
||||
|
||||
template<typename Seq, typename State, typename F>
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
inline typename result_of::reverse_iter_fold<
|
||||
Seq const
|
||||
, State const
|
||||
, F
|
||||
>::type
|
||||
reverse_iter_fold(Seq const& seq, State const& state, F f);
|
||||
|
||||
template<typename Seq, typename State, typename F>
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
inline typename result_of::reverse_iter_fold<
|
||||
Seq
|
||||
, State
|
||||
, F
|
||||
>::type
|
||||
reverse_iter_fold(Seq& seq, State& state, F f);
|
||||
|
||||
template<typename Seq, typename State, typename F>
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
inline typename result_of::reverse_iter_fold<
|
||||
Seq const
|
||||
, State
|
||||
, F
|
||||
>::type
|
||||
reverse_iter_fold(Seq const& seq, State& state, F f);
|
||||
}}
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user