138 virtual Error setComm(MPI_Comm comm = MPI_COMM_WORLD) = 0;
166 virtual void setParam(
const char* name,
const char* value,
167 unsigned int level = 0) = 0;
179 unsigned int level = 0) = 0;
195 virtual double getMin(
unsigned int n)
const = 0;
203 virtual double getMax(
unsigned int n)
const = 0;
212 virtual double getDelta(
unsigned int n,
unsigned int level = 0)
const = 0;
232 virtual unsigned char getByte(
const double* pos,
unsigned int level = 0) = 0;
243 virtual int getInt(
const double* pos,
unsigned int level = 0) = 0;
254 virtual long getLong(
const double* pos,
unsigned int level = 0) = 0;
265 virtual float getFloat(
const double* pos,
unsigned int level = 0) = 0;
276 virtual double getDouble(
const double* pos,
unsigned int level = 0) = 0;
288 virtual void getBuf(
void* buf,
const double* pos,
unsigned int level = 0) = 0;
303 virtual unsigned long getCounter(
const char *name,
304 unsigned int level = 0) = 0;
339 unsigned int blockLength[],
unsigned long displacements[],
Type types[]);
395 #endif // ASAGI_NOMPI
422 typedef enum { ASAGI_BYTE, ASAGI_INT, ASAGI_LONG, ASAGI_FLOAT, ASAGI_DOUBLE }
asagi_type;
435 ASAGI_NOT_INITIALIZED,
436 ASAGI_ALREADY_INITIALIZED,
440 ASAGI_UNSUPPORTED_DIMENSIONS,
441 ASAGI_MULTIPLE_TOPGRIDS,
442 ASAGI_INVALID_VAR_SIZE
470 unsigned int blockLength[],
471 unsigned long displacements[],
496 const char* value,
unsigned int level);
static void stopCommThread()
virtual double getDouble(const double *pos, unsigned int level=0)=0
static void close(asagi::Grid *grid)
long asagi_grid_get_long(asagi_grid *handle, const double *pos, unsigned int level)
int asagi_grid_get_int(asagi_grid *handle, const double *pos, unsigned int level)
unsigned int asagi_grid_var_size(asagi_grid *handle)
static asagi::Grid * createStruct(unsigned int count, unsigned int blockLength[], unsigned long displacements[], Type types[])
double asagi_grid_get_double(asagi_grid *handle, const double *pos, unsigned int level)
virtual unsigned int getVarSize() const =0
void asagi_grid_close(asagi_grid *handle)
void asagi_grid_set_comm(asagi_grid *handle, MPI_Comm comm)
void asagi_grid_get_buf(asagi_grid *handle, void *buf, const double *pos, unsigned int level)
asagi_error asagi_grid_open(asagi_grid *handle, const char *filename, unsigned int level)
asagi_grid * asagi_grid_create_struct(unsigned int count, unsigned int blockLength[], unsigned long displacements[], asagi_type types[])
static Error startCommThread(int schedCPU=-1, MPI_Comm comm=MPI_COMM_WORLD)
double asagi_grid_min(asagi_grid *handle, unsigned int n)
virtual unsigned char getByte(const double *pos, unsigned int level=0)=0
virtual void setParam(const char *name, const char *value, unsigned int level=0)=0
Changes a grid parameter.
void asagi_stop_comm_thread()
virtual long getLong(const double *pos, unsigned int level=0)=0
int asagi_node_local_rank(MPI_Comm comm)
double asagi_grid_delta(asagi_grid *handle, unsigned int n, unsigned int level)
asagi_grid * asagi_grid_create(asagi_type type)
static asagi::Grid * createArray(Type type=FLOAT)
float asagi_grid_get_float(asagi_grid *handle, const double *pos, unsigned int level)
C++ Interface for ASAGI grids.
virtual Error open(const char *filename, unsigned int level=0)=0
Loads values from a NetCDF file.
static asagi::Grid * create(Type type=FLOAT)
virtual Error setThreads(unsigned int threads)=0
Sets the number of threads in the application.
virtual int getInt(const double *pos, unsigned int level=0)=0
virtual void getBuf(void *buf, const double *pos, unsigned int level=0)=0
asagi_error asagi_start_comm_thread(int sched_cpu, MPI_Comm comm)
virtual float getFloat(const double *pos, unsigned int level=0)=0
double asagi_grid_max(asagi_grid *handle, unsigned int n)
virtual double getMax(unsigned int n) const =0
void asagi_grid_set_threads(asagi_grid *handle, unsigned int threads)
void asagi_grid_set_param(asagi_grid *handle, const char *name, const char *value, unsigned int level)
virtual unsigned long getCounter(const char *name, unsigned int level=0)=0
virtual Error setComm(MPI_Comm comm=MPI_COMM_WORLD)=0
unsigned int asagi_grid_dimensions(asagi_grid *handle)
asagi_grid * asagi_grid_create_array(asagi_type basic_type)
unsigned char asagi_grid_get_byte(asagi_grid *handle, const double *pos, unsigned int level)
virtual unsigned int getDimensions() const =0
Returns the number of dimensions loaded from the file.
virtual double getMin(unsigned int n) const =0
virtual double getDelta(unsigned int n, unsigned int level=0) const =0
static int nodeLocalRank(MPI_Comm comm=MPI_COMM_WORLD)