PPL Logo

MulticastStrategy Class Reference
[Strategies for use in Charm++]

Abstract parent class for multicast strategies. More...

#include <MulticastStrategy.h>

Inheritance diagram for MulticastStrategy:

Inheritance graph
[legend]
Collaboration diagram for MulticastStrategy:

Collaboration graph
[legend]

Public Member Functions

 MulticastStrategy (CkMigrateMessage *m)
 MulticastStrategy ()
 Array constructor.
 ~MulticastStrategy ()
void insertMessage (MessageHolder *msg)
 Called for each message.
void insertMessage (CharmMessageHolder *msg)
void handleMessage (void *msg)
 Called by the converse handler function.
virtual void pup (PUP::er &p)
 PUPable_abstract (MulticastStrategy)

Protected Member Functions

ComlibSectionHashObjectinsertSectionID (CkSectionID *sid, int npes, ComlibMulticastIndexCount *pelist)
 Add this section to the hash table locally.
virtual void createObjectOnSrcPe (ComlibSectionHashObject *obj, int npes, ComlibMulticastIndexCount *pelist)=0
 Called when a new section multicast is called by the user locally.
virtual void createObjectOnIntermediatePe (ComlibSectionHashObject *obj, int npes, ComlibMulticastIndexCount *counts, int srcpe)=0
 Similar to createHashObjectOnSrcPe, but that this call is made on the destination or intermediate processor.
virtual int needSorting ()
 Needed for getNewMulticastMessage, to specify if the list of processors need to be ordered.
virtual void localMulticast (envelope *env, ComlibSectionHashObject *obj, CkMcastBaseMsg *msg)
 Called to multicast the message to local array elements.
virtual void remoteMulticast (envelope *env, ComlibSectionHashObject *obj)
 Called to send to message out to the remote destinations.
void handleNewMulticastMessage (envelope *env)
 This function is called when a multicast is received with a new section definition.

Protected Attributes

ComlibSectionInfo sinfo
 Helper that generates unique ids for successive uses of the strategy.
CkHashtableT
< ComlibSectionHashKey,
ComlibSectionHashObject * > 
sec_ht
 A container to hold persistent information about the previously used array sections.

Detailed Description

Abstract parent class for multicast strategies.

All multicast strategies mush inherit from this.

The definition of the array section, as well as the location of all the elements in the processors is determined by the sending processor. All recipient processors will deliver messages locally to any array elements whose destination PE in the message is the local PE. If the element is not located locally, the array manager will handle the delivery to the actual location of the element.

Definition at line 27 of file MulticastStrategy.h.


Constructor & Destructor Documentation

MulticastStrategy::MulticastStrategy ( CkMigrateMessage m  )  [inline]

Definition at line 81 of file MulticastStrategy.h.


Member Function Documentation

virtual void MulticastStrategy::createObjectOnSrcPe ( ComlibSectionHashObject obj,
int  npes,
ComlibMulticastIndexCount pelist 
) [protected, pure virtual]

Called when a new section multicast is called by the user locally.

The strategy should then create a topology for it and return a hash object to store that topology.

Implemented in DirectMulticastStrategy, MultiRingMulticastStrategy, and RingMulticastStrategy.

Referenced by insertSectionID().

virtual void MulticastStrategy::createObjectOnIntermediatePe ( ComlibSectionHashObject obj,
int  npes,
ComlibMulticastIndexCount counts,
int  srcpe 
) [protected, pure virtual]

Similar to createHashObjectOnSrcPe, but that this call is made on the destination or intermediate processor.

It receives all the information in the parameters, and it does not use ComlibLastKnown, since in some cases it can be incoherent.

Parameters:
nindices number of local elements to multicast
idxlist list of local elements
npes number of processors involved in the multicast
counts list of all the processors involved int the multicast
srcpe processor which started the multicast
Returns:
a hash object describing the section

Implemented in DirectMulticastStrategy, MultiRingMulticastStrategy, and RingMulticastStrategy.

Referenced by handleNewMulticastMessage().

virtual int MulticastStrategy::needSorting (  )  [inline, protected, virtual]

Needed for getNewMulticastMessage, to specify if the list of processors need to be ordered.

By default it doesn't.

Reimplemented in MultiRingMulticastStrategy.

Definition at line 63 of file MulticastStrategy.h.

Referenced by insertMessage().

void MulticastStrategy::insertMessage ( MessageHolder msg  )  [inline, virtual]

Called for each message.

Implements Strategy.

Definition at line 89 of file MulticastStrategy.h.

MulticastStrategy::PUPable_abstract ( MulticastStrategy   ) 


Field Documentation

Helper that generates unique ids for successive uses of the strategy.

Definition at line 30 of file MulticastStrategy.h.

Referenced by handleNewMulticastMessage(), insertMessage(), insertSectionID(), and localMulticast().

A container to hold persistent information about the previously used array sections.

The strategy could refer to information here instead of decoding the section info from the message.

Definition at line 35 of file MulticastStrategy.h.

Referenced by handleMessage(), handleNewMulticastMessage(), insertMessage(), insertSectionID(), and ~MulticastStrategy().


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

Generated on Fri May 25 08:04:27 2012 for Charm++ by  doxygen 1.5.5