PPL Logo

Strategy Class Reference
[Converse Communication Optimization Framework]

Class that defines the entry methods that a Converse level strategy must define. More...

#include <convcomlibstrategy.h>

Inheritance diagram for Strategy:

Inheritance graph
[legend]
Collaboration diagram for Strategy:

Collaboration graph
[legend]

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

Detailed Description

Class that defines the entry methods that a Converse level strategy must define.

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.


Constructor & Destructor Documentation

Strategy::Strategy ( CkMigrateMessage m  )  [inline]

Definition at line 202 of file convcomlibstrategy.h.


Member Function Documentation

int Strategy::getInstance (  )  [inline, protected]

void Strategy::setBracketed (  )  [inline]

Definition at line 211 of file convcomlibstrategy.h.

References isStrategyBracketed.

Referenced by EachToManyMulticastStrategy::commonInit().

int Strategy::isBracketed (  )  [inline]

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]

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]

void Strategy::setType ( int  t  )  [inline]

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]

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   ) 


Field Documentation

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().


The documentation for this class was generated from the following files:

Generated on Fri May 25 08:05:30 2012 for Charm++ by  doxygen 1.5.5