diff options
author | Robb Matzke <matzke@llnl.gov> | 1998-05-13 17:58:24 (GMT) |
---|---|---|
committer | Robb Matzke <matzke@llnl.gov> | 1998-05-13 17:58:24 (GMT) |
commit | 34f5a59b9eb995997536575eeb796f745a2be784 (patch) | |
tree | c70515f61d6167c265f43c7d13c7c75d1e3608cb /src/H5P.c | |
parent | bb86785ce5b597cdc007f8494c6649b01e386455 (diff) | |
download | hdf5-34f5a59b9eb995997536575eeb796f745a2be784.zip hdf5-34f5a59b9eb995997536575eeb796f745a2be784.tar.gz hdf5-34f5a59b9eb995997536575eeb796f745a2be784.tar.bz2 |
[svn-r398] Changes since 19980501
----------------------
./src/H5Bprivate.h
./src/H5F.c
./src/H5Ffamily.c
./src/H5Fprivate.h
./src/H5Gpkg.h
./src/H5MF.c
./src/H5P.c
./src/H5Ppublic.h
./test/big.c
./html/Big.html
./html/Files.html
Family members can now be any size >1kB. Got rid of some
places where we were reading a property list after it was
closed.
./MANIFEST
./src/Makefile.in
./src/h5repart.c
A program to repartition file families. The source and/or
destination may be files or file families. Examples:
testhdf5 -c -o stab
h5repart -m 1m tstab2.h5 x%05d.h5
h5repart -m 100k x%05d.h5 y%05d.h5
h5repart y%05d.h5 z.h5
diff tstab2.h5 z.h5
./src/h5ls.c
Added a usage message, replaced assertions with error
messages.
./config/linux
Made a warning message more obvious. Added better
optimization flags for Pentium-Pro's.
Diffstat (limited to 'src/H5P.c')
-rw-r--r-- | src/H5P.c | 48 |
1 files changed, 40 insertions, 8 deletions
@@ -1574,10 +1574,10 @@ H5Pget_split (hid_t tid, size_t meta_ext_size, char *meta_ext/*out*/, * Function: H5Pset_family * * Purpose: Sets the low-level driver to stripe the hdf5 address space - * across a family of files. The OFFSET_BITS argument indicates - * how many of the low-order bits of an address will be used for - * the offset within the file, and is only meaningful when - * creating new files. + * across a family of files. The MEMB_SIZE argument indicates + * the size in bytes of each family member and is only + * meaningful when creating new files or opening families that + * have only one member. * * Return: Success: SUCCEED * @@ -1591,7 +1591,7 @@ H5Pget_split (hid_t tid, size_t meta_ext_size, char *meta_ext/*out*/, *------------------------------------------------------------------------- */ herr_t -H5Pset_family (hid_t tid, size_t offset_bits, hid_t memb_tid) +H5Pset_family (hid_t tid, hsize_t memb_size, hid_t memb_tid) { H5F_access_t *tmpl = NULL; @@ -1605,6 +1605,10 @@ H5Pset_family (hid_t tid, size_t offset_bits, hid_t memb_tid) HRETURN_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file access template"); } + if (memb_size && memb_size<1024) { + HRETURN_ERROR (H5E_ARGS, H5E_BADRANGE, FAIL, + "family member size is too small"); + } if (H5P_DEFAULT!=memb_tid && (H5P_FILE_ACCESS != H5Pget_class(memb_tid) || NULL == (tmpl = H5I_object(memb_tid)))) { @@ -1614,7 +1618,8 @@ H5Pset_family (hid_t tid, size_t offset_bits, hid_t memb_tid) /* Set driver */ tmpl->driver = H5F_LOW_FAMILY; - tmpl->u.fam.offset_bits = offset_bits; + H5F_addr_reset (&(tmpl->u.fam.memb_size)); + H5F_addr_inc (&(tmpl->u.fam.memb_size), memb_size); tmpl->u.fam.memb_access = H5P_copy (H5P_FILE_ACCESS, memb_tmpl); FUNC_LEAVE (SUCCEED); @@ -1644,7 +1649,7 @@ H5Pset_family (hid_t tid, size_t offset_bits, hid_t memb_tid) *------------------------------------------------------------------------- */ herr_t -H5Pget_family (hid_t tid, size_t *offset_bits/*out*/, hid_t *memb_tid/*out*/) +H5Pget_family (hid_t tid, hsize_t *memb_size/*out*/, hid_t *memb_tid/*out*/) { H5F_access_t *tmpl = NULL; @@ -1662,13 +1667,15 @@ H5Pget_family (hid_t tid, size_t *offset_bits/*out*/, hid_t *memb_tid/*out*/) } /* Output args */ + if (memb_size) { + *memb_size = tmpl->u.fam.memb_size.offset; + } if (memb_tid) { assert (tmpl->u.fam.memb_access); *memb_tid = H5P_create (H5P_FILE_ACCESS, H5P_copy (H5P_FILE_ACCESS, tmpl->u.fam.memb_access)); } - if (offset_bits) *offset_bits = tmpl->u.fam.offset_bits; FUNC_LEAVE (SUCCEED); } @@ -2356,6 +2363,8 @@ H5P_copy (H5P_class_t type, const void *src) int i; const H5D_create_t *dc_src = NULL; H5D_create_t *dc_dst = NULL; + const H5F_access_t *fa_src = NULL; + H5F_access_t *fa_dst = NULL; FUNC_ENTER (H5P_copy, NULL); @@ -2392,6 +2401,29 @@ H5P_copy (H5P_class_t type, const void *src) break; case H5P_FILE_ACCESS: + fa_src = (const H5F_access_t*)src; + fa_dst = (H5F_access_t*)dst; + switch (fa_src->driver) { + case H5F_LOW_ERROR: + case H5F_LOW_SEC2: + case H5F_LOW_STDIO: + case H5F_LOW_CORE: + case H5F_LOW_MPIO: + /* Nothing to do */ + break; + + case H5F_LOW_FAMILY: + fa_dst->u.fam.memb_access = H5P_copy (H5P_FILE_ACCESS, + fa_src->u.fam.memb_access); + break; + + case H5F_LOW_SPLIT: + fa_dst->u.split.meta_access=H5P_copy (H5P_FILE_ACCESS, + fa_src->u.split.meta_access); + fa_dst->u.split.raw_access = H5P_copy (H5P_FILE_ACCESS, + fa_src->u.split.raw_access); + break; + } break; case H5P_DATASET_CREATE: |