2010-06-03 21:24:43 +08:00
|
|
|
/*********************************************************************
|
2018-12-07 06:40:43 +08:00
|
|
|
* Copyright 2018, UCAR/Unidata
|
2010-06-03 21:24:43 +08:00
|
|
|
* See netcdf/COPYRIGHT file for copying and redistribution conditions.
|
|
|
|
*********************************************************************/
|
|
|
|
|
|
|
|
#ifndef ODOM_H
|
|
|
|
#define ODOM_H 1
|
|
|
|
|
|
|
|
typedef struct Odometer {
|
|
|
|
int rank;
|
2012-02-14 08:25:32 +08:00
|
|
|
int offset;
|
|
|
|
struct Odometer* origin;
|
|
|
|
size_t start[NC_MAX_VAR_DIMS];
|
|
|
|
size_t count[NC_MAX_VAR_DIMS];
|
|
|
|
size_t index[NC_MAX_VAR_DIMS];
|
|
|
|
size_t declsize[NC_MAX_VAR_DIMS];
|
2010-06-03 21:24:43 +08:00
|
|
|
} Odometer;
|
|
|
|
|
2012-02-14 08:25:32 +08:00
|
|
|
/*Forward*/
|
|
|
|
struct Dimset;
|
2010-06-03 21:24:43 +08:00
|
|
|
|
|
|
|
/* Odometer operators*/
|
|
|
|
extern Odometer* newodometer(struct Dimset*, size_t* startp, size_t* countp);
|
2012-02-14 08:25:32 +08:00
|
|
|
extern Odometer* newsubodometer(Odometer*, struct Dimset*, int, int);
|
|
|
|
|
|
|
|
extern Odometer* newsubodometer(Odometer*, struct Dimset*,
|
|
|
|
int start, int stop);
|
|
|
|
|
2010-06-03 21:24:43 +08:00
|
|
|
extern void odometerfree(Odometer*);
|
|
|
|
extern char* odometerprint(Odometer* odom);
|
|
|
|
|
|
|
|
extern int odometermore(Odometer* odom);
|
2014-09-19 08:26:06 +08:00
|
|
|
extern int odometerincr(Odometer* odom);
|
2012-02-14 08:25:32 +08:00
|
|
|
extern size_t odometeroffset(Odometer* odom);
|
2014-09-19 08:26:06 +08:00
|
|
|
extern size_t* odometerstartvector(Odometer* odom);
|
|
|
|
extern size_t* odometercountvector(Odometer* odom);
|
2012-02-14 08:25:32 +08:00
|
|
|
|
2010-06-03 21:24:43 +08:00
|
|
|
#endif /*ODOM_H*/
|