diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 1998-02-25 18:48:33 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 1998-02-25 18:48:33 (GMT) |
commit | faa3f5739e0b52d84d119791b6859fe610b76d37 (patch) | |
tree | 6c1849a3516a7bf19a4f33af1868bb55e536c3d3 /src | |
parent | 1f96b24ba70e33d1c87dd5773d3ef18d1f46a3c5 (diff) | |
download | hdf5-faa3f5739e0b52d84d119791b6859fe610b76d37.zip hdf5-faa3f5739e0b52d84d119791b6859fe610b76d37.tar.gz hdf5-faa3f5739e0b52d84d119791b6859fe610b76d37.tar.bz2 |
[svn-r296] Switched prefix for dataspaces from H5P to H5S
Diffstat (limited to 'src')
-rw-r--r-- | src/H5D.c | 86 | ||||
-rw-r--r-- | src/H5Dprivate.h | 8 | ||||
-rw-r--r-- | src/H5M.c | 6 | ||||
-rw-r--r-- | src/H5Oprivate.h | 4 | ||||
-rw-r--r-- | src/H5Osdspace.c | 22 | ||||
-rw-r--r-- | src/H5S.c (renamed from src/H5P.c) | 314 | ||||
-rw-r--r-- | src/H5Sprivate.h (renamed from src/H5Pprivate.h) | 110 | ||||
-rw-r--r-- | src/H5Spublic.h (renamed from src/H5Ppublic.h) | 42 | ||||
-rw-r--r-- | src/H5Ssimp.c (renamed from src/H5Psimp.c) | 90 | ||||
-rw-r--r-- | src/H5T.c | 2 | ||||
-rw-r--r-- | src/Makefile.in | 6 | ||||
-rw-r--r-- | src/hdf5.h | 2 |
12 files changed, 346 insertions, 346 deletions
@@ -37,7 +37,7 @@ static char RcsId[] = "@(#)$Revision$"; struct H5D_t { H5G_entry_t ent; /*cached object header stuff */ H5T_t *type; /*datatype of this dataset */ - H5P_t *space; /*dataspace of this dataset */ + H5S_t *space; /*dataspace of this dataset */ H5D_create_t create_parms; /*creation parameters */ H5O_layout_t layout; /*data layout */ }; @@ -163,7 +163,7 @@ H5Dcreate(hid_t file_id, const char *name, hid_t type_id, hid_t space_id, { H5F_t *f = NULL; H5T_t *type = NULL; - H5P_t *space = NULL; + H5S_t *space = NULL; H5D_t *new_dset = NULL; hid_t ret_value = FAIL; const H5D_create_t *create_parms = NULL; @@ -317,7 +317,7 @@ H5Dclose(hid_t dataset_id) * * Return: Success: ID for a copy of the data space. The data * space should be released by calling - * H5Pclose(). + * H5Sclose(). * * Failure: FAIL * @@ -332,7 +332,7 @@ hid_t H5Dget_space (hid_t dataset_id) { H5D_t *dataset = NULL; - H5P_t *copied_space = NULL; + H5S_t *copied_space = NULL; hid_t ret_value = FAIL; FUNC_ENTER (H5Dget_space, FAIL); @@ -344,7 +344,7 @@ H5Dget_space (hid_t dataset_id) } /* Copy the data space */ - if (NULL==(copied_space=H5P_copy (dataset->space))) { + if (NULL==(copied_space=H5S_copy (dataset->space))) { HRETURN_ERROR (H5E_DATASET, H5E_CANTINIT, FAIL, "unable to copy the data space"); } @@ -468,10 +468,10 @@ H5Dget_create_parms (hid_t dataset_id) * Additional miscellaneous data transfer properties can be * passed to this function with the XFER_PARMS_ID argument. * - * The FILE_SPACE_ID can be the constant H5P_ALL which indicates + * The FILE_SPACE_ID can be the constant H5S_ALL which indicates * that the entire file data space is to be referenced. * - * The MEM_SPACE_ID can be the constant H5P_ALL in which case + * The MEM_SPACE_ID can be the constant H5S_ALL in which case * the memory data space is the same as the file data space * defined when the dataset was created. * @@ -506,8 +506,8 @@ H5Dread(hid_t dataset_id, hid_t mem_type_id, hid_t mem_space_id, { H5D_t *dataset = NULL; const H5T_t *mem_type = NULL; - const H5P_t *mem_space = NULL; - const H5P_t *file_space = NULL; + const H5S_t *mem_space = NULL; + const H5S_t *file_space = NULL; const H5D_xfer_t *xfer_parms = NULL; FUNC_ENTER(H5Dread, FAIL); @@ -522,13 +522,13 @@ H5Dread(hid_t dataset_id, hid_t mem_type_id, hid_t mem_space_id, NULL == (mem_type = H5A_object(mem_type_id))) { HRETURN_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a data type"); } - if (H5P_ALL != mem_space_id) { + if (H5S_ALL != mem_space_id) { if (H5_DATASPACE != H5A_group(mem_space_id) || NULL == (mem_space = H5A_object(mem_space_id))) { HRETURN_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a data space"); } } - if (H5P_ALL != file_space_id) { + if (H5S_ALL != file_space_id) { if (H5_DATASPACE != H5A_group(file_space_id) || NULL == (file_space = H5A_object(file_space_id))) { HRETURN_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a data space"); @@ -563,10 +563,10 @@ H5Dread(hid_t dataset_id, hid_t mem_type_id, hid_t mem_space_id, * properties can be passed to this function with the * XFER_PARMS_ID argument. * - * The FILE_SPACE_ID can be the constant H5P_ALL which indicates + * The FILE_SPACE_ID can be the constant H5S_ALL which indicates * that the entire file data space is to be referenced. * - * The MEM_SPACE_ID can be the constant H5P_ALL in which case + * The MEM_SPACE_ID can be the constant H5S_ALL in which case * the memory data space is the same as the file data space * defined when the dataset was created. * @@ -595,8 +595,8 @@ H5Dwrite(hid_t dataset_id, hid_t mem_type_id, hid_t mem_space_id, { H5D_t *dataset = NULL; const H5T_t *mem_type = NULL; - const H5P_t *mem_space = NULL; - const H5P_t *file_space = NULL; + const H5S_t *mem_space = NULL; + const H5S_t *file_space = NULL; const H5D_xfer_t *xfer_parms = NULL; FUNC_ENTER(H5Dwrite, FAIL); @@ -611,13 +611,13 @@ H5Dwrite(hid_t dataset_id, hid_t mem_type_id, hid_t mem_space_id, NULL == (mem_type = H5A_object(mem_type_id))) { HRETURN_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a data type"); } - if (H5P_ALL != mem_space_id) { + if (H5S_ALL != mem_space_id) { if (H5_DATASPACE != H5A_group(mem_space_id) || NULL == (mem_space = H5A_object(mem_space_id))) { HRETURN_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a data space"); } } - if (H5P_ALL != file_space_id) { + if (H5S_ALL != file_space_id) { if (H5_DATASPACE != H5A_group(file_space_id) || NULL == (file_space = H5A_object(file_space_id))) { HRETURN_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a data space"); @@ -737,7 +737,7 @@ H5D_find_name(hid_t file_id, group_t UNUSED, const char *name) *------------------------------------------------------------------------- */ H5D_t * -H5D_create(H5F_t *f, const char *name, const H5T_t *type, const H5P_t *space, +H5D_create(H5F_t *f, const char *name, const H5T_t *type, const H5S_t *space, const H5D_create_t *create_parms) { H5D_t *new_dset = NULL; @@ -757,7 +757,7 @@ H5D_create(H5F_t *f, const char *name, const H5T_t *type, const H5P_t *space, new_dset = H5MM_xcalloc(1, sizeof(H5D_t)); H5F_addr_undef(&(new_dset->ent.header)); new_dset->type = H5T_copy(type); - new_dset->space = H5P_copy(space); + new_dset->space = H5S_copy(space); new_dset->create_parms = *create_parms; /* @@ -769,27 +769,27 @@ H5D_create(H5F_t *f, const char *name, const H5T_t *type, const H5P_t *space, } /* Update the type and space header messages */ if (H5O_modify(&(new_dset->ent), H5O_DTYPE, 0, 0, new_dset->type) < 0 || - H5P_modify(&(new_dset->ent), new_dset->space) < 0) { + H5S_modify(&(new_dset->ent), new_dset->space) < 0) { HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, NULL, "can't update type or space header messages"); } /* Total raw data size */ new_dset->layout.type = new_dset->create_parms.layout; - new_dset->layout.ndims = H5P_get_ndims(space) + 1; + new_dset->layout.ndims = H5S_get_ndims(space) + 1; assert(new_dset->layout.ndims <= NELMTS(new_dset->layout.dim)); new_dset->layout.dim[new_dset->layout.ndims - 1] = H5T_get_size(type); switch (new_dset->create_parms.layout) { case H5D_CONTIGUOUS: - if (H5P_get_dims(space, new_dset->layout.dim) < 0) { + if (H5S_get_dims(space, new_dset->layout.dim) < 0) { HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, NULL, "unable to initialize contiguous storage"); } break; case H5D_CHUNKED: - if (new_dset->create_parms.chunk_ndims != H5P_get_ndims(space)) { + if (new_dset->create_parms.chunk_ndims != H5S_get_ndims(space)) { HGOTO_ERROR(H5E_DATASET, H5E_BADVALUE, NULL, "dimensionality of chunks doesn't match the data space"); } @@ -825,7 +825,7 @@ H5D_create(H5F_t *f, const char *name, const H5T_t *type, const H5P_t *space, if (new_dset->type) H5T_close(new_dset->type); if (new_dset->space) - H5P_close(new_dset->space); + H5S_close(new_dset->space); if (H5F_addr_defined(&(new_dset->ent.header))) { H5O_close(&(new_dset->ent)); } @@ -880,7 +880,7 @@ H5D_open(H5F_t *f, const char *name) } /* Get the type and space */ if (NULL==(dataset->type=H5O_read(&(dataset->ent), H5O_DTYPE, 0, NULL)) || - NULL==(dataset->space=H5P_read(f, &(dataset->ent)))) { + NULL==(dataset->space=H5S_read(f, &(dataset->ent)))) { HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, NULL, "unable to load type or space info from dataset header"); } @@ -928,7 +928,7 @@ H5D_open(H5F_t *f, const char *name) if (dataset->type) H5T_close(dataset->type); if (dataset->space) - H5P_close(dataset->space); + H5S_close(dataset->space); dataset->ent.file = NULL; H5MM_xfree(dataset); } @@ -972,7 +972,7 @@ H5D_close(H5D_t *dataset) * these fails, so we just continue. */ free_failed = (H5T_close(dataset->type) < 0 || - H5P_close(dataset->space) < 0); + H5S_close(dataset->space) < 0); /* Close the dataset object */ H5O_close(&(dataset->ent)); @@ -1012,8 +1012,8 @@ H5D_close(H5D_t *dataset) *------------------------------------------------------------------------- */ herr_t -H5D_read(H5D_t *dataset, const H5T_t *mem_type, const H5P_t *mem_space, - const H5P_t *file_space, const H5D_xfer_t *xfer_parms, +H5D_read(H5D_t *dataset, const H5T_t *mem_type, const H5S_t *mem_space, + const H5S_t *file_space, const H5D_xfer_t *xfer_parms, void *buf/*out*/) { size_t nelmts ; /*number of elements */ @@ -1021,8 +1021,8 @@ H5D_read(H5D_t *dataset, const H5T_t *mem_type, const H5P_t *mem_space, uint8 *bkg_buf = NULL; /*background buffer */ H5T_conv_t tconv_func = NULL; /*conversion function */ hid_t src_id = -1, dst_id = -1;/*temporary type atoms */ - const H5P_conv_t *sconv_func = NULL; /*space conversion funcs*/ - H5P_number_t numbering; /*element numbering info*/ + const H5S_conv_t *sconv_func = NULL; /*space conversion funcs*/ + H5S_number_t numbering; /*element numbering info*/ H5T_cdata_t *cdata = NULL; /*type conversion data */ herr_t ret_value = FAIL; @@ -1054,7 +1054,7 @@ H5D_read(H5D_t *dataset, const H5T_t *mem_type, const H5P_t *mem_space, HGOTO_ERROR(H5E_DATASET, H5E_UNSUPPORTED, FAIL, "unable to convert between src and dest data types"); } - if (NULL==(sconv_func=H5P_find (mem_space, file_space))) { + if (NULL==(sconv_func=H5S_find (mem_space, file_space))) { HGOTO_ERROR (H5E_DATASET, H5E_UNSUPPORTED, FAIL, "unable to convert from file to memory data space"); } @@ -1066,7 +1066,7 @@ H5D_read(H5D_t *dataset, const H5T_t *mem_type, const H5P_t *mem_space, } else { HDmemset (&numbering, 0, sizeof numbering); } - if (H5P_get_npoints (mem_space)!=H5P_get_npoints (file_space)) { + if (H5S_get_npoints (mem_space)!=H5S_get_npoints (file_space)) { HGOTO_ERROR (H5E_ARGS, H5E_BADVALUE, FAIL, "src and dest data spaces have different sizes"); } @@ -1074,7 +1074,7 @@ H5D_read(H5D_t *dataset, const H5T_t *mem_type, const H5P_t *mem_space, /* * Compute the size of the request and allocate scratch buffers. */ - nelmts = H5P_get_npoints(mem_space); + nelmts = H5S_get_npoints(mem_space); #ifndef LATER /* * Note: this prototype version allocates a buffer large enough to @@ -1155,8 +1155,8 @@ H5D_read(H5D_t *dataset, const H5T_t *mem_type, const H5P_t *mem_space, *------------------------------------------------------------------------- */ herr_t -H5D_write(H5D_t *dataset, const H5T_t *mem_type, const H5P_t *mem_space, - const H5P_t *file_space, const H5D_xfer_t *xfer_parms, +H5D_write(H5D_t *dataset, const H5T_t *mem_type, const H5S_t *mem_space, + const H5S_t *file_space, const H5D_xfer_t *xfer_parms, const void *buf) { size_t nelmts; @@ -1164,8 +1164,8 @@ H5D_write(H5D_t *dataset, const H5T_t *mem_type, const H5P_t *mem_space, uint8 *bkg_buf = NULL; /*background buffer */ H5T_conv_t tconv_func = NULL; /*conversion function */ hid_t src_id = -1, dst_id = -1;/*temporary type atoms */ - const H5P_conv_t *sconv_func = NULL; /*space conversion funcs*/ - H5P_number_t numbering; /*element numbering info*/ + const H5S_conv_t *sconv_func = NULL; /*space conversion funcs*/ + H5S_number_t numbering; /*element numbering info*/ H5T_cdata_t *cdata = NULL; /*type conversion data */ herr_t ret_value = FAIL; @@ -1197,7 +1197,7 @@ H5D_write(H5D_t *dataset, const H5T_t *mem_type, const H5P_t *mem_space, HGOTO_ERROR(H5E_DATASET, H5E_UNSUPPORTED, FAIL, "unable to convert between src and dest data types"); } - if (NULL==(sconv_func=H5P_find (mem_space, file_space))) { + if (NULL==(sconv_func=H5S_find (mem_space, file_space))) { HGOTO_ERROR (H5E_DATASET, H5E_UNSUPPORTED, FAIL, "unable to convert from memory to file data space"); } @@ -1209,7 +1209,7 @@ H5D_write(H5D_t *dataset, const H5T_t *mem_type, const H5P_t *mem_space, } else { HDmemset (&numbering, 0, sizeof numbering); } - if (H5P_get_npoints (mem_space)!=H5P_get_npoints (file_space)) { + if (H5S_get_npoints (mem_space)!=H5S_get_npoints (file_space)) { HGOTO_ERROR (H5E_ARGS, H5E_BADVALUE, FAIL, "src and dest data spaces have different sizes"); } @@ -1217,7 +1217,7 @@ H5D_write(H5D_t *dataset, const H5T_t *mem_type, const H5P_t *mem_space, /* * Compute the size of the request and allocate scratch buffers. */ - nelmts = H5P_get_npoints(mem_space); + nelmts = H5S_get_npoints(mem_space); #ifndef LATER /* * Note: This prototype version allocates a buffer large enough to @@ -1314,14 +1314,14 @@ H5D_extend (H5D_t *dataset, const size_t *size) } /* Increase the size of the data space */ - if ((changed=H5P_extend (dataset->space, size))<0) { + if ((changed=H5S_extend (dataset->space, size))<0) { HRETURN_ERROR (H5E_DATASET, H5E_CANTINIT, FAIL, "unable to increase size of data space"); } /* Save the new dataspace in the file if necessary */ if (changed>0 && - H5P_modify (&(dataset->ent), dataset->space)<0) { + H5S_modify (&(dataset->ent), dataset->space)<0) { HRETURN_ERROR (H5E_DATASET, H5E_WRITEERROR, FAIL, "unable to update file with new dataspace"); } diff --git a/src/H5Dprivate.h b/src/H5Dprivate.h index 840b462..d4360d4 100644 --- a/src/H5Dprivate.h +++ b/src/H5Dprivate.h @@ -23,7 +23,7 @@ #include <H5Fprivate.h> /*for the H5F_t type */ #include <H5Gprivate.h> /*symbol tables */ #include <H5Tprivate.h> /*for the H5T_t type */ -#include <H5Pprivate.h> /*for the H5P_t type */ +#include <H5Sprivate.h> /*for the H5S_t type */ #include <H5Oprivate.h> /*object Headers */ #define H5D_RESERVED_ATOMS 0 @@ -48,14 +48,14 @@ extern const H5D_xfer_t H5D_xfer_dflt; /* Functions defined in H5D.c */ H5D_t *H5D_create (H5F_t *f, const char *name, const H5T_t *type, - const H5P_t *space, const H5D_create_t *create_parms); + const H5S_t *space, const H5D_create_t *create_parms); H5D_t *H5D_open (H5F_t *f, const char *name); herr_t H5D_close (H5D_t *dataset); herr_t H5D_read (H5D_t *dataset, const H5T_t *mem_type, - const H5P_t *mem_space, const H5P_t *file_space, + const H5S_t *mem_space, const H5S_t *file_space, const H5D_xfer_t *xfer_parms, void *buf/*out*/); herr_t H5D_write (H5D_t *dataset, const H5T_t *mem_type, - const H5P_t *mem_space, const H5P_t *file_space, + const H5S_t *mem_space, const H5S_t *file_space, const H5D_xfer_t *xfer_parms, const void *buf); hid_t H5D_find_name (hid_t file_id, group_t UNUSED, const char *name); herr_t H5D_extend (H5D_t *dataset, const size_t *size); @@ -48,7 +48,7 @@ static char RcsId[] = "@(#)$Revision$"; #include <H5Cprivate.h> /* Template interface */ #include <H5Dprivate.h> /* Dataset interface */ #include <H5Eprivate.h> /*error handling */ -#include <H5Pprivate.h> /* Dataspace functions */ +#include <H5Sprivate.h> /* Dataspace functions */ #include <H5Tprivate.h> /* Datatype interface */ #include <H5Mprivate.h> /* Meta-object interface */ #include <H5Cprivate.h> /* Template interface */ @@ -110,7 +110,7 @@ static meta_func_t meta_func_arr[] = NULL, /* Datatype GetFile */ H5Tclose /* Datatype Release */ }, - { /* Dimensionality object meta-functions (defined in H5P.c) */ + { /* Dimensionality object meta-functions (defined in H5S.c) */ H5_DATASPACE, /* Dimensionality Type ID */ NULL, /* Dimensionality Create */ NULL, /* Dimensionality Access */ @@ -125,7 +125,7 @@ static meta_func_t meta_func_arr[] = NULL, /* Dimensionality Delete */ NULL, /* Dimensionality GetParent */ NULL, /* Dimensionality GetFile */ - H5Pclose /* Dimensionality Release */ + H5Sclose /* Dimensionality Release */ }, { /* Dataset object meta-functions (defined in H5D.c) */ H5_DATASET, /* Dataset Type ID */ diff --git a/src/H5Oprivate.h b/src/H5Oprivate.h index 0cd671a..0d3b2f7 100644 --- a/src/H5Oprivate.h +++ b/src/H5Oprivate.h @@ -24,7 +24,7 @@ #include <H5Fprivate.h> #include <H5Gprivate.h> #include <H5Tprivate.h> -#include <H5Pprivate.h> +#include <H5Sprivate.h> /* * Align messages on 8-byte boundaries because we would like to copy the @@ -116,7 +116,7 @@ extern const H5O_class_t H5O_NULL[1]; #define H5O_SDSPACE_ID 0x0001 extern const H5O_class_t H5O_SDSPACE[1]; -/* operates on an H5P_simple_t struct */ +/* operates on an H5S_simple_t struct */ /* * Data Type Message. diff --git a/src/H5Osdspace.c b/src/H5Osdspace.c index 561eb5a..7957122 100644 --- a/src/H5Osdspace.c +++ b/src/H5Osdspace.c @@ -37,7 +37,7 @@ static herr_t H5O_sdspace_debug(H5F_t *f, const void *_mesg, const H5O_class_t H5O_SDSPACE[1] = {{ H5O_SDSPACE_ID, /* message id number */ "simple_dspace", /* message name for debugging */ - sizeof(H5P_simple_t), /* native message size */ + sizeof(H5S_simple_t), /* native message size */ H5O_sdspace_decode, /* decode message */ H5O_sdspace_encode, /* encode message */ H5O_sdspace_copy, /* copy the native value */ @@ -71,7 +71,7 @@ static hbool_t interface_initialize_g = FALSE; static void * H5O_sdspace_decode(H5F_t *f, size_t raw_size, const uint8 *p) { - H5P_simple_t *sdim = NULL;/* New simple dimensionality structure */ + H5S_simple_t *sdim = NULL;/* New simple dimensionality structure */ uintn u; /* local counting variable */ uintn flags; @@ -83,7 +83,7 @@ H5O_sdspace_decode(H5F_t *f, size_t raw_size, const uint8 *p) assert(p); /* decode */ - if ((sdim = H5MM_xcalloc(1, sizeof(H5P_simple_t))) != NULL) { + if ((sdim = H5MM_xcalloc(1, sizeof(H5S_simple_t))) != NULL) { UINT32DECODE(p, sdim->rank); UINT32DECODE(p, flags); if (sdim->rank > 0) { @@ -133,7 +133,7 @@ H5O_sdspace_decode(H5F_t *f, size_t raw_size, const uint8 *p) static herr_t H5O_sdspace_encode(H5F_t *f, size_t raw_size, uint8 *p, const void *mesg) { - const H5P_simple_t *sdim = (const H5P_simple_t *) mesg; + const H5S_simple_t *sdim = (const H5S_simple_t *) mesg; uintn u; /* Local counting variable */ uintn flags = 0; @@ -185,18 +185,18 @@ H5O_sdspace_encode(H5F_t *f, size_t raw_size, uint8 *p, const void *mesg) static void * H5O_sdspace_copy(const void *mesg, void *dest) { - const H5P_simple_t *src = (const H5P_simple_t *) mesg; - H5P_simple_t *dst = (H5P_simple_t *) dest; + const H5S_simple_t *src = (const H5S_simple_t *) mesg; + H5S_simple_t *dst = (H5S_simple_t *) dest; FUNC_ENTER(H5O_sdspace_copy, NULL); /* check args */ assert(src); if (!dst) - dst = H5MM_xcalloc(1, sizeof(H5P_simple_t)); + dst = H5MM_xcalloc(1, sizeof(H5S_simple_t)); /* deep copy -- pointed-to values are copied also */ - HDmemcpy(dst, src, sizeof(H5P_simple_t)); + HDmemcpy(dst, src, sizeof(H5S_simple_t)); if (src->size) { dst->size = H5MM_xcalloc(src->rank, sizeof(src->size[0])); @@ -233,7 +233,7 @@ H5O_sdspace_copy(const void *mesg, void *dest) static size_t H5O_sdspace_size(H5F_t *f, const void *mesg) { - const H5P_simple_t *sdim = (const H5P_simple_t *) mesg; + const H5S_simple_t *sdim = (const H5S_simple_t *) mesg; size_t ret_value = 8; /* all dimensionality messages are at least 8 bytes long (rank and flags) */ FUNC_ENTER(H5O_sim_dtype_size, FAIL); @@ -267,7 +267,7 @@ static herr_t H5O_sdspace_debug(H5F_t *f, const void *mesg, FILE * stream, intn indent, intn fwidth) { - const H5P_simple_t *sdim = (const H5P_simple_t *) mesg; + const H5S_simple_t *sdim = (const H5S_simple_t *) mesg; uintn u; /* local counting variable */ FUNC_ENTER(H5O_sdspace_debug, FAIL); @@ -293,7 +293,7 @@ H5O_sdspace_debug(H5F_t *f, const void *mesg, FILE * stream, if (sdim->max) { fprintf (stream, "{"); for (u = 0; u < sdim->rank; u++) { - if (H5P_UNLIMITED==sdim->max[u]) { + if (H5S_UNLIMITED==sdim->max[u]) { fprintf (stream, "%sINF", u?", ":""); } else { fprintf (stream, "%s%lu\n", u?", ":"", @@ -21,21 +21,21 @@ static char RcsId[] = "@(#)$Revision$"; #include <H5Eprivate.h> /* Error handling */ #include <H5MMprivate.h> /* Memory Management functions */ #include <H5Oprivate.h> /*object headers */ -#include <H5Pprivate.h> /* Data-space functions */ +#include <H5Sprivate.h> /* Data-space functions */ /* Interface initialization */ -#define PABLO_MASK H5P_mask -#define INTERFACE_INIT H5P_init_interface +#define PABLO_MASK H5S_mask +#define INTERFACE_INIT H5S_init_interface static intn interface_initialize_g = FALSE; -static herr_t H5P_init_interface(void); -static void H5P_term_interface(void); +static herr_t H5S_init_interface(void); +static void H5S_term_interface(void); /*-------------------------------------------------------------------------- NAME - H5P_init_interface -- Initialize interface-specific information + H5S_init_interface -- Initialize interface-specific information USAGE - herr_t H5P_init_interface() + herr_t H5S_init_interface() RETURNS SUCCEED/FAIL @@ -44,16 +44,16 @@ DESCRIPTION --------------------------------------------------------------------------*/ static herr_t -H5P_init_interface(void) +H5S_init_interface(void) { herr_t ret_value = SUCCEED; - FUNC_ENTER(H5P_init_interface, FAIL); + FUNC_ENTER(H5S_init_interface, FAIL); /* Initialize the atom group for the file IDs */ if ((ret_value = H5A_init_group(H5_DATASPACE, H5A_DATASPACEID_HASHSIZE, - H5P_RESERVED_ATOMS, - (herr_t (*)(void *)) H5P_close)) != FAIL) { - ret_value = H5_add_exit(&H5P_term_interface); + H5S_RESERVED_ATOMS, + (herr_t (*)(void *)) H5S_close)) != FAIL) { + ret_value = H5_add_exit(&H5S_term_interface); } FUNC_LEAVE(ret_value); } @@ -61,11 +61,11 @@ H5P_init_interface(void) /*-------------------------------------------------------------------------- NAME - H5P_term_interface + H5S_term_interface PURPOSE - Terminate various H5P objects + Terminate various H5S objects USAGE - void H5P_term_interface() + void H5S_term_interface() RETURNS SUCCEED/FAIL DESCRIPTION @@ -77,13 +77,13 @@ H5P_init_interface(void) REVISION LOG --------------------------------------------------------------------------*/ static void -H5P_term_interface(void) +H5S_term_interface(void) { H5A_destroy_group(H5_DATASPACE); } /*------------------------------------------------------------------------- - * Function: H5Pcreate_simple + * Function: H5Screate_simple * * Purpose: Creates a new simple data space object and opens it for * access. The DIMS argument is the size of the simple dataset @@ -108,13 +108,13 @@ H5P_term_interface(void) *------------------------------------------------------------------------- */ hid_t -H5Pcreate_simple(int rank, const size_t *dims, const size_t *maxdims) +H5Screate_simple(int rank, const size_t *dims, const size_t *maxdims) { - H5P_t *ds = NULL; + H5S_t *ds = NULL; hid_t ret_value = FAIL; int i; - FUNC_ENTER(H5Pcreate, FAIL); + FUNC_ENTER(H5Screate, FAIL); /* Check arguments */ if (rank<0) { @@ -135,12 +135,12 @@ H5Pcreate_simple(int rank, const size_t *dims, const size_t *maxdims) } /* Create a new data space */ - ds = H5MM_xcalloc(1, sizeof(H5P_t)); + ds = H5MM_xcalloc(1, sizeof(H5S_t)); #ifdef LATER /* QAK */ if(rank>0) /* for creating simple dataspace */ { #endif /* LATER */ - ds->type = H5P_SIMPLE; + ds->type = H5S_SIMPLE; ds->hslab_def = FALSE; /* no hyperslab defined currently */ /* Initialize rank and dimensions */ @@ -157,7 +157,7 @@ H5Pcreate_simple(int rank, const size_t *dims, const size_t *maxdims) } /* end if */ else /* rank==0, for scalar data space */ { - ds->type = H5P_SCALAR; + ds->type = H5S_SCALAR; } /* end else */ #endif /* LATER */ @@ -175,7 +175,7 @@ H5Pcreate_simple(int rank, const size_t *dims, const size_t *maxdims) } /*------------------------------------------------------------------------- - * Function: H5Pclose + * Function: H5Sclose * * Purpose: Release access to a data space object. * @@ -193,9 +193,9 @@ H5Pcreate_simple(int rank, const size_t *dims, const size_t *maxdims) *------------------------------------------------------------------------- */ herr_t -H5Pclose(hid_t space_id) +H5Sclose(hid_t space_id) { - FUNC_ENTER(H5Pclose, FAIL); + FUNC_ENTER(H5Sclose, FAIL); /* Check args */ if (H5_DATASPACE != H5A_group(space_id) || @@ -210,7 +210,7 @@ H5Pclose(hid_t space_id) } /*------------------------------------------------------------------------- - * Function: H5P_close + * Function: H5S_close * * Purpose: Releases all memory associated with a data space. * @@ -226,24 +226,24 @@ H5Pclose(hid_t space_id) *------------------------------------------------------------------------- */ herr_t -H5P_close(H5P_t *ds) +H5S_close(H5S_t *ds) { - FUNC_ENTER(H5P_close, FAIL); + FUNC_ENTER(H5S_close, FAIL); assert(ds); switch (ds->type) { - case H5P_SCALAR: + case H5S_SCALAR: /*void */ break; - case H5P_SIMPLE: + case H5S_SIMPLE: H5MM_xfree(ds->u.simple.size); H5MM_xfree(ds->u.simple.max); H5MM_xfree(ds->u.simple.perm); break; - case H5P_COMPLEX: + case H5S_COMPLEX: /* nothing */ break; @@ -262,7 +262,7 @@ H5P_close(H5P_t *ds) } /*------------------------------------------------------------------------- - * Function: H5Pcopy + * Function: H5Scopy * * Purpose: Copies a dataspace. * @@ -278,13 +278,13 @@ H5P_close(H5P_t *ds) *------------------------------------------------------------------------- */ hid_t -H5Pcopy (hid_t space_id) +H5Scopy (hid_t space_id) { - H5P_t *src = NULL; - H5P_t *dst = NULL; + H5S_t *src = NULL; + H5S_t *dst = NULL; hid_t ret_value = FAIL; - FUNC_ENTER (H5Pcopy, FAIL); + FUNC_ENTER (H5Scopy, FAIL); /* Check args */ if (H5_DATASPACE!=H5A_group (space_id) || @@ -293,7 +293,7 @@ H5Pcopy (hid_t space_id) } /* Copy */ - if (NULL==(dst=H5P_copy (src))) { + if (NULL==(dst=H5S_copy (src))) { HRETURN_ERROR (H5E_DATASPACE, H5E_CANTINIT, FAIL, "unable to copy data space"); } @@ -309,7 +309,7 @@ H5Pcopy (hid_t space_id) /*------------------------------------------------------------------------- - * Function: H5P_copy + * Function: H5S_copy * * Purpose: Copies a data space. * @@ -324,23 +324,23 @@ H5Pcopy (hid_t space_id) * *------------------------------------------------------------------------- */ -H5P_t * -H5P_copy(const H5P_t *src) +H5S_t * +H5S_copy(const H5S_t *src) { - H5P_t *dst = NULL; + H5S_t *dst = NULL; int i; - FUNC_ENTER(H5P_copy, NULL); + FUNC_ENTER(H5S_copy, NULL); - dst = H5MM_xmalloc(sizeof(H5P_t)); + dst = H5MM_xmalloc(sizeof(H5S_t)); *dst = *src; switch (dst->type) { - case H5P_SCALAR: + case H5S_SCALAR: /*void */ break; - case H5P_SIMPLE: + case H5S_SIMPLE: if (dst->u.simple.size) { dst->u.simple.size = H5MM_xmalloc(dst->u.simple.rank * sizeof(dst->u.simple.size[0])); @@ -364,7 +364,7 @@ H5P_copy(const H5P_t *src) } break; - case H5P_COMPLEX: + case H5S_COMPLEX: /*void */ break; @@ -377,7 +377,7 @@ H5P_copy(const H5P_t *src) } /*------------------------------------------------------------------------- - * Function: H5Pget_npoints + * Function: H5Sget_npoints * * Purpose: Determines how many data points a data set has. * @@ -393,25 +393,25 @@ H5P_copy(const H5P_t *src) *------------------------------------------------------------------------- */ size_t -H5Pget_npoints(hid_t space_id) +H5Sget_npoints(hid_t space_id) { - H5P_t *ds = NULL; + H5S_t *ds = NULL; size_t ret_value = 0; - FUNC_ENTER(H5Pget_npoints, 0); + FUNC_ENTER(H5Sget_npoints, 0); /* Check args */ if (H5_DATASPACE != H5A_group(space_id) || NULL == (ds = H5A_object(space_id))) { HRETURN_ERROR(H5E_ARGS, H5E_BADTYPE, 0, "not a data space"); } - ret_value = H5P_get_npoints(ds); + ret_value = H5S_get_npoints(ds); FUNC_LEAVE(ret_value); } /*------------------------------------------------------------------------- - * Function: H5P_get_npoints + * Function: H5S_get_npoints * * Purpose: Determines how many data points a data set has. * @@ -427,22 +427,22 @@ H5Pget_npoints(hid_t space_id) *------------------------------------------------------------------------- */ size_t -H5P_get_npoints(const H5P_t *ds) +H5S_get_npoints(const H5S_t *ds) { size_t ret_value = 0; intn i; - FUNC_ENTER(H5P_get_npoints, 0); + FUNC_ENTER(H5S_get_npoints, 0); /* check args */ assert(ds); switch (ds->type) { - case H5P_SCALAR: + case H5S_SCALAR: ret_value = 1; break; - case H5P_SIMPLE: + case H5S_SIMPLE: /* * Count the elements selected by the hypeslab if there is one, * otherwise count all the elements. @@ -458,7 +458,7 @@ H5P_get_npoints(const H5P_t *ds) } break; - case H5P_COMPLEX: + case H5S_COMPLEX: HRETURN_ERROR(H5E_DATASPACE, H5E_UNSUPPORTED, 0, "complex data spaces are not supported yet"); @@ -472,7 +472,7 @@ H5P_get_npoints(const H5P_t *ds) } /*------------------------------------------------------------------------- - * Function: H5Pget_ndims + * Function: H5Sget_ndims * * Purpose: Determines the dimensionality of a data space. * @@ -488,25 +488,25 @@ H5P_get_npoints(const H5P_t *ds) *------------------------------------------------------------------------- */ int -H5Pget_ndims(hid_t space_id) +H5Sget_ndims(hid_t space_id) { - H5P_t *ds = NULL; + H5S_t *ds = NULL; intn ret_value = 0; - FUNC_ENTER(H5Pget_ndims, FAIL); + FUNC_ENTER(H5Sget_ndims, FAIL); /* Check args */ if (H5_DATASPACE != H5A_group(space_id) || NULL == (ds = H5A_object(space_id))) { HRETURN_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a data space"); } - ret_value = H5P_get_ndims(ds); + ret_value = H5S_get_ndims(ds); FUNC_LEAVE(ret_value); } /*------------------------------------------------------------------------- - * Function: H5P_get_ndims + * Function: H5S_get_ndims * * Purpose: Returns the number of dimensions in a data space. * @@ -523,25 +523,25 @@ H5Pget_ndims(hid_t space_id) *------------------------------------------------------------------------- */ intn -H5P_get_ndims(const H5P_t *ds) +H5S_get_ndims(const H5S_t *ds) { intn ret_value = FAIL; - FUNC_ENTER(H5P_get_ndims, FAIL); + FUNC_ENTER(H5S_get_ndims, FAIL); /* check args */ assert(ds); switch (ds->type) { - case H5P_SCALAR: + case H5S_SCALAR: ret_value = 0; break; - case H5P_SIMPLE: + case H5S_SIMPLE: ret_value = ds->u.simple.rank; break; - case H5P_COMPLEX: + case H5S_COMPLEX: HRETURN_ERROR(H5E_DATASPACE, H5E_UNSUPPORTED, FAIL, "complex data spaces are not supported yet"); @@ -555,13 +555,13 @@ H5P_get_ndims(const H5P_t *ds) } /*------------------------------------------------------------------------- - * Function: H5Pget_dims + * Function: H5Sget_dims * * Purpose: Returns the size in each dimension of a data space DS through * the DIMS argument. * * Return: Success: Number of dimensions, the same value as - * returned by H5Pget_ndims(). + * returned by H5Sget_ndims(). * * Failure: FAIL * @@ -573,13 +573,13 @@ H5P_get_ndims(const H5P_t *ds) *------------------------------------------------------------------------- */ int -H5Pget_dims(hid_t space_id, size_t dims[]/*out*/) +H5Sget_dims(hid_t space_id, size_t dims[]/*out*/) { - H5P_t *ds = NULL; + H5S_t *ds = NULL; intn ret_value = 0; - FUNC_ENTER(H5Pget_dims, FAIL); + FUNC_ENTER(H5Sget_dims, FAIL); /* Check args */ if (H5_DATASPACE != H5A_group(space_id) || @@ -589,13 +589,13 @@ H5Pget_dims(hid_t space_id, size_t dims[]/*out*/) if (!dims) { HRETURN_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no output buffer"); } - ret_value = H5P_get_dims(ds, dims); + ret_value = H5S_get_dims(ds, dims); FUNC_LEAVE(ret_value); } /*------------------------------------------------------------------------- - * Function: H5P_get_dims + * Function: H5S_get_dims * * Purpose: Returns the size in each dimension of a data space. This * function may not be meaningful for all types of data spaces. @@ -612,30 +612,30 @@ H5Pget_dims(hid_t space_id, size_t dims[]/*out*/) *------------------------------------------------------------------------- */ intn -H5P_get_dims(const H5P_t *ds, size_t dims[]) +H5S_get_dims(const H5S_t *ds, size_t dims[]) { intn ret_value = FAIL; intn i; - FUNC_ENTER(H5P_get_dims, FAIL); + FUNC_ENTER(H5S_get_dims, FAIL); /* check args */ assert(ds); assert(dims); switch (ds->type) { - case H5P_SCALAR: + case H5S_SCALAR: ret_value = 0; break; - case H5P_SIMPLE: + case H5S_SIMPLE: ret_value = ds->u.simple.rank; for (i = 0; i < ret_value; i++) { dims[i] = ds->u.simple.size[i]; } break; - case H5P_COMPLEX: + case H5S_COMPLEX: HRETURN_ERROR(H5E_DATASPACE, H5E_UNSUPPORTED, FAIL, "complex data spaces are not supported yet"); @@ -649,7 +649,7 @@ H5P_get_dims(const H5P_t *ds, size_t dims[]) } /*------------------------------------------------------------------------- - * Function: H5P_modify + * Function: H5S_modify * * Purpose: Updates a data space by writing a message to an object * header. @@ -666,26 +666,26 @@ H5P_get_dims(const H5P_t *ds, size_t dims[]) *------------------------------------------------------------------------- */ herr_t -H5P_modify(H5G_entry_t *ent, const H5P_t *ds) +H5S_modify(H5G_entry_t *ent, const H5S_t *ds) { - FUNC_ENTER(H5P_modify, FAIL); + FUNC_ENTER(H5S_modify, FAIL); assert(ent); assert(ds); switch (ds->type) { - case H5P_SCALAR: + case H5S_SCALAR: HRETURN_ERROR(H5E_DATASPACE, H5E_UNSUPPORTED, FAIL, "scalar data spaces are not implemented yet"); - case H5P_SIMPLE: + case H5S_SIMPLE: if (H5O_modify(ent, H5O_SDSPACE, 0, 0, &(ds->u.simple)) < 0) { HRETURN_ERROR(H5E_DATASPACE, H5E_CANTINIT, FAIL, "can't update simple data space message"); } break; - case H5P_COMPLEX: + case H5S_COMPLEX: HRETURN_ERROR(H5E_DATASPACE, H5E_UNSUPPORTED, FAIL, "complex data spaces are not implemented yet"); @@ -698,7 +698,7 @@ H5P_modify(H5G_entry_t *ent, const H5P_t *ds) } /*------------------------------------------------------------------------- - * Function: H5P_read + * Function: H5S_read * * Purpose: Reads the data space from an object header. * @@ -713,31 +713,31 @@ H5P_modify(H5G_entry_t *ent, const H5P_t *ds) * *------------------------------------------------------------------------- */ -H5P_t * -H5P_read(H5F_t *f, H5G_entry_t *ent) +H5S_t * +H5S_read(H5F_t *f, H5G_entry_t *ent) { - H5P_t *ds = NULL; + H5S_t *ds = NULL; - FUNC_ENTER(H5P_read, NULL); + FUNC_ENTER(H5S_read, NULL); /* check args */ assert(f); assert(ent); - ds = H5MM_xcalloc(1, sizeof(H5P_t)); + ds = H5MM_xcalloc(1, sizeof(H5S_t)); if (H5O_read(ent, H5O_SDSPACE, 0, &(ds->u.simple))) { - ds->type = H5P_SIMPLE; + ds->type = H5S_SIMPLE; } else { - ds->type = H5P_SCALAR; + ds->type = H5S_SCALAR; } FUNC_LEAVE(ds); } /*------------------------------------------------------------------------- - * Function: H5P_cmp + * Function: H5S_cmp * * Purpose: Compares two data spaces. * @@ -755,11 +755,11 @@ H5P_read(H5F_t *f, H5G_entry_t *ent) *------------------------------------------------------------------------- */ intn -H5P_cmp(const H5P_t *ds1, const H5P_t *ds2) +H5S_cmp(const H5S_t *ds1, const H5S_t *ds2) { intn i; - FUNC_ENTER(H5P_cmp, 0); + FUNC_ENTER(H5S_cmp, 0); /* check args */ assert(ds1); @@ -772,7 +772,7 @@ H5P_cmp(const H5P_t *ds1, const H5P_t *ds2) HRETURN(1); switch (ds1->type) { - case H5P_SIMPLE: + case H5S_SIMPLE: if (ds1->u.simple.rank < ds2->u.simple.rank) HRETURN(-1); if (ds1->u.simple.rank > ds2->u.simple.rank) @@ -829,12 +829,12 @@ H5P_cmp(const H5P_t *ds1, const H5P_t *ds2) /*-------------------------------------------------------------------------- NAME - H5P_is_simple + H5S_is_simple PURPOSE Check if a dataspace is simple (internal) USAGE - hbool_t H5P_is_simple(sdim) - H5P_t *sdim; IN: Pointer to dataspace object to query + hbool_t H5S_is_simple(sdim) + H5S_t *sdim; IN: Pointer to dataspace object to query RETURNS TRUE/FALSE/FAIL DESCRIPTION @@ -842,15 +842,15 @@ H5P_cmp(const H5P_t *ds1, const H5P_t *ds2) has orthogonal, evenly spaced dimensions. --------------------------------------------------------------------------*/ hbool_t -H5P_is_simple(const H5P_t *sdim) +H5S_is_simple(const H5S_t *sdim) { hbool_t ret_value = FAIL; - FUNC_ENTER(H5P_is_simple, FAIL); + FUNC_ENTER(H5S_is_simple, FAIL); /* Check args and all the boring stuff. */ assert(sdim); - ret_value = sdim->type == H5P_SIMPLE ? TRUE : FALSE; /* Currently all dataspaces are simple, but check anyway */ + ret_value = sdim->type == H5S_SIMPLE ? TRUE : FALSE; /* Currently all dataspaces are simple, but check anyway */ FUNC_LEAVE(ret_value); } @@ -858,11 +858,11 @@ H5P_is_simple(const H5P_t *sdim) /*-------------------------------------------------------------------------- NAME - H5Pis_simple + H5Sis_simple PURPOSE Check if a dataspace is simple USAGE - hbool_t H5Pis_simple(sid) + hbool_t H5Sis_simple(sid) hid_t sid; IN: ID of dataspace object to query RETURNS TRUE/FALSE/FAIL @@ -871,18 +871,18 @@ H5P_is_simple(const H5P_t *sdim) has orthogonal, evenly spaced dimensions. --------------------------------------------------------------------------*/ hbool_t -H5Pis_simple(hid_t sid) +H5Sis_simple(hid_t sid) { - H5P_t *space = NULL; /* dataspace to modify */ + H5S_t *space = NULL; /* dataspace to modify */ hbool_t ret_value = FAIL; - FUNC_ENTER(H5Pis_simple, FAIL); + FUNC_ENTER(H5Sis_simple, FAIL); /* Check args and all the boring stuff. */ if ((space = H5A_object(sid)) == NULL) HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "not a data space"); - ret_value = H5P_is_simple(space); + ret_value = H5S_is_simple(space); done: if (ret_value == FAIL) { /* Error condition cleanup */ @@ -895,11 +895,11 @@ H5Pis_simple(hid_t sid) /*-------------------------------------------------------------------------- NAME - H5Pset_space + H5Sset_space PURPOSE Determine the size of a dataspace USAGE - herr_t H5Pset_space(sid, rank, dims) + herr_t H5Sset_space(sid, rank, dims) hid_t sid; IN: Dataspace object to query intn rank; IN: # of dimensions for the dataspace const size_t *dims; IN: Size of each dimension for the dataspace @@ -915,13 +915,13 @@ H5Pis_simple(hid_t sid) be unlimited in size. --------------------------------------------------------------------------*/ herr_t -H5Pset_space(hid_t sid, int rank, const size_t *dims) +H5Sset_space(hid_t sid, int rank, const size_t *dims) { - H5P_t *space = NULL; /* dataspace to modify */ + H5S_t *space = NULL; /* dataspace to modify */ intn u; /* local counting variable */ herr_t ret_value = SUCCEED; - FUNC_ENTER(H5Pset_space, FAIL); + FUNC_ENTER(H5Sset_space, FAIL); /* Check args */ if ((space = H5A_object(sid)) == NULL) @@ -941,12 +941,12 @@ H5Pset_space(hid_t sid, int rank, const size_t *dims) /* shift out of the previous state to a "simple" dataspace */ switch (space->type) { - case H5P_SCALAR: - case H5P_SIMPLE: + case H5S_SCALAR: + case H5S_SIMPLE: /* do nothing */ break; - case H5P_COMPLEX: + case H5S_COMPLEX: /* * eventually this will destroy whatever "complex" dataspace info * is retained, right now it's an error @@ -957,7 +957,7 @@ H5Pset_space(hid_t sid, int rank, const size_t *dims) HRETURN_ERROR(H5E_DATASPACE, H5E_BADVALUE, FAIL, "unknown data space class"); } - space->type = H5P_SIMPLE; + space->type = H5S_SIMPLE; /* Reset hyperslab definition, if one is defined */ if(space->hslab_def==TRUE) { @@ -968,7 +968,7 @@ H5Pset_space(hid_t sid, int rank, const size_t *dims) } if (rank == 0) { /* scalar variable */ - space->type = H5P_SCALAR; + space->type = H5S_SCALAR; space->u.simple.rank = 0; /* set to scalar rank */ if (space->u.simple.size != NULL) space->u.simple.size = H5MM_xfree(space->u.simple.size); @@ -996,11 +996,11 @@ H5Pset_space(hid_t sid, int rank, const size_t *dims) /*-------------------------------------------------------------------------- NAME - H5Pset_hyperslab + H5Sset_hyperslab PURPOSE Select a hyperslab from a simple dataspace USAGE - herr_t H5Pset_hyperslab(sid, start, count, stride) + herr_t H5Sset_hyperslab(sid, start, count, stride) hid_t sid; IN: Dataspace object to select hyperslab from const int *start; IN: Starting location for hyperslab to select const size_t *count; IN: Number of elements in hyperslab @@ -1017,14 +1017,14 @@ H5Pset_space(hid_t sid, int rank, const size_t *dims) datasets which extend in arbitrary directions. --------------------------------------------------------------------------*/ herr_t -H5Pset_hyperslab(hid_t sid, const int *start, const size_t *count, const size_t *stride) +H5Sset_hyperslab(hid_t sid, const int *start, const size_t *count, const size_t *stride) { - H5P_t *space = NULL; /* dataspace to modify */ + H5S_t *space = NULL; /* dataspace to modify */ size_t *tmp_stride=NULL; /* temp. copy of stride */ intn u; /* local counting variable */ herr_t ret_value = SUCCEED; - FUNC_ENTER(H5Pset_hyperslab, FAIL); + FUNC_ENTER(H5Sset_hyperslab, FAIL); /* Get the object */ if (H5_DATASPACE != H5A_group(sid) || (space = H5A_object(sid)) == NULL) @@ -1034,7 +1034,7 @@ H5Pset_hyperslab(hid_t sid, const int *start, const size_t *count, const size_t "invalid hyperslab selected"); /* We can't modify other types of dataspaces currently, so error out */ - if (space->type!=H5P_SIMPLE) + if (space->type!=H5S_SIMPLE) HGOTO_ERROR(H5E_DATASPACE, H5E_BADVALUE, FAIL, "unknown dataspace type"); @@ -1083,7 +1083,7 @@ done: } /*------------------------------------------------------------------------- - * Function: H5Pget_hyperslab + * Function: H5Sget_hyperslab * * Purpose: Retrieves information about the hyperslab from a simple data * space. If no hyperslab has been defined then the hyperslab @@ -1101,13 +1101,13 @@ done: *------------------------------------------------------------------------- */ int -H5Pget_hyperslab (hid_t sid, int offset[]/*out*/, size_t size[]/*out*/, +H5Sget_hyperslab (hid_t sid, int offset[]/*out*/, size_t size[]/*out*/, size_t stride[]/*out*/) { - const H5P_t *ds = NULL; + const H5S_t *ds = NULL; intn ret_value = FAIL; - FUNC_ENTER (H5Pget_hyperslab, FAIL); + FUNC_ENTER (H5Sget_hyperslab, FAIL); /* Check args */ if (H5_DATASPACE!=H5A_group (sid) || NULL==(ds=H5A_object (sid))) { @@ -1115,7 +1115,7 @@ H5Pget_hyperslab (hid_t sid, int offset[]/*out*/, size_t size[]/*out*/, } /* Get hyperslab info */ - if ((ret_value=H5P_get_hyperslab (ds, offset, size, stride))<0) { + if ((ret_value=H5S_get_hyperslab (ds, offset, size, stride))<0) { HRETURN_ERROR (H5E_DATASPACE, H5E_CANTINIT, FAIL, "unable to retrieve hyperslab information"); } @@ -1124,7 +1124,7 @@ H5Pget_hyperslab (hid_t sid, int offset[]/*out*/, size_t size[]/*out*/, } /*------------------------------------------------------------------------- - * Function: H5P_get_hyperslab + * Function: H5S_get_hyperslab * * Purpose: Retrieves information about the hyperslab from a simple data * space. If no hyperslab has been defined then the hyperslab @@ -1142,21 +1142,21 @@ H5Pget_hyperslab (hid_t sid, int offset[]/*out*/, size_t size[]/*out*/, *------------------------------------------------------------------------- */ intn -H5P_get_hyperslab (const H5P_t *ds, int offset[]/*out*/, +H5S_get_hyperslab (const H5S_t *ds, int offset[]/*out*/, size_t size[]/*out*/, size_t stride[]/*out*/) { intn i; intn ret_value = FAIL; - FUNC_ENTER (H5P_get_hyperslab, FAIL); + FUNC_ENTER (H5S_get_hyperslab, FAIL); /* Check args */ assert (ds); switch (ds->type) { - case H5P_SCALAR: + case H5S_SCALAR: break; - case H5P_SIMPLE: + case H5S_SIMPLE: if (ds->hslab_def) { for (i=0; i<ds->u.simple.rank; i++) { if (offset) offset[i] = ds->h.start[i]; @@ -1173,7 +1173,7 @@ H5P_get_hyperslab (const H5P_t *ds, int offset[]/*out*/, ret_value = ds->u.simple.rank; break; - case H5P_COMPLEX: /*fall through*/ + case H5S_COMPLEX: /*fall through*/ default: HRETURN_ERROR (H5E_DATASPACE, H5E_UNSUPPORTED, FAIL, "hyperslabs not supported for this type of space"); @@ -1184,7 +1184,7 @@ H5P_get_hyperslab (const H5P_t *ds, int offset[]/*out*/, /*------------------------------------------------------------------------- - * Function: H5P_find + * Function: H5S_find * * Purpose: Given two data spaces (MEM_SPACE and FILE_SPACE) this * function locates the data space conversion functions and @@ -1203,23 +1203,23 @@ H5P_get_hyperslab (const H5P_t *ds, int offset[]/*out*/, * *------------------------------------------------------------------------- */ -const H5P_conv_t * -H5P_find (const H5P_t *mem_space, const H5P_t *file_space) +const H5S_conv_t * +H5S_find (const H5S_t *mem_space, const H5S_t *file_space) { - static H5P_conv_t _conv; - static const H5P_conv_t *conv = NULL; + static H5S_conv_t _conv; + static const H5S_conv_t *conv = NULL; - FUNC_ENTER (H5P_find, NULL); + FUNC_ENTER (H5S_find, NULL); /* Check args */ - assert (mem_space && H5P_SIMPLE==mem_space->type); - assert (file_space && H5P_SIMPLE==file_space->type); + assert (mem_space && H5S_SIMPLE==mem_space->type); + assert (file_space && H5S_SIMPLE==file_space->type); /* * We can't do conversion if the source and destination select a * different number of data points. */ - if (H5P_get_npoints (mem_space) != H5P_get_npoints (file_space)) { + if (H5S_get_npoints (mem_space) != H5S_get_npoints (file_space)) { HRETURN_ERROR (H5E_DATASPACE, H5E_BADRANGE, NULL, "memory and file data spaces are different sizes"); } @@ -1230,11 +1230,11 @@ H5P_find (const H5P_t *mem_space, const H5P_t *file_space) * for now we only support simple data spaces. */ if (!conv) { - _conv.init = H5P_simp_init; - _conv.fgath = H5P_simp_fgath; - _conv.mscat = H5P_simp_mscat; - _conv.mgath = H5P_simp_mgath; - _conv.fscat = H5P_simp_fscat; + _conv.init = H5S_simp_init; + _conv.fgath = H5S_simp_fgath; + _conv.mscat = H5S_simp_mscat; + _conv.mgath = H5S_simp_mgath; + _conv.fscat = H5S_simp_fscat; conv = &_conv; } @@ -1242,7 +1242,7 @@ H5P_find (const H5P_t *mem_space, const H5P_t *file_space) } /*------------------------------------------------------------------------- - * Function: H5P_extend + * Function: H5S_extend * * Purpose: Extend the dimensions of a data space. * @@ -1258,20 +1258,20 @@ H5P_find (const H5P_t *mem_space, const H5P_t *file_space) *------------------------------------------------------------------------- */ intn -H5P_extend (H5P_t *space, const size_t *size) +H5S_extend (H5S_t *space, const size_t *size) { intn i, ret_value=0; - FUNC_ENTER (H5P_extend, FAIL); + FUNC_ENTER (H5S_extend, FAIL); /* Check args */ - assert (space && H5P_SIMPLE==space->type); + assert (space && H5S_SIMPLE==space->type); assert (size); for (i=0; i<space->u.simple.rank; i++) { if (space->u.simple.size[i]<size[i]) { if (space->u.simple.max && - H5P_UNLIMITED!=space->u.simple.max[i] && + H5S_UNLIMITED!=space->u.simple.max[i] && space->u.simple.max[i]<size[i]) { HRETURN_ERROR (H5E_ARGS, H5E_BADVALUE, FAIL, "dimension cannot be increased"); diff --git a/src/H5Pprivate.h b/src/H5Sprivate.h index 0ac73b3..25e758e 100644 --- a/src/H5Pprivate.h +++ b/src/H5Sprivate.h @@ -11,116 +11,116 @@ ****************************************************************************/ /* - * This file contains private information about the H5P module + * This file contains private information about the H5S module */ -#ifndef _H5Pprivate_H -#define _H5Pprivate_H +#ifndef _H5Sprivate_H +#define _H5Sprivate_H -#include <H5Ppublic.h> +#include <H5Spublic.h> /* Private headers needed by this file */ #include <H5private.h> #include <H5Gprivate.h> /*for H5G_entry_t */ #include <H5Oprivate.h> -#define H5P_RESERVED_ATOMS 2 +#define H5S_RESERVED_ATOMS 2 /* Flags to indicate special dataspace features are active */ -#define H5P_VALID_MAX 0x01 -#define H5P_VALID_PERM 0x02 +#define H5S_VALID_MAX 0x01 +#define H5S_VALID_PERM 0x02 -typedef struct H5P_hyperslab_t { +typedef struct H5S_hyperslab_t { intn *start; /* Location of start of hyperslab */ size_t *count; /* Number of elements in hyperslab */ size_t *stride; /* Packing of values of hyperslab */ -} H5P_hyperslab_t; +} H5S_hyperslab_t; -typedef struct H5P_simple_t { +typedef struct H5S_simple_t { intn rank; /*number of dimensions */ size_t *size; /*dimension sizes */ size_t *max; /*maximum dimension sizes or NULL */ intn *perm; /*dimension permutations or NULL */ -} H5P_simple_t; +} H5S_simple_t; -typedef struct H5P_t { - H5P_class_t type; /*type of dimensionality object */ +typedef struct H5S_t { + H5S_class_t type; /*type of dimensionality object */ union { - H5P_simple_t simple; /*simple dimensionality information */ + H5S_simple_t simple; /*simple dimensionality information */ } u; uintn hslab_def; /* Whether the hyperslab is defined */ - H5P_hyperslab_t h; /* Hyperslab information */ -} H5P_t; + H5S_hyperslab_t h; /* Hyperslab information */ +} H5S_t; /* * This structure contains information about how the elements of a data space * are numbered. */ -typedef struct H5P_number_t { +typedef struct H5S_number_t { int _place_holder; /*remove this field! */ -} H5P_number_t; +} H5S_number_t; /* * Callbacks for data space conversion. */ -typedef struct H5P_tconv_t { +typedef struct H5S_tconv_t { /* Initialize element numbering information */ - size_t (*init)(const struct H5O_layout_t *layout, const H5P_t *mem_space, - const H5P_t *file_space, H5P_number_t *numbering/*out*/); + size_t (*init)(const struct H5O_layout_t *layout, const H5S_t *mem_space, + const H5S_t *file_space, H5S_number_t *numbering/*out*/); /* Gather elements from disk to type conversion buffer */ size_t (*fgath)(H5F_t *f, const struct H5O_layout_t *layout, - size_t elmt_size, const H5P_t *file_space, - const H5P_number_t *numbering, size_t start, size_t nelmts, + size_t elmt_size, const H5S_t *file_space, + const H5S_number_t *numbering, size_t start, size_t nelmts, void *tconv_buf/*out*/); /* Scatter elements from type conversion buffer to application buffer */ herr_t (*mscat)(const void *tconv_buf, size_t elmt_size, - const H5P_t *mem_space, const H5P_number_t *numbering, + const H5S_t *mem_space, const H5S_number_t *numbering, size_t start, size_t nelmts, void *buf/*out*/); /* Gather elements from app buffer to type conversion buffer */ size_t (*mgath)(const void *buf, size_t elmt_size, - const H5P_t *mem_space, const H5P_number_t *numbering, + const H5S_t *mem_space, const H5S_number_t *numbering, size_t start, size_t nelmts, void *tconv_buf/*out*/); /* Scatter elements from type conversion buffer to disk */ herr_t (*fscat)(H5F_t *f, const struct H5O_layout_t *layout, - size_t elmt_size, const H5P_t *file_space, - const H5P_number_t *numbering, size_t start, size_t nelmts, + size_t elmt_size, const H5S_t *file_space, + const H5S_number_t *numbering, size_t start, size_t nelmts, const void *tconv_buf); -} H5P_conv_t; - -H5P_t *H5P_copy (const H5P_t *src); -herr_t H5P_close (H5P_t *ds); -size_t H5P_get_npoints (const H5P_t *ds); -intn H5P_get_ndims (const H5P_t *ds); -intn H5P_get_dims (const H5P_t *ds, size_t dims[]/*out*/); -herr_t H5P_modify (H5G_entry_t *ent, const H5P_t *space); -H5P_t *H5P_read (H5F_t *f, H5G_entry_t *ent); -intn H5P_cmp (const H5P_t *ds1, const H5P_t *ds2); -hbool_t H5P_is_simple (const H5P_t *sdim); -uintn H5P_nelem (const H5P_t *space); -const H5P_conv_t *H5P_find (const H5P_t *mem_space, const H5P_t *file_space); -intn H5P_get_hyperslab (const H5P_t *ds, int offset[]/*out*/, +} H5S_conv_t; + +H5S_t *H5S_copy (const H5S_t *src); +herr_t H5S_close (H5S_t *ds); +size_t H5S_get_npoints (const H5S_t *ds); +intn H5S_get_ndims (const H5S_t *ds); +intn H5S_get_dims (const H5S_t *ds, size_t dims[]/*out*/); +herr_t H5S_modify (H5G_entry_t *ent, const H5S_t *space); +H5S_t *H5S_read (H5F_t *f, H5G_entry_t *ent); +intn H5S_cmp (const H5S_t *ds1, const H5S_t *ds2); +hbool_t H5S_is_simple (const H5S_t *sdim); +uintn H5S_nelem (const H5S_t *space); +const H5S_conv_t *H5S_find (const H5S_t *mem_space, const H5S_t *file_space); +intn H5S_get_hyperslab (const H5S_t *ds, int offset[]/*out*/, size_t size[]/*out*/, size_t stride[]/*out*/); -intn H5P_extend (H5P_t *space, const size_t *size); +intn H5S_extend (H5S_t *space, const size_t *size); /* Conversion functions for simple data spaces */ -size_t H5P_simp_init (const struct H5O_layout_t *layout, - const H5P_t *mem_space, const H5P_t *file_space, - H5P_number_t *numbering/*out*/); -size_t H5P_simp_fgath (H5F_t *f, const struct H5O_layout_t *layout, - size_t elmt_size, const H5P_t *file_space, - const H5P_number_t *numbering, size_t start, +size_t H5S_simp_init (const struct H5O_layout_t *layout, + const H5S_t *mem_space, const H5S_t *file_space, + H5S_number_t *numbering/*out*/); +size_t H5S_simp_fgath (H5F_t *f, const struct H5O_layout_t *layout, + size_t elmt_size, const H5S_t *file_space, + const H5S_number_t *numbering, size_t start, size_t nelmts, void *tconv_buf/*out*/); -herr_t H5P_simp_mscat (const void *tconv_buf, size_t elmt_size, - const H5P_t *mem_space, const H5P_number_t *numbering, +herr_t H5S_simp_mscat (const void *tconv_buf, size_t elmt_size, + const H5S_t *mem_space, const H5S_number_t *numbering, size_t start, size_t nelmts, void *buf/*out*/); -size_t H5P_simp_mgath (const void *buf, size_t elmt_size, - const H5P_t *mem_space, const H5P_number_t *numbering, +size_t H5S_simp_mgath (const void *buf, size_t elmt_size, + const H5S_t *mem_space, const H5S_number_t *numbering, size_t start, size_t nelmts, void *tconv_buf/*out*/); -herr_t H5P_simp_fscat (H5F_t *f, const struct H5O_layout_t *layout, - size_t elmt_size, const H5P_t *file_space, - const H5P_number_t *numbering, size_t start, +herr_t H5S_simp_fscat (H5F_t *f, const struct H5O_layout_t *layout, + size_t elmt_size, const H5S_t *file_space, + const H5S_number_t *numbering, size_t start, size_t nelmts, const void *tconv_buf); #endif diff --git a/src/H5Ppublic.h b/src/H5Spublic.h index 72f3c55..3fe0a31 100644 --- a/src/H5Ppublic.h +++ b/src/H5Spublic.h @@ -11,43 +11,43 @@ ****************************************************************************/ /* - * This file contains public declarations for the H5P module. + * This file contains public declarations for the H5S module. */ #ifndef _H5pproto_H -#define _H5Pproto_H +#define _H5Sproto_H /* Public headers needed by this file */ #include <H5public.h> #include <H5Apublic.h> /* Define atomic datatypes */ -#define H5P_ALL (-2) -#define H5P_UNLIMITED 0 +#define H5S_ALL (-2) +#define H5S_UNLIMITED 0 /* Different types of dataspaces */ -typedef enum H5P_class_t { - H5P_NO_CLASS = -1, /*error */ - H5P_SCALAR = 0, /*scalar variable */ - H5P_SIMPLE = 1, /*simple data space */ - H5P_COMPLEX = 2 /*complex data space */ -} H5P_class_t; +typedef enum H5S_class_t { + H5S_NO_CLASS = -1, /*error */ + H5S_SCALAR = 0, /*scalar variable */ + H5S_SIMPLE = 1, /*simple data space */ + H5S_COMPLEX = 2 /*complex data space */ +} H5S_class_t; #ifdef __cplusplus extern "C" { #endif -/* Functions in H5P.c */ -hid_t H5Pcreate_simple (int rank, const size_t dims[], const size_t maxdims[]); -hid_t H5Pcopy (hid_t space_id); -herr_t H5Pclose (hid_t space_id); -size_t H5Pget_npoints (hid_t space_id); -int H5Pget_ndims (hid_t space_id); -int H5Pget_dims (hid_t space_id, size_t dims[]); -hbool_t H5Pis_simple (hid_t space_id); -herr_t H5Pset_space (hid_t space_id, int rank, const size_t *dims); -herr_t H5Pset_hyperslab(hid_t sid, const int *start, const size_t *count, +/* Functions in H5S.c */ +hid_t H5Screate_simple (int rank, const size_t dims[], const size_t maxdims[]); +hid_t H5Scopy (hid_t space_id); +herr_t H5Sclose (hid_t space_id); +size_t H5Sget_npoints (hid_t space_id); +int H5Sget_ndims (hid_t space_id); +int H5Sget_dims (hid_t space_id, size_t dims[]); +hbool_t H5Sis_simple (hid_t space_id); +herr_t H5Sset_space (hid_t space_id, int rank, const size_t *dims); +herr_t H5Sset_hyperslab(hid_t sid, const int *start, const size_t *count, const size_t *stride); -int H5Pget_hyperslab (hid_t sid, int offset[]/*out*/, +int H5Sget_hyperslab (hid_t sid, int offset[]/*out*/, size_t size[]/*out*/, size_t stride[]/*out*/); #ifdef __cplusplus diff --git a/src/H5Psimp.c b/src/H5Ssimp.c index 7f78236..99900c2 100644 --- a/src/H5Psimp.c +++ b/src/H5Ssimp.c @@ -9,16 +9,16 @@ */ #include <H5private.h> #include <H5Eprivate.h> -#include <H5Pprivate.h> +#include <H5Sprivate.h> #include <H5Vprivate.h> /* Interface initialization */ -#define PABLO_MASK H5P_simp_mask +#define PABLO_MASK H5S_simp_mask #define INTERFACE_INIT NULL static intn interface_initialize_g = FALSE; /*------------------------------------------------------------------------- - * Function: H5P_simp_init + * Function: H5S_simp_init * * Purpose: Generates element numbering information for the data * spaces involved in a data space conversion. @@ -36,30 +36,30 @@ static intn interface_initialize_g = FALSE; *------------------------------------------------------------------------- */ size_t -H5P_simp_init (const struct H5O_layout_t *layout, const H5P_t *mem_space, - const H5P_t *file_space, H5P_number_t *numbering/*out*/) +H5S_simp_init (const struct H5O_layout_t *layout, const H5S_t *mem_space, + const H5S_t *file_space, H5S_number_t *numbering/*out*/) { size_t nelmts; - FUNC_ENTER (H5P_simp_init, 0); + FUNC_ENTER (H5S_simp_init, 0); /* Check args */ assert (layout); - assert (mem_space && H5P_SIMPLE==mem_space->type); - assert (file_space && H5P_SIMPLE==file_space->type); + assert (mem_space && H5S_SIMPLE==mem_space->type); + assert (file_space && H5S_SIMPLE==file_space->type); assert (numbering); /* Numbering is implied by the hyperslab, C order */ - HDmemset (numbering, 0, sizeof(H5P_number_t)); + HDmemset (numbering, 0, sizeof(H5S_number_t)); /* Data can be efficiently copied at any size */ - nelmts = H5P_get_npoints (file_space); + nelmts = H5S_get_npoints (file_space); FUNC_LEAVE (nelmts); } /*------------------------------------------------------------------------- - * Function: H5P_simp_fgath + * Function: H5S_simp_fgath * * Purpose: Gathers data points from file F and accumulates them in the * type conversion buffer BUF. The LAYOUT argument describes @@ -68,7 +68,7 @@ H5P_simp_init (const struct H5O_layout_t *layout, const H5P_t *mem_space, * FILE_SPACE describes the data space of the dataset on disk * and the elements that have been selected for reading (via * hyperslab, etc) and NUMBERING describes how those elements - * are numbered (initialized by the H5P_*_init() call). This + * are numbered (initialized by the H5S_*_init() call). This * function will copy at most NELMTS elements beginning at the * element numbered START. * @@ -84,9 +84,9 @@ H5P_simp_init (const struct H5O_layout_t *layout, const H5P_t *mem_space, *------------------------------------------------------------------------- */ size_t -H5P_simp_fgath (H5F_t *f, const struct H5O_layout_t *layout, - size_t elmt_size, const H5P_t *file_space, - const H5P_number_t *numbering, size_t start, size_t nelmts, +H5S_simp_fgath (H5F_t *f, const struct H5O_layout_t *layout, + size_t elmt_size, const H5S_t *file_space, + const H5S_number_t *numbering, size_t start, size_t nelmts, void *buf/*out*/) { size_t file_offset[H5O_LAYOUT_NDIMS]; /*offset of slab in file*/ @@ -99,7 +99,7 @@ H5P_simp_fgath (H5F_t *f, const struct H5O_layout_t *layout, intn space_ndims; /*dimensionality of space*/ intn i; /*counters */ - FUNC_ENTER (H5P_simp_fgath, 0); + FUNC_ENTER (H5S_simp_fgath, 0); /* Check args */ assert (f); @@ -114,7 +114,7 @@ H5P_simp_fgath (H5F_t *f, const struct H5O_layout_t *layout, * The prototype doesn't support strip mining. */ assert (0==start); - assert (nelmts==H5P_get_npoints (file_space)); + assert (nelmts==H5S_get_npoints (file_space)); /* * Get hyperslab information to determine what elements are being @@ -124,13 +124,13 @@ H5P_simp_fgath (H5F_t *f, const struct H5O_layout_t *layout, * H5F_istore_read(). */ #ifdef LATER - if ((space_ndims=H5P_get_hyperslab (file_space, file_offset, + if ((space_ndims=H5S_get_hyperslab (file_space, file_offset, hsize, sample))<0) { HRETURN_ERROR (H5E_DATASPACE, H5E_CANTINIT, 0, "unable to retrieve hyperslab parameters"); } #else - if ((space_ndims=H5P_get_hyperslab (file_space, file_offset_signed, + if ((space_ndims=H5S_get_hyperslab (file_space, file_offset_signed, hsize, sample))<0) { HRETURN_ERROR (H5E_DATASPACE, H5E_CANTINIT, 0, "unable to retrieve hyperslab parameters"); @@ -162,7 +162,7 @@ H5P_simp_fgath (H5F_t *f, const struct H5O_layout_t *layout, } /*------------------------------------------------------------------------- - * Function: H5P_simp_mscat + * Function: H5S_simp_mscat * * Purpose: Scatters data points from the type conversion buffer * TCONV_BUF to the application buffer BUF. Each element is @@ -183,8 +183,8 @@ H5P_simp_fgath (H5F_t *f, const struct H5O_layout_t *layout, *------------------------------------------------------------------------- */ herr_t -H5P_simp_mscat (const void *tconv_buf, size_t elmt_size, - const H5P_t *mem_space, const H5P_number_t *numbering, +H5S_simp_mscat (const void *tconv_buf, size_t elmt_size, + const H5S_t *mem_space, const H5S_number_t *numbering, size_t start, size_t nelmts, void *buf/*out*/) { size_t mem_offset[H5O_LAYOUT_NDIMS]; /*slab offset in app buf*/ @@ -198,12 +198,12 @@ H5P_simp_mscat (const void *tconv_buf, size_t elmt_size, intn space_ndims; /*dimensionality of space*/ intn i; /*counters */ - FUNC_ENTER (H5P_simp_mscat, FAIL); + FUNC_ENTER (H5S_simp_mscat, FAIL); /* Check args */ assert (tconv_buf); assert (elmt_size>0); - assert (mem_space && H5P_SIMPLE==mem_space->type); + assert (mem_space && H5S_SIMPLE==mem_space->type); assert (numbering); assert (nelmts>0); assert (buf); @@ -212,7 +212,7 @@ H5P_simp_mscat (const void *tconv_buf, size_t elmt_size, * The prototype doesn't support strip mining. */ assert (0==start); - assert (nelmts==H5P_get_npoints (mem_space)); + assert (nelmts==H5S_get_npoints (mem_space)); /* * Retrieve hyperslab information to determine what elements are being @@ -221,13 +221,13 @@ H5P_simp_mscat (const void *tconv_buf, size_t elmt_size, * way to pass sample information to H5V_hyper_copy(). */ #ifdef LATER - if ((space_ndims=H5P_get_hyperslab (mem_space, mem_offset, hsize, + if ((space_ndims=H5S_get_hyperslab (mem_space, mem_offset, hsize, sample))<0) { HRETURN_ERROR (H5E_DATASPACE, H5E_CANTINIT, FAIL, "unable to retrieve hyperslab parameters"); } #else - if ((space_ndims=H5P_get_hyperslab (mem_space, mem_offset_signed, + if ((space_ndims=H5S_get_hyperslab (mem_space, mem_offset_signed, hsize, sample))<0) { HRETURN_ERROR (H5E_DATASPACE, H5E_CANTINIT, FAIL, "unable to retrieve hyperslab parameters"); @@ -243,7 +243,7 @@ H5P_simp_mscat (const void *tconv_buf, size_t elmt_size, "hyperslab sampling is not implemented yet"); } } - if (H5P_get_dims (mem_space, mem_size)<0) { + if (H5S_get_dims (mem_space, mem_size)<0) { HRETURN_ERROR (H5E_DATASPACE, H5E_CANTINIT, FAIL, "unable to retrieve data space dimensions"); } @@ -265,7 +265,7 @@ H5P_simp_mscat (const void *tconv_buf, size_t elmt_size, } /*------------------------------------------------------------------------- - * Function: H5P_simp_mgath + * Function: H5S_simp_mgath * * Purpose: Gathers dataset elements from application memory BUF and * copies them into the data type conversion buffer TCONV_BUF. @@ -288,8 +288,8 @@ H5P_simp_mscat (const void *tconv_buf, size_t elmt_size, *------------------------------------------------------------------------- */ size_t -H5P_simp_mgath (const void *buf, size_t elmt_size, - const H5P_t *mem_space, const H5P_number_t *numbering, +H5S_simp_mgath (const void *buf, size_t elmt_size, + const H5S_t *mem_space, const H5S_number_t *numbering, size_t start, size_t nelmts, void *tconv_buf/*out*/) { size_t mem_offset[H5O_LAYOUT_NDIMS]; /*slab offset in app buf*/ @@ -303,12 +303,12 @@ H5P_simp_mgath (const void *buf, size_t elmt_size, intn space_ndims; /*dimensionality of space*/ intn i; /*counters */ - FUNC_ENTER (H5P_simp_mgath, 0); + FUNC_ENTER (H5S_simp_mgath, 0); /* Check args */ assert (buf); assert (elmt_size>0); - assert (mem_space && H5P_SIMPLE==mem_space->type); + assert (mem_space && H5S_SIMPLE==mem_space->type); assert (numbering); assert (nelmts>0); assert (tconv_buf); @@ -317,7 +317,7 @@ H5P_simp_mgath (const void *buf, size_t elmt_size, * The prototype doesn't support strip mining. */ assert (0==start); - assert (nelmts==H5P_get_npoints (mem_space)); + assert (nelmts==H5S_get_npoints (mem_space)); /* * Retrieve hyperslab information to determine what elements are being @@ -326,13 +326,13 @@ H5P_simp_mgath (const void *buf, size_t elmt_size, * way to pass sample information to H5V_hyper_copy(). */ #ifdef LATER - if ((space_ndims=H5P_get_hyperslab (mem_space, mem_offset, hsize, + if ((space_ndims=H5S_get_hyperslab (mem_space, mem_offset, hsize, sample))<0) { HRETURN_ERROR (H5E_DATASPACE, H5E_CANTINIT, 0, "unable to retrieve hyperslab parameters"); } #else - if ((space_ndims=H5P_get_hyperslab (mem_space, mem_offset_signed, + if ((space_ndims=H5S_get_hyperslab (mem_space, mem_offset_signed, hsize, sample))<0) { HRETURN_ERROR (H5E_DATASPACE, H5E_CANTINIT, FAIL, "unable to retrieve hyperslab parameters"); @@ -348,7 +348,7 @@ H5P_simp_mgath (const void *buf, size_t elmt_size, "hyperslab sampling is not implemented yet"); } } - if (H5P_get_dims (mem_space, mem_size)<0) { + if (H5S_get_dims (mem_space, mem_size)<0) { HRETURN_ERROR (H5E_DATASPACE, H5E_CANTINIT, 0, "unable to retrieve data space dimensions"); } @@ -370,7 +370,7 @@ H5P_simp_mgath (const void *buf, size_t elmt_size, } /*------------------------------------------------------------------------- - * Function: H5P_simp_fscat + * Function: H5S_simp_fscat * * Purpose: Scatters dataset elements from the type conversion buffer BUF * to the file F where the data points are arranged according to @@ -392,9 +392,9 @@ H5P_simp_mgath (const void *buf, size_t elmt_size, *------------------------------------------------------------------------- */ herr_t -H5P_simp_fscat (H5F_t *f, const struct H5O_layout_t *layout, - size_t elmt_size, const H5P_t *file_space, - const H5P_number_t *numbering, size_t start, size_t nelmts, +H5S_simp_fscat (H5F_t *f, const struct H5O_layout_t *layout, + size_t elmt_size, const H5S_t *file_space, + const H5S_number_t *numbering, size_t start, size_t nelmts, const void *buf) { size_t file_offset[H5O_LAYOUT_NDIMS]; /*offset of hyperslab */ @@ -407,7 +407,7 @@ H5P_simp_fscat (H5F_t *f, const struct H5O_layout_t *layout, intn space_ndims; /*space dimensionality */ intn i; /*counters */ - FUNC_ENTER (H5P_simp_fscat, FAIL); + FUNC_ENTER (H5S_simp_fscat, FAIL); /* Check args */ assert (f); @@ -422,7 +422,7 @@ H5P_simp_fscat (H5F_t *f, const struct H5O_layout_t *layout, * The prototype doesn't support strip mining. */ assert (0==start); - assert (nelmts==H5P_get_npoints (file_space)); + assert (nelmts==H5S_get_npoints (file_space)); /* * Get hyperslab information to determine what elements are being @@ -432,13 +432,13 @@ H5P_simp_fscat (H5F_t *f, const struct H5O_layout_t *layout, * H5F_istore_read(). */ #ifdef LATER - if ((space_ndims=H5P_get_hyperslab (file_space, file_offset, hsize, + if ((space_ndims=H5S_get_hyperslab (file_space, file_offset, hsize, sample))<0) { HRETURN_ERROR (H5E_DATASPACE, H5E_CANTINIT, FAIL, "unable to retrieve hyperslab parameters"); } #else - if ((space_ndims=H5P_get_hyperslab (file_space, file_offset_signed, + if ((space_ndims=H5S_get_hyperslab (file_space, file_offset_signed, hsize, sample))<0) { HRETURN_ERROR (H5E_DATASPACE, H5E_CANTINIT, FAIL, "unable to retrieve hyperslab parameters"); @@ -22,7 +22,7 @@ static char RcsId[] = "@(#)$Revision$"; #include <H5Eprivate.h> /*error handling */ #include <H5Mprivate.h> /*meta data */ #include <H5MMprivate.h> /*memory management */ -#include <H5Pprivate.h> /*data space */ +#include <H5Sprivate.h> /*data space */ #include <H5Tpkg.h> /*data-type functions */ #define PABLO_MASK H5T_mask diff --git a/src/Makefile.in b/src/Makefile.in index 6780aa1..d84fcb1 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -20,7 +20,7 @@ LIB_SRC=H5.c H5A.c H5AC.c H5B.c H5C.c H5D.c H5E.c H5F.c H5Farray.c H5Fcore.c \ H5Ffamily.c H5Fistore.c H5Flow.c H5Fsec2.c H5Fsplit.c H5Fstdio.c \ H5G.c H5Gent.c H5Gnode.c H5Gstab.c H5H.c H5M.c H5MF.c H5MM.c H5O.c \ H5Ocont.c H5Odtype.c H5Oefl.c H5Olayout.c H5Oname.c H5Onull.c \ - H5Osdspace.c H5Ostab.c H5P.c H5Psimp.c H5T.c H5Tconv.c H5Tinit.c \ + H5Osdspace.c H5Ostab.c H5S.c H5Ssimp.c H5T.c H5Tconv.c H5Tinit.c \ H5V.c @PARALLEL_SRC@ LIB_OBJ=$(LIB_SRC:.c=.o) @@ -35,14 +35,14 @@ PROG_OBJ=$(PROG_SRC:.c=.o) # Public header files (to be installed)... PUB_HDR=H5public.h H5Apublic.h H5ACpublic.h H5Bpublic.h H5Cpublic.h \ H5Dpublic.h H5Epublic.h H5Fpublic.h H5Gpublic.h H5Hpublic.h \ - H5Mpublic.h H5MFpublic.h H5MMpublic.h H5Opublic.h H5Ppublic.h \ + H5Mpublic.h H5MFpublic.h H5MMpublic.h H5Opublic.h H5Spublic.h \ H5Tpublic.h H5config.h hdf5.h # Other header files (not to be installed)... PRIVATE_HDR=H5private.h H5Aprivate.h H5ACprivate.h H5Bprivate.h \ H5Cprivate.h H5Dprivate.h H5Eprivate.h H5Fprivate.h H5Gprivate.h \ H5Gpkg.h H5Hprivate.h H5Mprivate.h H5MFprivate.h H5MMprivate.h \ - H5Oprivate.h H5Pprivate.h H5Tprivate.h H5Tpkg.h H5Vprivate.h + H5Oprivate.h H5Sprivate.h H5Tprivate.h H5Tpkg.h H5Vprivate.h # Number format detection H5Tinit.c: H5detect @@ -32,6 +32,6 @@ #include <H5MFpublic.h> #include <H5MMpublic.h> #include <H5Opublic.h> -#include <H5Ppublic.h> +#include <H5Spublic.h> #include <H5Tpublic.h> #endif |