OpenMPI  0.1.1
btl_smcuda_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 (c) 2012 NVIDIA Corporation. All rights reserved.
15  * $COPYRIGHT$
16  *
17  * Additional copyrights may follow
18  *
19  * $HEADER$
20  */
21 /**
22  * @file
23  */
24 #ifndef MCA_BTL_SMCUDA_SEND_FRAG_H
25 #define MCA_BTL_SMCUDA_SEND_FRAG_H
26 
27 #include "ompi_config.h"
28 #include "btl_smcuda.h"
29 
30 
31 #define MCA_BTL_SMCUDA_FRAG_TYPE_MASK ((uintptr_t)0x3)
32 #define MCA_BTL_SMCUDA_FRAG_SEND ((uintptr_t)0x0)
33 #define MCA_BTL_SMCUDA_FRAG_ACK ((uintptr_t)0x1)
34 #define MCA_BTL_SMCUDA_FRAG_PUT ((uintptr_t)0x2)
35 #define MCA_BTL_SMCUDA_FRAG_GET ((uintptr_t)0x3)
36 
37 #define MCA_BTL_SMCUDA_FRAG_STATUS_MASK ((uintptr_t)0x4)
38 
40 
42  struct mca_btl_smcuda_frag_t *frag;
43  size_t len;
44  int my_smp_rank;
45  mca_btl_base_tag_t tag;
46 };
48 
49 /**
50  * shared memory send fragment derived type.
51  */
54  mca_btl_base_segment_t segment;
55  struct mca_btl_base_endpoint_t *endpoint;
56 #if OMPI_CUDA_SUPPORT
57  struct mca_mpool_base_registration_t *registration;
58 #endif /* OMPI_CUDA_SUPPORT */
59  size_t size;
60  /* pointer written to the FIFO, this is the base of the shared memory region */
62  ompi_free_list_t* my_list;
63 };
68 
69 
74 
75 #define MCA_BTL_SMCUDA_FRAG_ALLOC_EAGER(frag, rc) \
76 { \
77  ompi_free_list_item_t* item; \
78  OMPI_FREE_LIST_GET(&mca_btl_smcuda_component.sm_frags_eager, item, rc); \
79  frag = (mca_btl_smcuda_frag_t*)item; \
80 }
81 
82 #define MCA_BTL_SMCUDA_FRAG_ALLOC_MAX(frag, rc) \
83 { \
84  ompi_free_list_item_t* item; \
85  OMPI_FREE_LIST_GET(&mca_btl_smcuda_component.sm_frags_max, item, rc); \
86  frag = (mca_btl_smcuda_frag_t*)item; \
87 }
88 
89 #define MCA_BTL_SMCUDA_FRAG_ALLOC_USER(frag, rc) \
90 { \
91  ompi_free_list_item_t* item; \
92  OMPI_FREE_LIST_GET(&mca_btl_smcuda_component.sm_frags_user, item, rc); \
93  frag = (mca_btl_smcuda_frag_t*)item; \
94 }
95 
96 
97 #define MCA_BTL_SMCUDA_FRAG_RETURN(frag) \
98 { \
99  OMPI_FREE_LIST_RETURN(frag->my_list, (ompi_free_list_item_t*)(frag)); \
100 }
101 #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: mpool.h:44
Definition: ompi_free_list.h:39
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
shared memory send fragment derived type.
Definition: btl_smcuda_frag.h:52
#define OBJ_CLASS_DECLARATION(NAME)
Declaration for class descriptor.
Definition: opal_object.h:236
Definition: btl_smcuda_frag.h:41