OpenAtom
Version1.5a
|
A very thin wrapper class. More...
#include <InputDataHandler.h>
Public Member Functions | |
InputDataHandler (CProxy_PairCalculator pcProxy) | |
Entry Method. An instance needs to be configured with the actual message handlers. More... | |
InputDataHandler (CkMigrateMessage *msg) | |
Entry Method. migration constructor. | |
void | acceptLeftData (paircalcInputMsg *msg) |
Entry Method. Deposit some data belonging to the left matrix block. | |
void | acceptRightData (paircalcInputMsg *msg) |
Entry Method. Deposit some data belonging to the right matrix block. | |
void | setupRDMALeft (RDMASetupRequestMsg< RDMApair_GSP_PC > *msg) |
Entry Method. Senders call this to setup an RDMA link to send the left matrix block. More... | |
void | setupRDMARight (RDMASetupRequestMsg< RDMApair_GSP_PC > *msg) |
Entry Method. Senders call this to setup an RDMA link to send the right matrix block. More... | |
Private Attributes | |
leftHandlerType * | leftHandler |
A message handler object that actually handles incoming msgs carrying left matrix data. | |
rightHandlerType * | rightHandler |
A message handler object that actually handles incoming msgs carrying right matrix data. | |
A very thin wrapper class.
Instantiated as a chare array that provides GSpace chares with an API to send the input data in. The intent is to permit a somewhat generic message handling behavior that doesnt require GSpace to jump through hoops.
Currently it is desired to collate messages and compute on them later. Requirements might change later to require streamed computing etc which can be met by configuring this class with different message handlers.
This is a template class only so that it does not have to pay the penalties associated with using base class pointers. The left and right message handlers could simply have been pointers to a base class MessageHandler. However, this would involve virtual function call overhead and would almost certainly prevent inlining of the handlers' operator(). To avoid this and yet retain the ability to support new behavior at a later date, this has been made a template class. This should provide a relatively stable API for the GSpace chares to use, and all this template muck is only compile time overhead anyway.
Definition at line 34 of file InputDataHandler.h.
|
inline |
Entry Method. An instance needs to be configured with the actual message handlers.
Get a handle on your customer PairCalc chare array element
If your customer is on this same processor (which it MUST be) Ask it for pointers to the message handlers
Definition at line 39 of file InputDataHandler.h.
References InputDataHandler< leftHandlerType, rightHandlerType >::leftHandler, PairCalculator::leftHandler(), InputDataHandler< leftHandlerType, rightHandlerType >::rightHandler, and PairCalculator::rightHandler().
|
inline |
Entry Method. Senders call this to setup an RDMA link to send the left matrix block.
Get a copy of the transaction token sent in the message
Verify that the setup request has come to the correct place
Insert receiver identification into the handshake token
Delegate the actual RDMA setup work to the message handler
Definition at line 71 of file InputDataHandler.h.
References InputDataHandler< leftHandlerType, rightHandlerType >::leftHandler, RDMASetupRequestMsg< tokenType >::sender(), and RDMASetupRequestMsg< tokenType >::token().
|
inline |
Entry Method. Senders call this to setup an RDMA link to send the right matrix block.
Get a copy of the transaction token sent in the message
Verify that the setup request has come to the correct place
Insert receiver identification into the handshake token
Delegate the actual RDMA setup work to the message handler
Definition at line 93 of file InputDataHandler.h.
References InputDataHandler< leftHandlerType, rightHandlerType >::rightHandler, RDMASetupRequestMsg< tokenType >::sender(), and RDMASetupRequestMsg< tokenType >::token().