test development for different szip option mask settings
@@ -649,18 +649,22 @@ main(int argc, char **argv)
}
SUMMARIZE_ERR;
#define NUM_MASK 2
+#define NUM_PPB 1
printf("**** testing different values for szip params...");
{
int ncid;
int dimid;
int varid;
int option_mask[NUM_MASK] = {NC_SZIP_NN_OPTION_MASK, NC_SZIP_EC_OPTION_MASK};
- /* int pixels_per_block; */
+ int pixels_per_block[NUM_PPB] = {32};
int option_mask_in, pixels_per_block_in;
- int m;
+ int m, p;
/* Try different option masks. */
for (m = 0; m < NUM_MASK; m++)
+ {
+ /* Try different option masks. */
+ for (p = 0; p < NUM_PPB; p++)
{
/* Create a netcdf-4 file with one dimensions. */
if (nc_create(FILE_NAME, NC_NETCDF4, &ncid)) ERR;
@@ -670,7 +674,7 @@ main(int argc, char **argv)
if (nc_def_var(ncid, V_SMALL, NC_INT64, NDIMS1, &dimid, &varid)) ERR;
/* Turn on szip filter. */
- if (nc_def_var_szip(ncid, varid, option_mask[m], NC_SZIP_EC_BPP_IN)) ERR;
+ if (nc_def_var_szip(ncid, varid, option_mask[m], pixels_per_block[p])) ERR;
/* Check szip filter settings. */
if (nc_inq_var_szip(ncid, varid, &option_mask_in, &pixels_per_block_in)) ERR;
@@ -697,6 +701,7 @@ main(int argc, char **argv)
if(params_in[1] != pixels_per_block_in) ERR;
if (nc_close(ncid)) ERR;
}
+ } /* next PPB */
} /* next mask */
}
SUMMARIZE_ERR;
