forked from boostorg/fusion
gpu-enable functions
This commit is contained in:
committed by
Eric Niebler
parent
867c7e5dfb
commit
c4f9f0d1b6
@ -8,6 +8,7 @@
|
||||
#if !defined(BOOST_FUSION_NVIEW_ADVANCE_IMPL_SEP_24_2009_0212PM)
|
||||
#define BOOST_FUSION_NVIEW_ADVANCE_IMPL_SEP_24_2009_0212PM
|
||||
|
||||
#include <boost/fusion/support/config.hpp>
|
||||
#include <boost/mpl/advance.hpp>
|
||||
#include <boost/fusion/iterator/advance.hpp>
|
||||
|
||||
@ -35,6 +36,7 @@ namespace boost { namespace fusion
|
||||
typedef nview_iterator<sequence_type,
|
||||
typename mpl::advance<iterator_type, Dist>::type> type;
|
||||
|
||||
BOOST_FUSION_GPU_ENABLED
|
||||
static type
|
||||
call(Iterator const& i)
|
||||
{
|
||||
|
@ -8,6 +8,7 @@
|
||||
#if !defined(BOOST_FUSION_NVIEW_AT_IMPL_SEP_24_2009_0225PM)
|
||||
#define BOOST_FUSION_NVIEW_AT_IMPL_SEP_24_2009_0225PM
|
||||
|
||||
#include <boost/fusion/support/config.hpp>
|
||||
#include <boost/fusion/sequence/intrinsic/at.hpp>
|
||||
|
||||
namespace boost { namespace fusion
|
||||
@ -31,6 +32,7 @@ namespace boost { namespace fusion
|
||||
typedef typename result_of::at<index_type, N>::type index;
|
||||
typedef typename result_of::at<sequence_type, index>::type type;
|
||||
|
||||
BOOST_FUSION_GPU_ENABLED
|
||||
static type
|
||||
call(Sequence& seq)
|
||||
{
|
||||
|
@ -8,6 +8,7 @@
|
||||
#if !defined(BOOST_FUSION_NVIEW_BEGIN_IMPL_SEP_23_2009_1036PM)
|
||||
#define BOOST_FUSION_NVIEW_BEGIN_IMPL_SEP_23_2009_1036PM
|
||||
|
||||
#include <boost/fusion/support/config.hpp>
|
||||
#include <boost/mpl/begin.hpp>
|
||||
#include <boost/fusion/sequence/intrinsic/begin.hpp>
|
||||
|
||||
@ -34,6 +35,7 @@ namespace boost { namespace fusion
|
||||
typedef nview_iterator<Sequence,
|
||||
typename mpl::begin<index_type>::type> type;
|
||||
|
||||
BOOST_FUSION_GPU_ENABLED
|
||||
static type call(Sequence& s)
|
||||
{
|
||||
return type(s);
|
||||
|
@ -8,6 +8,7 @@
|
||||
#if !defined(BOOST_FUSION_NVIEW_DEREF_IMPL_SEP_24_2009_0818AM)
|
||||
#define BOOST_FUSION_NVIEW_DEREF_IMPL_SEP_24_2009_0818AM
|
||||
|
||||
#include <boost/fusion/support/config.hpp>
|
||||
#include <boost/fusion/iterator/deref.hpp>
|
||||
#include <boost/fusion/container/vector.hpp>
|
||||
|
||||
@ -33,6 +34,7 @@ namespace boost { namespace fusion
|
||||
typedef typename result_of::at<
|
||||
typename sequence_type::sequence_type, index>::type type;
|
||||
|
||||
BOOST_FUSION_GPU_ENABLED
|
||||
static type call(Iterator const& i)
|
||||
{
|
||||
return at<index>(i.seq.seq);
|
||||
|
@ -8,6 +8,7 @@
|
||||
#if !defined(BOOST_FUSION_NVIEW_DISTANCE_IMPL_SEP_23_2009_0328PM)
|
||||
#define BOOST_FUSION_NVIEW_DISTANCE_IMPL_SEP_23_2009_0328PM
|
||||
|
||||
#include <boost/fusion/support/config.hpp>
|
||||
#include <boost/fusion/iterator/distance.hpp>
|
||||
|
||||
namespace boost { namespace fusion
|
||||
@ -30,6 +31,7 @@ namespace boost { namespace fusion
|
||||
typename First::first_type, typename Last::first_type
|
||||
>::type type;
|
||||
|
||||
BOOST_FUSION_GPU_ENABLED
|
||||
static type
|
||||
call(First const& /*first*/, Last const& /*last*/)
|
||||
{
|
||||
|
@ -8,6 +8,7 @@
|
||||
#if !defined(BOOST_FUSION_NVIEW_END_IMPL_SEP_24_2009_0140PM)
|
||||
#define BOOST_FUSION_NVIEW_END_IMPL_SEP_24_2009_0140PM
|
||||
|
||||
#include <boost/fusion/support/config.hpp>
|
||||
#include <boost/mpl/end.hpp>
|
||||
#include <boost/fusion/sequence/intrinsic/end.hpp>
|
||||
|
||||
@ -35,6 +36,7 @@ namespace boost { namespace fusion
|
||||
typedef nview_iterator<Sequence,
|
||||
typename mpl::end<index_type>::type> type;
|
||||
|
||||
BOOST_FUSION_GPU_ENABLED
|
||||
static type call(Sequence& s)
|
||||
{
|
||||
return type(s);
|
||||
|
@ -8,6 +8,7 @@
|
||||
#if !defined(BOOST_FUSION_NVIEW_ITERATOR_SEP_24_2009_0329PM)
|
||||
#define BOOST_FUSION_NVIEW_ITERATOR_SEP_24_2009_0329PM
|
||||
|
||||
#include <boost/fusion/support/config.hpp>
|
||||
#include <boost/fusion/iterator/equal_to.hpp>
|
||||
|
||||
namespace boost { namespace fusion
|
||||
|
@ -8,6 +8,7 @@
|
||||
#if !defined(BOOST_FUSION_NVIEW_NEXT_IMPL_SEP_24_2009_0116PM)
|
||||
#define BOOST_FUSION_NVIEW_NEXT_IMPL_SEP_24_2009_0116PM
|
||||
|
||||
#include <boost/fusion/support/config.hpp>
|
||||
#include <boost/mpl/next.hpp>
|
||||
|
||||
namespace boost { namespace fusion
|
||||
@ -34,6 +35,7 @@ namespace boost { namespace fusion
|
||||
typedef nview_iterator<sequence_type,
|
||||
typename mpl::next<first_type>::type> type;
|
||||
|
||||
BOOST_FUSION_GPU_ENABLED
|
||||
static type
|
||||
call(Iterator const& i)
|
||||
{
|
||||
|
@ -63,6 +63,7 @@ namespace boost { namespace fusion { namespace result_of
|
||||
namespace boost { namespace fusion
|
||||
{
|
||||
template<BOOST_PP_ENUM_PARAMS(N, int I), typename Sequence>
|
||||
BOOST_FUSION_GPU_ENABLED
|
||||
inline nview<Sequence, mpl::vector_c<int, BOOST_PP_ENUM_PARAMS(N, I)> >
|
||||
as_nview(Sequence& s)
|
||||
{
|
||||
|
@ -8,6 +8,7 @@
|
||||
#if !defined(BOOST_FUSION_NVIEW_PRIOR_IMPL_SEP_24_2009_0142PM)
|
||||
#define BOOST_FUSION_NVIEW_PRIOR_IMPL_SEP_24_2009_0142PM
|
||||
|
||||
#include <boost/fusion/support/config.hpp>
|
||||
#include <boost/mpl/prior.hpp>
|
||||
|
||||
namespace boost { namespace fusion
|
||||
@ -34,6 +35,7 @@ namespace boost { namespace fusion
|
||||
typedef nview_iterator<sequence_type,
|
||||
typename mpl::prior<first_type>::type> type;
|
||||
|
||||
BOOST_FUSION_GPU_ENABLED
|
||||
static type
|
||||
call(Iterator const& i)
|
||||
{
|
||||
|
@ -7,6 +7,7 @@
|
||||
#if !defined(FUSION_NVIEW_SIZE_IMPL_OCT_06_2009_0525PM)
|
||||
#define FUSION_NVIEW_SIZE_IMPL_OCT_06_2009_0525PM
|
||||
|
||||
#include <boost/fusion/support/config.hpp>
|
||||
#include <boost/fusion/iterator/distance.hpp>
|
||||
#include <boost/fusion/sequence/intrinsic/begin.hpp>
|
||||
#include <boost/fusion/sequence/intrinsic/end.hpp>
|
||||
|
@ -8,6 +8,7 @@
|
||||
#if !defined(BOOST_FUSION_NVIEW_VALUE_AT_IMPL_SEP_24_2009_0234PM)
|
||||
#define BOOST_FUSION_NVIEW_VALUE_AT_IMPL_SEP_24_2009_0234PM
|
||||
|
||||
#include <boost/fusion/support/config.hpp>
|
||||
#include <boost/fusion/sequence/intrinsic/value_at.hpp>
|
||||
|
||||
namespace boost { namespace fusion
|
||||
|
@ -8,6 +8,7 @@
|
||||
#if !defined(BOOST_FUSION_VALUE_OF_PRIOR_IMPL_SEP_24_2009_0158PM)
|
||||
#define BOOST_FUSION_VALUE_OF_PRIOR_IMPL_SEP_24_2009_0158PM
|
||||
|
||||
#include <boost/fusion/support/config.hpp>
|
||||
#include <boost/fusion/iterator/deref.hpp>
|
||||
#include <boost/fusion/container/vector.hpp>
|
||||
|
||||
|
@ -8,6 +8,7 @@
|
||||
#if !defined(BOOST_FUSION_NVIEW_SEP_23_2009_0948PM)
|
||||
#define BOOST_FUSION_NVIEW_SEP_23_2009_0948PM
|
||||
|
||||
#include <boost/fusion/support/config.hpp>
|
||||
#include <boost/mpl/size.hpp>
|
||||
#include <boost/mpl/if.hpp>
|
||||
#include <boost/mpl/vector_c.hpp>
|
||||
@ -39,6 +40,7 @@ namespace boost { namespace fusion
|
||||
|
||||
#ifdef BOOST_NO_CXX11_RVALUE_REFERENCES
|
||||
template <typename T>
|
||||
BOOST_FUSION_GPU_ENABLED
|
||||
typename add_reference<T>::type
|
||||
operator()(T& x) const
|
||||
{
|
||||
@ -46,6 +48,7 @@ namespace boost { namespace fusion
|
||||
}
|
||||
#else
|
||||
template <typename T>
|
||||
BOOST_FUSION_GPU_ENABLED
|
||||
typename result<addref(T)>::type
|
||||
operator()(T&& x) const
|
||||
{
|
||||
@ -65,6 +68,7 @@ namespace boost { namespace fusion
|
||||
{};
|
||||
|
||||
template <typename T>
|
||||
BOOST_FUSION_GPU_ENABLED
|
||||
typename add_reference<typename add_const<T>::type>::type
|
||||
operator()(T& x) const
|
||||
{
|
||||
@ -72,6 +76,7 @@ namespace boost { namespace fusion
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
BOOST_FUSION_GPU_ENABLED
|
||||
typename add_reference<typename add_const<T>::type>::type
|
||||
operator()(T const& x) const
|
||||
{
|
||||
@ -103,7 +108,7 @@ namespace boost { namespace fusion
|
||||
typedef typename result_of::as_vector<transform_view_type>::type
|
||||
sequence_type;
|
||||
|
||||
explicit nview(Sequence& val)
|
||||
BOOST_FUSION_GPU_ENABLED explicit nview(Sequence& val)
|
||||
: seq(sequence_type(transform_view_type(val, transform_type())))
|
||||
{}
|
||||
|
||||
|
@ -7,6 +7,7 @@
|
||||
#if !defined(BOOST_FUSION_NVIEW_ITERATOR_SEP_23_2009_0948PM)
|
||||
#define BOOST_FUSION_NVIEW_ITERATOR_SEP_23_2009_0948PM
|
||||
|
||||
#include <boost/fusion/support/config.hpp>
|
||||
#include <boost/fusion/support/iterator_base.hpp>
|
||||
#include <boost/fusion/support/category_of.hpp>
|
||||
#include <boost/fusion/sequence/intrinsic/begin.hpp>
|
||||
@ -41,7 +42,7 @@ namespace boost { namespace fusion
|
||||
typedef Sequence sequence_type;
|
||||
typedef mpl_iterator<Pos> first_type;
|
||||
|
||||
explicit nview_iterator(Sequence& in_seq)
|
||||
BOOST_FUSION_GPU_ENABLED explicit nview_iterator(Sequence& in_seq)
|
||||
: seq(in_seq) {}
|
||||
|
||||
Sequence& seq;
|
||||
|
Reference in New Issue
Block a user