OpenMPI 0.1.1

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

- File List
- Globals

grequest.h
1 /*
2 * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
3 * University Research and Technology
4 * Corporation. All rights reserved.
5 * Copyright (c) 2004-2005 The University of Tennessee and The University
6 * of Tennessee Research Foundation. All rights
7 * reserved.
8 * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
9 * University of Stuttgart. All rights reserved.
10 * Copyright (c) 2004-2005 The Regents of the University of California.
11 * All rights reserved.
12 * Copyright (c) 2006 Cisco Systems, Inc. All rights reserved.
13 * $COPYRIGHT$
14 *
15 * Additional copyrights may follow
16 *
17 * $HEADER$
18 */
19
20 #ifndef OMPI_GEN_REQUEST_H
21 #define OMPI_GEN_REQUEST_H
22
23 #include "ompi_config.h"
24 #include "ompi/request/request.h"
25
26 BEGIN_C_DECLS
27 OMPI_DECLSPEC OBJ_CLASS_DECLARATION(ompi_grequest_t);
28
29 /**
30 * Fortran type for generalized request query function
31 */
32 typedef void (MPI_F_Grequest_query_function)(MPI_Aint *extra_state,
33 MPI_Fint *status,
34 MPI_Fint *ierr);
35 /**
36 * Fortran type for generalized request free function
37 */
38 typedef void (MPI_F_Grequest_free_function)(MPI_Aint *extra_state,
39 MPI_Fint *ierr);
40 /**
41 * Fortran type for generalized request cancel function
42 */
43 typedef void (MPI_F_Grequest_cancel_function)(MPI_Aint *extra_state,
44 ompi_fortran_logical_t *complete,
45 MPI_Fint *ierr);
46
47 /**
48 * Union for query function for use in ompi_grequest_t
49 */
50 typedef union {
51 MPI_Grequest_query_function* c_query;
52 MPI_F_Grequest_query_function* f_query;
53 } MPI_Grequest_query_fct_t;
54
55 /**
56 * Union for free function for use in ompi_grequest_t
57 */
58 typedef union {
59 MPI_Grequest_free_function* c_free;
60 MPI_F_Grequest_free_function* f_free;
61 } MPI_Grequest_free_fct_t;
62
63 /**
64 * Union for cancel function for use in ompi_grequest_t
65 */
66 typedef union {
67 MPI_Grequest_cancel_function* c_cancel;
68 MPI_F_Grequest_cancel_function* f_cancel;
69 } MPI_Grequest_cancel_fct_t;
70
71 /**
72 * Main structure for MPI generalized requests
73 */
74 struct ompi_grequest_t {
75 ompi_request_t greq_base;
76 MPI_Grequest_query_fct_t greq_query;
77 MPI_Grequest_free_fct_t greq_free;
78 MPI_Grequest_cancel_fct_t greq_cancel;
79 void *greq_state;
80 bool greq_funcs_are_c;
81 };
82 /**
83 * Convenience typedef
84 */
85 typedef struct ompi_grequest_t ompi_grequest_t;
86
87 /**
88 * Start a generalized request (back end for MPI_GREQUEST_START)
89 */
90 OMPI_DECLSPEC int ompi_grequest_start(
91 MPI_Grequest_query_function *gquery,
92 MPI_Grequest_free_function *gfree,
93 MPI_Grequest_cancel_function *gcancel,
94 void* gstate,
95 ompi_request_t** request);
96
97 /**
98 * Complete a generalized request (back end for MPI_GREQUEST_COMPLETE)
99 */
100 OMPI_DECLSPEC int ompi_grequest_complete(ompi_request_t *req);
101
102 /**
103 * Invoke the query function on a generalized request
104 */
105 OMPI_DECLSPEC int ompi_grequest_invoke_query(ompi_request_t *request,
106 ompi_status_public_t *status);
107 END_C_DECLS
108
109 #endif
MPI_Grequest_query_fct_t
Union for query function for use in ompi_grequest_t.
Definition: grequest.h:50
request.h
Top-level description of requests.
MPI_Grequest_free_fct_t
Union for free function for use in ompi_grequest_t.
Definition: grequest.h:58
MPI_Grequest_cancel_fct_t
Union for cancel function for use in ompi_grequest_t.
Definition: grequest.h:66
ompi_grequest_t
Main structure for MPI generalized requests.
Definition: grequest.h:74
ompi_status_public_t
Definition: mpi.h:337
request
Definition: evdns.c:158
ompi_request_t
Main top-level request struct definition.
Definition: request.h:100
OBJ_CLASS_DECLARATION
#define OBJ_CLASS_DECLARATION(NAME)
Declaration for class descriptor.
Definition: opal_object.h:236