summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>1998-02-25 18:48:33 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>1998-02-25 18:48:33 (GMT)
commitfaa3f5739e0b52d84d119791b6859fe610b76d37 (patch)
tree6c1849a3516a7bf19a4f33af1868bb55e536c3d3
parent1f96b24ba70e33d1c87dd5773d3ef18d1f46a3c5 (diff)
downloadhdf5-faa3f5739e0b52d84d119791b6859fe610b76d37.zip
hdf5-faa3f5739e0b52d84d119791b6859fe610b76d37.tar.gz
hdf5-faa3f5739e0b52d84d119791b6859fe610b76d37.tar.bz2
[svn-r296] Switched prefix for dataspaces from H5P to H5S
-rw-r--r--examples/h5_chunk_read.c18
-rw-r--r--examples/h5_compound.c12
-rw-r--r--examples/h5_extend_write.c18
-rw-r--r--examples/h5_group.c16
-rw-r--r--examples/h5_read.c14
-rw-r--r--examples/h5_write.c6
-rw-r--r--src/H5D.c86
-rw-r--r--src/H5Dprivate.h8
-rw-r--r--src/H5M.c6
-rw-r--r--src/H5Oprivate.h4
-rw-r--r--src/H5Osdspace.c22
-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.c2
-rw-r--r--src/Makefile.in6
-rw-r--r--src/hdf5.h2
-rw-r--r--test/Makefile.in6
-rw-r--r--test/cmpd_dset.c28
-rw-r--r--test/dsets.c14
-rw-r--r--test/dspace.c2
-rw-r--r--test/extend.c14
-rw-r--r--test/th5s.c (renamed from test/th5p.c)52
24 files changed, 446 insertions, 446 deletions
diff --git a/examples/h5_chunk_read.c b/examples/h5_chunk_read.c
index 3460d9d..916383b 100644
--- a/examples/h5_chunk_read.c
+++ b/examples/h5_chunk_read.c
@@ -48,8 +48,8 @@ dataset = H5Dopen(file, DATASETNAME);
*/
filespace = H5Dget_space(dataset); /* Get filespace handle first. */
-rank = H5Pget_ndims(filespace);
-status_n = H5Pget_dims(filespace, dims);
+rank = H5Sget_ndims(filespace);
+status_n = H5Sget_dims(filespace, dims);
printf("dataset rank %d, dimensions %d x %d \n", rank, dims[0], dims[1]);
/*
@@ -73,7 +73,7 @@ printf("chunk rank %d, dimensions %d x %d \n", rank_chunk,
/*
* Define the memory space to read dataset.
*/
-memspace = H5Pcreate_simple(RANK,dims,NULL);
+memspace = H5Screate_simple(RANK,dims,NULL);
/*
* Read dataset back and display.
@@ -110,7 +110,7 @@ for (j = 0; j < dims[0]; j++) {
* and read it into column array.
*/
col_dims[0] = 10;
-memspace = H5Pcreate_simple(RANKC, col_dims, NULL);
+memspace = H5Screate_simple(RANKC, col_dims, NULL);
/*
* Define the column (hyperslab) to read.
@@ -119,7 +119,7 @@ offset[0] = 0;
offset[1] = 2;
count[0] = 10;
count[1] = 1;
-status = H5Pset_hyperslab(filespace, offset, count, NULL);
+status = H5Sset_hyperslab(filespace, offset, count, NULL);
status = H5Dread(dataset, H5T_NATIVE_INT, memspace, filespace,
H5C_DEFAULT, column);
printf("\n");
@@ -146,7 +146,7 @@ for (i = 0; i < 10; i++) {
/*
* Define the memory space to read a chunk.
*/
-memspace = H5Pcreate_simple(rank_chunk,chunk_dims,NULL);
+memspace = H5Screate_simple(rank_chunk,chunk_dims,NULL);
/*
* Define chunk in the file (hyperslab) to read.
@@ -155,7 +155,7 @@ offset[0] = 2;
offset[1] = 0;
count[0] = chunk_dims[0];
count[1] = chunk_dims[1];
-status = H5Pset_hyperslab(filespace, offset, count, NULL);
+status = H5Sset_hyperslab(filespace, offset, count, NULL);
/*
* Read chunk back and display.
@@ -179,8 +179,8 @@ for (j = 0; j < chunk_dims[0]; j++) {
*/
H5Cclose(cparms);
H5Dclose(dataset);
-H5Pclose(filespace);
-H5Pclose(memspace);
+H5Sclose(filespace);
+H5Sclose(memspace);
H5Fclose(file);
}
diff --git a/examples/h5_compound.c b/examples/h5_compound.c
index 05add7d..91061cf 100644
--- a/examples/h5_compound.c
+++ b/examples/h5_compound.c
@@ -57,7 +57,7 @@ size_t size;
/*
* Create the data space.
*/
-space = H5Pcreate_simple(RANK, dim, NULL);
+space = H5Screate_simple(RANK, dim, NULL);
/*
* Create the file.
@@ -80,13 +80,13 @@ dataset = H5Dcreate(file, DATASETNAME, s1_tid, space, H5C_DEFAULT);
/*
* Wtite data to the dataset;
*/
-status = H5Dwrite(dataset, s1_tid, H5P_ALL, H5P_ALL, H5C_DEFAULT, s1);
+status = H5Dwrite(dataset, s1_tid, H5S_ALL, H5S_ALL, H5C_DEFAULT, s1);
/*
* Release resources
*/
H5Tclose(s1_tid);
-H5Pclose(space);
+H5Sclose(space);
H5Dclose(dataset);
H5Fclose(file);
@@ -109,7 +109,7 @@ status = H5Tinsert(s2_tid, "a_name", HPOFFSET(s2, a), H5T_NATIVE_INT);
* Read two fields c and a from s1 dataset. Fields iin the file
* are found by their names "c_name" and "a_name".
*/
-status = H5Dread(dataset, s2_tid, H5P_ALL, H5P_ALL, H5C_DEFAULT, s2);
+status = H5Dread(dataset, s2_tid, H5S_ALL, H5S_ALL, H5C_DEFAULT, s2);
/*
* Display the fields
@@ -134,7 +134,7 @@ status = H5Tinsert(s3_tid, "b_name", 0, H5T_NATIVE_FLOAT);
/*
* Read field b from s1 dataset. Field in the file is found by its name.
*/
-status = H5Dread(dataset, s3_tid, H5P_ALL, H5P_ALL, H5C_DEFAULT, s3);
+status = H5Dread(dataset, s3_tid, H5S_ALL, H5S_ALL, H5C_DEFAULT, s3);
/*
* Display the field
@@ -150,6 +150,6 @@ printf("\n");
H5Tclose(s2_tid);
H5Tclose(s3_tid);
H5Dclose(dataset);
-H5Pclose(space);
+H5Sclose(space);
H5Fclose(file);
}
diff --git a/examples/h5_extend_write.c b/examples/h5_extend_write.c
index 69e18ad..1d0438b 100644
--- a/examples/h5_extend_write.c
+++ b/examples/h5_extend_write.c
@@ -25,7 +25,7 @@ main ()
size_t dims2[2] = { 7, 1}; /* data2 dimensions */
size_t dims3[2] = { 2, 2}; /* data3 dimensions */
- size_t maxdims[2] = {H5P_UNLIMITED, H5P_UNLIMITED};
+ size_t maxdims[2] = {H5S_UNLIMITED, H5S_UNLIMITED};
size_t chunk_dims[2] ={2, 5};
size_t size[2];
int offset[2];
@@ -44,7 +44,7 @@ main ()
/*
* Create the data space with ulimited dimensions.
*/
-dataspace = H5Pcreate_simple(RANK, dims, maxdims);
+dataspace = H5Screate_simple(RANK, dims, maxdims);
/*
* Create a new file. If file exists its contents will be overwritten.
@@ -77,7 +77,7 @@ status = H5Dextend (dataset, size);
filespace = H5Dget_space (dataset);
offset[0] = 0;
offset[1] = 0;
-status = H5Pset_hyperslab(filespace, offset, dims1, NULL);
+status = H5Sset_hyperslab(filespace, offset, dims1, NULL);
/*
* Write the data to the hyperslab.
@@ -99,12 +99,12 @@ status = H5Dextend (dataset, size);
filespace = H5Dget_space (dataset);
offset[0] = 3;
offset[1] = 0;
-status = H5Pset_hyperslab(filespace, offset, dims2, NULL);
+status = H5Sset_hyperslab(filespace, offset, dims2, NULL);
/*
* Define memory space
*/
-dataspace = H5Pcreate_simple(RANK, dims2, NULL);
+dataspace = H5Screate_simple(RANK, dims2, NULL);
/*
* Write the data to the hyperslab.
@@ -126,12 +126,12 @@ status = H5Dextend (dataset, size);
filespace = H5Dget_space (dataset);
offset[0] = 0;
offset[1] = 3;
-status = H5Pset_hyperslab(filespace, offset, dims3, NULL);
+status = H5Sset_hyperslab(filespace, offset, dims3, NULL);
/*
* Define memory space.
*/
-dataspace = H5Pcreate_simple(RANK, dims3, NULL);
+dataspace = H5Screate_simple(RANK, dims3, NULL);
/*
* Write the data to the hyperslab.
@@ -157,8 +157,8 @@ status = H5Dwrite(dataset, H5T_NATIVE_INT, dataspace, filespace,
* Close/release resources.
*/
H5Dclose(dataset);
-H5Pclose(dataspace);
-H5Pclose(filespace);
+H5Sclose(dataspace);
+H5Sclose(filespace);
H5Fclose(file);
}
diff --git a/examples/h5_group.c b/examples/h5_group.c
index 0ff7945..303ce99 100644
--- a/examples/h5_group.c
+++ b/examples/h5_group.c
@@ -38,7 +38,7 @@ status = H5Gclose(dir);
* Create dataspace for the character string
*/
size[0] = 80;
-dataspace = H5Pcreate_simple(1, size, NULL);
+dataspace = H5Screate_simple(1, size, NULL);
/*
* Create dataset "String" in the root group.
@@ -58,7 +58,7 @@ H5Dclose(dataset);
*/
dataset = H5Dcreate(file, "/FloatData/String", H5T_NATIVE_CHAR, dataspace,
H5C_DEFAULT);
-H5Pclose(dataspace);
+H5Sclose(dataspace);
H5Dclose(dataset);
/*
@@ -66,10 +66,10 @@ H5Dclose(dataset);
*/
dims[0] = 2;
dims[1] = 3;
-dataspace = H5Pcreate_simple(RANK, dims, NULL);
+dataspace = H5Screate_simple(RANK, dims, NULL);
dataset = H5Dcreate(file, "/IntData/IntArray", H5T_NATIVE_INT, dataspace,
H5C_DEFAULT);
-H5Pclose(dataspace);
+H5Sclose(dataspace);
H5Dclose(dataset);
/*
@@ -92,17 +92,17 @@ status = H5Gset (file, "/FloatData");
dims[0] = 5;
dims[1] = 10;
-dataspace = H5Pcreate_simple(RANK, dims, NULL);
+dataspace = H5Screate_simple(RANK, dims, NULL);
dataset = H5Dcreate(file, "FloatArray", H5T_NATIVE_FLOAT, dataspace, H5C_DEFAULT);
-H5Pclose(dataspace);
+H5Sclose(dataspace);
H5Dclose(dataset);
dims[0] = 4;
dims[1] = 6;
-dataspace = H5Pcreate_simple(RANK, dims, NULL);
+dataspace = H5Screate_simple(RANK, dims, NULL);
dataset = H5Dcreate(file, "DoubleArray", H5T_NATIVE_DOUBLE, dataspace,
H5C_DEFAULT);
-H5Pclose(dataspace);
+H5Sclose(dataspace);
H5Dclose(dataset);
/*
diff --git a/examples/h5_read.c b/examples/h5_read.c
index a7813c0..d95dbe2 100644
--- a/examples/h5_read.c
+++ b/examples/h5_read.c
@@ -66,8 +66,8 @@ size = H5Tget_size(datatype);
printf(" Data size is %d \n", size);
dataspace = H5Dget_space(dataset); /* dataspace handle */
-rank = H5Pget_ndims(dataspace);
-status_n = H5Pget_dims(dataspace, dims_out);
+rank = H5Sget_ndims(dataspace);
+status_n = H5Sget_dims(dataspace, dims_out);
printf("rank %d, dimensions %d x %d \n", rank, dims_out[0], dims_out[1]);
/*
@@ -77,7 +77,7 @@ offset[0] = 1;
offset[1] = 2;
count[0] = NX_SUB;
count[1] = NY_SUB;
-status = H5Pset_hyperslab(dataspace, offset, count, NULL);
+status = H5Sset_hyperslab(dataspace, offset, count, NULL);
/*
* Define the memory dataspace.
@@ -85,7 +85,7 @@ status = H5Pset_hyperslab(dataspace, offset, count, NULL);
dimsm[0] = NX;
dimsm[1] = NY;
dimsm[2] = NZ ;
-memspace = H5Pcreate_simple(RANK_OUT,dimsm,NULL);
+memspace = H5Screate_simple(RANK_OUT,dimsm,NULL);
/*
* Define memory hyperslab.
@@ -96,7 +96,7 @@ offset_out[2] = 0;
count_out[0] = NX_SUB;
count_out[1] = NY_SUB;
count_out[2] = 1;
-status = H5Pset_hyperslab(memspace, offset_out, count_out, NULL);
+status = H5Sset_hyperslab(memspace, offset_out, count_out, NULL);
/*
* Read data from hyperslab in the file into the hyperslab in
@@ -121,8 +121,8 @@ for (j = 0; j < NX; j++) {
*/
H5Tclose(datatype);
H5Dclose(dataset);
-H5Pclose(dataspace);
-H5Pclose(memspace);
+H5Sclose(dataspace);
+H5Sclose(memspace);
H5Fclose(file);
}
diff --git a/examples/h5_write.c b/examples/h5_write.c
index 5d631d3..088810d 100644
--- a/examples/h5_write.c
+++ b/examples/h5_write.c
@@ -47,7 +47,7 @@ file = H5Fcreate(FILE, H5F_ACC_TRUNC, H5C_DEFAULT, H5C_DEFAULT);
*/
dimsf[0] = NX;
dimsf[1] = NY;
-dataspace = H5Pcreate_simple(RANK, dimsf, NULL);
+dataspace = H5Screate_simple(RANK, dimsf, NULL);
/*
* Define datatype for the data in the file.
@@ -65,13 +65,13 @@ dataset = H5Dcreate(file, DATASETNAME, datatype, dataspace,
/*
* Write the data to the dataset using default transfer properties.
*/
-status = H5Dwrite(dataset, H5T_NATIVE_INT32, H5P_ALL, H5P_ALL,
+status = H5Dwrite(dataset, H5T_NATIVE_INT32, H5S_ALL, H5S_ALL,
H5C_DEFAULT, data);
/*
* Close/release resources.
*/
-H5Pclose(dataspace);
+H5Sclose(dataspace);
H5Tclose(datatype);
H5Dclose(dataset);
H5Fclose(file);
diff --git a/src/H5D.c b/src/H5D.c
index 28a3d2e..dad5886 100644
--- a/src/H5D.c
+++ b/src/H5D.c
@@ -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);
diff --git a/src/H5M.c b/src/H5M.c
index a9dc02b..e805248 100644
--- a/src/H5M.c
+++ b/src/H5M.c
@@ -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?", ":"",
diff --git a/src/H5P.c b/src/H5S.c
index 2d39edf..c6f03b2 100644
--- a/src/H5P.c
+++ b/src/H5S.c
@@ -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");
diff --git a/src/H5T.c b/src/H5T.c
index 49a0019..b34860b 100644
--- a/src/H5T.c
+++ b/src/H5T.c
@@ -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
diff --git a/src/hdf5.h b/src/hdf5.h
index 39be4a5..a5d8f19 100644
--- a/src/hdf5.h
+++ b/src/hdf5.h
@@ -32,6 +32,6 @@
#include <H5MFpublic.h>
#include <H5MMpublic.h>
#include <H5Opublic.h>
-#include <H5Ppublic.h>
+#include <H5Spublic.h>
#include <H5Tpublic.h>
#endif
diff --git a/test/Makefile.in b/test/Makefile.in
index 76cc68d..3c61e91 100644
--- a/test/Makefile.in
+++ b/test/Makefile.in
@@ -16,17 +16,17 @@ TESTS=$(PROGS)
# Temporary files
MOSTLYCLEAN=cmpd_dset.h5 dataset.h5 extend.h5 istore.h5 tfile1.h5 tfile2.h5 \
- tfile3.h5 th5p1.h5 theap.h5 tohdr.h5 tstab1.h5 tstab2.h5
+ tfile3.h5 th5s1.h5 theap.h5 tohdr.h5 tstab1.h5 tstab2.h5
# Source and object files for programs... The PROG_SRC list contains all the
# source files and is used for things like dependencies, archiving, etc. The
# other source lists are for the individual tests, the files of which may
# overlap with other tests.
-PROG_SRC=testhdf5.c tfile.c theap.c tmeta.c tohdr.c tstab.c th5p.c dtypes.c \
+PROG_SRC=testhdf5.c tfile.c theap.c tmeta.c tohdr.c tstab.c th5s.c dtypes.c \
hyperslab.c istore.c dsets.c cmpd_dset.c extend.c
PROG_OBJ=$(PROG_SRC:.c=.o)
-TESTHDF5_SRC=testhdf5.c tfile.c theap.c tmeta.c tohdr.c tstab.c th5p.c
+TESTHDF5_SRC=testhdf5.c tfile.c theap.c tmeta.c tohdr.c tstab.c th5s.c
TESTHDF5_OBJ=$(TESTHDF5_SRC:.c=.o)
DSETS_SRC=dsets.c
diff --git a/test/cmpd_dset.c b/test/cmpd_dset.c
index 6ad4b31..aad6339 100644
--- a/test/cmpd_dset.c
+++ b/test/cmpd_dset.c
@@ -134,7 +134,7 @@ main (void)
assert (file>=0);
/* Create the data space */
- space = H5Pcreate_simple (2, dim, NULL);
+ space = H5Screate_simple (2, dim, NULL);
assert (space>=0);
@@ -170,7 +170,7 @@ STEP 1: Initialize dataset `s1' and store it on disk in native order.\n");
assert (dataset>=0);
/* Write the data */
- status = H5Dwrite (dataset, s1_tid, H5P_ALL, H5P_ALL, H5C_DEFAULT, s1);
+ status = H5Dwrite (dataset, s1_tid, H5S_ALL, H5S_ALL, H5C_DEFAULT, s1);
assert (status>=0);
/*
@@ -195,7 +195,7 @@ STEP 2: Read the dataset from disk into a new memory buffer which has the\n\
assert (s2_tid>=0);
/* Read the data */
- status = H5Dread (dataset, s2_tid, H5P_ALL, H5P_ALL, H5C_DEFAULT, s2);
+ status = H5Dread (dataset, s2_tid, H5S_ALL, H5S_ALL, H5C_DEFAULT, s2);
assert (status>=0);
/* Compare s2 with s1. They should be the same */
@@ -227,7 +227,7 @@ STEP 3: Read the dataset again with members in a different order.\n");
assert (s3_tid>=0);
/* Read the data */
- status = H5Dread (dataset, s3_tid, H5P_ALL, H5P_ALL, H5C_DEFAULT, s3);
+ status = H5Dread (dataset, s3_tid, H5S_ALL, H5S_ALL, H5C_DEFAULT, s3);
assert (status>=0);
/* Compare s3 with s1. They should be the same */
@@ -255,7 +255,7 @@ STEP 4: Read a subset of the members.\n");
assert (s4_tid>=0);
/* Read the data */
- status = H5Dread (dataset, s4_tid, H5P_ALL, H5P_ALL, H5C_DEFAULT, s4);
+ status = H5Dread (dataset, s4_tid, H5S_ALL, H5S_ALL, H5C_DEFAULT, s4);
assert (status>=0);
/* Compare s4 with s1 */
@@ -291,7 +291,7 @@ STEP 5: Read members into a superset which is partially initialized.\n");
assert (s5_tid>=0);
/* Read the data */
- status = H5Dread (dataset, s5_tid, H5P_ALL, H5P_ALL, H5C_DEFAULT, s5);
+ status = H5Dread (dataset, s5_tid, H5S_ALL, H5S_ALL, H5C_DEFAULT, s5);
assert (status>=0);
/* Check that the data was read properly */
@@ -329,11 +329,11 @@ STEP 6: Update fields `b' and `d' on the file, leaving the other fields\n\
}
/* Write the data to file */
- status = H5Dwrite (dataset, s4_tid, H5P_ALL, H5P_ALL, H5C_DEFAULT, s4);
+ status = H5Dwrite (dataset, s4_tid, H5S_ALL, H5S_ALL, H5C_DEFAULT, s4);
assert (status>=0);
/* Read the data back */
- status = H5Dread (dataset, s1_tid, H5P_ALL, H5P_ALL, H5C_DEFAULT, s1);
+ status = H5Dread (dataset, s1_tid, H5S_ALL, H5S_ALL, H5C_DEFAULT, s1);
assert (status>=0);
/* Compare */
@@ -356,11 +356,11 @@ STEP 7: Reading original dataset with explicit data space.\n");
fflush (stdout);
/* Create the data space */
- s7_sid = H5Pcreate_simple (2, dim, NULL);
+ s7_sid = H5Screate_simple (2, dim, NULL);
assert (s7_sid>=0);
/* Read the dataset */
- status = H5Dread (dataset, s2_tid, s7_sid, H5P_ALL, H5C_DEFAULT, s2);
+ status = H5Dread (dataset, s2_tid, s7_sid, H5S_ALL, H5C_DEFAULT, s2);
assert (status>=0);
/* Compare */
@@ -391,11 +391,11 @@ STEP 8: Read middle third hyperslab into memory array.\n");
h_size[1] = 2*NY/3 - f_offset[1];
h_sample[0] = 1;
h_sample[1] = 1;
- status = H5Pset_hyperslab (s8_f_sid, f_offset, h_size, h_sample);
+ status = H5Sset_hyperslab (s8_f_sid, f_offset, h_size, h_sample);
assert (status>=0);
/* Create memory data space */
- s8_m_sid = H5Pcreate_simple (2, h_size, NULL);
+ s8_m_sid = H5Screate_simple (2, h_size, NULL);
assert (s8_m_sid>=0);
/* Read the dataset */
@@ -518,7 +518,7 @@ STEP 11: Write an array back to the middle third of the dataset to\n\
fflush (stdout);
/* Create the memory array and initialize all fields to zero */
- ndims = H5Pget_hyperslab (s8_f_sid, f_offset, h_size, h_sample);
+ ndims = H5Sget_hyperslab (s8_f_sid, f_offset, h_size, h_sample);
assert (ndims==2);
s11 = malloc (h_size[0]*h_size[1]*sizeof(s4_t));
assert (s11);
@@ -529,7 +529,7 @@ STEP 11: Write an array back to the middle third of the dataset to\n\
assert (status>=0);
/* Read the whole thing */
- status = H5Dread (dataset, s1_tid, H5P_ALL, H5P_ALL, H5C_DEFAULT, s1);
+ status = H5Dread (dataset, s1_tid, H5S_ALL, H5S_ALL, H5C_DEFAULT, s1);
assert (status>=0);
/* Compare */
diff --git a/test/dsets.c b/test/dsets.c
index 8261103..16cd541 100644
--- a/test/dsets.c
+++ b/test/dsets.c
@@ -57,7 +57,7 @@ test_create(hid_t file)
/* Create the data space */
dims[0] = 256;
dims[1] = 512;
- space = H5Pcreate_simple(2, dims, NULL);
+ space = H5Screate_simple(2, dims, NULL);
assert(space != FAIL);
/*
@@ -209,7 +209,7 @@ test_simple_io(hid_t file)
/* Create the data space */
dims[0] = 100;
dims[1] = 200;
- space = H5Pcreate_simple(2, dims, NULL);
+ space = H5Screate_simple(2, dims, NULL);
assert(space != FAIL);
/* Create the dataset */
@@ -218,7 +218,7 @@ test_simple_io(hid_t file)
assert(dataset >= 0);
/* Write the data to the dataset */
- status = H5Dwrite(dataset, H5T_NATIVE_INT, H5P_ALL, H5P_ALL,
+ status = H5Dwrite(dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL,
H5C_DEFAULT, points);
if (status < 0) {
puts("*FAILED*");
@@ -229,7 +229,7 @@ test_simple_io(hid_t file)
goto error;
}
/* Read the dataset back */
- status = H5Dread(dataset, H5T_NATIVE_INT, H5P_ALL, H5P_ALL,
+ status = H5Dread(dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL,
H5C_DEFAULT, check);
if (status < 0) {
puts("*FAILED*");
@@ -301,7 +301,7 @@ test_tconv(hid_t file)
/* Create the data space */
dims[0] = 1000000;
- space = H5Pcreate_simple (1, dims, NULL);
+ space = H5Screate_simple (1, dims, NULL);
assert(space != FAIL);
/* Create the data set */
@@ -310,7 +310,7 @@ test_tconv(hid_t file)
assert(dataset >= 0);
/* Write the data to the dataset */
- status = H5Dwrite(dataset, H5T_NATIVE_INT32, H5P_ALL, H5P_ALL,
+ status = H5Dwrite(dataset, H5T_NATIVE_INT32, H5S_ALL, H5S_ALL,
H5C_DEFAULT, out);
if (status<0) H5Eprint (H5E_thrdid_g, stdout);
assert(status >= 0);
@@ -330,7 +330,7 @@ test_tconv(hid_t file)
}
/* Read data with byte order conversion */
- status = H5Dread(dataset, type, H5P_ALL, H5P_ALL, H5C_DEFAULT, in);
+ status = H5Dread(dataset, type, H5S_ALL, H5S_ALL, H5C_DEFAULT, in);
assert(status >= 0);
/* Check */
diff --git a/test/dspace.c b/test/dspace.c
index 54fa17f..e833995 100644
--- a/test/dspace.c
+++ b/test/dspace.c
@@ -5,7 +5,7 @@
* Programmer: Robb Matzke <matzke@llnl.gov>
* Tuesday, December 9, 1997
*
- * Purpose: Tests the data space interface (H5P).
+ * Purpose: Tests the data space interface (H5S).
*/
int
diff --git a/test/extend.c b/test/extend.c
index 7de127e..a3562fa 100644
--- a/test/extend.c
+++ b/test/extend.c
@@ -40,7 +40,7 @@ main (void)
static const size_t dims[2] = {NX, NY};
static const size_t half_dims[2] = {NX/2, NY/2};
static const size_t chunk_dims[2] = {NX/2, NY/2};
- static size_t maxdims[2] = {H5P_UNLIMITED, H5P_UNLIMITED};
+ static size_t maxdims[2] = {H5S_UNLIMITED, H5S_UNLIMITED};
static size_t size[2];
int offset[2];
@@ -50,7 +50,7 @@ main (void)
buf1[i][j] = i*NY+j;
}
}
- mem_space = H5Pcreate_simple (2, dims, maxdims);
+ mem_space = H5Screate_simple (2, dims, maxdims);
assert (mem_space>=0);
/* Create the file */
@@ -80,21 +80,21 @@ main (void)
/* Select a hyperslab */
file_space = H5Dget_space (dataset);
assert (file_space>=0);
- status = H5Pset_hyperslab (file_space, offset, dims, NULL);
+ status = H5Sset_hyperslab (file_space, offset, dims, NULL);
assert (status>=0);
/* Write to the hyperslab */
status = H5Dwrite (dataset, H5T_NATIVE_INT, mem_space, file_space,
H5C_DEFAULT, buf1);
assert (status>=0);
- H5Pclose (file_space);
+ H5Sclose (file_space);
}
}
- H5Pclose (mem_space);
+ H5Sclose (mem_space);
/* Read the data */
- mem_space = H5Pcreate_simple (2, half_dims, NULL);
+ mem_space = H5Screate_simple (2, half_dims, NULL);
file_space = H5Dget_space (dataset);
for (i=0; i<10; i++) {
for (j=0; j<10; j++) {
@@ -103,7 +103,7 @@ main (void)
offset[0] = i * NX/2;
offset[1] = j * NY/2;
assert (file_space>=0);
- status = H5Pset_hyperslab (file_space, offset, half_dims, NULL);
+ status = H5Sset_hyperslab (file_space, offset, half_dims, NULL);
assert (status>=0);
/* Read */
diff --git a/test/th5p.c b/test/th5s.c
index e856e3c..faafd5e 100644
--- a/test/th5p.c
+++ b/test/th5s.c
@@ -29,7 +29,7 @@ static char RcsId[] = "$Revision$";
#include <H5private.h>
#include <H5Bprivate.h>
#include <H5Mprivate.h>
-#include <H5Pprivate.h>
+#include <H5Sprivate.h>
#define FILE "th5p1.h5"
@@ -50,7 +50,7 @@ static char RcsId[] = "$Revision$";
/****************************************************************
**
-** test_h5p_basic(): Test basic H5P (dataspace) code.
+** test_h5p_basic(): Test basic H5S (dataspace) code.
**
****************************************************************/
static void
@@ -73,35 +73,35 @@ test_h5p_basic(void)
fid1 = H5Fcreate(FILE, H5F_ACC_TRUNC, H5C_DEFAULT, H5C_DEFAULT);
CHECK(fid1, FAIL, "H5Fcreate");
- sid1 = H5Pcreate_simple(SPACE1_RANK, dims1, NULL);
- CHECK(sid1, FAIL, "H5Pcreate_simple");
+ sid1 = H5Screate_simple(SPACE1_RANK, dims1, NULL);
+ CHECK(sid1, FAIL, "H5Screate_simple");
- n = H5Pget_npoints(sid1);
- CHECK(n, UFAIL, "H5Pget_npoints");
- VERIFY(n, SPACE1_DIM1 * SPACE1_DIM2 * SPACE1_DIM3, "H5Pget_npoints");
+ n = H5Sget_npoints(sid1);
+ CHECK(n, UFAIL, "H5Sget_npoints");
+ VERIFY(n, SPACE1_DIM1 * SPACE1_DIM2 * SPACE1_DIM3, "H5Sget_npoints");
- rank = H5Pget_ndims(sid1);
- CHECK(rank, UFAIL, "H5Pget_lrank");
- VERIFY(rank, SPACE1_RANK, "H5Pget_lrank");
+ rank = H5Sget_ndims(sid1);
+ CHECK(rank, UFAIL, "H5Sget_lrank");
+ VERIFY(rank, SPACE1_RANK, "H5Sget_lrank");
- ret = H5Pget_dims(sid1, tdims);
- CHECK(ret, FAIL, "H5Pget_ldims");
- VERIFY(HDmemcmp(tdims, dims1, SPACE1_RANK * sizeof(uint32)), 0, "H5Pget_ldims");
+ ret = H5Sget_dims(sid1, tdims);
+ CHECK(ret, FAIL, "H5Sget_ldims");
+ VERIFY(HDmemcmp(tdims, dims1, SPACE1_RANK * sizeof(uint32)), 0, "H5Sget_ldims");
- sid2 = H5Pcreate_simple(SPACE2_RANK, dims2, NULL);
- CHECK(sid2, FAIL, "H5Pcreate_simple");
+ sid2 = H5Screate_simple(SPACE2_RANK, dims2, NULL);
+ CHECK(sid2, FAIL, "H5Screate_simple");
- n = H5Pget_npoints(sid2);
- CHECK(n, UFAIL, "H5Pnelem");
- VERIFY(n, SPACE2_DIM1 * SPACE2_DIM2 * SPACE2_DIM3 * SPACE2_DIM4, "H5Pnelem");
+ n = H5Sget_npoints(sid2);
+ CHECK(n, UFAIL, "H5Snelem");
+ VERIFY(n, SPACE2_DIM1 * SPACE2_DIM2 * SPACE2_DIM3 * SPACE2_DIM4, "H5Snelem");
- rank = H5Pget_ndims(sid2);
- CHECK(rank, UFAIL, "H5Pget_lrank");
- VERIFY(rank, SPACE2_RANK, "H5Pget_lrank");
+ rank = H5Sget_ndims(sid2);
+ CHECK(rank, UFAIL, "H5Sget_lrank");
+ VERIFY(rank, SPACE2_RANK, "H5Sget_lrank");
- ret = H5Pget_dims(sid2, tdims);
- CHECK(ret, FAIL, "H5Pget_ldims");
- VERIFY(HDmemcmp(tdims, dims2, SPACE2_RANK * sizeof(uint32)), 0, "H5Pget_ldims");
+ ret = H5Sget_dims(sid2, tdims);
+ CHECK(ret, FAIL, "H5Sget_ldims");
+ VERIFY(HDmemcmp(tdims, dims2, SPACE2_RANK * sizeof(uint32)), 0, "H5Sget_ldims");
ret = H5Mclose(sid1);
CHECK(ret, FAIL, "H5Mrelease");
@@ -116,7 +116,7 @@ test_h5p_basic(void)
/****************************************************************
**
-** test_h5p(): Main H5P (dataspace) testing routine.
+** test_h5p(): Main H5S (dataspace) testing routine.
**
****************************************************************/
void
@@ -125,5 +125,5 @@ test_h5p(void)
/* Output message about test being performed */
MESSAGE(5, ("Testing Dataspaces\n"));
- test_h5p_basic(); /* Test basic H5P code */
+ test_h5p_basic(); /* Test basic H5S code */
} /* test_h5p() */