38 #ifndef GRID_LEVEL_FULLDIST_H
39 #define GRID_LEVEL_FULLDIST_H
63 template<
class MPITrans,
class NumaTrans,
class Type,
class Allocator>
86 :
Full<Type, Allocator>(comm, numa, type),
100 const char* filename,
104 unsigned int cacheSize,
106 grid::ValuePosition valuePos)
110 blockSize, timeDimension,
111 cacheSize, cacheHandSpread,
117 err = Allocator::allocate(
150 void getAt(T* buf,
const double* pos)
153 size_t index[MAX_DIMENSIONS];
169 unsigned long cacheOffset;
170 unsigned char* cache;
173 if (static_cast<long>(globalBlockId) != oldGlobalBlockId) {
177 this->blockRank(globalBlockId), this->
blockDomain(globalBlockId),
195 this->
type().convert(&cache[this->
typeSize() * offset], buf);
234 #endif // GRID_LEVEL_FULLDIST_H
unsigned long blockByCoords(const size_t *index) const
void incCounter(perf::Counter::CounterType type)
void getAt(T *buf, const double *pos)
void init(unsigned char *cache, unsigned long blocks, unsigned long blockSize, long handDiff=-1)
FullDist(mpi::MPIComm &comm, const numa::Numa &numa, Type &type)
asagi::Grid::Error open(const char *filename, const char *varname, const int *blockSize, int timeDimension, unsigned int cacheSize, int cacheHandSpread, grid::ValuePosition valuePos)
unsigned int typeSize() const
unsigned int numaDomainId() const
const size_t * blockSize() const
unsigned long totalBlockSize() const
unsigned long calcOffsetInBlock(const size_t *index)
cache::CacheManager m_cacheManager
void pos2index(const double *pos, size_t *index)
unsigned long blockNodeOffset(unsigned long id) const
unsigned int blockDomain(unsigned long id) const
const Type & type() const
void getAt(T *buf, const double *pos)
int blockRank(unsigned long id) const
asagi::Grid::Error open(const char *filename, const char *varname, const int *blockSize, int timeDimension, unsigned int cacheSize, int cacheHandSpread, grid::ValuePosition valuePos)
long get(unsigned long blockId, unsigned long &cacheOffset, unsigned char *&data)
unsigned long blockOffset(unsigned long id) const
void unlock(unsigned long cacheOffset)
unsigned long localBlockCount() const