root/ompi/mpi/cxx/info_inln.h

/* [<][>][^][v][top][bottom][index][help] */

INCLUDED FROM


DEFINITIONS

This source file includes following definitions.
  1. Create
  2. Delete
  3. Dup
  4. Free
  5. Get
  6. Get_nkeys
  7. Get_nthkey
  8. Get_valuelen
  9. Set

   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 
  21 inline MPI::Info
  22 MPI::Info::Create()
  23 {
  24   MPI_Info newinfo;
  25   (void) MPI_Info_create(&newinfo);
  26   return newinfo;
  27 }
  28 
  29 inline void
  30 MPI::Info::Delete(const char* key)
  31 {
  32    (void)MPI_Info_delete(mpi_info, const_cast<char *>(key));
  33 }
  34 
  35 inline MPI::Info
  36 MPI::Info::Dup() const
  37 {
  38   MPI_Info newinfo;
  39   (void)MPI_Info_dup(mpi_info, &newinfo);
  40   return newinfo;
  41 }
  42 
  43 inline void
  44 MPI::Info::Free()
  45 {
  46   (void) MPI_Info_free(&mpi_info);
  47 }
  48 
  49 inline bool
  50 MPI::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 
  57 inline int
  58 MPI::Info::Get_nkeys() const
  59 {
  60   int nkeys;
  61   MPI_Info_get_nkeys(mpi_info, &nkeys);
  62   return nkeys;
  63 }
  64 
  65 inline void
  66 MPI::Info::Get_nthkey(int n, char* key) const
  67 {
  68   (void) MPI_Info_get_nthkey(mpi_info, n, key);
  69 }
  70 
  71 inline bool
  72 MPI::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 
  79 inline void
  80 MPI::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 }

/* [<][>][^][v][top][bottom][index][help] */