PPL Logo

CkArray Class Reference
[CkArrayImpl]

#include <ckarray.h>

Inheritance diagram for CkArray:

Inheritance graph
[legend]
Collaboration diagram for CkArray:

Collaboration graph
[legend]

Public Member Functions

 CkArray (CkArrayOptions &c, CkMarshalledMessage &initMsg, CkNodeGroupID nodereductionProxy)
 CkArray (CkMigrateMessage *m)
CkGroupIDgetGroupID (void)
CkLocMgrgetLocMgr (void)
const CkArrayIndexgetNumInitial (void) const
int homePe (const CkArrayIndex &idx) const
int procNum (const CkArrayIndex &idx) const
int lastKnown (const CkArrayIndex &idx) const
 Return the last known processor for this array index.
int deliver (CkMessage *m, CkDeliver_t type, int opts=0)
 Deliver message to this element (directly if local) doFree if is local.
ArrayElementlookup (const CkArrayIndex &index)
 Fetch a local element via its index (return NULL if not local).
virtual CkMigratableallocateMigrated (int elChareType, const CkArrayIndex &idx, CkElementCreation_t type)
 Create-after-migrate:.
void prepareCtorMsg (CkMessage *m, int &onPe, const CkArrayIndex &idx)
 Prepare creation message:.
virtual void insertInitial (const CkArrayIndex &idx, void *ctorMsg, int local=1)
 Create initial array elements:.
virtual void doneInserting (void)
 Done with initial insertions.
void remoteDoneInserting (void)
 This is called on every processor after the last array insertion.
virtual CmiBool insertElement (CkMessage *)
 Create manually:.
CmiBool demandCreateElement (const CkArrayIndex &idx, int onPe, int ctor, CkDeliver_t type)
 Demand-creation:.
void sendBroadcast (CkMessage *msg)
 Broadcast communication:.
void recvBroadcast (CkMessage *msg)
 Increment broadcast count; deliver to all local elements.
void sendExpeditedBroadcast (CkMessage *msg)
void recvExpeditedBroadcast (CkMessage *msg)
void recvBroadcastViaTree (CkMessage *msg)
void pup (PUP::er &p)
void ckJustMigrated (void)
virtual CmiBool isArrMgr (void)
void addListener (CkArrayListener *l)
void flushStates ()
virtual int numberReductionMessages ()
void broadcastHomeElements (void *data, CkLocRec *rec, CkArrayIndex *index)

Static Public Member Functions

static void staticBroadcastHomeElements (CkArray *arr, void *data, CkLocRec *rec, CkArrayIndex *index)

Private Types

typedef CkMigratableListT
< ArrayElement
ArrayElementList

Private Member Functions

ArrayElementallocate (int elChareType, const CkArrayIndex &idx, CkMessage *msg, CmiBool fromMigration)
 Are we currently inserting elements?
void springCleaning (void)

Static Private Member Functions

static void staticSpringCleaning (void *forWhom, double curWallTime)

Private Attributes

CkMagicNumber< ArrayElementmagic
CkLocMgrlocMgr
CkGroupID locMgrID
CProxy_CkArray thisProxy
ArrayElementListelements
intchildren
int numChildren
bool stableLocations
CkArrayIndex numInitial
CmiBool isInserting
 Number of initial array elements.
CkPupAblePtrVec< CkArrayListenerlisteners
int listenerDataOffset
CkArrayReducerreducer
CkArrayBroadcasterbroadcaster

Friends

class ArrayElement
class CProxy_ArrayBase
class CProxyElement_ArrayBase

Detailed Description

Definition at line 638 of file ckarray.h.


Member Typedef Documentation

Definition at line 647 of file ckarray.h.


Constructor & Destructor Documentation

CkArray::CkArray ( CkArrayOptions c,
CkMarshalledMessage initMsg,
CkNodeGroupID  nodereductionProxy 
)

CkArray::CkArray ( CkMigrateMessage m  ) 

Definition at line 830 of file ckarray.C.

References CmiTrue, isInserting, and locMgr.


Member Function Documentation

CkGroupID& CkArray::getGroupID ( void   )  [inline]

