diff --git a/hpx/include/serialization.hpp b/hpx/include/serialization.hpp index 63378dd8ca59..6707de2c683b 100644 --- a/hpx/include/serialization.hpp +++ b/hpx/include/serialization.hpp @@ -13,7 +13,6 @@ #include #include #include -#include #include #include #include diff --git a/hpx/runtime/serialization/serialize_sequence.hpp b/hpx/runtime/serialization/serialize_sequence.hpp deleted file mode 100644 index 10d8ffd23a3d..000000000000 --- a/hpx/runtime/serialization/serialize_sequence.hpp +++ /dev/null @@ -1,173 +0,0 @@ -// Copyright (c) 2007-2015 Hartmut Kaiser -// -// Distributed under the Boost Software License, Version 1.0. (See accompanying -// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) - -#if !defined(HPX_SERIALIZATION_SERIALIZE_SEQUENCE_MAY_17_2008_0545PM) -#define HPX_SERIALIZATION_SERIALIZE_SEQUENCE_MAY_17_2008_0545PM - -#include - -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include - -namespace hpx { namespace serialization -{ - template - void serialize_sequence(Archive& ar, Sequence& seq); - - namespace detail - { - /// serialization support for a boost::fusion::sequence - struct serialize_sequence_loop - { - template - static void serialize_element(Archive & ar, Element & e, boost::mpl::false_) - { - ar & e; - } - - template - static void serialize_element(Archive & ar, Element & e, boost::mpl::true_) - { - ar & hpx::serialization::make_array(&e, 1); - } - - template - static void serialize(Archive& ar, Element& e, boost::mpl::false_) - { - typedef typename boost::remove_const::type element_type; - typedef typename - hpx::traits::is_bitwise_serializable::type - predicate; - - if(ar.disable_array_optimization()) - { - serialize_element(ar, e, boost::mpl::false_()); - } - else - { - serialize_element(ar, e, predicate()); - } - } - - template - static void serialize(Archive&, util::unused_type&, boost::mpl::false_) - { - } - - template - static void serialize(Archive&, util::unused_type const&, boost::mpl::false_) - { - } - - template - static void serialize(Archive& ar, Element& e, boost::mpl::true_) - { - serialize_sequence(ar, e); - } - - template - static void serialize(Archive& ar, Element& e) - { - typedef - typename boost::fusion::traits::is_sequence::type - is_sequence; - serialize(ar, e, is_sequence()); - } - - template - static void - call (Archive&, First const&, Last const&, boost::mpl::true_) - { - } - - template - static void - call(Archive& ar, First const& first, Last const& last, boost::mpl::false_) - { - boost::fusion::result_of::equal_to< - typename boost::fusion::result_of::next::type, Last - > is_last; - - serialize(ar, *first); - call(ar, boost::fusion::next(first), last, is_last); - } - - template - static void - call(Archive& ar, First const& first, Last const& last) - { - boost::fusion::result_of::equal_to is_last; - call(ar, first, last, is_last); - } - }; - - template - inline void - serialize_sequence(Archive& ar, Sequence& seq, boost::mpl::false_) - { - serialize_sequence_loop::call(ar, boost::fusion::begin(seq), - boost::fusion::end(seq)); - } - - /////////////////////////////////////////////////////////////////////// - // optimized serialization, all of the tuple is stored as a binary blob - template - inline void - serialize_sequence(Archive& ar, Sequence& seq, boost::mpl::true_) - { - ar & hpx::serialization::make_array(&seq, 1); - } - } - - /////////////////////////////////////////////////////////////////////////// - template - inline void - serialize_sequence(Archive& ar, Sequence& seq) - { - typedef typename boost::remove_const::type sequence_type; - typedef typename - hpx::traits::is_bitwise_serializable::type - predicate; - - if(boost::fusion::size(seq) != 0) - { -#if defined(HPX_DEBUG_SERIALIZATION) - char type = 'S'; - std::size_t size = boost::fusion::size(seq); - ar & type & size; - HPX_ASSERT(type == 'S'); - HPX_ASSERT(size == boost::fusion::size(seq)); -#endif - - if(ar.disable_array_optimization()) - { - detail::serialize_sequence(ar, seq, boost::mpl::false_()); - } - else - { - detail::serialize_sequence(ar, seq, predicate()); - } - -#if defined(HPX_DEBUG_SERIALIZATION) - type = 'E'; - ar & type; - HPX_ASSERT(type == 'E'); -#endif - } - } -}} - -#endif diff --git a/hpx/util/zip_iterator.hpp b/hpx/util/zip_iterator.hpp index d6cb054b7a6b..53c7c7016876 100644 --- a/hpx/util/zip_iterator.hpp +++ b/hpx/util/zip_iterator.hpp @@ -12,7 +12,6 @@ #include #include #include -#include #include #include @@ -363,7 +362,7 @@ namespace hpx { namespace util template void serialize(Archive& ar, unsigned) { - serialization::serialize_sequence(ar, iterators_); + ar & iterators_; } private: diff --git a/src/runtime/agas/request.cpp b/src/runtime/agas/request.cpp index f54e08ce0256..c249fefbc51e 100644 --- a/src/runtime/agas/request.cpp +++ b/src/runtime/agas/request.cpp @@ -11,7 +11,6 @@ #include #include #include -#include #include #include @@ -672,7 +671,7 @@ namespace hpx { namespace agas void operator()(Sequence const& seq) const { // TODO: verification? - serialization::serialize_sequence(ar, seq); + ar << seq; } }; @@ -692,7 +691,7 @@ namespace hpx { namespace agas boost::mpl::at_c< \ request_data::data_type::types, n \ >::type d; \ - serialization::serialize_sequence(ar, d); \ + ar >> d; \ data->data = d; \ return; \ } \ diff --git a/src/runtime/agas/response.cpp b/src/runtime/agas/response.cpp index c49ba7bc2dec..faa5ef15383b 100644 --- a/src/runtime/agas/response.cpp +++ b/src/runtime/agas/response.cpp @@ -18,7 +18,6 @@ #include #include #include -#include #include #include @@ -585,7 +584,7 @@ namespace hpx { namespace agas void operator()(Sequence const& seq) const { // TODO: verification? - serialization::serialize_sequence(ar, seq); + ar << seq; } }; @@ -606,7 +605,7 @@ namespace hpx { namespace agas boost::mpl::at_c< \ response_data::data_type::types, n \ >::type d; \ - serialization::serialize_sequence(ar, d); \ + ar >> d; \ data->data = d; \ return; \ } \ diff --git a/src/runtime/components/console_logging.cpp b/src/runtime/components/console_logging.cpp index a4c6ed536004..127488f9147a 100644 --- a/src/runtime/components/console_logging.cpp +++ b/src/runtime/components/console_logging.cpp @@ -15,7 +15,6 @@ #include #include #include -#include #include #include diff --git a/src/runtime/components/server/console_logging_server.cpp b/src/runtime/components/server/console_logging_server.cpp index 4b25b8c18760..b576d803f1ce 100644 --- a/src/runtime/components/server/console_logging_server.cpp +++ b/src/runtime/components/server/console_logging_server.cpp @@ -12,7 +12,6 @@ #include #include #include -#include #include #include