This source file includes following definitions.
- mca_pml_cm_recv_request_free
- mca_pml_cm_recv_request_completion
- mca_pml_cm_recv_request_construct
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19 #include "ompi_config.h"
20
21 #include "pml_cm.h"
22 #include "pml_cm_recvreq.h"
23
24 static int
25 mca_pml_cm_recv_request_free(struct ompi_request_t** request)
26 {
27 mca_pml_cm_request_t* recvreq = *(mca_pml_cm_request_t**)request;
28
29 assert( false == recvreq->req_free_called );
30
31 recvreq->req_free_called = true;
32 if( true == recvreq->req_pml_complete ) {
33 if( MCA_PML_CM_REQUEST_RECV_THIN == recvreq->req_pml_type ) {
34 MCA_PML_CM_THIN_RECV_REQUEST_RETURN((mca_pml_cm_hvy_recv_request_t*)recvreq );
35 } else {
36 MCA_PML_CM_HVY_RECV_REQUEST_RETURN((mca_pml_cm_hvy_recv_request_t*)recvreq );
37 }
38 }
39
40 *request = MPI_REQUEST_NULL;
41 return OMPI_SUCCESS;
42 }
43
44
45 void mca_pml_cm_recv_request_completion(struct mca_mtl_request_t *mtl_request)
46 {
47 mca_pml_cm_request_t *base_request =
48 (mca_pml_cm_request_t*) mtl_request->ompi_req;
49 if( MCA_PML_CM_REQUEST_RECV_THIN == base_request->req_pml_type ) {
50 MCA_PML_CM_THIN_RECV_REQUEST_PML_COMPLETE(((mca_pml_cm_thin_recv_request_t*)base_request));
51 } else {
52 MCA_PML_CM_HVY_RECV_REQUEST_PML_COMPLETE(((mca_pml_cm_hvy_recv_request_t*)base_request));
53 }
54 }
55
56 static void
57 mca_pml_cm_recv_request_construct(mca_pml_cm_thin_recv_request_t* recvreq)
58 {
59 recvreq->req_base.req_ompi.req_start = mca_pml_cm_start;
60 recvreq->req_base.req_ompi.req_free = mca_pml_cm_recv_request_free;
61 recvreq->req_base.req_ompi.req_cancel = mca_pml_cm_cancel;
62 OBJ_CONSTRUCT( &(recvreq->req_base.req_convertor), opal_convertor_t );
63 }
64
65
66 OBJ_CLASS_INSTANCE(mca_pml_cm_thin_recv_request_t,
67 mca_pml_cm_request_t,
68 mca_pml_cm_recv_request_construct,
69 NULL);
70
71
72 OBJ_CLASS_INSTANCE(mca_pml_cm_hvy_recv_request_t,
73 mca_pml_cm_request_t,
74 mca_pml_cm_recv_request_construct,
75 NULL);