PPL Logo

CkCacheManager< CkCacheKey > Class Template Reference

#include <CkCache.h>

Inheritance diagram for CkCacheManager< CkCacheKey >:

Inheritance graph
[legend]
Collaboration diagram for CkCacheManager< CkCacheKey >:

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< CkCacheKey > *type, CkCacheRequestorData< CkCacheKey > &req)
void * requestDataNoFetch (CkCacheKey key, int chunk)
CkCacheEntry< CkCacheKey > * requestCacheEntryNoFetch (CkCacheKey key, int chunk)
void recvData (CkCacheKey key, void *data, CkCacheFillMsg< CkCacheKey > *msg=NULL)
void recvData (CkCacheFillMsg< CkCacheKey > *msg)
void recvData (CkCacheKey key, CkArrayIndex &from, CkCacheEntryType< CkCacheKey > *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< CkCacheKey > * > * 
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< CkCacheKey > * > * 
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

template<class CkCacheKey>
class CkCacheManager< CkCacheKey >

Definition at line 201 of file CkCache.h.


Constructor & Destructor Documentation

template<class CkCacheKey>
CkCacheManager< CkCacheKey >::CkCacheManager ( int  size,
CkGroupID  gid 
) [inline]

template<class CkCacheKey>
CkCacheManager< CkCacheKey >::CkCacheManager ( int  size,
int  n,
CkGroupID gid 
) [inline]

template<class CkCacheKey>
CkCacheManager< CkCacheKey >::CkCacheManager ( int  size,
int  n,
CkGroupID gid,
int  nWB,
CkGroupID gidWB 
) [inline]

template<class CkCacheKey>
CkCacheManager< CkCacheKey >::CkCacheManager ( CkMigrateMessage m  )  [inline]

Definition at line 280 of file CkCache.h.

References CkCacheManager< CkCacheKey >::init().

Here is the call graph for this function:

template<class CkCacheKey>
CkCacheManager< CkCacheKey >::~CkCacheManager (  )  [inline]

Definition at line 281 of file CkCache.h.


Member Function Documentation

template<class CkCacheKey>
void CkCacheManager< CkCacheKey >::pup ( PUP::er p  )  [inline]

template<class CkCacheKey>
void CkCacheManager< CkCacheKey >::init ( void   )  [inline, private]

template<class CkCacheKey>
void * CkCacheManager< CkCacheKey >::requestData ( CkCacheKey  what,
CkArrayIndex &  toWhom,
int  chunk,
CkCacheEntryType< CkCacheKey > *  type,
CkCacheRequestorData< CkCacheKey > &  req 
) [inline]

template<class CkCacheKey>
void * CkCacheManager< CkCacheKey >::requestDataNoFetch ( CkCacheKey  key,
int  chunk 
) [inline]

Definition at line 428 of file CkCache.h.

References CkCacheManager< CkCacheKey >::cacheTable, and p.

template<class CkCacheKey>
CkCacheEntry< CkCacheKey > * CkCacheManager< CkCacheKey >::requestCacheEntryNoFetch ( CkCacheKey  key,
int  chunk 
) [inline]

Definition at line 437 of file CkCache.h.

References CkCacheManager< CkCacheKey >::cacheTable, and p.

template<class CkCacheKey>
void CkCacheManager< CkCacheKey >::recvData ( CkCacheKey  key,
void *  data,
CkCacheFillMsg< CkCacheKey > *  msg = NULL 
) [inline]

template<class CkCacheKey>
void CkCacheManager< CkCacheKey >::recvData ( CkCacheFillMsg< CkCacheKey > *  msg  )  [inline]

Definition at line 481 of file CkCache.h.

References CkCacheFillMsg< CkCacheKey >::key, key, and CkCacheManager< CkCacheKey >::recvData().

Here is the call graph for this function:

template<class CkCacheKey>
void CkCacheManager< CkCacheKey >::recvData ( CkCacheKey  key,
CkArrayIndex &  from,
CkCacheEntryType< CkCacheKey > *  type,
int  chunk,
void *  data 
) [inline]

template<class CkCacheKey>
void CkCacheManager< CkCacheKey >::cacheSync ( int numChunks,
CkArrayIndex &  chareIdx,
int localIdx 
) [inline]

template<class CkCacheKey>
void CkCacheManager< CkCacheKey >::writebackChunk ( int  num  )  [inline]

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

Definition at line 579 of file CkCache.h.

References CkCacheManager< CkCacheKey >::cacheTable, CkCacheManager< CkCacheKey >::chunkAckWB, and CkCacheEntry< CkCacheKey >::writeback().

Here is the call graph for this function:

template<class CkCacheKey>
void CkCacheManager< CkCacheKey >::finishedChunk ( int  num,
CmiUInt8  weight 
) [inline]

template<class CkCacheKey>
void CkCacheManager< CkCacheKey >::collectStatistics ( CkCallback  cb  )  [inline]

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

Collect the statistics for the latest iteration

Definition at line 629 of file CkCache.h.

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

Here is the call graph for this function:

template<class CkCacheKey>
std::map< CkCacheKey, CkCacheEntry< CkCacheKey > * > * CkCacheManager< CkCacheKey >::getCache (  )  [inline]

Definition at line 446 of file CkCache.h.

References CkCacheManager< CkCacheKey >::cacheTable.


Field Documentation

template<class CkCacheKey>
int CkCacheManager< CkCacheKey >::numChunks [private]

template<class CkCacheKey>
int CkCacheManager< CkCacheKey >::finishedChunks [private]

Number of chunks that have already been completely acknowledged.

Definition at line 210 of file CkCache.h.

Referenced by CkCacheManager< CkCacheKey >::cacheSync(), and CkCacheManager< CkCacheKey >::finishedChunk().

template<class CkCacheKey>
CkCacheArrayCounter CkCacheManager< CkCacheKey >::localChares [private]

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

Definition at line 214 of file CkCache.h.

Referenced by CkCacheManager< CkCacheKey >::cacheSync().

template<class CkCacheKey>
CkCacheArrayCounter CkCacheManager< CkCacheKey >::localCharesWB [private]

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

Definition at line 217 of file CkCache.h.

Referenced by CkCacheManager< CkCacheKey >::cacheSync().

template<class CkCacheKey>
int CkCacheManager< CkCacheKey >::syncdChares [private]

number of chares that have checked in for the next iteration

Definition at line 219 of file CkCache.h.

Referenced by CkCacheManager< CkCacheKey >::cacheSync(), CkCacheManager< CkCacheKey >::finishedChunk(), and CkCacheManager< CkCacheKey >::init().

template<class CkCacheKey>
int CkCacheManager< CkCacheKey >::numLocMgr [private]

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

Definition at line 222 of file CkCache.h.

Referenced by CkCacheManager< CkCacheKey >::cacheSync(), CkCacheManager< CkCacheKey >::CkCacheManager(), CkCacheManager< CkCacheKey >::init(), and CkCacheManager< CkCacheKey >::pup().

template<class CkCacheKey>
CkGroupID* CkCacheManager< CkCacheKey >::locMgr [private]

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

Definition at line 225 of file CkCache.h.

Referenced by CkCacheManager< CkCacheKey >::cacheSync(), CkCacheManager< CkCacheKey >::CkCacheManager(), CkCacheManager< CkCacheKey >::init(), and CkCacheManager< CkCacheKey >::pup().

template<class CkCacheKey>
int CkCacheManager< CkCacheKey >::numLocMgrWB [private]

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

Definition at line 227 of file CkCache.h.

Referenced by CkCacheManager< CkCacheKey >::cacheSync(), CkCacheManager< CkCacheKey >::CkCacheManager(), and CkCacheManager< CkCacheKey >::pup().

template<class CkCacheKey>
CkGroupID* CkCacheManager< CkCacheKey >::locMgrWB [private]

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

Definition at line 230 of file CkCache.h.

Referenced by CkCacheManager< CkCacheKey >::cacheSync(), CkCacheManager< CkCacheKey >::CkCacheManager(), and CkCacheManager< CkCacheKey >::pup().

template<class CkCacheKey>
CmiUInt8 CkCacheManager< CkCacheKey >::dataArrived [private]

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

Definition at line 234 of file CkCache.h.

Referenced by CkCacheManager< CkCacheKey >::cacheSync(), CkCacheManager< CkCacheKey >::collectStatistics(), and CkCacheManager< CkCacheKey >::init().

template<class CkCacheKey>
CmiUInt8 CkCacheManager< CkCacheKey >::dataTotalArrived [private]

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

Definition at line 237 of file CkCache.h.

Referenced by CkCacheManager< CkCacheKey >::cacheSync(), CkCacheManager< CkCacheKey >::collectStatistics(), and CkCacheManager< CkCacheKey >::init().

template<class CkCacheKey>
CmiUInt8 CkCacheManager< CkCacheKey >::dataMisses [private]

particles missed while walking the tree for computation

Definition at line 239 of file CkCache.h.

Referenced by CkCacheManager< CkCacheKey >::cacheSync(), CkCacheManager< CkCacheKey >::collectStatistics(), and CkCacheManager< CkCacheKey >::init().

template<class CkCacheKey>
CmiUInt8 CkCacheManager< CkCacheKey >::dataLocal [private]

particles that have been imported from local TreePieces

Definition at line 241 of file CkCache.h.

Referenced by CkCacheManager< CkCacheKey >::cacheSync(), CkCacheManager< CkCacheKey >::collectStatistics(), and CkCacheManager< CkCacheKey >::init().

template<class CkCacheKey>
CmiUInt8 CkCacheManager< CkCacheKey >::dataError [private]

particles arrived which were never requested, basically errors

Definition at line 243 of file CkCache.h.

Referenced by CkCacheManager< CkCacheKey >::collectStatistics().

template<class CkCacheKey>
CmiUInt8 CkCacheManager< CkCacheKey >::totalDataRequested [private]

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

Definition at line 246 of file CkCache.h.

Referenced by CkCacheManager< CkCacheKey >::cacheSync(), CkCacheManager< CkCacheKey >::collectStatistics(), CkCacheManager< CkCacheKey >::init(), and CkCacheManager< CkCacheKey >::requestData().

template<class CkCacheKey>
CmiUInt8 CkCacheManager< CkCacheKey >::maxData [private]

maximum number of nodes stored at some point in the cache

Definition at line 248 of file CkCache.h.

Referenced by CkCacheManager< CkCacheKey >::cacheSync(), CkCacheManager< CkCacheKey >::collectStatistics(), and CkCacheManager< CkCacheKey >::finishedChunk().

template<class CkCacheKey>
CmiUInt8* CkCacheManager< CkCacheKey >::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 253 of file CkCache.h.

Referenced by CkCacheManager< CkCacheKey >::cacheSync(), CkCacheManager< CkCacheKey >::finishedChunk(), and CkCacheManager< CkCacheKey >::init().

template<class CkCacheKey>
CmiUInt8 CkCacheManager< CkCacheKey >::maxSize [private]

Maximum number of allowed data stored.

Definition at line 256 of file CkCache.h.

Referenced by CkCacheManager< CkCacheKey >::CkCacheManager(), CkCacheManager< CkCacheKey >::init(), and CkCacheManager< CkCacheKey >::pup().

template<class CkCacheKey>
int* CkCacheManager< CkCacheKey >::chunkAck [private]

template<class CkCacheKey>
int* CkCacheManager< CkCacheKey >::chunkAckWB [private]

number of acknowledgements awaited before writing back the chunk

Definition at line 261 of file CkCache.h.

Referenced by CkCacheManager< CkCacheKey >::cacheSync(), and CkCacheManager< CkCacheKey >::writebackChunk().

template<class CkCacheKey>
std::map<CkCacheKey,CkCacheEntry<CkCacheKey>*>* CkCacheManager< CkCacheKey >::cacheTable [private]

template<class CkCacheKey>
int CkCacheManager< CkCacheKey >::storedData [private]

template<class CkCacheKey>
std::map<CkCacheKey,int> CkCacheManager< CkCacheKey >::outStandingRequests [private]

list of all the outstanding requests.

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

Definition at line 269 of file CkCache.h.

Referenced by CkCacheManager< CkCacheKey >::cacheSync(), CkCacheManager< CkCacheKey >::recvData(), and CkCacheManager< CkCacheKey >::requestData().


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

Generated on Mon Sep 21 08:19:30 2020 for Charm++ by  doxygen 1.5.5