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

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

Adding compiled files

File size: 2.2 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 (c) 2006      Cisco Systems, Inc.  All rights reserved.
14// $COPYRIGHT$
15//
16// Additional copyrights may follow
17//
18// $HEADER$
19//
20
21//
22// Point-to-Point Communication
23//
24
25inline int
26MPI::Status::Get_count(const MPI::Datatype& datatype) const
27{
28  int count;
29  (void)MPI_Get_count(const_cast<MPI_Status*>(&mpi_status), datatype, &count);
30  return count;
31}
32
33inline bool
34MPI::Status::Is_cancelled() const
35{
36  int t;
37  (void)MPI_Test_cancelled(const_cast<MPI_Status*>(&mpi_status), &t);
38  return OPAL_INT_TO_BOOL(t);
39}
40
41inline int
42MPI::Status::Get_elements(const MPI::Datatype& datatype) const
43{
44  int count;
45  (void)MPI_Get_elements(const_cast<MPI_Status*>(&mpi_status), datatype, &count);
46  return count;
47}
48
49//
50// Status Access
51//
52inline int
53MPI::Status::Get_source() const
54{
55  int source;
56  source = mpi_status.MPI_SOURCE;
57  return source;
58}
59
60inline void
61MPI::Status::Set_source(int source)
62{
63  mpi_status.MPI_SOURCE = source;
64}
65
66inline int
67MPI::Status::Get_tag() const
68{
69  int tag;
70  tag = mpi_status.MPI_TAG;
71  return tag;
72}
73
74inline void
75MPI::Status::Set_tag(int tag)
76{
77  mpi_status.MPI_TAG = tag;
78}
79
80inline int
81MPI::Status::Get_error() const
82{
83  int error;
84  error = mpi_status.MPI_ERROR;
85  return error;
86}
87
88inline void
89MPI::Status::Set_error(int error)
90{
91  mpi_status.MPI_ERROR = error;
92}
93
94inline void
95MPI::Status::Set_elements(const MPI::Datatype& datatype, int count)
96{
97    MPI_Status_set_elements(&mpi_status, datatype, count);
98}
99
100inline void
101MPI::Status::Set_cancelled(bool flag)
102{
103    MPI_Status_set_cancelled(&mpi_status, (int) flag);
104}
105
Note: See TracBrowser for help on using the repository browser.