PPL Logo

CkCacheManager Class Reference

#include <CkCache.h>

Inheritance diagram for CkCacheManager:

Inheritance graph
[legend]
Collaboration diagram for CkCacheManager:

Collaboration graph
[legend]

Public Member Functions

 CkCacheManager (int size, CkGroupID gid)
 CkCacheManager (int size, int n, CkGroupID *gid)
 CkCacheManager (int size, int n, CkGroupID *gid, int nWB, CkGroupID *gidWB)
 CkCacheManager (CkMigrateMessage *m)
 ~CkCacheManager ()
void pup (PUP::er &p)
void * requestData (CkCacheKey what, CkArrayIndex &toWhom, int chunk, CkCacheEntryType *type, CkCacheRequestorData &req)
void * requestDataNoFetch (CkCacheKey key, int chunk)
CkCacheEntryrequestCacheEntryNoFetch (CkCacheKey key, int chunk)
void recvData (CkCacheFillMsg *msg)
void recvData (CkCacheKey key, CkArrayIndex &from, CkCacheEntryType *type, int chunk, void *data)
void cacheSync (int &numChunks, CkArrayIndex &chareIdx, int &localIdx)
void writebackChunk (int num)
 Called from the TreePieces to acknowledge that a particular chunk can be written back to the original senders.
void finishedChunk (int num, CmiUInt8 weight)
 Called from the TreePieces to acknowledge that a particular chunk has been completely used, and can be deleted.
void collectStatistics (CkCallback &cb)
 Called from the TreePieces to acknowledge that they have completely finished their computation.
std::map< CkCacheKey,
CkCacheEntry * > * 
getCache ()

Private Member Functions

void init ()

Private Attributes

int numChunks
 Number of chunks in which the cache is splitted.
int finishedChunks
 Number of chunks that have already been completely acknowledged.
CkCacheArrayCounter localChares
 A list of all the elements that are present in the local processor for the current iteration.
CkCacheArrayCounter localCharesWB
 A list of all the elements that are present in the local processor for the current iteration with respect to writeback.
int syncdChares
 number of chares that have checked in for the next iteration
int numLocMgr
 The number of arrays this Manager serves without support for writeback.
CkGroupIDlocMgr
 The group ids of the location managers of the arrays this Manager serves with support for writeback.
int numLocMgrWB
 The number of arrays this Manager serves with support for writeback.
CkGroupIDlocMgrWB
 The group ids of the location managers of the arrays this Manager serves with support for writeback.
CmiUInt8 dataArrived
 particles arrived from remote processors, this counts only the entries in the cache
CmiUInt8 dataTotalArrived
 particles arrived from remote processors, this counts the real number of particles arrived
CmiUInt8 dataMisses
 particles missed while walking the tree for computation
CmiUInt8 dataLocal
 particles that have been imported from local TreePieces
CmiUInt8 dataError
 particles arrived which were never requested, basically errors
CmiUInt8 totalDataRequested
 counts the total number of particles requested by all the chares on the processor
CmiUInt8 maxData
 maximum number of nodes stored at some point in the cache
CmiUInt8chunkWeight
 weights of the chunks in which the tree is divided, the cache will update the chunk division based on these values
CmiUInt8 maxSize
 Maximum number of allowed data stored.
intchunkAck
 number of acknowledgements awaited before deleting the chunk
intchunkAckWB
 number of acknowledgements awaited before writing back the chunk
std::map< CkCacheKey,
CkCacheEntry * > * 
cacheTable
 hash table containing all the entries currently in the cache
int storedData
std::map< CkCacheKey, intoutStandingRequests
 list of all the outstanding requests.

Detailed Description

Definition at line 194 of file CkCache.h.


Constructor & Destructor Documentation

CkCacheManager::CkCacheManager ( int  size,
CkGroupID  gid 
)

Definition at line 3 of file CkCache.C.

References init(), locMgr, maxSize, numLocMgr, and numLocMgrWB.

CkCacheManager::CkCacheManager ( int  size,
int  n,
CkGroupID gid 
)

Definition at line 12 of file CkCache.C.

References init(), locMgr, maxSize, numLocMgr, and numLocMgrWB.

CkCacheManager::CkCacheManager ( int  size,
int  n,
CkGroupID gid,
int  nWB,
CkGroupID gidWB 
)

Definition at line 21 of file CkCache.C.

References init(), locMgr, locMgrWB, maxSize, numLocMgr, and numLocMgrWB.

CkCacheManager::CkCacheManager ( CkMigrateMessage m  ) 

Definition at line 32 of file CkCache.C.

References init().

CkCacheManager::~CkCacheManager (  )  [inline]

Definition at line 274 of file CkCache.h.


Member Function Documentation

void CkCacheManager::pup ( PUP::er p  ) 

Definition at line 55 of file CkCache.C.

References PUP::er::isUnpacking(), locMgr, locMgrWB, maxSize, numLocMgr, numLocMgrWB, and PUParray().

void CkCacheManager::init ( void   )  [private]

void * CkCacheManager::requestData ( CkCacheKey  what,
CkArrayIndex toWhom,
int  chunk,
CkCacheEntryType type,
CkCacheRequestorData req 
)

void * CkCacheManager::requestDataNoFetch ( CkCacheKey  key,
int  chunk 
)

Definition at line 115 of file CkCache.C.

References cacheTable, and p.

CkCacheEntry * CkCacheManager::requestCacheEntryNoFetch ( CkCacheKey  key,
int  chunk 
)

