forked from boostorg/fusion
gpu-enable more functions, but not stream inserters and extractors
This commit is contained in:
@ -46,11 +46,14 @@ namespace boost { namespace fusion
|
||||
typedef typename result_of::end<Sequence>::type last_type;
|
||||
typedef Pred pred_type;
|
||||
|
||||
BOOST_FUSION_GPU_ENABLED
|
||||
filter_view(Sequence& in_seq)
|
||||
: seq(in_seq)
|
||||
{}
|
||||
|
||||
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;
|
||||
|
||||
|
@ -55,6 +55,7 @@ namespace boost { namespace fusion
|
||||
typedef last_iter last_type;
|
||||
typedef Pred pred_type;
|
||||
|
||||
BOOST_FUSION_GPU_ENABLED
|
||||
filter_iterator(First const& in_first)
|
||||
: first(filter::iter_call(first_converter::call(in_first))) {}
|
||||
|
||||
|
@ -44,6 +44,7 @@ namespace boost { namespace fusion
|
||||
|
||||
typedef typename traits::category_of<begin_type>::type category;
|
||||
|
||||
BOOST_FUSION_GPU_ENABLED
|
||||
iterator_range(First const& in_first, Last const& in_last)
|
||||
: first(convert_iterator<First>::call(in_first))
|
||||
, last(convert_iterator<Last>::call(in_last)) {}
|
||||
|
@ -56,13 +56,17 @@ namespace boost { namespace fusion
|
||||
result_of::size<Sequence1>::value + result_of::size<Sequence2>::value>
|
||||
size;
|
||||
|
||||
BOOST_FUSION_GPU_ENABLED
|
||||
joint_view(Sequence1& in_seq1, Sequence2& in_seq2)
|
||||
: seq1(in_seq1)
|
||||
, seq2(in_seq2)
|
||||
{}
|
||||
|
||||
BOOST_FUSION_GPU_ENABLED
|
||||
first_type first() const { return fusion::begin(seq1); }
|
||||
BOOST_FUSION_GPU_ENABLED
|
||||
concat_type concat() const { return fusion::begin(seq2); }
|
||||
BOOST_FUSION_GPU_ENABLED
|
||||
concat_last_type concat_last() const { return fusion::end(seq2); }
|
||||
|
||||
private:
|
||||
|
@ -41,6 +41,7 @@ namespace boost { namespace fusion
|
||||
typedef Category category;
|
||||
BOOST_STATIC_ASSERT((!result_of::equal_to<first_type, last_type>::value));
|
||||
|
||||
BOOST_FUSION_GPU_ENABLED
|
||||
joint_view_iterator(First const& in_first, Concat const& in_concat)
|
||||
: first(first_converter::call(in_first))
|
||||
, concat(concat_converter::call(in_concat))
|
||||
|
@ -38,6 +38,7 @@ namespace boost { namespace fusion
|
||||
mpl::if_<traits::is_view<Sequence>, Sequence, sequence_type&>::type
|
||||
stored_seq_type;
|
||||
|
||||
BOOST_FUSION_GPU_ENABLED
|
||||
repetitive_view(Sequence& in_seq)
|
||||
: seq(in_seq) {}
|
||||
|
||||
|
@ -39,6 +39,7 @@ namespace boost { namespace fusion
|
||||
BOOST_FUSION_GPU_ENABLED explicit repetitive_view_iterator(Sequence& in_seq)
|
||||
: seq(in_seq), pos(begin(in_seq)) {}
|
||||
|
||||
BOOST_FUSION_GPU_ENABLED
|
||||
repetitive_view_iterator(Sequence& in_seq, pos_type const& in_pos)
|
||||
: seq(in_seq), pos(in_pos) {}
|
||||
|
||||
|
@ -50,11 +50,14 @@ namespace boost { namespace fusion
|
||||
bidirectional_traversal_tag
|
||||
, typename traits::category_of<first_type>::type>::value));
|
||||
|
||||
BOOST_FUSION_GPU_ENABLED
|
||||
reverse_view(Sequence& in_seq)
|
||||
: seq(in_seq)
|
||||
{}
|
||||
|
||||
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;
|
||||
|
||||
|
@ -42,6 +42,7 @@ namespace boost { namespace fusion
|
||||
bidirectional_traversal_tag
|
||||
, category>::value));
|
||||
|
||||
BOOST_FUSION_GPU_ENABLED
|
||||
reverse_view_iterator(First const& in_first)
|
||||
: first(converter::call(in_first)) {}
|
||||
|
||||
|
@ -43,6 +43,7 @@ namespace boost { namespace fusion
|
||||
typedef mpl::int_<1> size;
|
||||
typedef T value_type;
|
||||
|
||||
BOOST_FUSION_GPU_ENABLED
|
||||
single_view()
|
||||
: val() {}
|
||||
|
||||
|
@ -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;
|
||||
|
@ -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) {}
|
||||
|
||||
|
@ -59,6 +59,7 @@ namespace boost { namespace fusion
|
||||
return fusion::at<N>(seq);
|
||||
}
|
||||
|
||||
BOOST_FUSION_GPU_ENABLED
|
||||
unused_type operator()(unused_type const&) const
|
||||
{
|
||||
return unused_type();
|
||||
|
@ -56,6 +56,7 @@ namespace boost { namespace fusion {
|
||||
return fusion::begin(seq);
|
||||
}
|
||||
|
||||
BOOST_FUSION_GPU_ENABLED
|
||||
unused_type operator()(unused_type const&) const
|
||||
{
|
||||
return unused_type();
|
||||
|
@ -50,6 +50,7 @@ namespace boost { namespace fusion {
|
||||
return fusion::deref(it);
|
||||
}
|
||||
|
||||
BOOST_FUSION_GPU_ENABLED
|
||||
unused_type operator()(unused_type const&) const
|
||||
{
|
||||
return unused_type();
|
||||
|
@ -70,6 +70,7 @@ namespace boost { namespace fusion {
|
||||
return fusion::advance<M>(fusion::begin(seq));
|
||||
}
|
||||
|
||||
BOOST_FUSION_GPU_ENABLED
|
||||
unused_type operator()(unused_type const&) const
|
||||
{
|
||||
return unused_type();
|
||||
|
@ -49,6 +49,7 @@ namespace boost { namespace fusion {
|
||||
return fusion::next(it);
|
||||
}
|
||||
|
||||
BOOST_FUSION_GPU_ENABLED
|
||||
unused_type operator()(unused_type const&) const
|
||||
{
|
||||
return unused_type();
|
||||
|
@ -48,6 +48,7 @@ namespace boost { namespace fusion {
|
||||
return fusion::prior(it);
|
||||
}
|
||||
|
||||
BOOST_FUSION_GPU_ENABLED
|
||||
unused_type operator()(unused_type const&) const
|
||||
{
|
||||
return unused_type();
|
||||
|
@ -122,6 +122,7 @@ namespace boost { namespace fusion {
|
||||
typedef typename fusion::result_of::as_vector<Sequences>::type sequences;
|
||||
typedef typename detail::min_size<real_sequences>::type size;
|
||||
|
||||
BOOST_FUSION_GPU_ENABLED
|
||||
zip_view(
|
||||
const Sequences& seqs)
|
||||
: sequences_(seqs)
|
||||
|
Reference in New Issue
Block a user