mirror of
https://github.com/Unidata/netcdf-c.git
synced 2025-04-06 18:00:24 +08:00
using storage field in nc4var.c
This commit is contained in:
parent
119e8e9465
commit
b98a37e0b3
@ -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. */
|
||||
|
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user