gpu-enable more functions, but not stream inserters and extractors

This commit is contained in:
Eric Niebler
2014-01-23 21:30:18 -08:00
parent c4f9f0d1b6
commit e5b0f3c2e1
30 changed files with 88 additions and 60 deletions

View File

@@ -56,15 +56,20 @@ namespace boost { namespace fusion
typedef Sequence2 sequence2_type;
typedef F transform_type;
BOOST_FUSION_GPU_ENABLED
transform_view(Sequence1& in_seq1, Sequence2& in_seq2, F const& binop)
: f(binop)
, seq1(in_seq1)
, seq2(in_seq2)
{}
BOOST_FUSION_GPU_ENABLED
first1_type first1() const { return fusion::begin(seq1); }
BOOST_FUSION_GPU_ENABLED
first2_type first2() const { return fusion::begin(seq2); }
BOOST_FUSION_GPU_ENABLED
last1_type last1() const { return fusion::end(seq1); }
BOOST_FUSION_GPU_ENABLED
last2_type last2() const { return fusion::end(seq2); }
transform_type f;
@@ -95,12 +100,15 @@ namespace boost { namespace fusion
typedef Sequence sequence_type;
typedef F transform_type;
BOOST_FUSION_GPU_ENABLED
transform_view(Sequence& in_seq, F const& in_f)
: seq(in_seq)
, f(in_f)
{}
BOOST_FUSION_GPU_ENABLED
first_type first() const { return fusion::begin(seq); }
BOOST_FUSION_GPU_ENABLED
last_type last() const { return fusion::end(seq); }
typename mpl::if_<traits::is_view<Sequence>, Sequence, Sequence&>::type seq;
transform_type f;

View File

@@ -35,6 +35,7 @@ namespace boost { namespace fusion
typedef typename traits::category_of<first_type>::type category;
typedef F transform_type;
BOOST_FUSION_GPU_ENABLED
transform_view_iterator(First const& in_first, F const& in_f)
: first(converter::call(in_first)), f(in_f) {}
@@ -61,6 +62,7 @@ namespace boost { namespace fusion
typedef typename traits::category_of<first1_type>::type category;
typedef F transform_type;
BOOST_FUSION_GPU_ENABLED
transform_view_iterator2(First1 const& in_first1, First2 const& in_first2, F const& in_f)
: first1(converter1::call(in_first1)), first2(converter2::call(in_first2)), f(in_f) {}