OpenMPI 0.1.1

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

- File List
- Globals

btl_template_frag.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-2008 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$
13 *
14 * Additional copyrights may follow
15 *
16 * $HEADER$
17 */
18
19 #ifndef MCA_BTL_TEMPLATE_FRAG_H
20 #define MCA_BTL_TEMPLATE_FRAG_H
21
22
23 #define MCA_BTL_TEMPLATE_FRAG_ALIGN (8)
24 #include "ompi_config.h"
25 #include "btl_template.h"
26
27 BEGIN_C_DECLS
28
29 /**
30 * TEMPLATE send fratemplateent derived type.
31 */
32 struct mca_btl_template_frag_t {
33 mca_btl_base_descriptor_t base;
34 mca_btl_base_segment_t segment;
35 struct mca_btl_base_endpoint_t *endpoint;
36 mca_btl_base_header_t *hdr;
37 size_t size;
38 #if MCA_BTL_HAS_MPOOL
39 struct mca_mpool_base_registration_t* registration;
40 #endif
41 };
42 typedef struct mca_btl_template_frag_t mca_btl_template_frag_t;
43 OBJ_CLASS_DECLARATION(mca_btl_template_frag_t);
44
45 typedef struct mca_btl_template_frag_t mca_btl_template_frag_eager_t;
46
47 OBJ_CLASS_DECLARATION(mca_btl_template_frag_eager_t);
48
49 typedef struct mca_btl_template_frag_t mca_btl_template_frag_max_t;
50
51 OBJ_CLASS_DECLARATION(mca_btl_template_frag_max_t);
52
53 typedef struct mca_btl_template_frag_t mca_btl_template_frag_user_t;
54
55 OBJ_CLASS_DECLARATION(mca_btl_template_frag_user_t);
56
57
58 /*
59 * Macros to allocate/return descriptors from module specific
60 * free list(s).
61 */
62
63 #define MCA_BTL_TEMPLATE_FRAG_ALLOC_EAGER(btl, frag, rc) \
64 { \
65 \
66 ompi_free_list_item_t *item; \
67 OMPI_FREE_LIST_GET(&((mca_btl_template_module_t*)btl)->template_frag_eager, item, rc); \
68 frag = (mca_btl_template_frag_t*) item; \
69 }
70
71 #define MCA_BTL_TEMPLATE_FRAG_RETURN_EAGER(btl, frag) \
72 { \
73 OMPI_FREE_LIST_RETURN(&((mca_btl_template_module_t*)btl)->template_frag_eager, \
74 (ompi_free_list_item_t*)(frag)); \
75 }
76
77 #define MCA_BTL_TEMPLATE_FRAG_ALLOC_MAX(btl, frag, rc) \
78 { \
79 \
80 ompi_free_list_item_t *item; \
81 OMPI_FREE_LIST_GET(&((mca_btl_template_module_t*)btl)->template_frag_max, item, rc); \
82 frag = (mca_btl_template_frag_t*) item; \
83 }
84
85 #define MCA_BTL_TEMPLATE_FRAG_RETURN_MAX(btl, frag) \
86 { \
87 OMPI_FREE_LIST_RETURN(&((mca_btl_template_module_t*)btl)->template_frag_max, \
88 (ompi_free_list_item_t*)(frag)); \
89 }
90
91
92 #define MCA_BTL_TEMPLATE_FRAG_ALLOC_USER(btl, frag, rc) \
93 { \
94 ompi_free_list_item_t *item; \
95 OMPI_FREE_LIST_GET(&((mca_btl_template_module_t*)btl)->template_frag_user, item, rc); \
96 frag = (mca_btl_template_frag_t*) item; \
97 }
98
99 #define MCA_BTL_TEMPLATE_FRAG_RETURN_USER(btl, frag) \
100 { \
101 OMPI_FREE_LIST_RETURN(&((mca_btl_template_module_t*)btl)->template_frag_user, \
102 (ompi_free_list_item_t*)(frag)); \
103 }
104
105
106
107 END_C_DECLS
108 #endif
mca_btl_base_descriptor_t
A descriptor that holds the parameters to a send/put/get operation along w/ a callback routine that i...
Definition: btl.h:275
mca_btl_base_header_t
Definition: btl.h:321
mca_mpool_base_registration_t
Definition: mpool.h:44
btl_template.h
mca_btl_template_frag_t
TEMPLATE send fratemplateent derived type.
Definition: btl_template_frag.h:32
mca_btl_base_endpoint_t
State of ELAN endpoint connection.
Definition: btl_elan_endpoint.h:33
mca_btl_base_segment_t
Describes a region/segment of memory that is addressable by an BTL.
Definition: btl.h:236
OBJ_CLASS_DECLARATION
#define OBJ_CLASS_DECLARATION(NAME)
Declaration for class descriptor.
Definition: opal_object.h:236