38 #ifndef GRID_LEVEL_FULL_H
39 #define GRID_LEVEL_FULL_H
58 template<
class Type,
class Allocator>
72 :
Blocked<Type>(comm, numa, type),
91 unsigned int cacheSize,
93 grid::ValuePosition valuePos)
96 blockSize, timeDimension, valuePos);
101 err = this->
numa().template allocate<Allocator>(
114 size_t blockPos[MAX_DIMENSIONS];
118 for (
unsigned char j = 0; j < this->
dimensions(); j++)
137 void getAt(T* buf,
const double* pos)
142 size_t index[MAX_DIMENSIONS];
148 assert(this->
blockRank(globalBlockId) == this->
comm().rank());
152 unsigned long localBlockId = this->
blockOffset(globalBlockId);
159 this->
type().convert(
183 #endif // GRID_LEVEL_FULL_H
unsigned long blockByCoords(const size_t *index) const
Base class for all grid levels that work on blocks.
void incCounter(perf::Counter::CounterType type)
void getAt(T *buf, const double *pos)
void calcBlockPosition(unsigned long block, size_t *pos) const
unsigned long local2global(unsigned long id) const
unsigned int dimensions() const
unsigned int typeSize() const
unsigned int numaDomainId() const
const size_t * blockSize() const
unsigned long totalBlockSize() const
unsigned long calcOffsetInBlock(const size_t *index)
Full(mpi::MPIComm &comm, const numa::Numa &numa, Type &type)
void pos2index(const double *pos, size_t *index)
unsigned int blockDomain(unsigned long id) const
unsigned long totalBlockCount() const
const Type & type() const
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)
asagi::Grid::Error open(const char *filename, const char *varname, const int *blockSize, int timeDimension, grid::ValuePosition valuePos)
unsigned long blockOffset(unsigned long id) const
io::NetCdfReader & inputFile() const
unsigned long localBlockCount() const