| 1 | /*
|
|---|
| 2 | * vmg - a versatile multigrid solver
|
|---|
| 3 | * Copyright (C) 2012 Institute for Numerical Simulation, University of Bonn
|
|---|
| 4 | *
|
|---|
| 5 | * vmg is free software: you can redistribute it and/or modify
|
|---|
| 6 | * it under the terms of the GNU General Public License as published by
|
|---|
| 7 | * the Free Software Foundation, either version 3 of the License, or
|
|---|
| 8 | * (at your option) any later version.
|
|---|
| 9 | *
|
|---|
| 10 | * vmg is distributed in the hope that it will be useful,
|
|---|
| 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|---|
| 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|---|
| 13 | * GNU General Public License for more details.
|
|---|
| 14 | *
|
|---|
| 15 | * You should have received a copy of the GNU General Public License
|
|---|
| 16 | * along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|---|
| 17 | */
|
|---|
| 18 |
|
|---|
| 19 | /**
|
|---|
| 20 | * @file datatypes_global.hpp
|
|---|
| 21 | * @author Julian Iseringhausen <isering@ins.uni-bonn.de>
|
|---|
| 22 | * @date Mon Jan 2 18:45:22 2012
|
|---|
| 23 | *
|
|---|
| 24 | * @brief Stores some CommSubgrid related information in order to minimize
|
|---|
| 25 | * the communication in this routine.
|
|---|
| 26 | *
|
|---|
| 27 | */
|
|---|
| 28 |
|
|---|
| 29 | #ifndef DATATYPES_GLOBAL_HPP_
|
|---|
| 30 | #define DATATYPES_GLOBAL_HPP_
|
|---|
| 31 |
|
|---|
| 32 | #include <vector>
|
|---|
| 33 |
|
|---|
| 34 | #include "comm/mpi/datatype.hpp"
|
|---|
| 35 |
|
|---|
| 36 | namespace VMG
|
|---|
| 37 | {
|
|---|
| 38 |
|
|---|
| 39 | namespace MPI
|
|---|
| 40 | {
|
|---|
| 41 |
|
|---|
| 42 | class DatatypesGlobal
|
|---|
| 43 | {
|
|---|
| 44 | public:
|
|---|
| 45 | DatatypesGlobal() {}
|
|---|
| 46 | ~DatatypesGlobal() {}
|
|---|
| 47 |
|
|---|
| 48 | typedef std::vector<Datatype>::iterator iterator;
|
|---|
| 49 | typedef std::vector<Datatype>::const_iterator const_iterator;
|
|---|
| 50 | typedef std::vector<Datatype>::reverse_iterator reverse_iterator;
|
|---|
| 51 | typedef std::vector<Datatype>::const_reverse_iterator const_reverse_iterator;
|
|---|
| 52 |
|
|---|
| 53 | std::vector<Datatype>& Send() {return send;}
|
|---|
| 54 | const std::vector<Datatype>& Send() const {return send;}
|
|---|
| 55 |
|
|---|
| 56 | std::vector<Datatype>& Receive() {return recv;}
|
|---|
| 57 | const std::vector<Datatype>& Receive() const {return recv;}
|
|---|
| 58 |
|
|---|
| 59 | private:
|
|---|
| 60 | std::vector<Datatype> send, recv;
|
|---|
| 61 | };
|
|---|
| 62 |
|
|---|
| 63 | }
|
|---|
| 64 |
|
|---|
| 65 | }
|
|---|
| 66 |
|
|---|
| 67 | #endif /* DATATYPES_GLOBAL_HPP_ */
|
|---|