OpenMPI  0.1.1
btl_sm_frag.h
Go to the documentation of this file.
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-2009 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) 2008 Sun Microsystems, Inc. All rights reserved.
13  * Copyright (c) 2009 Cisco Systems, Inc. All rights reserved.
14  * $COPYRIGHT$
15  *
16  * Additional copyrights may follow
17  *
18  * $HEADER$
19  */
20 /**
21  * @file
22  */
23 #ifndef MCA_BTL_SM_SEND_FRAG_H
24 #define MCA_BTL_SM_SEND_FRAG_H
25 
26 #include "ompi_config.h"
27 #include "btl_sm.h"
28 
29 
30 #define MCA_BTL_SM_FRAG_TYPE_MASK ((uintptr_t)0x3)
31 #define MCA_BTL_SM_FRAG_SEND ((uintptr_t)0x0)
32 #define MCA_BTL_SM_FRAG_ACK ((uintptr_t)0x1)
33 #define MCA_BTL_SM_FRAG_PUT ((uintptr_t)0x2)
34 #define MCA_BTL_SM_FRAG_GET ((uintptr_t)0x3)
35 
36 #define MCA_BTL_SM_FRAG_STATUS_MASK ((uintptr_t)0x4)
37 
38 struct mca_btl_sm_frag_t;
39 
41  struct mca_btl_sm_frag_t *frag;
42  size_t len;
43  int my_smp_rank;
44  mca_btl_base_tag_t tag;
45 };
46 typedef struct mca_btl_sm_hdr_t mca_btl_sm_hdr_t;
47 
48 /**
49  * shared memory send fragment derived type.
50  */
53  mca_btl_base_segment_t segment;
54  struct mca_btl_base_endpoint_t *endpoint;
55  size_t size;
56  /* pointer written to the FIFO, this is the base of the shared memory region */
57  mca_btl_sm_hdr_t *hdr;
58  ompi_free_list_t* my_list;
59 };
64 
65 
70 
71 #define MCA_BTL_SM_FRAG_ALLOC_EAGER(frag, rc) \
72 { \
73  ompi_free_list_item_t* item; \
74  OMPI_FREE_LIST_GET(&mca_btl_sm_component.sm_frags_eager, item, rc); \
75  frag = (mca_btl_sm_frag_t*)item; \
76 }
77 
78 #define MCA_BTL_SM_FRAG_ALLOC_MAX(frag, rc) \
79 { \
80  ompi_free_list_item_t* item; \
81  OMPI_FREE_LIST_GET(&mca_btl_sm_component.sm_frags_max, item, rc); \
82  frag = (mca_btl_sm_frag_t*)item; \
83 }
84 
85 #define MCA_BTL_SM_FRAG_ALLOC_USER(frag, rc) \
86 { \
87  ompi_free_list_item_t* item; \
88  OMPI_FREE_LIST_GET(&mca_btl_sm_component.sm_frags_user, item, rc); \
89  frag = (mca_btl_sm_frag_t*)item; \
90 }
91 
92 
93 #define MCA_BTL_SM_FRAG_RETURN(frag) \
94 { \
95  OMPI_FREE_LIST_RETURN(frag->my_list, (ompi_free_list_item_t*)(frag)); \
96 }
97 #endif
A descriptor that holds the parameters to a send/put/get operation along w/ a callback routine that i...
Definition: btl.h:275
shared memory send fragment derived type.
Definition: btl_sm_frag.h:51
Definition: ompi_free_list.h:39
Definition: btl_sm_frag.h:40
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