
#include <CkCache.h>


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) |
| CkCacheEntry * | requestCacheEntryNoFetch (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. | |
| CkGroupID * | locMgr |
| 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. | |
| CkGroupID * | locMgrWB |
| 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 | |
| CmiUInt8 * | chunkWeight |
| 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. | |
| int * | chunkAck |
| number of acknowledgements awaited before deleting the chunk | |
| int * | chunkAckWB |
| 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, int > | outStandingRequests |
| list of all the outstanding requests. | |
Definition at line 194 of file CkCache.h.
| CkCacheManager::CkCacheManager | ( | CkMigrateMessage * | m | ) |
| 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] |
Definition at line 36 of file CkCache.C.
References cacheTable, chunkAck, chunkWeight, dataArrived, dataLocal, dataMisses, dataTotalArrived, locMgr, maxSize, numChunks, numLocMgr, storedData, syncdChares, and totalDataRequested.
Referenced by CkCacheManager().
| void * CkCacheManager::requestData | ( | CkCacheKey | what, | |
| CkArrayIndex & | toWhom, | |||
| int | chunk, | |||
| CkCacheEntryType * | type, | |||
| CkCacheRequestorData & | req | |||
| ) |
Definition at line 66 of file CkCache.C.
References cacheTable, chunkAck, CkCacheEntry::data, CkCacheEntry::home, CkCacheEntry::misses, outStandingRequests, p, CkCacheEntry::replyRecvd, CkCacheEntryType::request(), CkCacheEntry::requestorVec, CkCacheEntry::requestSent, totalDataRequested, and CkCacheEntry::totalRequests.
| void * CkCacheManager::requestDataNoFetch | ( | CkCacheKey | key, | |
| int | chunk | |||
| ) |
| CkCacheEntry * CkCacheManager::requestCacheEntryNoFetch | ( | CkCacheKey | key, | |
| int | chunk | |||
| ) |
| void CkCacheManager::recvData | ( | CkCacheFillMsg * | msg | ) |
Definition at line 135 of file CkCache.C.
References cacheTable, caller, chunkAck, CkCacheEntry::data, CkCacheEntry::home, CkCacheFillMsg::key, numChunks, outStandingRequests, p, CkCacheEntry::requestorVec, CkCacheEntryType::size(), storedData, CkCacheEntry::type, and CkCacheEntryType::unpack().
| void CkCacheManager::recvData | ( | CkCacheKey | key, | |
| CkArrayIndex & | from, | |||
| CkCacheEntryType * | type, | |||
| int | chunk, | |||
| void * | data | |||
| ) |
Definition at line 158 of file CkCache.C.
References cacheTable, caller, CkCacheEntry::data, CkCacheEntry::home, CkCacheEntry::key, p, CkCacheEntry::replyRecvd, CkCacheEntry::requestorVec, CkCacheEntryType::size(), storedData, CkCacheEntry::type, and CkCacheEntryType::writeback().
| void CkCacheManager::cacheSync | ( | int & | numChunks, | |
| CkArrayIndex & | chareIdx, | |||
| int & | localIdx | |||
| ) |
Definition at line 180 of file CkCache.C.
References cacheTable, chunkAck, chunkAckWB, chunkWeight, CkLocalBranch(), CmiResetMaxMemory(), CkCacheArrayCounter::count, dataArrived, dataLocal, dataMisses, dataTotalArrived, finishedChunks, CkHashtableT< KEY, OBJ >::get(), CkLocMgr::iterate(), localChares, localCharesWB, locMgr, locMgrWB, maxData, numChunks, numLocMgr, numLocMgrWB, outStandingRequests, CkCacheArrayCounter::registered, CkCacheArrayCounter::reset(), storedData, syncdChares, and totalDataRequested.
| 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().
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 | ( | ) |
int CkCacheManager::numChunks [private] |
Number of chunks in which the cache is splitted.
Definition at line 201 of file CkCache.h.
Referenced by cacheSync(), finishedChunk(), init(), and recvData().
int CkCacheManager::finishedChunks [private] |
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().
int CkCacheManager::syncdChares [private] |
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().
int CkCacheManager::numLocMgr [private] |
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().
CkGroupID* CkCacheManager::locMgr [private] |
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().
int CkCacheManager::numLocMgrWB [private] |
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().
CkGroupID* CkCacheManager::locMgrWB [private] |
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().
CmiUInt8 CkCacheManager::dataArrived [private] |
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().
CmiUInt8 CkCacheManager::dataTotalArrived [private] |
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().
CmiUInt8 CkCacheManager::dataMisses [private] |
particles missed while walking the tree for computation
Definition at line 232 of file CkCache.h.
Referenced by cacheSync(), collectStatistics(), and init().
CmiUInt8 CkCacheManager::dataLocal [private] |
particles that have been imported from local TreePieces
Definition at line 234 of file CkCache.h.
Referenced by cacheSync(), collectStatistics(), and init().
CmiUInt8 CkCacheManager::dataError [private] |
particles arrived which were never requested, basically errors
Definition at line 236 of file CkCache.h.
Referenced by collectStatistics().
CmiUInt8 CkCacheManager::totalDataRequested [private] |
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().
CmiUInt8 CkCacheManager::maxData [private] |
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().
CmiUInt8* CkCacheManager::chunkWeight [private] |
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().
CmiUInt8 CkCacheManager::maxSize [private] |
Maximum number of allowed data stored.
Definition at line 249 of file CkCache.h.
Referenced by CkCacheManager(), init(), and pup().
int* CkCacheManager::chunkAck [private] |
number of acknowledgements awaited before deleting the chunk
Definition at line 252 of file CkCache.h.
Referenced by cacheSync(), finishedChunk(), init(), recvData(), and requestData().
int* CkCacheManager::chunkAckWB [private] |
number of acknowledgements awaited before writing back the chunk
Definition at line 254 of file CkCache.h.
Referenced by cacheSync(), and writebackChunk().
std::map<CkCacheKey,CkCacheEntry*>* CkCacheManager::cacheTable [private] |
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().
int CkCacheManager::storedData [private] |
Definition at line 258 of file CkCache.h.
Referenced by cacheSync(), finishedChunk(), init(), and recvData().
std::map<CkCacheKey,int> CkCacheManager::outStandingRequests [private] |
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().
1.5.5