PPL Logo

CkRegister

Charm Registration--keeps track of the possible chare and method types. More...

Data Structures

class  EntryInfo
 Represents a single entry method or constructor. More...
class  MsgInfo
 Represents one type of Message. More...
class  ChareInfo
 Represents a class of Chares (or array or group elements). More...
class  MainInfo
 Describes a mainchare's constructor. These are all executed at startup. More...
class  ReadonlyInfo
 Describes a readonly global variable. More...
class  ReadonlyMsgInfo
 Describes a readonly message. More...
class  CkRegisteredInfo< T >
 This class stores registered entities, like EntryInfo's, in a linear list indexed by index ("idx"). More...

Typedefs

typedef void *(* CkPackFnPtr )(void *msg)
 Message pack function: convert a message into a buffer.
typedef void *(* CkUnpackFnPtr )(void *buf)
 Message unpack function: convert a buffer into a message.
typedef void(* CkDeallocFnPtr )(void *msg)
 Message dealloc function: deletes a message.
typedef void(* CkCallFnPtr )(void *msg, void *obj)
 A "call function" to invoke a method on an object.
typedef void(* CkPupReadonlyFnPtr )(void *pup_er)
 This function pup's a global variable.
typedef int(* CkMarshallUnpackFn )(char *marshall_buf, void *object)
 A "marshall unpack" function: pups out parameters and calls a method.
typedef void(* CkMessagePupFn )(PUP::er &p, void *userMessage)
 A "message pup" function: pups message data for debugger display.

Enumerations

enum  ChareType {
  TypeInvalid = 0, TypeChare, TypeMainChare, TypeGroup,
  TypeNodeGroup, TypeArray
}
 type of a chare More...

Functions

int CkRegisterMsg (const char *name, CkPackFnPtr pack, CkUnpackFnPtr unpack, CkDeallocFnPtr dealloc, size_t size)
 Register this message name, with this basic size and pack and unpack functions.
int CkRegisterEp (const char *name, CkCallFnPtr call, int msgIdx, int chareIdx, int ck_ep_flags)
 Register this entry point, with this call function and flags.
int CkRegisterChare (const char *name, size_t dataSz, ChareType chareType)
 Register this type of chare (group, or array), with this size.
void CkRegisterChareInCharm (int chareIndex)
 Register this chare as internal to Charm++.
int CkRegisterMainChare (int chareIndex, int epIndex)
 Register this chare as a mainchare, with this entry point as its constructor.
void CkRegisterDefaultCtor (int chareIndex, int ctorEpIndex)
 Register a default constructor for this chare.
void CkRegisterMigCtor (int chareIndex, int ctorEpIndex)
 Register a migration constructor for this chare.
void CkRegisterGroupIrr (int chareIndex, int isIrr)
 Indicate whether this group is an IrrGroup.
void CkRegisterBase (int derivedIdx, int baseIdx)
 Register the chare baseIdx as a base class of the chare derivedIdx.
void CkRegisterReadonly (const char *name, const char *type, int size, void *ptr, CkPupReadonlyFnPtr pup_fn)
 Register this readonly global variable.
void CkRegisterReadonlyMsg (const char *name, const char *type, void **pMsg)
 Register this readonly message.
void CkRegisterMarshallUnpackFn (int epIndex, CkMarshallUnpackFn m)
 Register this marshall unpack function with this entry point.
CkMarshallUnpackFn CkLookupMarshallUnpackFn (int epIndex)
 Lookup the marshall unpack function, if any, for this entry point.
void CkRegisterMessagePupFn (int epIndex, CkMessagePupFn m)
 Register this message pup function with this entry point.
void _registerInit (void)
void _registerDone (void)

Variables

CkRegisteredInfo< EntryInfo_entryTable
 These tables are shared between all processors on a node.
CkRegisteredInfo< MsgInfo_msgTable
CkRegisteredInfo< ChareInfo_chareTable
CkRegisteredInfo< MainInfo_mainTable
CkRegisteredInfo< ReadonlyInfo_readonlyTable
CkRegisteredInfo< ReadonlyMsgInfo_readonlyMsgs

