summaryrefslogtreecommitdiff
path: root/boost/fusion/algorithm/iteration/detail
diff options
context:
space:
mode:
Diffstat (limited to 'boost/fusion/algorithm/iteration/detail')
-rw-r--r--boost/fusion/algorithm/iteration/detail/fold.hpp13
-rw-r--r--boost/fusion/algorithm/iteration/detail/for_each.hpp11
-rw-r--r--boost/fusion/algorithm/iteration/detail/preprocessed/fold.hpp13
-rw-r--r--boost/fusion/algorithm/iteration/detail/preprocessed/iter_fold.hpp13
-rw-r--r--boost/fusion/algorithm/iteration/detail/preprocessed/reverse_fold.hpp13
-rw-r--r--boost/fusion/algorithm/iteration/detail/preprocessed/reverse_iter_fold.hpp13
-rw-r--r--boost/fusion/algorithm/iteration/detail/segmented_fold.hpp4
-rw-r--r--boost/fusion/algorithm/iteration/detail/segmented_for_each.hpp4
8 files changed, 79 insertions, 5 deletions
diff --git a/boost/fusion/algorithm/iteration/detail/fold.hpp b/boost/fusion/algorithm/iteration/detail/fold.hpp
index 174c4b105c..71f60a7c63 100644
--- a/boost/fusion/algorithm/iteration/detail/fold.hpp
+++ b/boost/fusion/algorithm/iteration/detail/fold.hpp
@@ -58,6 +58,7 @@ namespace boost { namespace fusion
struct BOOST_PP_CAT(unrolled_,BOOST_FUSION_FOLD_NAME)
{
template<typename State, typename It0, typename F>
+ BOOST_FUSION_GPU_ENABLED
static Result
call(State const& state,It0 const& it0,F f)
{
@@ -103,6 +104,7 @@ namespace boost { namespace fusion
struct BOOST_PP_CAT(unrolled_,BOOST_FUSION_FOLD_NAME)<Result,3>
{
template<typename State, typename It0, typename F>
+ BOOST_FUSION_GPU_ENABLED
static Result
call(State const& state,It0 const& it0,F f)
{
@@ -133,6 +135,7 @@ namespace boost { namespace fusion
struct BOOST_PP_CAT(unrolled_,BOOST_FUSION_FOLD_NAME)<Result,2>
{
template<typename State, typename It0, typename F>
+ BOOST_FUSION_GPU_ENABLED
static Result
call(State const& state,It0 const& it0,F f)
{
@@ -150,6 +153,7 @@ namespace boost { namespace fusion
struct BOOST_PP_CAT(unrolled_,BOOST_FUSION_FOLD_NAME)<Result,1>
{
template<typename State, typename It0, typename F>
+ BOOST_FUSION_GPU_ENABLED
static Result
call(State const& state,It0 const& it0,F f)
{
@@ -162,8 +166,9 @@ namespace boost { namespace fusion
struct BOOST_PP_CAT(unrolled_,BOOST_FUSION_FOLD_NAME)<Result,0>
{
template<typename State, typename It0, typename F>
+ BOOST_FUSION_GPU_ENABLED
static Result
- call(State const& state,It0 const& it0, F)
+ call(State const& state,It0 const&, F)
{
return static_cast<Result>(state);
}
@@ -340,6 +345,7 @@ namespace boost { namespace fusion
>::type
type;
+ BOOST_FUSION_GPU_ENABLED
static type
call(StateRef state, Seq& seq, F f)
{
@@ -363,6 +369,7 @@ namespace boost { namespace fusion
{
typedef StateRef type;
+ BOOST_FUSION_GPU_ENABLED
static StateRef
call(StateRef state, Seq&, F)
{
@@ -397,6 +404,7 @@ namespace boost { namespace fusion
}
template<typename Seq, typename State, typename F>
+ BOOST_FUSION_GPU_ENABLED
inline typename result_of::BOOST_FUSION_FOLD_NAME<
Seq
, State const
@@ -411,6 +419,7 @@ namespace boost { namespace fusion
}
template<typename Seq, typename State, typename F>
+ BOOST_FUSION_GPU_ENABLED
inline typename result_of::BOOST_FUSION_FOLD_NAME<
Seq const
, State const
@@ -425,6 +434,7 @@ namespace boost { namespace fusion
}
template<typename Seq, typename State, typename F>
+ BOOST_FUSION_GPU_ENABLED
inline typename result_of::BOOST_FUSION_FOLD_NAME<
Seq
, State const
@@ -439,6 +449,7 @@ namespace boost { namespace fusion
}
template<typename Seq, typename State, typename F>
+ BOOST_FUSION_GPU_ENABLED
inline typename result_of::BOOST_FUSION_FOLD_NAME<
Seq const
, State const
diff --git a/boost/fusion/algorithm/iteration/detail/for_each.hpp b/boost/fusion/algorithm/iteration/detail/for_each.hpp
index 66a1935076..81b3ab7028 100644
--- a/boost/fusion/algorithm/iteration/detail/for_each.hpp
+++ b/boost/fusion/algorithm/iteration/detail/for_each.hpp
@@ -7,6 +7,7 @@
#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>
@@ -20,12 +21,14 @@ namespace boost { namespace fusion {
namespace detail
{
template <typename First, typename Last, typename F>
+ 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_FUSION_GPU_ENABLED
inline void
for_each_linear(First const& first, Last const& last, F const& f, mpl::false_)
{
@@ -36,6 +39,7 @@ namespace detail
template <typename Sequence, typename F, typename Tag>
+ BOOST_FUSION_GPU_ENABLED
inline void
for_each_dispatch(Sequence& seq, F const& f, Tag)
{
@@ -52,6 +56,7 @@ namespace detail
struct for_each_unrolled
{
template<typename I0, typename F>
+ BOOST_FUSION_GPU_ENABLED
static void call(I0 const& i0, F const& f)
{
f(*i0);
@@ -72,6 +77,7 @@ namespace detail
struct for_each_unrolled<3>
{
template<typename I0, typename F>
+ BOOST_FUSION_GPU_ENABLED
static void call(I0 const& i0, F const& f)
{
f(*i0);
@@ -88,6 +94,7 @@ namespace detail
struct for_each_unrolled<2>
{
template<typename I0, typename F>
+ BOOST_FUSION_GPU_ENABLED
static void call(I0 const& i0, F const& f)
{
f(*i0);
@@ -101,6 +108,7 @@ namespace detail
struct for_each_unrolled<1>
{
template<typename I0, typename F>
+ BOOST_FUSION_GPU_ENABLED
static void call(I0 const& i0, F const& f)
{
f(*i0);
@@ -111,12 +119,14 @@ namespace detail
struct for_each_unrolled<0>
{
template<typename It, typename F>
+ BOOST_FUSION_GPU_ENABLED
static void call(It const&, F const&)
{
}
};
template <typename Sequence, typename F>
+ BOOST_FUSION_GPU_ENABLED
inline void
for_each_dispatch(Sequence& seq, F const& f, random_access_traversal_tag)
{
@@ -126,6 +136,7 @@ namespace detail
}
template <typename Sequence, typename F>
+ BOOST_FUSION_GPU_ENABLED
inline void
for_each(Sequence& seq, F const& f, mpl::false_) // unsegmented implementation
{
diff --git a/boost/fusion/algorithm/iteration/detail/preprocessed/fold.hpp b/boost/fusion/algorithm/iteration/detail/preprocessed/fold.hpp
index d368338a0b..140c70b1c2 100644
--- a/boost/fusion/algorithm/iteration/detail/preprocessed/fold.hpp
+++ b/boost/fusion/algorithm/iteration/detail/preprocessed/fold.hpp
@@ -24,6 +24,7 @@ namespace boost { namespace fusion
struct unrolled_fold
{
template<typename State, typename It0, typename F>
+ BOOST_FUSION_GPU_ENABLED
static Result
call(State const& state,It0 const& it0,F f)
{
@@ -64,6 +65,7 @@ namespace boost { namespace fusion
struct unrolled_fold<Result,3>
{
template<typename State, typename It0, typename F>
+ BOOST_FUSION_GPU_ENABLED
static Result
call(State const& state,It0 const& it0,F f)
{
@@ -90,6 +92,7 @@ namespace boost { namespace fusion
struct unrolled_fold<Result,2>
{
template<typename State, typename It0, typename F>
+ BOOST_FUSION_GPU_ENABLED
static Result
call(State const& state,It0 const& it0,F f)
{
@@ -104,6 +107,7 @@ namespace boost { namespace fusion
struct unrolled_fold<Result,1>
{
template<typename State, typename It0, typename F>
+ BOOST_FUSION_GPU_ENABLED
static Result
call(State const& state,It0 const& it0,F f)
{
@@ -115,8 +119,9 @@ namespace boost { namespace fusion
struct unrolled_fold<Result,0>
{
template<typename State, typename It0, typename F>
+ BOOST_FUSION_GPU_ENABLED
static Result
- call(State const& state,It0 const& it0, F)
+ call(State const& state,It0 const&, F)
{
return static_cast<Result>(state);
}
@@ -277,6 +282,7 @@ namespace boost { namespace fusion
, SeqSize
>::type
type;
+ BOOST_FUSION_GPU_ENABLED
static type
call(StateRef state, Seq& seq, F f)
{
@@ -296,6 +302,7 @@ namespace boost { namespace fusion
struct fold_impl<0,StateRef,Seq,F>
{
typedef StateRef type;
+ BOOST_FUSION_GPU_ENABLED
static StateRef
call(StateRef state, Seq&, F)
{
@@ -327,6 +334,7 @@ namespace boost { namespace fusion
{};
}
template<typename Seq, typename State, typename F>
+ BOOST_FUSION_GPU_ENABLED
inline typename result_of::fold<
Seq
, State const
@@ -340,6 +348,7 @@ namespace boost { namespace fusion
f);
}
template<typename Seq, typename State, typename F>
+ BOOST_FUSION_GPU_ENABLED
inline typename result_of::fold<
Seq const
, State const
@@ -353,6 +362,7 @@ namespace boost { namespace fusion
f);
}
template<typename Seq, typename State, typename F>
+ BOOST_FUSION_GPU_ENABLED
inline typename result_of::fold<
Seq
, State const
@@ -366,6 +376,7 @@ namespace boost { namespace fusion
f);
}
template<typename Seq, typename State, typename F>
+ BOOST_FUSION_GPU_ENABLED
inline typename result_of::fold<
Seq const
, State const
diff --git a/boost/fusion/algorithm/iteration/detail/preprocessed/iter_fold.hpp b/boost/fusion/algorithm/iteration/detail/preprocessed/iter_fold.hpp
index 74f8a0577b..1211550d39 100644
--- a/boost/fusion/algorithm/iteration/detail/preprocessed/iter_fold.hpp
+++ b/boost/fusion/algorithm/iteration/detail/preprocessed/iter_fold.hpp
@@ -23,6 +23,7 @@ namespace boost { namespace fusion
struct unrolled_iter_fold
{
template<typename State, typename It0, typename F>
+ BOOST_FUSION_GPU_ENABLED
static Result
call(State const& state,It0 const& it0,F f)
{
@@ -63,6 +64,7 @@ namespace boost { namespace fusion
struct unrolled_iter_fold<Result,3>
{
template<typename State, typename It0, typename F>
+ BOOST_FUSION_GPU_ENABLED
static Result
call(State const& state,It0 const& it0,F f)
{
@@ -89,6 +91,7 @@ namespace boost { namespace fusion
struct unrolled_iter_fold<Result,2>
{
template<typename State, typename It0, typename F>
+ BOOST_FUSION_GPU_ENABLED
static Result
call(State const& state,It0 const& it0,F f)
{
@@ -103,6 +106,7 @@ namespace boost { namespace fusion
struct unrolled_iter_fold<Result,1>
{
template<typename State, typename It0, typename F>
+ BOOST_FUSION_GPU_ENABLED
static Result
call(State const& state,It0 const& it0,F f)
{
@@ -114,8 +118,9 @@ namespace boost { namespace fusion
struct unrolled_iter_fold<Result,0>
{
template<typename State, typename It0, typename F>
+ BOOST_FUSION_GPU_ENABLED
static Result
- call(State const& state,It0 const& it0, F)
+ call(State const& state,It0 const&, F)
{
return static_cast<Result>(state);
}
@@ -276,6 +281,7 @@ namespace boost { namespace fusion
, SeqSize
>::type
type;
+ BOOST_FUSION_GPU_ENABLED
static type
call(StateRef state, Seq& seq, F f)
{
@@ -295,6 +301,7 @@ namespace boost { namespace fusion
struct iter_fold_impl<0,StateRef,Seq,F>
{
typedef StateRef type;
+ BOOST_FUSION_GPU_ENABLED
static StateRef
call(StateRef state, Seq&, F)
{
@@ -326,6 +333,7 @@ namespace boost { namespace fusion
{};
}
template<typename Seq, typename State, typename F>
+ BOOST_FUSION_GPU_ENABLED
inline typename result_of::iter_fold<
Seq
, State const
@@ -339,6 +347,7 @@ namespace boost { namespace fusion
f);
}
template<typename Seq, typename State, typename F>
+ BOOST_FUSION_GPU_ENABLED
inline typename result_of::iter_fold<
Seq const
, State const
@@ -352,6 +361,7 @@ namespace boost { namespace fusion
f);
}
template<typename Seq, typename State, typename F>
+ BOOST_FUSION_GPU_ENABLED
inline typename result_of::iter_fold<
Seq
, State const
@@ -365,6 +375,7 @@ namespace boost { namespace fusion
f);
}
template<typename Seq, typename State, typename F>
+ BOOST_FUSION_GPU_ENABLED
inline typename result_of::iter_fold<
Seq const
, State const
diff --git a/boost/fusion/algorithm/iteration/detail/preprocessed/reverse_fold.hpp b/boost/fusion/algorithm/iteration/detail/preprocessed/reverse_fold.hpp
index 71730abf07..cc78231a50 100644
--- a/boost/fusion/algorithm/iteration/detail/preprocessed/reverse_fold.hpp
+++ b/boost/fusion/algorithm/iteration/detail/preprocessed/reverse_fold.hpp
@@ -23,6 +23,7 @@ namespace boost { namespace fusion
struct unrolled_reverse_fold
{
template<typename State, typename It0, typename F>
+ BOOST_FUSION_GPU_ENABLED
static Result
call(State const& state,It0 const& it0,F f)
{
@@ -63,6 +64,7 @@ namespace boost { namespace fusion
struct unrolled_reverse_fold<Result,3>
{
template<typename State, typename It0, typename F>
+ BOOST_FUSION_GPU_ENABLED
static Result
call(State const& state,It0 const& it0,F f)
{
@@ -89,6 +91,7 @@ namespace boost { namespace fusion
struct unrolled_reverse_fold<Result,2>
{
template<typename State, typename It0, typename F>
+ BOOST_FUSION_GPU_ENABLED
static Result
call(State const& state,It0 const& it0,F f)
{
@@ -103,6 +106,7 @@ namespace boost { namespace fusion
struct unrolled_reverse_fold<Result,1>
{
template<typename State, typename It0, typename F>
+ BOOST_FUSION_GPU_ENABLED
static Result
call(State const& state,It0 const& it0,F f)
{
@@ -114,8 +118,9 @@ namespace boost { namespace fusion
struct unrolled_reverse_fold<Result,0>
{
template<typename State, typename It0, typename F>
+ BOOST_FUSION_GPU_ENABLED
static Result
- call(State const& state,It0 const& it0, F)
+ call(State const& state,It0 const&, F)
{
return static_cast<Result>(state);
}
@@ -276,6 +281,7 @@ namespace boost { namespace fusion
, SeqSize
>::type
type;
+ BOOST_FUSION_GPU_ENABLED
static type
call(StateRef state, Seq& seq, F f)
{
@@ -295,6 +301,7 @@ namespace boost { namespace fusion
struct reverse_fold_impl<0,StateRef,Seq,F>
{
typedef StateRef type;
+ BOOST_FUSION_GPU_ENABLED
static StateRef
call(StateRef state, Seq&, F)
{
@@ -326,6 +333,7 @@ namespace boost { namespace fusion
{};
}
template<typename Seq, typename State, typename F>
+ BOOST_FUSION_GPU_ENABLED
inline typename result_of::reverse_fold<
Seq
, State const
@@ -339,6 +347,7 @@ namespace boost { namespace fusion
f);
}
template<typename Seq, typename State, typename F>
+ BOOST_FUSION_GPU_ENABLED
inline typename result_of::reverse_fold<
Seq const
, State const
@@ -352,6 +361,7 @@ namespace boost { namespace fusion
f);
}
template<typename Seq, typename State, typename F>
+ BOOST_FUSION_GPU_ENABLED
inline typename result_of::reverse_fold<
Seq
, State const
@@ -365,6 +375,7 @@ namespace boost { namespace fusion
f);
}
template<typename Seq, typename State, typename F>
+ BOOST_FUSION_GPU_ENABLED
inline typename result_of::reverse_fold<
Seq const
, State const
diff --git a/boost/fusion/algorithm/iteration/detail/preprocessed/reverse_iter_fold.hpp b/boost/fusion/algorithm/iteration/detail/preprocessed/reverse_iter_fold.hpp
index 93b8c988dc..3023a91239 100644
--- a/boost/fusion/algorithm/iteration/detail/preprocessed/reverse_iter_fold.hpp
+++ b/boost/fusion/algorithm/iteration/detail/preprocessed/reverse_iter_fold.hpp
@@ -23,6 +23,7 @@ namespace boost { namespace fusion
struct unrolled_reverse_iter_fold
{
template<typename State, typename It0, typename F>
+ BOOST_FUSION_GPU_ENABLED
static Result
call(State const& state,It0 const& it0,F f)
{
@@ -63,6 +64,7 @@ namespace boost { namespace fusion
struct unrolled_reverse_iter_fold<Result,3>
{
template<typename State, typename It0, typename F>
+ BOOST_FUSION_GPU_ENABLED
static Result
call(State const& state,It0 const& it0,F f)
{
@@ -89,6 +91,7 @@ namespace boost { namespace fusion
struct unrolled_reverse_iter_fold<Result,2>
{
template<typename State, typename It0, typename F>
+ BOOST_FUSION_GPU_ENABLED
static Result
call(State const& state,It0 const& it0,F f)
{
@@ -103,6 +106,7 @@ namespace boost { namespace fusion
struct unrolled_reverse_iter_fold<Result,1>
{
template<typename State, typename It0, typename F>
+ BOOST_FUSION_GPU_ENABLED
static Result
call(State const& state,It0 const& it0,F f)
{
@@ -114,8 +118,9 @@ namespace boost { namespace fusion
struct unrolled_reverse_iter_fold<Result,0>
{
template<typename State, typename It0, typename F>
+ BOOST_FUSION_GPU_ENABLED
static Result
- call(State const& state,It0 const& it0, F)
+ call(State const& state,It0 const&, F)
{
return static_cast<Result>(state);
}
@@ -276,6 +281,7 @@ namespace boost { namespace fusion
, SeqSize
>::type
type;
+ BOOST_FUSION_GPU_ENABLED
static type
call(StateRef state, Seq& seq, F f)
{
@@ -295,6 +301,7 @@ namespace boost { namespace fusion
struct reverse_iter_fold_impl<0,StateRef,Seq,F>
{
typedef StateRef type;
+ BOOST_FUSION_GPU_ENABLED
static StateRef
call(StateRef state, Seq&, F)
{
@@ -326,6 +333,7 @@ namespace boost { namespace fusion
{};
}
template<typename Seq, typename State, typename F>
+ BOOST_FUSION_GPU_ENABLED
inline typename result_of::reverse_iter_fold<
Seq
, State const
@@ -339,6 +347,7 @@ namespace boost { namespace fusion
f);
}
template<typename Seq, typename State, typename F>
+ BOOST_FUSION_GPU_ENABLED
inline typename result_of::reverse_iter_fold<
Seq const
, State const
@@ -352,6 +361,7 @@ namespace boost { namespace fusion
f);
}
template<typename Seq, typename State, typename F>
+ BOOST_FUSION_GPU_ENABLED
inline typename result_of::reverse_iter_fold<
Seq
, State const
@@ -365,6 +375,7 @@ namespace boost { namespace fusion
f);
}
template<typename Seq, typename State, typename F>
+ BOOST_FUSION_GPU_ENABLED
inline typename result_of::reverse_iter_fold<
Seq const
, State const
diff --git a/boost/fusion/algorithm/iteration/detail/segmented_fold.hpp b/boost/fusion/algorithm/iteration/detail/segmented_fold.hpp
index 2371e1891e..58aab114a2 100644
--- a/boost/fusion/algorithm/iteration/detail/segmented_fold.hpp
+++ b/boost/fusion/algorithm/iteration/detail/segmented_fold.hpp
@@ -7,6 +7,7 @@
#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>
@@ -15,6 +16,7 @@ namespace boost { namespace fusion { namespace detail
template <typename Fun>
struct segmented_fold_fun
{
+ BOOST_FUSION_GPU_ENABLED
explicit segmented_fold_fun(Fun const& f)
: fun(f)
{}
@@ -27,6 +29,7 @@ namespace boost { namespace fusion { namespace detail
typedef typename result_of::fold<Sequence, State, Fun>::type type;
typedef mpl::true_ continue_type;
+ 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);
@@ -49,6 +52,7 @@ namespace boost { namespace fusion { namespace detail
>::type
type;
+ BOOST_FUSION_GPU_ENABLED
static type call(State& state, Sequence& seq, Fun fun)
{
return fusion::segmented_fold_until(seq, state, segmented_fold_fun<Fun>(fun));
diff --git a/boost/fusion/algorithm/iteration/detail/segmented_for_each.hpp b/boost/fusion/algorithm/iteration/detail/segmented_for_each.hpp
index f7ffb24d94..a5d6d4be3e 100644
--- a/boost/fusion/algorithm/iteration/detail/segmented_for_each.hpp
+++ b/boost/fusion/algorithm/iteration/detail/segmented_for_each.hpp
@@ -7,6 +7,7 @@
#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>
@@ -17,6 +18,7 @@ namespace boost { namespace fusion { namespace detail
template <typename Fun>
struct segmented_for_each_fun
{
+ BOOST_FUSION_GPU_ENABLED
explicit segmented_for_each_fun(Fun const& f)
: fun(f)
{}
@@ -29,6 +31,7 @@ namespace boost { namespace fusion { namespace detail
typedef void_ type;
typedef mpl::true_ continue_type;
+ 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);
@@ -38,6 +41,7 @@ namespace boost { namespace fusion { namespace detail
};
template <typename Sequence, typename F>
+ BOOST_FUSION_GPU_ENABLED
inline void
for_each(Sequence& seq, F const& f, mpl::true_) // segmented implementation
{