summaryrefslogtreecommitdiff
path: root/boost/fusion/algorithm/iteration/detail/for_each.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'boost/fusion/algorithm/iteration/detail/for_each.hpp')
-rw-r--r--boost/fusion/algorithm/iteration/detail/for_each.hpp11
1 files changed, 11 insertions, 0 deletions
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
{