Detailed Description

Charm Registration--keeps track of the possible chare and method types.

These routines keep track of the various chares (see ChareInfo and the _chareTable in register.h) and entry methods (see EntryInfo and the _entryTable) that exist in the program.

These are implemented in register.C.

These routines are normally called by a translator-generated _registerModule routine in the .def file. Because these routines fill out global tables, they are normally called exactly once per node at Charm startup time.


Typedef Documentation

typedef void*(* CkPackFnPtr)(void *msg)

Message pack function: convert a message into a buffer.

Definition at line 92 of file charm.h.

typedef void*(* CkUnpackFnPtr)(void *buf)

Message unpack function: convert a buffer into a message.

Definition at line 94 of file charm.h.

typedef void(* CkDeallocFnPtr)(void *msg)

Message dealloc function: deletes a message.

Definition at line 96 of file charm.h.

typedef void(* CkCallFnPtr)(void *msg, void *obj)

A "call function" to invoke a method on an object.

See EntryInfo

Definition at line 120 of file charm.h.

typedef void(* CkPupReadonlyFnPtr)(void *pup_er)

This function pup's a global variable.

Definition at line 143 of file charm.h.

typedef int(* CkMarshallUnpackFn)(char *marshall_buf, void *object)

A "marshall unpack" function: pups out parameters and calls a method.

Definition at line 152 of file charm.h.

typedef void(* CkMessagePupFn)(PUP::er &p, void *userMessage)

A "message pup" function: pups message data for debugger display.

Definition at line 160 of file charm.h.


Enumeration Type Documentation

enum ChareType

type of a chare

Enumerator:
TypeInvalid 
TypeChare 
TypeMainChare 
TypeGroup 
TypeNodeGroup 
TypeArray 

Definition at line 110 of file charm.h.


Function Documentation

int CkRegisterMsg ( const char *  name,
CkPackFnPtr  pack,
CkUnpackFnPtr  unpack,
CkDeallocFnPtr  dealloc,
size_t  size 
)

Register this message name, with this basic size and pack and unpack functions.

Definition at line 34 of file register.C.

References CkRegisteredInfo< T >::add().

Referenced by _initCharm(), CpdBreakPointInit(), and traceCommonInit().

int CkRegisterEp ( const char *  name,
CkCallFnPtr  call,
int  msgIdx,
int  chareIdx,
int  ck_ep_flags 
)

Register this entry point, with this call function and flags.

Returns the entry point's index in the _entryTable.

Definition at line 46 of file register.C.

References CkRegisteredInfo< T >::add(), ckInvalidCallFn(), BGConverse::CkMyRank(), CmiFalse, CmiTrue, EntryInfo::inCharm, EntryInfo::isMemCritical, EntryInfo::noKeep, numMemCriticalEntries, and EntryInfo::traceEnabled.

Referenced by _initCharm(), and traceCommonInit().

int CkRegisterChare ( const char *  name,
size_t  dataSz,
ChareType  chareType 
)

Register this type of chare (group, or array), with this size.

Returns the Chare's index in the _chareTable.

Definition at line 66 of file register.C.

References CkRegisteredInfo< T >::add().

Referenced by _initCharm(), CpdBreakPointInit(), and traceCommonInit().

void CkRegisterChareInCharm ( int  chareIndex  ) 

Register this chare as internal to Charm++.

Definition at line 72 of file register.C.

References CmiTrue.

Referenced by _initCharm(), CpdBreakPointInit(), and traceCommonInit().

int CkRegisterMainChare ( int  chareIndex,
int  epIndex 
)

Register this chare as a mainchare, with this entry point as its constructor.

Definition at line 93 of file register.C.

References CkRegisteredInfo< T >::add().

void CkRegisterDefaultCtor ( int  chareIndex,
int  ctorEpIndex 
)

Register a default constructor for this chare.

Definition at line 82 of file register.C.

void CkRegisterMigCtor ( int  chareIndex,
int  ctorEpIndex 
)

Register a migration constructor for this chare.

Definition at line 87 of file register.C.