Definition at line 123 of file CkCache.C.

References cacheTable, and p.

void CkCacheManager::recvData ( CkCacheFillMsg msg  ) 

void CkCacheManager::recvData ( CkCacheKey  key,
CkArrayIndex from,
CkCacheEntryType type,
int  chunk,
void *  data 
)

void CkCacheManager::cacheSync ( int numChunks,
CkArrayIndex chareIdx,
int localIdx 
)

void CkCacheManager::writebackChunk ( int  num  ) 

Called from the TreePieces to acknowledge that a particular chunk can be written back to the original senders.

Definition at line 247 of file CkCache.C.

References cacheTable, chunkAckWB, and CkCacheEntry::writeback().

void CkCacheManager::finishedChunk ( int  num,
CmiUInt8  weight 
)

Called from the TreePieces to acknowledge that a particular chunk has been completely used, and can be deleted.

Definition at line 262 of file CkCache.C.

References cacheTable, chunkAck, chunkWeight, CkCacheEntry::data, finishedChunks, maxData, numChunks, CkCacheEntryType::size(), storedData, syncdChares, and CkCacheEntry::type.

void CkCacheManager::collectStatistics ( CkCallback cb  ) 

Called from the TreePieces to acknowledge that they have completely finished their computation.

Collect the statistics for the latest iteration

Definition at line 295 of file CkCache.C.

References Converse::CkMyPe(), dataArrived, dataError, dataLocal, dataMisses, dataTotalArrived, maxData, CkCacheStatistics::sum, and totalDataRequested.

std::map< CkCacheKey, CkCacheEntry * > * CkCacheManager::getCache (  ) 

Definition at line 131 of file CkCache.C.

References cacheTable.


Field Documentation

Number of chunks in which the cache is splitted.

Definition at line 201 of file CkCache.h.

Referenced by cacheSync(), finishedChunk(), init(), and recvData().

Number of chunks that have already been completely acknowledged.

Definition at line 203 of file CkCache.h.

Referenced by cacheSync(), and finishedChunk().

A list of all the elements that are present in the local processor for the current iteration.

Definition at line 207 of file CkCache.h.

Referenced by cacheSync().

A list of all the elements that are present in the local processor for the current iteration with respect to writeback.

Definition at line 210 of file CkCache.h.

Referenced by cacheSync().

number of chares that have checked in for the next iteration

Definition at line 212 of file CkCache.h.

Referenced by cacheSync(), finishedChunk(), and init().

The number of arrays this Manager serves without support for writeback.

Definition at line 215 of file CkCache.h.

Referenced by cacheSync(), CkCacheManager(), init(), and pup().

The group ids of the location managers of the arrays this Manager serves with support for writeback.

Definition at line 218 of file CkCache.h.

Referenced by cacheSync(), CkCacheManager(), init(), and pup().

The number of arrays this Manager serves with support for writeback.

Definition at line 220 of file CkCache.h.

Referenced by cacheSync(), CkCacheManager(), and pup().

The group ids of the location managers of the arrays this Manager serves with support for writeback.

Definition at line 223 of file CkCache.h.

Referenced by cacheSync(), CkCacheManager(), and pup().

particles arrived from remote processors, this counts only the entries in the cache

Definition at line 227 of file CkCache.h.

Referenced by cacheSync(), collectStatistics(), and init().

particles arrived from remote processors, this counts the real number of particles arrived

Definition at line 230 of file CkCache.h.

Referenced by cacheSync(), collectStatistics(), and init().

particles missed while walking the tree for computation

Definition at line 232 of file CkCache.h.

Referenced by cacheSync(), collectStatistics(), and init().

particles that have been imported from local TreePieces

Definition at line 234 of file CkCache.h.

Referenced by cacheSync(), collectStatistics(), and init().

particles arrived which were never requested, basically errors

Definition at line 236 of file CkCache.h.

Referenced by collectStatistics().

counts the total number of particles requested by all the chares on the processor

Definition at line 239 of file CkCache.h.

Referenced by cacheSync(), collectStatistics(), init(), and requestData().

maximum number of nodes stored at some point in the cache

Definition at line 241 of file CkCache.h.

Referenced by cacheSync(), collectStatistics(), and finishedChunk().

weights of the chunks in which the tree is divided, the cache will update the chunk division based on these values

Definition at line 246 of file CkCache.h.

Referenced by cacheSync(), finishedChunk(), and init().

Maximum number of allowed data stored.

Definition at line 249 of file CkCache.h.

Referenced by CkCacheManager(), init(), and pup().

number of acknowledgements awaited before deleting the chunk

Definition at line 252 of file CkCache.h.

Referenced by cacheSync(), finishedChunk(), init(), recvData(), and requestData().

number of acknowledgements awaited before writing back the chunk

Definition at line 254 of file CkCache.h.

Referenced by cacheSync(), and writebackChunk().

hash table containing all the entries currently in the cache

Definition at line 257 of file CkCache.h.

Referenced by cacheSync(), finishedChunk(), getCache(), init(), recvData(), requestCacheEntryNoFetch(), requestData(), requestDataNoFetch(), and writebackChunk().

Definition at line 258 of file CkCache.h.

Referenced by cacheSync(), finishedChunk(), init(), and recvData().

list of all the outstanding requests.

The second field is the chunk for which this request is outstanding

Definition at line 262 of file CkCache.h.

Referenced by cacheSync(), recvData(), and requestData().


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

Generated on Thu May 24 07:57:02 2012 for Charm++ by  doxygen 1.5.5