OpenMPI 0.1.1

- Main Page
- Related Pages
- Modules
- Data Structures
- Files

- File List
- Globals

info.h
1 // -*- c++ -*-
2 //
3 // Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
4 // University Research and Technology
5 // Corporation. All rights reserved.
6 // Copyright (c) 2004-2005 The University of Tennessee and The University
7 // of Tennessee Research Foundation. All rights
8 // reserved.
9 // Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
10 // University of Stuttgart. All rights reserved.
11 // Copyright (c) 2004-2005 The Regents of the University of California.
12 // All rights reserved.
13 // Copyright (c) 2006-2008 Cisco Systems, Inc. All rights reserved.
14 // $COPYRIGHT$
15 //
16 // Additional copyrights may follow
17 //
18 // $HEADER$
19 //
20
21
22 class Info {
23 #if 0 /* OMPI_ENABLE_MPI_PROFILING */
24 // friend class PMPI::Info;
25 #endif
26 friend class MPI::Comm; //so I can access pmpi_info data member in comm.cc
27 friend class MPI::Request; //and also from request.cc
28
29 public:
30 #if 0 /* OMPI_ENABLE_MPI_PROFILING */
31
32 // construction / destruction
33 Info() { }
34 virtual ~Info() {}
35
36
37 // copy / assignment
38 Info(const Info& data) : pmpi_info(data.pmpi_info) { }
39
40 Info(MPI_Info i) : pmpi_info(i) { }
41
42 Info& operator=(const Info& data) {
43 pmpi_info = data.pmpi_info; return *this; }
44
45 // comparison, don't need for info
46
47 // inter-language operability
48 Info& operator= (const MPI_Info &i) {
49 pmpi_info = i; return *this; }
50 operator MPI_Info () const { return pmpi_info; }
51 // operator MPI_Info* () const { return pmpi_info; }
52 operator const PMPI::Info&() const { return pmpi_info; }
53
54
55 #else
56
57 Info() : mpi_info(MPI_INFO_NULL) { }
58 // copy
59 Info(const Info& data) : mpi_info(data.mpi_info) { }
60
61 Info(MPI_Info i) : mpi_info(i) { }
62
63 virtual ~Info() {}
64
65 Info& operator=(const Info& data) {
66 mpi_info = data.mpi_info; return *this; }
67
68 // comparison, don't need for info
69
70 // inter-language operability
71 Info& operator= (const MPI_Info &i) {
72 mpi_info = i; return *this; }
73 operator MPI_Info () const { return mpi_info; }
74 // operator MPI_Info* () const { return (MPI_Info*)&mpi_info; }
75
76 #endif
77
78 static Info Create();
79
80 virtual void Delete(const char* key);
81
82 virtual Info Dup() const;
83
84 virtual void Free();
85
86 virtual bool Get(const char* key, int valuelen, char* value) const;
87
88 virtual int Get_nkeys() const;
89
90 virtual void Get_nthkey(int n, char* key) const;
91
92 virtual bool Get_valuelen(const char* key, int& valuelen) const;
93
94 virtual void Set(const char* key, const char* value);
95
96 protected:
97 #if 0 /* OMPI_ENABLE_MPI_PROFILING */
98 PMPI::Info pmpi_info;
99 #else
100 MPI_Info mpi_info;
101 #endif
102
103 };
ompi_info_t
Definition: info.h:38
Info
Definition: info.h:22