forked from boostorg/fusion
final gpu-enabling tweaks
This commit is contained in:
@ -36,7 +36,6 @@ namespace boost { namespace fusion
|
||||
namespace detail
|
||||
{
|
||||
template <typename Tag>
|
||||
BOOST_FUSION_GPU_ENABLED
|
||||
int get_xalloc_index(Tag* = 0)
|
||||
{
|
||||
// each Tag will have a unique index
|
||||
@ -49,7 +48,6 @@ namespace boost { namespace fusion
|
||||
{
|
||||
struct arena
|
||||
{
|
||||
BOOST_FUSION_GPU_ENABLED
|
||||
~arena()
|
||||
{
|
||||
for (
|
||||
@ -64,7 +62,6 @@ namespace boost { namespace fusion
|
||||
std::vector<T*> data;
|
||||
};
|
||||
|
||||
BOOST_FUSION_GPU_ENABLED
|
||||
static void attach(Stream& stream, T const& data)
|
||||
{
|
||||
static arena ar; // our arena
|
||||
@ -72,7 +69,6 @@ namespace boost { namespace fusion
|
||||
stream.pword(get_xalloc_index<Tag>()) = ar.data.back();
|
||||
}
|
||||
|
||||
BOOST_FUSION_GPU_ENABLED
|
||||
static T const* get(Stream& stream)
|
||||
{
|
||||
return (T const*)stream.pword(get_xalloc_index<Tag>());
|
||||
@ -88,19 +84,16 @@ namespace boost { namespace fusion
|
||||
|
||||
typedef stream_data<Stream, Tag, string_type> stream_data_t;
|
||||
|
||||
BOOST_FUSION_GPU_ENABLED
|
||||
string_ios_manip(Stream& str_)
|
||||
: stream(str_)
|
||||
{}
|
||||
|
||||
BOOST_FUSION_GPU_ENABLED
|
||||
void
|
||||
set(string_type const& s)
|
||||
{
|
||||
stream_data_t::attach(stream, s);
|
||||
}
|
||||
|
||||
BOOST_FUSION_GPU_ENABLED
|
||||
void
|
||||
print(char const* default_) const
|
||||
{
|
||||
@ -112,7 +105,6 @@ namespace boost { namespace fusion
|
||||
stream << default_;
|
||||
}
|
||||
|
||||
BOOST_FUSION_GPU_ENABLED
|
||||
void
|
||||
read(char const* default_) const
|
||||
{
|
||||
@ -137,7 +129,6 @@ namespace boost { namespace fusion
|
||||
private:
|
||||
|
||||
template <typename Char>
|
||||
BOOST_FUSION_GPU_ENABLED
|
||||
void
|
||||
check_delim(Char c) const
|
||||
{
|
||||
@ -165,35 +156,30 @@ namespace boost { namespace fusion
|
||||
|
||||
#define STD_TUPLE_DEFINE_MANIPULATOR_FUNCTIONS(name) \
|
||||
template <typename Char, typename Traits> \
|
||||
BOOST_FUSION_GPU_ENABLED \
|
||||
inline detail::name##_type<Char, Traits> \
|
||||
name(const std::basic_string<Char, Traits>& s) \
|
||||
{ \
|
||||
return detail::name##_type<Char, Traits>(s); \
|
||||
} \
|
||||
\
|
||||
BOOST_FUSION_GPU_ENABLED \
|
||||
inline detail::name##_type<char> \
|
||||
name(char const* s) \
|
||||
{ \
|
||||
return detail::name##_type<char>(std::basic_string<char>(s)); \
|
||||
} \
|
||||
\
|
||||
BOOST_FUSION_GPU_ENABLED \
|
||||
inline detail::name##_type<wchar_t> \
|
||||
name(wchar_t const* s) \
|
||||
{ \
|
||||
return detail::name##_type<wchar_t>(std::basic_string<wchar_t>(s)); \
|
||||
} \
|
||||
\
|
||||
BOOST_FUSION_GPU_ENABLED \
|
||||
inline detail::name##_type<char> \
|
||||
name(char c) \
|
||||
{ \
|
||||
return detail::name##_type<char>(std::basic_string<char>(1, c)); \
|
||||
} \
|
||||
\
|
||||
BOOST_FUSION_GPU_ENABLED \
|
||||
inline detail::name##_type<wchar_t> \
|
||||
name(wchar_t c) \
|
||||
{ \
|
||||
@ -204,7 +190,6 @@ namespace boost { namespace fusion
|
||||
|
||||
#define STD_TUPLE_DEFINE_MANIPULATOR_FUNCTIONS(name) \
|
||||
template <typename Char, typename Traits> \
|
||||
BOOST_FUSION_GPU_ENABLED \
|
||||
inline detail::name##_type<Char, Traits> \
|
||||
name(const std::basic_string<Char, Traits>& s) \
|
||||
{ \
|
||||
@ -212,7 +197,6 @@ namespace boost { namespace fusion
|
||||
} \
|
||||
\
|
||||
template <typename Char> \
|
||||
BOOST_FUSION_GPU_ENABLED \
|
||||
inline detail::name##_type<Char> \
|
||||
name(Char s[]) \
|
||||
{ \
|
||||
@ -220,7 +204,6 @@ namespace boost { namespace fusion
|
||||
} \
|
||||
\
|
||||
template <typename Char> \
|
||||
BOOST_FUSION_GPU_ENABLED \
|
||||
inline detail::name##_type<Char> \
|
||||
name(Char const s[]) \
|
||||
{ \
|
||||
@ -228,7 +211,6 @@ namespace boost { namespace fusion
|
||||
} \
|
||||
\
|
||||
template <typename Char> \
|
||||
BOOST_FUSION_GPU_ENABLED \
|
||||
inline detail::name##_type<Char> \
|
||||
name(Char c) \
|
||||
{ \
|
||||
@ -247,12 +229,10 @@ namespace boost { namespace fusion
|
||||
{ \
|
||||
typedef std::basic_string<Char, Traits> string_type; \
|
||||
string_type data; \
|
||||
BOOST_FUSION_GPU_ENABLED \
|
||||
name##_type(const string_type& d): data(d) {} \
|
||||
}; \
|
||||
\
|
||||
template <typename Stream, typename Char, typename Traits> \
|
||||
BOOST_FUSION_GPU_ENABLED \
|
||||
Stream& operator>>(Stream& s, const name##_type<Char,Traits>& m) \
|
||||
{ \
|
||||
string_ios_manip<name##_tag, Stream>(s).set(m.data); \
|
||||
@ -260,7 +240,6 @@ namespace boost { namespace fusion
|
||||
} \
|
||||
\
|
||||
template <typename Stream, typename Char, typename Traits> \
|
||||
BOOST_FUSION_GPU_ENABLED \
|
||||
Stream& operator<<(Stream& s, const name##_type<Char,Traits>& m) \
|
||||
{ \
|
||||
string_ios_manip<name##_tag, Stream>(s).set(m.data); \
|
||||
|
Reference in New Issue
Block a user