netcdf-c/ncgen/odom.h

39 lines
1.1 KiB
C
Raw Normal View History

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;
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;
/*Forward*/
struct Dimset;
2010-06-03 21:24:43 +08:00
/* Odometer operators*/
extern Odometer* newodometer(struct Dimset*, size_t* startp, size_t* countp);
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);
extern int odometerincr(Odometer* odom);
extern size_t odometeroffset(Odometer* odom);
extern size_t* odometerstartvector(Odometer* odom);
extern size_t* odometercountvector(Odometer* odom);
2010-06-03 21:24:43 +08:00
#endif /*ODOM_H*/