OpenMPI 0.1.1

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

- File List
- Globals

btl_mx_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_MX_FRAG_H
20 #define MCA_BTL_MX_FRAG_H
21
22
23 #include "ompi_config.h"
24 #include "ompi/class/ompi_free_list.h"
25 #include "btl_mx.h"
26
27 #define MCA_BTL_MX_SEND 0x01
28 #define MCA_BTL_MX_RECV 0x02
29
30 BEGIN_C_DECLS
31
32 /**
33 * MX send framxent derived type.
34 */
35 struct mca_btl_mx_frag_t {
36 mca_btl_base_descriptor_t base;
37 mca_btl_base_segment_t segment[2];
38 struct mca_btl_base_endpoint_t* endpoint;
39 uint8_t type;
40 mx_request_t mx_request;
41 size_t size;
42 ompi_free_list_t* mx_frag_list;
43 };
44 typedef struct mca_btl_mx_frag_t mca_btl_mx_frag_t;
45 OBJ_CLASS_DECLARATION(mca_btl_mx_frag_t);
46
47 typedef struct mca_btl_mx_frag_t mca_btl_mx_frag_eager_t;
48
49 OBJ_CLASS_DECLARATION(mca_btl_mx_frag_eager_t);
50
51 typedef struct mca_btl_mx_frag_t mca_btl_mx_frag_max_t;
52
53 OBJ_CLASS_DECLARATION(mca_btl_mx_frag_max_t);
54
55 typedef struct mca_btl_mx_frag_t mca_btl_mx_frag_user_t;
56
57 OBJ_CLASS_DECLARATION(mca_btl_mx_frag_user_t);
58
59 /*
60 * Macros to allocate/return descriptors from module specific
61 * free list(s).
62 */
63
64 #define MCA_BTL_MX_FRAG_ALLOC_EAGER(btl, frag, rc) \
65 do { \
66 ompi_free_list_item_t *item; \
67 OMPI_FREE_LIST_GET( &mca_btl_mx_component.mx_send_eager_frags, item, rc); \
68 if( OPAL_LIKELY(NULL != item) ) { \
69 frag = (mca_btl_mx_frag_t*) item; \
70 frag->mx_frag_list = &(mca_btl_mx_component.mx_send_eager_frags); \
71 frag->segment[0].seg_addr.pval = (void*)(frag+1); \
72 } \
73 } while(0)
74
75 #define MCA_BTL_MX_FRAG_ALLOC_USER(btl, frag, rc) \
76 do { \
77 ompi_free_list_item_t *item; \
78 OMPI_FREE_LIST_GET( &mca_btl_mx_component.mx_send_user_frags, item, rc); \
79 if( OPAL_LIKELY(NULL != item) ) { \
80 frag = (mca_btl_mx_frag_t*) item; \
81 frag->mx_frag_list = &(mca_btl_mx_component.mx_send_user_frags); \
82 } \
83 } while(0)
84
85 #define MCA_BTL_MX_FRAG_RETURN(btl, frag) \
86 do { \
87 OMPI_FREE_LIST_RETURN( frag->mx_frag_list, \
88 (ompi_free_list_item_t*)(frag)); \
89 } while(0)
90
91 END_C_DECLS
92
93 #endif
btl_mx.h
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
ompi_free_list_t
Definition: ompi_free_list.h:39
mca_btl_base_endpoint_t
State of ELAN endpoint connection.
Definition: btl_elan_endpoint.h:33
mca_btl_mx_frag_t
MX send framxent derived type.
Definition: btl_mx_frag.h:35
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