Changeset 716da7 for src/comm/mpi/datatype.hpp
- Timestamp:
- Apr 24, 2012, 2:26:14 PM (14 years ago)
- Children:
- b51c3b
- Parents:
- e3dbbf
- File:
-
- 1 edited
-
src/comm/mpi/datatype.hpp (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/comm/mpi/datatype.hpp
re3dbbf r716da7 21 21 _starts(0), 22 22 _rank(-1), 23 _type(MPI_DATATYPE_NULL) 23 _tag_send(0), 24 _tag_recv(0), 25 _type(MPI_DATATYPE_NULL), 26 _alloc_buffer(false) 24 27 {} 25 28 26 29 Datatype(Index sizes, Index subsizes, Index starts, const int& rank, 27 const int& tag_send, const int& tag_receive) : 30 const int& tag_send, const int& tag_receive, 31 const bool& alloc_buffer) : 28 32 _sizes(sizes), 29 33 _subsizes(subsizes), … … 32 36 _tag_send(tag_send), 33 37 _tag_recv(tag_receive), 34 _ buffer(subsizes.Product())38 _alloc_buffer(alloc_buffer) 35 39 { 36 40 InitDatatype(); … … 38 42 39 43 Datatype(const GridIteratorSet& bounds, const Grid& grid, const int& rank, 40 const int& tag_send, const int& tag_receive) : 44 const int& tag_send, const int& tag_receive, 45 const bool& alloc_buffer) : 41 46 _sizes(grid.Local().SizeTotal()), 42 47 _subsizes(bounds.Begin().GetEnd() - bounds.Begin().GetBegin()), … … 45 50 _tag_send(tag_send), 46 51 _tag_recv(tag_receive), 47 _ buffer(_subsizes.Product())52 _alloc_buffer(alloc_buffer) 48 53 { 49 54 InitDatatype(); … … 57 62 _tag_send(other._tag_send), 58 63 _tag_recv(other._tag_recv), 59 _ buffer(_subsizes.Product())64 _alloc_buffer(other._alloc_buffer) 60 65 { 61 66 InitDatatype(); … … 84 89 const MPI_Datatype& Type() const {return _type;} 85 90 91 std::vector<vmg_float>& Buffer() {return _buffer;} 86 92 const std::vector<vmg_float>& Buffer() const {return _buffer;} 87 93 … … 111 117 MPI_Datatype _type; 112 118 std::vector<vmg_float> _buffer; 119 bool _alloc_buffer; 113 120 }; 114 121
Note:
See TracChangeset
for help on using the changeset viewer.
