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

@ -7,6 +7,7 @@
#if !defined(FUSION_MAP_MAIN_07212005_1106)
#define FUSION_MAP_MAIN_07212005_1106
#include <boost/fusion/support/config.hpp>
#include <boost/fusion/container/map/map_fwd.hpp>
#include <boost/fusion/support/pair.hpp>
@ -51,50 +52,60 @@ namespace boost { namespace fusion
typedef mpl::int_<base_type::size> size;
typedef mpl::false_ is_view;
BOOST_FUSION_GPU_ENABLED
map() {}
BOOST_FUSION_GPU_ENABLED
map(map const& seq)
: base_type(seq.base())
{}
BOOST_FUSION_GPU_ENABLED
map(map&& seq)
: base_type(std::forward<map>(seq))
{}
template <typename Sequence>
BOOST_FUSION_GPU_ENABLED
map(Sequence const& seq
, typename enable_if<traits::is_sequence<Sequence>>::type* /*dummy*/ = 0)
: base_type(begin(seq), detail::map_impl_from_iterator())
{}
template <typename Sequence>
BOOST_FUSION_GPU_ENABLED
map(Sequence& seq
, typename enable_if<traits::is_sequence<Sequence>>::type* /*dummy*/ = 0)
: base_type(begin(seq), detail::map_impl_from_iterator())
{}
template <typename Sequence>
BOOST_FUSION_GPU_ENABLED
map(Sequence&& seq
, typename enable_if<traits::is_sequence<Sequence>>::type* /*dummy*/ = 0)
: base_type(begin(seq), detail::map_impl_from_iterator())
{}
template <typename First, typename ...T_>
BOOST_FUSION_GPU_ENABLED
map(First const& first, T_ const&... rest)
: base_type(first, rest...)
{}
template <typename First, typename ...T_>
BOOST_FUSION_GPU_ENABLED
map(First&& first, T_&&... rest)
: base_type(std::forward<First>(first), std::forward<T_>(rest)...)
{}
BOOST_FUSION_GPU_ENABLED
map& operator=(map const& rhs)
{
base_type::operator=(rhs.base());
return *this;
}
BOOST_FUSION_GPU_ENABLED
map& operator=(map&& rhs)
{
base_type::operator=(std::forward<base_type>(rhs.base()));
@ -102,6 +113,7 @@ namespace boost { namespace fusion
}
template <typename Sequence>
BOOST_FUSION_GPU_ENABLED
typename enable_if<traits::is_sequence<Sequence>, map&>::type
operator=(Sequence const& seq)
{
@ -109,7 +121,9 @@ namespace boost { namespace fusion
return *this;
}
BOOST_FUSION_GPU_ENABLED
base_type& base() { return *this; }
BOOST_FUSION_GPU_ENABLED
base_type const& base() const { return *this; }
};
}}