gpu-enable functions

This commit is contained in:
Eric Niebler
2014-01-09 17:58:06 -08:00
committed by Eric Niebler
parent 867c7e5dfb
commit c4f9f0d1b6
840 changed files with 7409 additions and 116 deletions

View File

@ -8,6 +8,7 @@
#if !defined(BOOST_FUSION_ALL_05052005_1238)
#define BOOST_FUSION_ALL_05052005_1238
#include <boost/fusion/support/config.hpp>
#include <boost/fusion/support/category_of.hpp>
#include <boost/fusion/algorithm/query/detail/all.hpp>
@ -23,6 +24,7 @@ namespace boost { namespace fusion
}
template <typename Sequence, typename F>
BOOST_FUSION_GPU_ENABLED
inline bool
all(Sequence const& seq, F f)
{

View File

@ -9,6 +9,7 @@
#if !defined(FUSION_ANY_05052005_1230)
#define FUSION_ANY_05052005_1230
#include <boost/fusion/support/config.hpp>
#include <boost/fusion/support/category_of.hpp>
#include <boost/fusion/algorithm/query/detail/any.hpp>
@ -24,6 +25,7 @@ namespace boost { namespace fusion
}
template <typename Sequence, typename F>
BOOST_FUSION_GPU_ENABLED
inline bool
any(Sequence const& seq, F f)
{

View File

@ -8,6 +8,7 @@
#if !defined(BOOST_FUSION_COUNT_09162005_0150)
#define BOOST_FUSION_COUNT_09162005_0150
#include <boost/fusion/support/config.hpp>
#include <boost/fusion/algorithm/query/count_if.hpp>
#include <boost/fusion/algorithm/query/detail/count.hpp>
#include <boost/fusion/support/is_sequence.hpp>
@ -25,6 +26,7 @@ namespace boost { namespace fusion
}
template <typename Sequence, typename T>
BOOST_FUSION_GPU_ENABLED
inline
typename
enable_if<

View File

@ -8,6 +8,7 @@
#if !defined(BOOST_FUSION_COUNT_IF_09162005_0137)
#define BOOST_FUSION_COUNT_IF_09162005_0137
#include <boost/fusion/support/config.hpp>
#include <boost/fusion/algorithm/query/detail/count_if.hpp>
#include <boost/fusion/support/category_of.hpp>
#include <boost/fusion/support/is_sequence.hpp>
@ -25,6 +26,7 @@ namespace boost { namespace fusion
}
template <typename Sequence, typename F>
BOOST_FUSION_GPU_ENABLED
inline
typename
enable_if<

View File

@ -8,6 +8,7 @@
#if !defined(FUSION_ALL_05052005_1237)
#define FUSION_ALL_05052005_1237
#include <boost/fusion/support/config.hpp>
#include <boost/mpl/bool.hpp>
#include <boost/fusion/sequence/intrinsic/begin.hpp>
#include <boost/fusion/sequence/intrinsic/end.hpp>
@ -20,6 +21,7 @@
namespace boost { namespace fusion { namespace detail
{
template <typename First, typename Last, typename F>
BOOST_FUSION_GPU_ENABLED
inline bool
linear_all(First const&, Last const&, F const&, mpl::true_)
{
@ -27,6 +29,7 @@ namespace boost { namespace fusion { namespace detail
}
template <typename First, typename Last, typename F>
BOOST_FUSION_GPU_ENABLED
inline bool
linear_all(First const& first, Last const& last, F& f, mpl::false_)
{
@ -40,6 +43,7 @@ namespace boost { namespace fusion { namespace detail
}
template <typename Sequence, typename F, typename Tag>
BOOST_FUSION_GPU_ENABLED
inline bool
all(Sequence const& seq, F f, Tag)
{
@ -56,6 +60,7 @@ namespace boost { namespace fusion { namespace detail
struct unrolled_all
{
template <typename It, typename F>
BOOST_FUSION_GPU_ENABLED
static bool call(It const& it, F f)
{
return
@ -71,6 +76,7 @@ namespace boost { namespace fusion { namespace detail
struct unrolled_all<3>
{
template <typename It, typename F>
BOOST_FUSION_GPU_ENABLED
static bool call(It const& it, F f)
{
return
@ -84,6 +90,7 @@ namespace boost { namespace fusion { namespace detail
struct unrolled_all<2>
{
template <typename It, typename F>
BOOST_FUSION_GPU_ENABLED
static bool call(It const& it, F f)
{
return
@ -96,6 +103,7 @@ namespace boost { namespace fusion { namespace detail
struct unrolled_all<1>
{
template <typename It, typename F>
BOOST_FUSION_GPU_ENABLED
static bool call(It const& it, F f)
{
return f(*it);
@ -106,6 +114,7 @@ namespace boost { namespace fusion { namespace detail
struct unrolled_all<0>
{
template <typename It, typename F>
BOOST_FUSION_GPU_ENABLED
static bool call(It const& /*it*/, F /*f*/)
{
return true;
@ -113,6 +122,7 @@ namespace boost { namespace fusion { namespace detail
};
template <typename Sequence, typename F>
BOOST_FUSION_GPU_ENABLED
inline bool
all(Sequence const& seq, F f, random_access_traversal_tag)
{

View File

@ -9,6 +9,7 @@
#if !defined(FUSION_ANY_05052005_1229)
#define FUSION_ANY_05052005_1229
#include <boost/fusion/support/config.hpp>
#include <boost/mpl/bool.hpp>
#include <boost/fusion/sequence/intrinsic/begin.hpp>
#include <boost/fusion/sequence/intrinsic/end.hpp>
@ -23,6 +24,7 @@ namespace boost { namespace fusion {
namespace detail
{
template <typename First, typename Last, typename F>
BOOST_FUSION_GPU_ENABLED
inline bool
linear_any(First const&, Last const&, F const&, mpl::true_)
{
@ -30,6 +32,7 @@ namespace detail
}
template <typename First, typename Last, typename F>
BOOST_FUSION_GPU_ENABLED
inline bool
linear_any(First const& first, Last const& last, F& f, mpl::false_)
{
@ -43,6 +46,7 @@ namespace detail
}
template <typename Sequence, typename F, typename Tag>
BOOST_FUSION_GPU_ENABLED
inline bool
any(Sequence const& seq, F f, Tag)
{
@ -59,6 +63,7 @@ namespace detail
struct unrolled_any
{
template <typename It, typename F>
BOOST_FUSION_GPU_ENABLED
static bool call(It const& it, F f)
{
return
@ -74,6 +79,7 @@ namespace detail
struct unrolled_any<3>
{
template <typename It, typename F>
BOOST_FUSION_GPU_ENABLED
static bool call(It const& it, F f)
{
return
@ -87,6 +93,7 @@ namespace detail
struct unrolled_any<2>
{
template <typename It, typename F>
BOOST_FUSION_GPU_ENABLED
static bool call(It const& it, F f)
{
return
@ -99,6 +106,7 @@ namespace detail
struct unrolled_any<1>
{
template <typename It, typename F>
BOOST_FUSION_GPU_ENABLED
static bool call(It const& it, F f)
{
return f(*it);
@ -109,6 +117,7 @@ namespace detail
struct unrolled_any<0>
{
template <typename It, typename F>
BOOST_FUSION_GPU_ENABLED
static bool call(It const&, F)
{
return false;
@ -116,6 +125,7 @@ namespace detail
};
template <typename Sequence, typename F>
BOOST_FUSION_GPU_ENABLED
inline bool
any(Sequence const& seq, F f, random_access_traversal_tag)
{

View File

@ -7,6 +7,7 @@
#if !defined(FUSION_COUNT_09162005_0158)
#define FUSION_COUNT_09162005_0158
#include <boost/fusion/support/config.hpp>
#include <boost/config.hpp>
#include <boost/mpl/or.hpp>
#include <boost/type_traits/is_convertible.hpp>
@ -27,6 +28,7 @@ namespace boost { namespace fusion { namespace detail
struct compare_convertible<true>
{
template <typename T1, typename T2>
BOOST_FUSION_GPU_ENABLED
static bool
call(T1 const& x, T2 const& y)
{
@ -39,6 +41,7 @@ namespace boost { namespace fusion { namespace detail
struct compare_convertible<false>
{
template <typename T1, typename T2>
BOOST_FUSION_GPU_ENABLED
static bool
call(T1 const&, T2 const&)
{
@ -50,10 +53,12 @@ namespace boost { namespace fusion { namespace detail
struct count_compare
{
typedef typename detail::call_param<T1>::type param;
BOOST_FUSION_GPU_ENABLED
count_compare(param in_x)
: x(in_x) {}
template <typename T2>
BOOST_FUSION_GPU_ENABLED
bool
operator()(T2 const& y)
{

View File

@ -8,6 +8,7 @@
#if !defined(BOOST_FUSION_COUNT_IF_09162005_0141)
#define BOOST_FUSION_COUNT_IF_09162005_0141
#include <boost/fusion/support/config.hpp>
#include <boost/mpl/bool.hpp>
#include <boost/fusion/sequence/intrinsic/begin.hpp>
#include <boost/fusion/sequence/intrinsic/end.hpp>
@ -23,6 +24,7 @@ namespace boost { namespace fusion {
namespace detail
{
template <typename First, typename Last, typename F>
BOOST_FUSION_GPU_ENABLED
inline int
linear_count_if(First const&, Last const&, F const&, mpl::true_)
{
@ -30,6 +32,7 @@ namespace detail
}
template <typename First, typename Last, typename F>
BOOST_FUSION_GPU_ENABLED
inline int
linear_count_if(First const& first, Last const& last, F& f, mpl::false_)
{
@ -45,6 +48,7 @@ namespace detail
}
template <typename Sequence, typename F, typename Tag>
BOOST_FUSION_GPU_ENABLED
inline int
count_if(Sequence const& seq, F f, Tag)
{
@ -61,6 +65,7 @@ namespace detail
struct unrolled_count_if
{
template<typename I0, typename F>
BOOST_FUSION_GPU_ENABLED
static int call(I0 const& i0, F f)
{
int ct = unrolled_count_if<n-4>::
@ -91,6 +96,7 @@ namespace detail
struct unrolled_count_if<3>
{
template<typename I0, typename F>
BOOST_FUSION_GPU_ENABLED
static int call(I0 const& i0, F f)
{
int ct = 0;
@ -115,6 +121,7 @@ namespace detail
struct unrolled_count_if<2>
{
template<typename I0, typename F>
BOOST_FUSION_GPU_ENABLED
static int call(I0 const& i0, F f)
{
int ct = 0;
@ -135,6 +142,7 @@ namespace detail
struct unrolled_count_if<1>
{
template<typename I0, typename F>
BOOST_FUSION_GPU_ENABLED
static int call(I0 const& i0, F f)
{
int ct = 0;
@ -149,6 +157,7 @@ namespace detail
struct unrolled_count_if<0>
{
template<typename I0, typename F>
BOOST_FUSION_GPU_ENABLED
static int call(I0 const&, F)
{
return 0;
@ -156,6 +165,7 @@ namespace detail
};
template <typename Sequence, typename F>
BOOST_FUSION_GPU_ENABLED
inline int
count_if(Sequence const& seq, F f, random_access_traversal_tag)
{

View File

@ -9,6 +9,7 @@
#if !defined(FUSION_FIND_IF_05052005_1107)
#define FUSION_FIND_IF_05052005_1107
#include <boost/fusion/support/config.hpp>
#include <boost/mpl/apply.hpp>
#include <boost/mpl/eval_if.hpp>
#include <boost/mpl/identity.hpp>
@ -183,6 +184,7 @@ namespace detail
type;
template <typename Iterator>
BOOST_FUSION_GPU_ENABLED
static type
recursive_call(Iterator const& iter, mpl::true_)
{
@ -190,6 +192,7 @@ namespace detail
}
template <typename Iterator>
BOOST_FUSION_GPU_ENABLED
static type
recursive_call(Iterator const& iter, mpl::false_)
{
@ -197,6 +200,7 @@ namespace detail
}
template <typename Iterator>
BOOST_FUSION_GPU_ENABLED
static type
recursive_call(Iterator const& iter)
{
@ -205,6 +209,7 @@ namespace detail
}
template <typename Iterator, typename Tag>
BOOST_FUSION_GPU_ENABLED
static type
choose_call(Iterator const& iter, Tag)
{
@ -212,6 +217,7 @@ namespace detail
}
template <typename Iterator>
BOOST_FUSION_GPU_ENABLED
static type
choose_call(Iterator const& iter, random_access_traversal_tag)
{
@ -220,6 +226,7 @@ namespace detail
}
template <typename Iterator>
BOOST_FUSION_GPU_ENABLED
static type
iter_call(Iterator const& iter)
{
@ -227,6 +234,7 @@ namespace detail
}
template <typename Sequence>
BOOST_FUSION_GPU_ENABLED
static type
call(Sequence& seq)
{

View File

@ -7,6 +7,7 @@
#if !defined(BOOST_FUSION_SEGMENTED_FIND_HPP_INCLUDED)
#define BOOST_FUSION_SEGMENTED_FIND_HPP_INCLUDED
#include <boost/fusion/support/config.hpp>
#include <boost/mpl/eval_if.hpp>
#include <boost/mpl/identity.hpp>
#include <boost/fusion/algorithm/query/find_fwd.hpp>
@ -44,16 +45,19 @@ namespace boost { namespace fusion { namespace detail
>::type
type;
BOOST_FUSION_GPU_ENABLED
static type call(Sequence& seq, State const&state, Context const& context, segmented_find_fun)
{
return call_impl(seq, state, context, continue_type());
}
BOOST_FUSION_GPU_ENABLED
static type call_impl(Sequence&, State const&state, Context const&, mpl::true_)
{
return state;
}
BOOST_FUSION_GPU_ENABLED
static type call_impl(Sequence& seq, State const&, Context const& context, mpl::false_)
{
return fusion::make_segmented_iterator(fusion::find<T>(seq), context);
@ -74,6 +78,7 @@ namespace boost { namespace fusion { namespace detail
>::type
type;
BOOST_FUSION_GPU_ENABLED
static type call(Sequence& seq)
{
return fusion::segmented_fold_until(

View File

@ -7,6 +7,7 @@
#if !defined(BOOST_FUSION_SEGMENTED_FIND_IF_HPP_INCLUDED)
#define BOOST_FUSION_SEGMENTED_FIND_IF_HPP_INCLUDED
#include <boost/fusion/support/config.hpp>
#include <boost/mpl/eval_if.hpp>
#include <boost/mpl/identity.hpp>
#include <boost/fusion/algorithm/query/find_if_fwd.hpp>
@ -44,16 +45,19 @@ namespace boost { namespace fusion { namespace detail
>::type
type;
BOOST_FUSION_GPU_ENABLED
static type call(Sequence& seq, State const&state, Context const& context, segmented_find_if_fun)
{
return call_impl(seq, state, context, continue_type());
}
BOOST_FUSION_GPU_ENABLED
static type call_impl(Sequence&, State const&state, Context const&, mpl::true_)
{
return state;
}
BOOST_FUSION_GPU_ENABLED
static type call_impl(Sequence& seq, State const&, Context const& context, mpl::false_)
{
return fusion::make_segmented_iterator(fusion::find_if<Pred>(seq), context);
@ -74,6 +78,7 @@ namespace boost { namespace fusion { namespace detail
>::type
type;
BOOST_FUSION_GPU_ENABLED
static type call(Sequence& seq)
{
return fusion::segmented_fold_until(

View File

@ -8,6 +8,7 @@
#if !defined(FUSION_FIND_05052005_1107)
#define FUSION_FIND_05052005_1107
#include <boost/fusion/support/config.hpp>
#include <boost/fusion/algorithm/query/find_if_fwd.hpp>
#include <boost/fusion/algorithm/query/detail/find_if.hpp>
#include <boost/fusion/algorithm/query/detail/segmented_find.hpp>
@ -46,6 +47,7 @@ namespace boost { namespace fusion
}
template <typename T, typename Sequence>
BOOST_FUSION_GPU_ENABLED
inline typename
lazy_disable_if<
is_const<Sequence>
@ -58,6 +60,7 @@ namespace boost { namespace fusion
}
template <typename T, typename Sequence>
BOOST_FUSION_GPU_ENABLED
inline typename result_of::find<Sequence const, T>::type const
find(Sequence const& seq)
{

View File

@ -7,6 +7,7 @@
#if !defined(BOOST_FUSION_FIND_FWD_HPP_INCLUDED)
#define BOOST_FUSION_FIND_FWD_HPP_INCLUDED
#include <boost/fusion/support/config.hpp>
#include <boost/utility/enable_if.hpp>
#include <boost/type_traits/is_const.hpp>
@ -19,6 +20,7 @@ namespace boost { namespace fusion
}
template <typename T, typename Sequence>
BOOST_FUSION_GPU_ENABLED
inline typename
lazy_disable_if<
is_const<Sequence>
@ -27,6 +29,7 @@ namespace boost { namespace fusion
find(Sequence& seq);
template <typename T, typename Sequence>
BOOST_FUSION_GPU_ENABLED
inline typename result_of::find<Sequence const, T>::type const
find(Sequence const& seq);
}}

View File

@ -8,6 +8,7 @@
#if !defined(FUSION_FIND_IF_05052005_1108)
#define FUSION_FIND_IF_05052005_1108
#include <boost/fusion/support/config.hpp>
#include <boost/fusion/algorithm/query/find_if_fwd.hpp>
#include <boost/fusion/algorithm/query/detail/find_if.hpp>
#include <boost/fusion/algorithm/query/detail/segmented_find_if.hpp>
@ -41,6 +42,7 @@ namespace boost { namespace fusion
}
template <typename Pred, typename Sequence>
BOOST_FUSION_GPU_ENABLED
inline typename
lazy_disable_if<
is_const<Sequence>
@ -53,6 +55,7 @@ namespace boost { namespace fusion
}
template <typename Pred, typename Sequence>
BOOST_FUSION_GPU_ENABLED
inline typename result_of::find_if<Sequence const, Pred>::type const
find_if(Sequence const& seq)
{

View File

@ -7,6 +7,7 @@
#if !defined(BOOST_FUSION_FIND_IF_FWD_HPP_INCLUDED)
#define BOOST_FUSION_FIND_IF_FWD_HPP_INCLUDED
#include <boost/fusion/support/config.hpp>
#include <boost/utility/enable_if.hpp>
#include <boost/type_traits/is_const.hpp>
@ -20,6 +21,7 @@ namespace boost { namespace fusion
}
template <typename Pred, typename Sequence>
BOOST_FUSION_GPU_ENABLED
typename
lazy_disable_if<
is_const<Sequence>
@ -28,6 +30,7 @@ namespace boost { namespace fusion
find_if(Sequence& seq);
template <typename Pred, typename Sequence>
BOOST_FUSION_GPU_ENABLED
typename result_of::find_if<Sequence const, Pred>::type const
find_if(Sequence const& seq);
}}

View File

@ -8,6 +8,7 @@
#if !defined(BOOST_FUSION_NONE_07062005_1128)
#define BOOST_FUSION_NONE_07062005_1128
#include <boost/fusion/support/config.hpp>
#include <boost/fusion/algorithm/query/any.hpp>
namespace boost { namespace fusion
@ -22,6 +23,7 @@ namespace boost { namespace fusion
}
template <typename Sequence, typename F>
BOOST_FUSION_GPU_ENABLED
inline bool
none(Sequence const& seq, F f)
{