Definition at line 660 of file ckarray.h.

Referenced by CkArrayElementRangeIterator< T >::addLocation(), and insertInitial().

CkLocMgr* CkArray::getLocMgr ( void   )  [inline]

const CkArrayIndex& CkArray::getNumInitial ( void   )  const [inline]

Definition at line 664 of file ckarray.h.

Referenced by ArrayMeshStreamer< dtype, itype >::ArrayMeshStreamer().

int CkArray::homePe ( const CkArrayIndex idx  )  const [inline]

int CkArray::procNum ( const CkArrayIndex idx  )  const [inline]

Definition at line 666 of file ckarray.h.

Referenced by prepareCtorMsg().

int CkArray::lastKnown ( const CkArrayIndex idx  )  const [inline]

int CkArray::deliver ( CkMessage m,
CkDeliver_t  type,
int  opts = 0 
) [inline]

Deliver message to this element (directly if local) doFree if is local.

Definition at line 674 of file ckarray.h.

Referenced by ComlibManager::ArraySend(), CkSendMsgArray(), CkSendMsgArrayInline(), ComlibArrayInfo::deliver(), CharmStrategy::deliverToIndices(), and ComlibArrayInfo::localMulticast().

ArrayElement* CkArray::lookup ( const CkArrayIndex index  )  [inline]

Fetch a local element via its index (return NULL if not local).

Definition at line 677 of file ckarray.h.

Referenced by CpdPythonArrayIterator::addLocation(), MeshStreamerClientIterator< dtype >::addLocation(), and CkArrayElementRangeIterator< T >::addLocation().

CkMigratable * CkArray::allocateMigrated ( int  elChareType,
const CkArrayIndex idx,
CkElementCreation_t  type 
) [virtual]

Create-after-migrate:.

Implements CkArrMgr.

Definition at line 891 of file ckarray.C.

References allocate(), CkElementCreation_resume, CmiTrue, and ArrayElement::listenerData.

void CkArray::prepareCtorMsg ( CkMessage m,
int onPe,
const CkArrayIndex idx 
)

void CkArray::insertInitial ( const CkArrayIndex idx,
void *  ctorMsg,
int  local = 1 
) [virtual]

Create initial array elements:.

Implements CkArrMgr.

Definition at line 992 of file ckarray.C.

References CkArrayManagerInsert(), Converse::CkMyPe(), getGroupID(), insertElement(), and prepareCtorMsg().

void CkArray::doneInserting ( void   )  [virtual]

Done with initial insertions.

Implements CkArrMgr.

Definition at line 957 of file ckarray.C.

References Converse::CkMyPe(), and thisProxy.

void CkArray::remoteDoneInserting ( void   ) 

This is called on every processor after the last array insertion.

Definition at line 963 of file ckarray.C.

References CmiFalse, CkLocMgr::doneInserting(), isInserting, listeners, locMgr, and CkVec< T >::size().

CmiBool CkArray::insertElement ( CkMessage me  )  [virtual]

Create manually:.

This method is called by ck.C or the user to add an element.

Definition at line 927 of file ckarray.C.

References _entryTable, CkLocMgr::addElement(), allocate(), CkArrayManagerInsert(), CmiFalse, CmiTrue, idx, CkLocMgr::isRemote(), listeners, locMgr, and IrrGroup::thisgroup.

Referenced by _processArrayEltInitMsg(), demandCreateElement(), and insertInitial().

CmiBool CkArray::demandCreateElement ( const CkArrayIndex idx,
int  onPe,
int  ctor,
CkDeliver_t  type 
) [virtual]

void CkArray::sendBroadcast ( CkMessage msg  ) 

Broadcast communication:.

Reflect a broadcast off this Pe:.

Definition at line 1311 of file ckarray.C.

References children, CkCopyMsg(), Converse::CkMyPe(), numChildren, recvBroadcast(), and thisProxy.

void CkArray::recvBroadcast ( CkMessage msg  ) 

void CkArray::sendExpeditedBroadcast ( CkMessage msg  ) 

Definition at line 1332 of file ckarray.C.

References thisProxy.

