2011-01-07 06:09:14 +08:00
|
|
|
/*********************************************************************
|
2018-12-07 06:36:53 +08:00
|
|
|
* Copyright 2018, UCAR/Unidata
|
2011-01-07 06:09:14 +08:00
|
|
|
* See netcdf/COPYRIGHT file for copying and redistribution conditions.
|
|
|
|
* $Id $
|
|
|
|
*********************************************************************/
|
|
|
|
#ifndef _CHUNKSPEC_H_
|
|
|
|
#define _CHUNKSPEC_H_
|
|
|
|
|
2011-01-10 05:41:07 +08:00
|
|
|
/* Parse chunkspec string and convert into internal data structure,
|
|
|
|
* associating dimids from open file or group specified by ncid with
|
|
|
|
* corresponding chunk sizes */
|
2011-01-07 06:09:14 +08:00
|
|
|
extern int
|
|
|
|
chunkspec_parse(int ncid, const char *spec);
|
|
|
|
|
2011-01-10 05:41:07 +08:00
|
|
|
/* Return chunk size in chunkspec string specified for dimension
|
|
|
|
* corresponding to dimid, 0 if not found */
|
2011-01-07 06:09:14 +08:00
|
|
|
extern size_t
|
2018-07-27 10:16:02 +08:00
|
|
|
dimchunkspec_size(int dimid);
|
2011-01-07 06:09:14 +08:00
|
|
|
|
2020-03-01 03:06:21 +08:00
|
|
|
/* Return 1 if a dimension spec is defined
|
|
|
|
* corresponding to dimid, 0 if not found */
|
|
|
|
extern bool_t
|
|
|
|
dimchunkspec_exists(int indimid);
|
|
|
|
|
2011-01-10 05:41:07 +08:00
|
|
|
/* Return number of dimensions for which chunking was specified in
|
|
|
|
* chunkspec string on command line, 0 if no chunkspec string was
|
|
|
|
* specified. */
|
|
|
|
extern int
|
2018-07-27 10:16:02 +08:00
|
|
|
dimchunkspec_ndims(void);
|
2011-01-10 05:41:07 +08:00
|
|
|
|
2014-03-22 02:34:19 +08:00
|
|
|
/* Return whether chunking should be omitted, due to explicit
|
|
|
|
* command-line specification. */
|
|
|
|
extern bool_t
|
2018-07-27 10:16:02 +08:00
|
|
|
dimchunkspec_omit(void);
|
|
|
|
|
|
|
|
extern bool_t varchunkspec_omit(int grpid, int varid);
|
|
|
|
|
|
|
|
extern size_t* varchunkspec_chunksizes(int grpid, int varid);
|
|
|
|
|
|
|
|
extern size_t varchunkspec_ndims(int grpid, int varid);
|
|
|
|
|
|
|
|
extern bool_t varchunkspec_exists(int grpid, int varid);
|
|
|
|
|
2020-03-01 03:06:21 +08:00
|
|
|
extern int varchunkspec_kind(int grpid, int varid);
|
|
|
|
|
2018-07-27 10:16:02 +08:00
|
|
|
extern void chunkspecinit(void);
|
|
|
|
|
2014-03-22 02:34:19 +08:00
|
|
|
|
2011-01-07 06:09:14 +08:00
|
|
|
#endif /* _CHUNKSPEC_H_ */
|