using storage field in nc4var.c

This commit is contained in:
Edward Hartnett 2020-03-08 06:38:44 -06:00
parent 119e8e9465
commit b98a37e0b3
2 changed files with 6 additions and 10 deletions

View File

@ -970,7 +970,10 @@ var_create_dataset(NC_GRP_INFO_T *grp, NC_VAR_INFO_T *var, nc_bool_t write_dimid
* better performance. */
if (!var->shuffle && !var->fletcher32 && nclistlength(var->filters) == 0 &&
(var->chunksizes == NULL || !var->chunksizes[0]) && !unlimdim)
{
var->contiguous = NC_TRUE;
var->storage = NC_CONTIGUOUS;
}
/* Gather current & maximum dimension sizes, along with chunk
* sizes. */

View File

@ -123,7 +123,7 @@ nc_get_var_chunk_cache_ints(int ncid, int varid, int *sizep,
* @param deflatep Gets deflate setting.
* @param deflate_levelp Gets deflate level.
* @param fletcher32p Gets fletcher32 setting.
* @param storagep Gets contiguous setting.
* @param storagep Gets storage setting.
* @param chunksizesp Gets chunksizes.
* @param no_fill Gets fill mode.
* @param fill_valuep Gets fill value.
@ -188,7 +188,7 @@ NC4_inq_var_all(int ncid, int varid, char *name, nc_type *xtypep,
*nattsp = ncindexcount(var->att);
/* Did the user want the chunksizes? */
if (!var->contiguous && !var->compact && chunksizesp)
if (var->storage == NC_CHUNKED && chunksizesp)
{
for (d = 0; d < var->ndims; d++)
{
@ -199,14 +199,7 @@ NC4_inq_var_all(int ncid, int varid, char *name, nc_type *xtypep,
/* Did the user inquire about the storage? */
if (storagep)
{
if (var->contiguous)
*storagep = NC_CONTIGUOUS;
else if (var->compact)
*storagep = NC_COMPACT;
else
*storagep = NC_CHUNKED;
}
*storagep = var->storage;
/* Filter stuff. */
if (shufflep)