source: src/comm/mpi/key.hpp@ 97c25dd

Last change on this file since 97c25dd was 97c25dd, checked in by Julian Iseringhausen <isering@…>, 14 years ago

Work on a red-black communication routine to half the communication amount.

git-svn-id: https://svn.version.fz-juelich.de/scafacos/trunk@1247 5161e1c8-67bf-11de-9fd5-51895aff932f

  • Property mode set to 100644
File size: 866 bytes
Line 
1/**
2 * @file key.hpp
3 * @author Julian Iseringhausen <isering@ins.uni-bonn.de>
4 * @date Mon Nov 21 13:27:22 2011
5 *
6 * @brief Class to distinguish the different entities in maps.
7 *
8 */
9
10#ifndef KEY_HPP_
11#define KEY_HPP_
12
13#ifndef HAVE_MPI
14#error MPI is needed to compile this class
15#endif /* HAVE_MPI */
16
17#include <vector>
18
19namespace VMG
20{
21
22class Grid;
23class Index;
24
25namespace MPI
26{
27
28class Key {
29public:
30 Key();
31 Key(const VMG::MPI::Key& other);
32 Key(const Grid& grid);
33 Key(const Grid& grid_1, const Grid& grid_2);
34 Key(const Index& i1, const Index& i2, const Index& i3);
35
36 void AddKey(const Grid& grid);
37 void AddKey(const Index& index);
38 void AddKey(const int& i);
39 void AddKey(const void* addr);
40
41 bool operator<(const Key& other) const;
42
43private:
44 std::vector<int> int_keys;
45 std::vector<const void*> addr_keys;
46};
47
48}
49
50}
51
52#endif /* KEY_HPP_ */
Note: See TracBrowser for help on using the repository browser.