diff options
author | Jonathan Kim <jkm@hdfgroup.org> | 2011-05-10 23:05:28 (GMT) |
---|---|---|
committer | Jonathan Kim <jkm@hdfgroup.org> | 2011-05-10 23:05:28 (GMT) |
commit | a396f8dd7f882c1eddab91e1b7fa3c02bec5e06e (patch) | |
tree | d9567c8f20e5a4cfa68fe35539471319883227d2 /tools/lib/h5trav.c | |
parent | 30db3befb22fc8ec5b38b0a8ddc8ce544a63fa56 (diff) | |
download | hdf5-a396f8dd7f882c1eddab91e1b7fa3c02bec5e06e.zip hdf5-a396f8dd7f882c1eddab91e1b7fa3c02bec5e06e.tar.gz hdf5-a396f8dd7f882c1eddab91e1b7fa3c02bec5e06e.tar.bz2 |
[svn-r20794] Purpose:
HDFFV-5928 - GMQS: h5diff problem and improvement on comparsing the same objects
Description:
Merged from HDF5 trunk r20767.
Improved performance by eliminating duplicated action for getting object
information in half from the previous fixe when comparing group vs group.
This is addition to the previous commit r20706.
Tested:
jam (linux32-LE), koala (linux64-LE), heiwa (linuxppc64-BE), tejeda (mac32-LE)
Diffstat (limited to 'tools/lib/h5trav.c')
-rw-r--r-- | tools/lib/h5trav.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tools/lib/h5trav.c b/tools/lib/h5trav.c index 5195261..c3cfddf 100644 --- a/tools/lib/h5trav.c +++ b/tools/lib/h5trav.c @@ -307,6 +307,8 @@ trav_info_add(trav_info_t *info, const char *path, h5trav_type_t obj_type) idx = info->nused++; info->paths[idx].path = HDstrdup(path); info->paths[idx].type = obj_type; + info->paths[idx].fileno = 0; + info->paths[idx].objno = HADDR_UNDEF; } /* end trav_info_add() */ @@ -327,10 +329,18 @@ int trav_info_visit_obj(const char *path, const H5O_info_t *oinfo, const char UNUSED *already_visited, void *udata) { + size_t idx; + trav_info_t *info_p; /* Add the object to the 'info' struct */ /* (object types map directly to "traversal" types) */ trav_info_add((trav_info_t *)udata, path, (h5trav_type_t)oinfo->type); + /* set object addr and fileno. These are for checking same object */ + info_p = (trav_info_t *) udata; + idx = info_p->nused - 1; + info_p->paths[idx].objno = oinfo->addr; + info_p->paths[idx].fileno = oinfo->fileno; + return(0); } /* end trav_info_visit_obj() */ @@ -656,6 +666,7 @@ trav_table_add(trav_table_t *table, new = table->nobjs++; table->objs[new].objno = oinfo ? oinfo->addr : HADDR_UNDEF; table->objs[new].flags[0] = table->objs[new].flags[1] = 0; + table->objs[new].is_same_trgobj = 0; table->objs[new].name = (char *)HDstrdup(path); table->objs[new].type = oinfo ? (h5trav_type_t)oinfo->type : H5TRAV_TYPE_LINK; table->objs[new].nlinks = 0; @@ -739,6 +750,7 @@ void trav_table_addflags(unsigned *flags, table->objs[new].objno = 0; table->objs[new].flags[0] = flags[0]; table->objs[new].flags[1] = flags[1]; + table->objs[new].is_same_trgobj = 0; table->objs[new].name = (char *)HDstrdup(name); table->objs[new].type = type; table->objs[new].nlinks = 0; |