netcdf-c/libnczarr/zodom.h
Dennis Heimbigner 93e9d92778 More NCZarr optimizations
* Replace wholevar with more useful wholechunk optimization
* Add optimization to read multiple values at one time
* Replace NCDEFAULT_get/put_vars with native nczarr versions.
* Clarify chunk projection computations
* zdebdispatch.h
* Add more chunking test cases and re-enable run_chunkcases
* If !szip, then suppress deflate interference test
* Make H5Znoop(1) filter produce more information
* cleanup bzlib.c API
2021-01-06 13:35:59 -07:00

39 lines
1.4 KiB
C

/*********************************************************************
* Copyright 2018, UCAR/Unidata
* See netcdf/COPYRIGHT file for copying and redistribution conditions.
*********************************************************************/
#ifndef ZODOM_H
#define ZODOM_H
struct NCZSlice;
typedef struct NCZOdometer {
int rank; /*rank */
size64_t* start;
size64_t* stop; /* start + (count*stride) */
size64_t* stride;
size64_t* len; /* for computing offset */
size64_t* index; /* current value of the odometer*/
struct NCZOprop {
int stride1; /* all strides == 1 */
int start0; /* all starts == 0 */
// int optimized; /* stride[rank-1]==1 && start[rank-1]==0 */
} properties;
} NCZOdometer;
/**************************************************/
/* From zodom.c */
extern NCZOdometer* nczodom_new(int rank, const size64_t*, const size64_t*, const size64_t*, const size64_t*);
extern NCZOdometer* nczodom_fromslices(int rank, const struct NCZSlice* slices);
extern int nczodom_more(const NCZOdometer*);
extern void nczodom_next(NCZOdometer*);
extern size64_t* nczodom_indices(const NCZOdometer*);
extern size64_t nczodom_offset(const NCZOdometer*);
extern void nczodom_reset(NCZOdometer* odom);
extern void nczodom_free(NCZOdometer*);
extern size64_t nczodom_avail(const NCZOdometer*);
extern void nczodom_skipavail(NCZOdometer* odom);
#endif /*ZODOM_H*/