OpenMPI  0.1.1
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  */
34  mca_btl_base_segment_t segment;
35  struct mca_btl_base_endpoint_t *endpoint;
37  size_t size;
38 #if MCA_BTL_HAS_MPOOL
39  struct mca_mpool_base_registration_t* registration;
40 #endif
41 };
44 
46 
48 
50 
52 
54 
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
A descriptor that holds the parameters to a send/put/get operation along w/ a callback routine that i...
Definition: btl.h:275
Definition: btl.h:321
Definition: mpool.h:44
TEMPLATE send fratemplateent derived type.
Definition: btl_template_frag.h:32
State of ELAN endpoint connection.
Definition: btl_elan_endpoint.h:33
Describes a region/segment of memory that is addressable by an BTL.
Definition: btl.h:236
#define OBJ_CLASS_DECLARATION(NAME)
Declaration for class descriptor.
Definition: opal_object.h:236