38 #ifndef TRANSFER_MPICACHE_H
39 #define TRANSFER_MPICACHE_H
54 template<
class Allocator,
bool lock>
94 unsigned long blockCount,
160 if (dictEntry[count] < 0)
192 if (dictEntry[i] == entry)
196 for (; i < m_dictEntrySize-1; i++)
197 dictEntry[i] = dictEntry[i+1];
199 dictEntry[m_dictEntrySize-1] = -1;
253 if (dictEntry[count] < 0)
258 entry = dictEntry[rand() % count];
274 for (
int i = count-1; i >= 0; i--)
275 dictEntry[i+1] = dictEntry[i];
278 dictEntry[0] = newEntry;
288 #endif // TRANSFER_MPICACHE_H
void deleteBlockInfo(long *dictEntry, long entry)
void updateBlockInfo(long *dictEntry, unsigned long newEntry, unsigned int count)
asagi::Grid::Error broadcast(T &value, unsigned int rootDomain=0)
unsigned int totalDictEntrySize() const
unsigned long m_rankCacheSize
asagi::Grid::Error init(unsigned int cacheSize, unsigned long blockCount, const mpi::MPIComm &mpiComm, numa::NumaComm &numaComm)
static const unsigned int MAX_DICT_SIZE
long fetchAndUpdateBlockInfo(long *dictEntry, unsigned long newEntry)
unsigned int m_numaDomainId
unsigned int dictEntrySize() const
const mpi::MPIComm * m_mpiComm
long fetchBlockInfo(const long *dictEntry)
Include file for C and C++ API.
unsigned int domainId() const
long * dictionary(unsigned long entry)
unsigned long rankCacheSize() const
unsigned int totalDomains() const
void updateBlockInfo(long *dictEntry, unsigned long newEntry)
long fetchBlockInfo(const long *dictEntry, unsigned int &count)
const mpi::MPIComm & mpiComm() const
unsigned int m_dictEntrySize
const long * dictionary() const