File indexing completed on 2025-01-18 09:40:57
0001
0002
0003
0004
0005
0006
0007
0008
0009 #ifndef BOOST_MPI_DETAIL_FORWARD_OPRIMITIVE_HPP
0010 #define BOOST_MPI_DETAIL_FORWARD_OPRIMITIVE_HPP
0011
0012 #include <boost/config.hpp>
0013 #include <boost/serialization/array.hpp>
0014
0015 namespace boost { namespace mpi { namespace detail {
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025 template <class ImplementationArchive>
0026 class forward_oprimitive
0027 {
0028 public:
0029
0030
0031 typedef ImplementationArchive implementation_archive_type;
0032
0033
0034 forward_oprimitive(implementation_archive_type& ar)
0035 : implementation_archive(ar)
0036 {}
0037
0038
0039 void save_binary(const void * address, std::size_t count)
0040 {
0041 implementation_archive.save_binary(address,count);
0042 }
0043
0044
0045 template<class T>
0046 void save_array(serialization::array_wrapper<T> const& x, unsigned int file_version )
0047 {
0048 implementation_archive.save_array(x,file_version);
0049 }
0050
0051 typedef typename ImplementationArchive::use_array_optimization use_array_optimization;
0052
0053 #ifndef BOOST_NO_MEMBER_TEMPLATE_FRIENDS
0054 friend class archive::save_access;
0055 protected:
0056 #else
0057 public:
0058 #endif
0059
0060
0061 template<class T>
0062 void save(const T & t)
0063 {
0064 implementation_archive << t;
0065 }
0066
0067 private:
0068 implementation_archive_type& implementation_archive;
0069 };
0070
0071 } } }
0072
0073 #endif