2 #include "inputDataHandler.decl.h"
3 #include "RDMAMessages.h"
4 #include "ckPairCalculator.h"
7 #ifndef INPUT_DATA_HANDLER_H
8 #define INPUT_DATA_HANDLER_H
33 template <
class leftHandlerType,
class rightHandlerType>
41 #ifdef DEBUG_CP_PAIRCALC_INPUTDATAHANDLER
42 CkPrintf(
"InputHandler[%d,%d,%d,%d] I was just born. Now I am going to try and get a direct handle to my parent PC\n",thisIndex.w,thisIndex.x,thisIndex.y,thisIndex.z);
45 PairCalculator *myCustomerPC = pcProxy(thisIndex.w,thisIndex.x,thisIndex.y,thisIndex.z).ckLocal();
51 #ifdef DEBUG_CP_PAIRCALC_INPUTDATAHANDLER
52 CkPrintf(
"InputHandler[%d,%d,%d,%d] My left and right handlers: %p %p \n",thisIndex.w,thisIndex.x,thisIndex.y,thisIndex.z,
leftHandler,
rightHandler);
57 CkAbort(
"InputHandler: My customer PairCalc object is not (yet?) on this processor. What am I doing here? I am aborting... \n");
74 CkPrintf(
"InputDataHandler[%d %d %d %d]. Someone called an RDMA method on me when RDMA has not been enabled.\n",
75 thisIndex.w, thisIndex.x, thisIndex.y, thisIndex.z);
76 CkAbort(
"InputDataHandler aborting because someone called an RDMA method when it has been turned off for me...\n");
78 #ifdef DEBUG_CP_PAIRCALC_INPUTDATAHANDLER
79 CkPrintf(
"InputHandler[%d,%d,%d,%d] Received an RDMA channel setup request for left data from %d. \n",thisIndex.w,thisIndex.x,thisIndex.y,thisIndex.z,msg->
sender());
84 CkAssert(replyToken.shouldSendLeft);
86 replyToken.pcIndex = thisIndex;
96 CkPrintf(
"InputDataHandler[%d %d %d %d]. Someone called an RDMA method on me when RDMA has not been enabled.\n",
97 thisIndex.w, thisIndex.x, thisIndex.y, thisIndex.z);
98 CkAbort(
"InputDataHandler aborting because someone called an RDMA method when it has been turned off for me...\n");
100 #ifdef DEBUG_CP_PAIRCALC_INPUTDATAHANDLER
101 CkPrintf(
"InputHandler[%d,%d,%d,%d] Received an RDMA channel setup request for right data from %d. \n",thisIndex.w,thisIndex.x,thisIndex.y,thisIndex.z,msg->
sender());
106 CkAssert(!replyToken.shouldSendLeft);
108 replyToken.pcIndex = thisIndex;
126 #define CK_TEMPLATES_ONLY
127 #include "inputDataHandler.def.h"
128 #undef CK_TEMPLATES_ONLY
129 #endif // INPUT_DATA_HANDLER_H
CollatorType * leftHandler() const
Returns a pointer to the collator that will buffer the left matrix data (only for use by the correspo...
CollatorType * rightHandler() const
Returns a pointer to the collator that will buffer the right matrix data (only for use by the corresp...
A request from a data sender to setup an RDMA link. Initiates the sender-receiver handshake required ...
tokenType token() const
Get a copy of the handshake token the sender created.
int sender() const
Get an integer representation of the sender's ID.
A (hopefully) tiny token that is unique to every data sender-receiver pair, and is shared by them dur...