
#include <convcomlibstrategy.h>


Public Member Functions | |
| Strategy () | |
| Strategy (CkMigrateMessage *m) | |
| void | setBracketed () |
| int | isBracketed () |
| virtual void | bracketedUpdatePeKnowledge (int *count) |
| This function is called to update the knowledge hold by a strategy which cares about migratable objects. | |
| virtual void | insertMessage (MessageHolder *msg)=0 |
| Called for each message. | |
| virtual void | doneInserting () |
| Called after all messages have been deposited in this processor. | |
| int | getType () |
| void | setType (int t) |
| ComlibInstanceHandle | getHandle () |
| Return a handle to this strategy. | |
| virtual void | handleMessage (void *msg)=0 |
| Called when a message is received in the strategy handler. | |
| virtual void | deliver (char *msg, int size) |
| This method can be used to deliver a message through the correct class. | |
| virtual void | notifyDone () |
| Called when a subsystem scheme (like in bracketed EachToMany) terminates the requested routing operation. | |
| virtual void | finalizeCreation () |
| Called on processor 0 after the strategy has been packed for propagation. | |
| virtual void | pup (PUP::er &p) |
| Each strategy must define his own Pup interface. | |
| PUPable_abstract (Strategy) | |
Protected Member Functions | |
| int | getInstance () |
Protected Attributes | |
| short | type |
| short | isStrategyBracketed |
| 1 if the strategy is bracketed, 0 otherwise | |
| ComlibInstanceHandle | myHandle |
To write a new strategy inherit from this class and define the virtual methods. Every strategy can also define its own constructor and have any number of arguments.
Definition at line 181 of file convcomlibstrategy.h.
| Strategy::Strategy | ( | CkMigrateMessage * | m | ) | [inline] |
Definition at line 202 of file convcomlibstrategy.h.
| int Strategy::getInstance | ( | ) | [inline, protected] |
Definition at line 198 of file convcomlibstrategy.h.
References myHandle.
Referenced by RouterStrategy::doneInserting(), RectMulticastStrategy::forwardMulticast(), BroadcastStrategy::handleHypercube(), RectMulticastStrategy::handleMessage(), OneTimeMulticastStrategy::handleMessage(), MulticastStrategy::handleMessage(), ChunkMulticastStrategy::handleMessage(), RectMulticastStrategy::handleMessageForward(), BroadcastStrategy::handleTree(), OneTimeMulticastStrategy::insertMessage(), MulticastStrategy::insertMessage(), EachToManyMulticastStrategy::insertMessage(), ChunkMulticastStrategy::insertMessage(), MulticastStrategy::localMulticast(), RouterStrategy::notifyDone(), RectMulticastStrategy::remoteMulticast(), OneTimeMulticastStrategy::remoteMulticast(), MulticastStrategy::remoteMulticast(), ChunkMulticastStrategy::remoteMulticast(), and RectMulticastStrategy::sendRectDest().
| void Strategy::setBracketed | ( | ) | [inline] |
Definition at line 211 of file convcomlibstrategy.h.
References isStrategyBracketed.
Referenced by EachToManyMulticastStrategy::commonInit().
| int Strategy::isBracketed | ( | ) | [inline] |
Definition at line 212 of file convcomlibstrategy.h.
References isStrategyBracketed.
Referenced by ComlibManager::bracketedStartErrorRecoveryProcess().
| virtual void Strategy::bracketedUpdatePeKnowledge | ( | int * | count | ) | [inline, virtual] |
This function is called to update the knowledge hold by a strategy which cares about migratable objects.
count is of size CkNumPes() and has the following format: 0 if proc "i" has no objects, 1 if proc "i" has only source objects, 2 if proc "i" has only destination objects, 3 if proc "i" has both source and destination objects
Reimplemented in RouterStrategy.
Definition at line 223 of file convcomlibstrategy.h.
Referenced by ComlibManager::bracketedReceiveNewPeList().
| virtual void Strategy::insertMessage | ( | MessageHolder * | msg | ) | [pure virtual] |
Called for each message.
Implemented in BroadcastStrategy, ChunkMulticastStrategy, EachToManyMulticastStrategy, MulticastStrategy, OneTimeMulticastStrategy, RectMulticastStrategy, RouterStrategy, PipeBroadcastConverse, PipelineStrategy, and RouterStrategy.
| virtual void Strategy::doneInserting | ( | void | ) | [inline, virtual] |
Called after all messages have been deposited in this processor.
This corresponds to a call to ComlibEnd(cinst), where cinst is the ComlibInstanceHandle returned when registering the Strategy with Comlib. In higher levels this may need many ComlibEnd calls before invoking doneInserting.
Reimplemented in RectMulticastStrategy, RouterStrategy, PipelineStrategy, and RouterStrategy.
Definition at line 233 of file convcomlibstrategy.h.
Referenced by AMPI_Allgather(), AMPI_Allgatherv(), AMPI_Alltoall(), AMPI_Alltoallv(), AMPI_Iallgather(), and AMPI_Ialltoall().
| int Strategy::getType | ( | void | ) | [inline] |
Definition at line 238 of file convcomlibstrategy.h.
References type.
Referenced by PipeBroadcastStrategy::deliver(), EachToManyMulticastStrategy::deliver(), BroadcastStrategy::handleHypercube(), and BroadcastStrategy::handleTree().
| void Strategy::setType | ( | int | t | ) | [inline] |
Definition at line 240 of file convcomlibstrategy.h.
References type.
Referenced by BroadcastStrategy::BroadcastStrategy(), ChunkMulticastStrategy::ChunkMulticastStrategy(), EachToManyMulticastStrategy::EachToManyMulticastStrategy(), MulticastStrategy::MulticastStrategy(), OneTimeMulticastStrategy::OneTimeMulticastStrategy(), PipeBroadcastStrategy::PipeBroadcastStrategy(), RectMulticastStrategy::RectMulticastStrategy(), and RouterStrategy::RouterStrategy().
| ComlibInstanceHandle Strategy::getHandle | ( | ) | [inline] |
Return a handle to this strategy.
Definition at line 243 of file convcomlibstrategy.h.
References myHandle.
Referenced by ComlibAssociateProxy(), and ComlibRegister().
| virtual void Strategy::handleMessage | ( | void * | msg | ) | [pure virtual] |
Called when a message is received in the strategy handler.
Implemented in BroadcastStrategy, ChunkMulticastStrategy, EachToManyMulticastStrategy, MulticastStrategy, OneTimeMulticastStrategy, RectMulticastStrategy, RectMulticastStrategy, PipeBroadcastConverse, and RouterStrategy.
Referenced by strategyHandler().
| virtual void Strategy::deliver | ( | char * | msg, | |
| int | size | |||
| ) | [inline, virtual] |
This method can be used to deliver a message through the correct class.
Reimplemented in EachToManyMulticastStrategy, PipeBroadcastStrategy, PipeBroadcastConverse, and RouterStrategy.
Definition at line 249 of file convcomlibstrategy.h.
References CmiAbort().
Referenced by PeTable::ExtractAndDeliverLocalMsgs().
| virtual void Strategy::notifyDone | ( | ) | [inline, virtual] |
Called when a subsystem scheme (like in bracketed EachToMany) terminates the requested routing operation.
Reimplemented in EachToManyMulticastStrategy, and RouterStrategy.
Definition at line 255 of file convcomlibstrategy.h.
Referenced by Router::Done().
| virtual void Strategy::finalizeCreation | ( | ) | [inline, virtual] |
Called on processor 0 after the strategy has been packed for propagation.
In this way the strategy can leave some portion not fully initialized and initialize it after it has been packed. This gives the possibility to propagate some data everywhere before doing processor specific handling.
Definition at line 262 of file convcomlibstrategy.h.
| Strategy::PUPable_abstract | ( | Strategy | ) |
short Strategy::type [protected] |
Definition at line 185 of file convcomlibstrategy.h.
Referenced by getType(), pup(), setType(), and Strategy().
short Strategy::isStrategyBracketed [protected] |
1 if the strategy is bracketed, 0 otherwise
Definition at line 187 of file convcomlibstrategy.h.
Referenced by isBracketed(), pup(), setBracketed(), and Strategy().
ComlibInstanceHandle Strategy::myHandle [protected] |
Definition at line 191 of file convcomlibstrategy.h.
Referenced by EachToManyMulticastStrategy::deliver(), getHandle(), getInstance(), pup(), and Strategy().
1.5.5