19 #ifndef MCA_BTL_GM_FRAG_H
20 #define MCA_BTL_GM_FRAG_H
23 #define MCA_BTL_GM_FRAG_ALIGN (8)
24 #include "ompi_config.h"
26 #include "ompi/mca/btl/base/btl_base_error.h"
36 } mca_btl_gm_frag_type_t;
50 enum gm_priority priority;
51 mca_btl_gm_frag_type_t type;
75 #define MCA_BTL_GM_FRAG_ALLOC_EAGER(btl, frag, rc) \
78 ompi_free_list_item_t *item; \
79 OMPI_FREE_LIST_GET(&((mca_btl_gm_module_t*)btl)->gm_frag_eager, item, rc); \
80 frag = (mca_btl_gm_frag_t*) item; \
83 #define MCA_BTL_GM_FRAG_ALLOC_MAX(btl, frag, rc) \
86 ompi_free_list_item_t *item; \
87 OMPI_FREE_LIST_GET(&((mca_btl_gm_module_t*)btl)->gm_frag_max, item, rc); \
88 frag = (mca_btl_gm_frag_t*) item; \
91 #define MCA_BTL_GM_FRAG_ALLOC_USER(btl, frag, rc) \
93 ompi_free_list_item_t *item; \
94 OMPI_FREE_LIST_GET(&((mca_btl_gm_module_t*)btl)->gm_frag_user, item, rc); \
95 frag = (mca_btl_gm_frag_t*) item; \
98 #define MCA_BTL_GM_FRAG_RETURN(btl, frag) \
100 ompi_free_list_t* mylist = NULL; \
101 mca_btl_gm_module_t* btl_gm = (mca_btl_gm_module_t*) btl; \
102 mca_btl_gm_frag_t* frag_gm = (mca_btl_gm_frag_t*) frag; \
103 switch(frag_gm->type) { \
104 case MCA_BTL_GM_EAGER: \
105 mylist = &btl_gm->gm_frag_eager; \
107 case MCA_BTL_GM_SEND: \
108 mylist = &btl_gm->gm_frag_max; \
110 case MCA_BTL_GM_PUT: \
111 case MCA_BTL_GM_GET: \
112 mylist = &btl_gm->gm_frag_user; \
115 BTL_ERROR(("Unknown frag type\n")); \
118 OMPI_FREE_LIST_RETURN(mylist, \
119 (ompi_free_list_item_t*)(frag)); \
125 #define MCA_BTL_GM_FRAG_POST(btl,frag) \
127 if(opal_list_get_size(&btl->gm_repost) < (size_t)btl->gm_num_repost) { \
128 opal_list_append(&btl->gm_repost, (opal_list_item_t*)frag); \
131 gm_provide_receive_buffer(btl->port, frag->hdr, frag->size, frag->priority); \
132 } while (NULL != (frag = (mca_btl_gm_frag_t*)opal_list_remove_first(&btl->gm_repost))); \
A descriptor that holds the parameters to a send/put/get operation along w/ a callback routine that i...
Definition: btl.h:275
GM send fragment derived type.
Definition: btl_gm_frag.h:42
State of ELAN endpoint connection.
Definition: btl_elan_endpoint.h:33
BTL Module Interface.
Definition: btl_gm.h:77
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