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

@ -10,6 +10,7 @@
#include <boost/preprocessor/iterate.hpp>
#include <boost/preprocessor/repetition/enum_params.hpp>
#include <boost/preprocessor/repetition/enum_binary_params.hpp>
#include <boost/fusion/support/config.hpp>
#include <boost/fusion/container/vector/vector_fwd.hpp>
#include <boost/fusion/container/vector/detail/vector_n_chooser.hpp>
#include <boost/fusion/sequence/intrinsic/begin.hpp>
@ -28,6 +29,7 @@
ctor_helper(rhs, is_base_of<vector, Sequence>()) \
#define BOOST_FUSION_VECTOR_CTOR_HELPER() \
BOOST_FUSION_GPU_ENABLED \
static vector_n const& \
ctor_helper(vector const& rhs, mpl::true_) \
{ \
@ -35,6 +37,7 @@
} \
\
template <typename T> \
BOOST_FUSION_GPU_ENABLED \
static T const& \
ctor_helper(T const& rhs, mpl::false_) \
{ \
@ -97,17 +100,21 @@ namespace boost { namespace fusion
typedef typename vector_n::category category;
typedef typename vector_n::is_view is_view;
BOOST_FUSION_GPU_ENABLED
vector()
: vec() {}
template <BOOST_PP_ENUM_PARAMS(FUSION_MAX_VECTOR_SIZE, typename U)>
BOOST_FUSION_GPU_ENABLED
vector(vector<BOOST_PP_ENUM_PARAMS(FUSION_MAX_VECTOR_SIZE, U)> const& rhs)
: vec(rhs.vec) {}
BOOST_FUSION_GPU_ENABLED
vector(vector const& rhs)
: vec(rhs.vec) {}
template <typename Sequence>
BOOST_FUSION_GPU_ENABLED
vector(Sequence const& rhs)
: vec(BOOST_FUSION_VECTOR_COPY_INIT()) {}
@ -121,6 +128,7 @@ namespace boost { namespace fusion
#include <boost/fusion/container/vector/detail/vector_forward_ctor.hpp>
template <BOOST_PP_ENUM_PARAMS(FUSION_MAX_VECTOR_SIZE, typename U)>
BOOST_FUSION_GPU_ENABLED
vector&
operator=(vector<BOOST_PP_ENUM_PARAMS(FUSION_MAX_VECTOR_SIZE, U)> const& rhs)
{
@ -129,6 +137,7 @@ namespace boost { namespace fusion
}
template <typename T>
BOOST_FUSION_GPU_ENABLED
vector&
operator=(T const& rhs)
{
@ -136,6 +145,7 @@ namespace boost { namespace fusion
return *this;
}
BOOST_FUSION_GPU_ENABLED
vector&
operator=(vector const& rhs)
{
@ -148,8 +158,10 @@ FUSION_HASH if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
#endif
#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) || \
(defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES))
BOOST_FUSION_GPU_ENABLED
vector(vector&& rhs)
: vec(std::forward<vector_n>(rhs.vec)) {}
BOOST_FUSION_GPU_ENABLED
vector&
operator=(vector&& rhs)
{
@ -158,6 +170,7 @@ FUSION_HASH if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
}
template <typename T>
BOOST_FUSION_GPU_ENABLED
vector&
operator=(T&& rhs)
{
@ -170,6 +183,7 @@ FUSION_HASH endif
#endif
template <int N>
BOOST_FUSION_GPU_ENABLED
typename add_reference<
typename mpl::at_c<types, N>::type
>::type
@ -179,6 +193,7 @@ FUSION_HASH endif
}
template <int N>
BOOST_FUSION_GPU_ENABLED
typename add_reference<
typename add_const<
typename mpl::at_c<types, N>::type
@ -190,6 +205,7 @@ FUSION_HASH endif
}
template <typename I>
BOOST_FUSION_GPU_ENABLED
typename add_reference<
typename mpl::at<types, I>::type
>::type
@ -199,6 +215,7 @@ FUSION_HASH endif
}
template<typename I>
BOOST_FUSION_GPU_ENABLED
typename add_reference<
typename add_const<
typename mpl::at<types, I>::type