123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263 |
- #ifndef BOOST_MPI_INPLACE_HPP
- #define BOOST_MPI_INPLACE_HPP
- #include <boost/mpi/communicator.hpp>
- #include <vector>
- namespace boost { namespace mpi {
- template <typename T>
- struct inplace_t {
- inplace_t(T& inout) : buffer(inout) {}
- T& buffer;
- };
- template <typename T>
- struct inplace_t<T*> {
- inplace_t(T* inout) : buffer(inout) {}
- T* buffer;
- };
- template<typename T>
- inplace_t<T>
- inplace(T& inout) {
- return inplace_t<T>(inout);
- }
- template<typename T>
- inplace_t<T*>
- inplace(T* inout) {
- return inplace_t<T*>(inout);
- }
- } }
- #endif
|