1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20 #ifndef PML_CM_REQUEST_H
21 #define PML_CM_REQUEST_H
22
23 #include "ompi/mca/pml/base/pml_base_sendreq.h"
24 #include "ompi/mca/pml/base/pml_base_bsend.h"
25 #include "ompi/mca/pml/pml.h"
26 #include "ompi/mca/mtl/mtl.h"
27
28
29
30
31 typedef enum {
32 MCA_PML_CM_REQUEST_SEND_HEAVY,
33 MCA_PML_CM_REQUEST_SEND_THIN,
34 MCA_PML_CM_REQUEST_RECV_HEAVY,
35 MCA_PML_CM_REQUEST_RECV_THIN,
36 MCA_PML_CM_REQUEST_NULL
37 } mca_pml_cm_request_type_t;
38
39
40
41
42 struct mca_pml_cm_request_t {
43
44
45 ompi_request_t req_ompi;
46 volatile int32_t req_pml_complete;
47 volatile int32_t req_free_called;
48 mca_pml_cm_request_type_t req_pml_type;
49 struct ompi_communicator_t *req_comm;
50 struct ompi_datatype_t *req_datatype;
51 opal_convertor_t req_convertor;
52
53 };
54 typedef struct mca_pml_cm_request_t mca_pml_cm_request_t;
55 OBJ_CLASS_DECLARATION(mca_pml_cm_request_t);
56
57
58
59
60
61 #if OPAL_CUDA_SUPPORT
62 #define MCA_PML_CM_SWITCH_CUDA_CONVERTOR_OFF(flags, datatype, count) \
63 { \
64 if (opal_datatype_is_contiguous_memory_layout(&datatype->super, count) \
65 && (ompi_mtl->mtl_flags & MCA_MTL_BASE_FLAG_CUDA_INIT_DISABLE)) { \
66 flags |= CONVERTOR_SKIP_CUDA_INIT; \
67 } \
68 }
69 #else
70 #define MCA_PML_CM_SWITCH_CUDA_CONVERTOR_OFF(flags, datatype, count)
71 #endif
72
73 #endif