summaryrefslogtreecommitdiffstats
path: root/src/H5Pdcpl.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2015-12-13 05:42:36 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2015-12-13 05:42:36 (GMT)
commite78db67c621a2ce04d95c1c6b2b4b3c23682abfb (patch)
tree56a0b2364c3416c82e2fdcdb0c245b9c07d9c149 /src/H5Pdcpl.c
parentaa4fc58ac985ba354525056428d79f918f95d119 (diff)
downloadhdf5-e78db67c621a2ce04d95c1c6b2b4b3c23682abfb.zip
hdf5-e78db67c621a2ce04d95c1c6b2b4b3c23682abfb.tar.gz
hdf5-e78db67c621a2ce04d95c1c6b2b4b3c23682abfb.tar.bz2
[svn-r28606] Description:
Revisions to normalize revise chunks vs. trunk, plus push dataset metadata changes into the cache immediately (instead of holding them within the dataset data structures). Tested on: MacOSX/64 10.11.2 (amazon) w/serial & parallel (h5committest not required on this branch)
Diffstat (limited to 'src/H5Pdcpl.c')
-rw-r--r--src/H5Pdcpl.c26
1 files changed, 16 insertions, 10 deletions
diff --git a/src/H5Pdcpl.c b/src/H5Pdcpl.c
index 0677517..afef06b 100644
--- a/src/H5Pdcpl.c
+++ b/src/H5Pdcpl.c
@@ -769,12 +769,16 @@ H5P__dcrt_layout_cmp(const void *_layout1, const void *_layout2,
HDassert(size == sizeof(H5O_layout_t));
/* Check for different layout type */
- if(layout1->type < layout2->type) HGOTO_DONE(-1)
- if(layout1->type > layout2->type) HGOTO_DONE(1)
+ if(layout1->type < layout2->type)
+ HGOTO_DONE(-1)
+ if(layout1->type > layout2->type)
+ HGOTO_DONE(1)
/* Check for different layout version */
- if(layout1->version < layout2->version) HGOTO_DONE(-1)
- if(layout1->version > layout2->version) HGOTO_DONE(1)
+ if(layout1->version < layout2->version)
+ HGOTO_DONE(-1)
+ if(layout1->version > layout2->version)
+ HGOTO_DONE(1)
/* Compare non-dataset-specific fields in layout info */
switch(layout1->type) {
@@ -787,13 +791,17 @@ H5P__dcrt_layout_cmp(const void *_layout1, const void *_layout2,
unsigned u; /* Local index variable */
/* Check the number of dimensions */
- if(layout1->u.chunk.ndims < layout2->u.chunk.ndims) HGOTO_DONE(-1)
- if(layout1->u.chunk.ndims > layout2->u.chunk.ndims) HGOTO_DONE(1)
+ if(layout1->u.chunk.ndims < layout2->u.chunk.ndims)
+ HGOTO_DONE(-1)
+ if(layout1->u.chunk.ndims > layout2->u.chunk.ndims)
+ HGOTO_DONE(1)
/* Compare the chunk dims */
for(u = 0; u < layout1->u.chunk.ndims - 1; u++) {
- if(layout1->u.chunk.dim[u] < layout2->u.chunk.dim[u]) HGOTO_DONE(-1)
- if(layout1->u.chunk.dim[u] > layout2->u.chunk.dim[u]) HGOTO_DONE(1)
+ if(layout1->u.chunk.dim[u] < layout2->u.chunk.dim[u])
+ HGOTO_DONE(-1)
+ if(layout1->u.chunk.dim[u] > layout2->u.chunk.dim[u])
+ HGOTO_DONE(1)
} /* end for */
} /* end case */
break;
@@ -2133,7 +2141,6 @@ H5Pset_virtual(hid_t dcpl_id, hid_t vspace_id, const char *src_file_name,
H5O_storage_virtual_ent_t *old_list = NULL; /* List pointer previously on property list */
H5O_storage_virtual_ent_t *ent = NULL; /* Convenience pointer to new VDS entry */
hbool_t retrieved_layout = FALSE; /* Whether the layout has been retrieved */
- hbool_t adding_entry = FALSE; /* Whether we are in the middle of adding an entry */
hbool_t free_list = FALSE; /* Whether to free the list of virtual entries */
herr_t ret_value = SUCCEED; /* Return value */
@@ -2207,7 +2214,6 @@ H5Pset_virtual(hid_t dcpl_id, hid_t vspace_id, const char *src_file_name,
HDmemset(ent, 0, sizeof(H5O_storage_virtual_ent_t)); /* Clear before starting to set up */
if(NULL == (ent->source_dset.virtual_select = H5S_copy(vspace, FALSE, TRUE)))
HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, FAIL, "unable to copy virtual selection")
- adding_entry = TRUE;
if(NULL == (ent->source_file_name = HDstrdup(src_file_name)))
HGOTO_ERROR(H5E_PLIST, H5E_RESOURCE, FAIL, "can't duplicate source file name")
if(NULL == (ent->source_dset_name = HDstrdup(src_dset_name)))