source: proiecte/hpl/openmpi_compiled/include/openmpi/ompi/mpi/cxx/info_inln.h @ 97

Last change on this file since 97 was 97, checked in by (none), 14 years ago

Adding compiled files

File size: 1.9 KB
Line 
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$
14//
15// Additional copyrights may follow
16//
17// $HEADER$
18//
19
20
21inline MPI::Info
22MPI::Info::Create()
23{
24  MPI_Info newinfo;
25  (void) MPI_Info_create(&newinfo);
26  return newinfo;
27}
28
29inline void
30MPI::Info::Delete(const char* key)
31{
32   (void)MPI_Info_delete(mpi_info, const_cast<char *>(key));
33}
34
35inline MPI::Info
36MPI::Info::Dup() const
37{
38  MPI_Info newinfo;
39  (void)MPI_Info_dup(mpi_info, &newinfo);
40  return newinfo;
41}
42
43inline void
44MPI::Info::Free()
45{
46  (void) MPI_Info_free(&mpi_info);
47}
48
49inline bool
50MPI::Info::Get(const char* key, int valuelen, char* value) const
51{
52  int flag;
53  (void)MPI_Info_get(mpi_info, const_cast<char *>(key), valuelen, value, &flag);
54  return OPAL_INT_TO_BOOL(flag);
55}
56
57inline int
58MPI::Info::Get_nkeys() const
59{
60  int nkeys;
61  MPI_Info_get_nkeys(mpi_info, &nkeys);
62  return nkeys;
63}
64
65inline void
66MPI::Info::Get_nthkey(int n, char* key) const
67{
68  (void) MPI_Info_get_nthkey(mpi_info, n, key);
69}
70
71inline bool 
72MPI::Info::Get_valuelen(const char* key, int& valuelen) const
73{
74  int flag;
75  (void) MPI_Info_get_valuelen(mpi_info, const_cast<char *>(key), &valuelen, &flag);
76  return OPAL_INT_TO_BOOL(flag);
77}
78
79inline void
80MPI::Info::Set(const char* key, const char* value)
81{
82  (void) MPI_Info_set(mpi_info, const_cast<char *>(key), const_cast<char *>(value));
83}
Note: See TracBrowser for help on using the repository browser.