Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r55437 - branches/release/boost/mpi/detail
From: troyer_at_[hidden]
Date: 2009-08-06 16:41:27


Author: troyer
Date: 2009-08-06 16:41:25 EDT (Thu, 06 Aug 2009)
New Revision: 55437
URL: http://svn.boost.org/trac/boost/changeset/55437

Log:
Fixed trac issue 3261
Text files modified:
   branches/release/boost/mpi/detail/forward_skeleton_iarchive.hpp | 7 +++++++
   branches/release/boost/mpi/detail/forward_skeleton_oarchive.hpp | 5 +++++
   branches/release/boost/mpi/detail/ignore_iprimitive.hpp | 2 +-
   branches/release/boost/mpi/detail/ignore_oprimitive.hpp | 4 ++--
   branches/release/boost/mpi/detail/ignore_skeleton_oarchive.hpp | 7 +++++++
   branches/release/boost/mpi/detail/packed_iprimitive.hpp | 6 +++---
   branches/release/boost/mpi/detail/packed_oprimitive.hpp | 6 +++---
   7 files changed, 28 insertions(+), 9 deletions(-)

Modified: branches/release/boost/mpi/detail/forward_skeleton_iarchive.hpp
==============================================================================
--- branches/release/boost/mpi/detail/forward_skeleton_iarchive.hpp (original)
+++ branches/release/boost/mpi/detail/forward_skeleton_iarchive.hpp 2009-08-06 16:41:25 EDT (Thu, 06 Aug 2009)
@@ -65,6 +65,13 @@
 BOOST_ARCHIVE_FORWARD_IMPLEMENTATION(archive::class_name_type)
 BOOST_ARCHIVE_FORWARD_IMPLEMENTATION(serialization::collection_size_type)
 
+ void load_override(std::string & s , int)
+ {
+ serialization::collection_size_type length(s.size());
+ load_override(length,0);
+ s.resize(length);
+ }
+
 #undef BOOST_ARCHIVE_FORWARD_IMPLEMENTATION
 protected:
     /// the actual archive used to serialize the information we actually want to store

Modified: branches/release/boost/mpi/detail/forward_skeleton_oarchive.hpp
==============================================================================
--- branches/release/boost/mpi/detail/forward_skeleton_oarchive.hpp (original)
+++ branches/release/boost/mpi/detail/forward_skeleton_oarchive.hpp 2009-08-06 16:41:25 EDT (Thu, 06 Aug 2009)
@@ -66,6 +66,11 @@
 BOOST_ARCHIVE_FORWARD_IMPLEMENTATION(archive::class_name_type)
 BOOST_ARCHIVE_FORWARD_IMPLEMENTATION(serialization::collection_size_type)
 
+ void save_override(std::string const & t , int)
+ {
+ save_override(serialization::collection_size_type(t.size()),0);
+ }
+
 
 #undef BOOST_ARCHIVE_FORWARD_IMPLEMENTATION
 protected:

Modified: branches/release/boost/mpi/detail/ignore_iprimitive.hpp
==============================================================================
--- branches/release/boost/mpi/detail/ignore_iprimitive.hpp (original)
+++ branches/release/boost/mpi/detail/ignore_iprimitive.hpp 2009-08-06 16:41:25 EDT (Thu, 06 Aug 2009)
@@ -52,7 +52,7 @@
         /// don't do anything when loading primitive types
     template<class T>
     void load(T & t)
- {
+ {
     }
 };
 

Modified: branches/release/boost/mpi/detail/ignore_oprimitive.hpp
==============================================================================
--- branches/release/boost/mpi/detail/ignore_oprimitive.hpp (original)
+++ branches/release/boost/mpi/detail/ignore_oprimitive.hpp 2009-08-06 16:41:25 EDT (Thu, 06 Aug 2009)
@@ -31,8 +31,8 @@
 
         /// don't do anything when saving binary data
     void save_binary(const void *, std::size_t )
- {
- }
+ {
+ }
 
         /// don't do anything when saving arrays
     template<class T>

Modified: branches/release/boost/mpi/detail/ignore_skeleton_oarchive.hpp
==============================================================================
--- branches/release/boost/mpi/detail/ignore_skeleton_oarchive.hpp (original)
+++ branches/release/boost/mpi/detail/ignore_skeleton_oarchive.hpp 2009-08-06 16:41:25 EDT (Thu, 06 Aug 2009)
@@ -16,6 +16,7 @@
 #include <boost/archive/basic_archive.hpp>
 #include <boost/archive/detail/oserializer.hpp>
 #include <boost/serialization/collection_size_type.hpp>
+#include <boost/serialization/array.hpp>
 
 namespace boost { namespace mpi { namespace detail {
 
@@ -60,6 +61,12 @@
 BOOST_ARCHIVE_IGNORE_IMPLEMENTATION(archive::class_name_type)
 BOOST_ARCHIVE_IGNORE_IMPLEMENTATION(serialization::collection_size_type)
 
+ void save_override(std::string const & s, int)
+ {
+ if (s.size())
+ save_override(serialization::make_array(s.data(),s.size()),0);
+ }
+
 #undef BOOST_ARCHIVE_IGNORE_IMPLEMENTATION
 };
 

Modified: branches/release/boost/mpi/detail/packed_iprimitive.hpp
==============================================================================
--- branches/release/boost/mpi/detail/packed_iprimitive.hpp (original)
+++ branches/release/boost/mpi/detail/packed_iprimitive.hpp 2009-08-06 16:41:25 EDT (Thu, 06 Aug 2009)
@@ -97,15 +97,15 @@
         s.resize(l);
         // note breaking a rule here - could be a problem on some platform
         load_impl(const_cast<char *>(s.data()),MPI_CHAR,l);
- }
+ }
 
 private:
 
     void load_impl(void * p, MPI_Datatype t, int l)
- {
+ {
         BOOST_MPI_CHECK_RESULT(MPI_Unpack,
         (const_cast<char*>(boost::serialization::detail::get_data(buffer_)), buffer_.size(), &position, p, l, t, comm));
- }
+ }
 
         buffer_type & buffer_;
         mutable std::size_t size_;

Modified: branches/release/boost/mpi/detail/packed_oprimitive.hpp
==============================================================================
--- branches/release/boost/mpi/detail/packed_oprimitive.hpp (original)
+++ branches/release/boost/mpi/detail/packed_oprimitive.hpp 2009-08-06 16:41:25 EDT (Thu, 06 Aug 2009)
@@ -77,12 +77,12 @@
         save_impl(&t, get_mpi_datatype<T>(t), 1);
     }
 
- void save(const std::string &s)
- {
+ void save(const std::string &s)
+ {
       unsigned int l = static_cast<unsigned int>(s.size());
       save(l);
       save_impl(s.data(),MPI_CHAR,s.size());
- }
+ }
 
 private:
 


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk