summaryrefslogtreecommitdiff
path: root/boost/mpi/detail/packed_oprimitive.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'boost/mpi/detail/packed_oprimitive.hpp')
-rw-r--r--boost/mpi/detail/packed_oprimitive.hpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/boost/mpi/detail/packed_oprimitive.hpp b/boost/mpi/detail/packed_oprimitive.hpp
index 1cb4ba0c26..4ca8e07240 100644
--- a/boost/mpi/detail/packed_oprimitive.hpp
+++ b/boost/mpi/detail/packed_oprimitive.hpp
@@ -12,7 +12,6 @@
#include <boost/mpi/config.hpp>
#include <cstddef> // size_t
#include <boost/config.hpp>
-
#include <boost/mpi/datatype.hpp>
#include <boost/mpi/exception.hpp>
#include <boost/mpi/detail/antiques.hpp>
@@ -47,6 +46,11 @@ public:
return size_ = buffer_.size();
}
+ const std::size_t* size_ptr() const
+ {
+ return &size();
+ }
+
void save_binary(void const *address, std::size_t count)
{
save_impl(address,MPI_BYTE,count);
@@ -108,6 +112,11 @@ private:
buffer_.resize(position);
}
+ static buffer_type::value_type* get_data(buffer_type& b)
+ {
+ return b.empty() ? 0 : &(b[0]);
+ }
+
buffer_type& buffer_;
mutable std::size_t size_;
MPI_Comm comm;