void CkRegisterGroupIrr ( int  chareIndex,
int  isIrr 
)

Indicate whether this group is an IrrGroup.

Definition at line 77 of file register.C.

void CkRegisterBase ( int  derivedIdx,
int  baseIdx 
)

Register the chare baseIdx as a base class of the chare derivedIdx.

Definition at line 101 of file register.C.

void CkRegisterReadonly ( const char *  name,
const char *  type,
int  size,
void *  ptr,
CkPupReadonlyFnPtr  pup_fn 
)

Register this readonly global variable.

Definition at line 108 of file register.C.

References CkRegisteredInfo< T >::add().

Referenced by readonly< dtype >::readonly(), and roarray< dtype, len >::roarray().

void CkRegisterReadonlyMsg ( const char *  name,
const char *  type,
void **  pMsg 
)

Register this readonly message.

Definition at line 115 of file register.C.

References CkRegisteredInfo< T >::add().

Referenced by romsg< dtype >::romsg().

void CkRegisterMarshallUnpackFn ( int  epIndex,
CkMarshallUnpackFn  m 
)

Register this marshall unpack function with this entry point.

Definition at line 122 of file register.C.

CkMarshallUnpackFn CkLookupMarshallUnpackFn ( int  epIndex  ) 

Lookup the marshall unpack function, if any, for this entry point.

Definition at line 128 of file register.C.

void CkRegisterMessagePupFn ( int  epIndex,
CkMessagePupFn  m 
)

Register this message pup function with this entry point.

Definition at line 133 of file register.C.

void _registerInit ( void   ) 

Definition at line 26 of file register.C.

Referenced by _initCharm().

void _registerDone ( void   ) 


Variable Documentation

These tables are shared between all processors on a node.

Definition at line 17 of file register.C.

Referenced by _allocNewChare(), _createGroup(), _initCharm(), _invokeEntry(), _processForPlainChareMsg(), CkLocMgr::addElementToRec(), TraceSummary::beginExecute(), TraceProjections::beginExecute(), CkArray::broadcastHomeElements(), CkCreateChare(), CkCreateGroup(), CkCreateLocalGroup(), CkCreateLocalNodeGroup(), CkCreateNodeGroup(), CkDeliverMessageFree(), CkDeliverMessageReadonly(), CkPupMainChareData(), CkPupMessage(), CpdAfterEp(), CpdBeforeEp(), CpdFinishInitialization(), CpdIsBgCharmDebugMessage(), CpdIsCharmDebugMessage(), CpdPupMessage(), CpdRemoveAllBreakPoints(), CpdRemoveBreakPoint(), CpdSetBreakPoint(), TraceProjections::creation(), CharmStrategy::deliverToIndices(), CkLocMgr::demandCreateElement(), TraceSummary::endExecute(), TraceProjections::endExecute(), TraceCounter::endOverview(), KMeansBOC::flushCheckDone(), KMeansBOC::getNextPhaseMetrics(), TraceUtilization::initMem(), SumLogPool::initMem(), CkArray::insertElement(), CkLocRec_local::invokeEntry(), isCharmEnvelope(), ComlibArrayInfo::localMulticast(), PhaseEntry::PhaseEntry(), printEPInfo(), CProxy::pup(), CkLocMgr::pupElementsFor(), CkMulticastMgr::sendToLocal(), startEntryEvent(), traceCommonInit(), TraceProjections::traceCommSetMsgID(), TraceProjections::traceGetMsgID(), TraceProjections::traceSetMsgID(), PhaseEntry::write(), TraceSummaryBOC::write(), SumLogPool::write(), CountLogPool::write(), StatTable::write(), and CountLogPool::writeSts().

Definition at line 20 of file register.C.

Referenced by _initCharm(), _processForPlainChareMsg(), and CkPupMainChareData().

Definition at line 21 of file register.C.

Referenced by _initCharm(), _processRODataMsg(), bdcastRO(), and CkPupROData().

Definition at line 22 of file register.C.

Referenced by _initCharm(), and _processROMsgMsg().


Generated on Fri May 25 08:00:58 2012 for Charm++ by  doxygen 1.5.5