2 * Charm Onesided API Utility Functions
10 /* CK_MSG_RDMA is passed in as entry method opts in the generated code for an entry
11 * method containing RDMA parameters. In the SMP mode with IMMEDIATE message support,
12 * it is used to mark the entry method invocation as IMMEDIATE to have the comm thread
13 * handle the metadata message. In all other cases (Non-SMP mode, No comm thread support),
14 * its value is used as 0.
17 #if CMK_ONESIDED_IMPL && CMK_SMP && CK_MSG_IMMEDIATE
18 #define CK_MSG_RDMA CK_MSG_IMMEDIATE
25 /* Sender Functions */
27 //Prepare metadata message with the relevant machine specific info
28 void CkRdmaPrepareMsg(envelope
**env
, int pe
);
30 //Create a new message with machine specific information
31 envelope
* CkRdmaCreateMetadataMsg(envelope
*env
, int pe
);
33 //Handle ack received on the sender by invoking callback
34 void CkHandleRdmaCookie(void *cookie
);
38 /* Receiver Functions */
40 //Copy the message using pointers when it's on the same PE/node
41 envelope
* CkRdmaCopyMsg(envelope
*env
);
44 * Extract rdma based information from the metadata message,
45 * allocate buffers and issue RDMA get call
47 void CkRdmaIssueRgets(envelope
*env
);
50 * Method called to update machine specific information and pointers
51 * inside Ckrdmawrappers
53 void CkUpdateRdmaPtrs(envelope
*msg
, int msgsize
, char *recv_md
, char *src_md
);
55 //Get the number of rdma ops using the metadata message
56 int getRdmaNumOps(envelope
*env
);
58 //Get the sum of rdma buffer sizes using the metadata message
59 int getRdmaBufSize(envelope
*env
);