void CkArray::recvExpeditedBroadcast ( CkMessage msg  )  [inline]

Definition at line 704 of file ckarray.h.

void CkArray::recvBroadcastViaTree ( CkMessage msg  ) 

Definition at line 1343 of file ckarray.C.

References children, CkCopyMsg(), numChildren, recvBroadcast(), and thisProxy.

void CkArray::pup ( PUP::er p  )  [virtual]

void CkArray::ckJustMigrated ( void   )  [inline, virtual]

Reimplemented from IrrGroup.

Definition at line 708 of file ckarray.h.

virtual CmiBool CkArray::isArrMgr ( void   )  [inline, virtual]

Reimplemented from IrrGroup.

Definition at line 715 of file ckarray.h.

References CmiTrue.

ArrayElement * CkArray::allocate ( int  elChareType,
const CkArrayIndex idx,
CkMessage msg,
CmiBool  fromMigration 
) [private]

void CkArray::springCleaning ( void   )  [inline, private]

Definition at line 501 of file ckarray.C.

References broadcaster, and CkArrayBroadcaster::springCleaning().

void CkArray::staticSpringCleaning ( void *  forWhom,
double  curWallTime 
) [static, private]

Definition at line 507 of file ckarray.C.

Referenced by CkArray(), and pup().

void CkArray::addListener ( CkArrayListener l  )  [inline]

Definition at line 743 of file ckarray.h.

References CkArrayListener::ckGetLen().

Referenced by CkArray().

void CkArray::flushStates (  )  [inline, virtual]

Reimplemented from IrrGroup.

Definition at line 757 of file ckarray.h.

References IrrGroup::flushStates().

virtual int CkArray::numberReductionMessages (  )  [inline, virtual]

Reimplemented from CkReductionMgr.

Definition at line 760 of file ckarray.h.

References Converse::CkMyPe().

void CkArray::broadcastHomeElements ( void *  data,
CkLocRec rec,
CkArrayIndex index 
)

void CkArray::staticBroadcastHomeElements ( CkArray arr,
void *  data,
CkLocRec rec,
CkArrayIndex index 
) [static]

Definition at line 1381 of file ckarray.C.

References broadcastHomeElements().

Referenced by recvBroadcast().


Friends And Related Function Documentation

friend class ArrayElement [friend]

Definition at line 639 of file ckarray.h.

friend class CProxy_ArrayBase [friend]

Definition at line 640 of file ckarray.h.

friend class CProxyElement_ArrayBase [friend]

Definition at line 641 of file ckarray.h.


Field Documentation

Reimplemented from Chare.

Definition at line 643 of file ckarray.h.

Definition at line 645 of file ckarray.h.

Referenced by pup().

CProxy_CkArray CkArray::thisProxy [private]

Reimplemented from CkReductionMgr.

Definition at line 646 of file ckarray.h.

Referenced by doneInserting(), pup(), recvBroadcastViaTree(), sendBroadcast(), and sendExpeditedBroadcast().

Definition at line 648 of file ckarray.h.

Referenced by pup(), and recvBroadcast().

int* CkArray::children [private]

Definition at line 650 of file ckarray.h.

Referenced by CkArray(), recvBroadcastViaTree(), and sendBroadcast().

Definition at line 651 of file ckarray.h.

Referenced by CkArray(), recvBroadcastViaTree(), and sendBroadcast().

Definition at line 654 of file ckarray.h.

Referenced by CkArray(), pup(), and recvBroadcast().

Definition at line 718 of file ckarray.h.

Referenced by allocate(), CkArray(), and pup().

Number of initial array elements.

Definition at line 719 of file ckarray.h.

Referenced by CkArray(), and remoteDoneInserting().

Definition at line 741 of file ckarray.h.

Referenced by CkArray(), and pup().

Definition at line 754 of file ckarray.h.

Referenced by CkArray(), ArrayElement::contribute2(), and pup().

Definition at line 755 of file ckarray.h.

Referenced by CkArray(), pup(), recvBroadcast(), and springCleaning().


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

Generated on Thu May 24 07:56:54 2012 for Charm++ by  doxygen 1.5.5