summaryrefslogtreecommitdiffstats
path: root/tools/lib
diff options
context:
space:
mode:
Diffstat (limited to 'tools/lib')
-rw-r--r--tools/lib/h5tools.h19
-rw-r--r--tools/lib/h5tools_dump.c222
-rw-r--r--tools/lib/h5tools_str.c99
-rw-r--r--tools/lib/h5tools_str.h5
4 files changed, 319 insertions, 26 deletions
diff --git a/tools/lib/h5tools.h b/tools/lib/h5tools.h
index ff7cf12..d2e3ea6 100644
--- a/tools/lib/h5tools.h
+++ b/tools/lib/h5tools.h
@@ -93,6 +93,16 @@
#define PACKED_BITS "PACKED_BITS"
#define PACKED_OFFSET "OFFSET"
#define PACKED_LENGTH "LENGTH"
+#define VDS_VIRTUAL "VIRTUAL"
+#define VDS_MAPPING "MAPPING"
+#define VDS_SOURCE "SOURCE"
+#define VDS_REG_HYPERSLAB "SELECTION REGULAR_HYPERSLAB"
+#define VDS_IRR_HYPERSLAB "SELECTION IRREGULAR_HYPERSLAB"
+#define VDS_POINT "POINT"
+#define VDS_SRC_FILE "FILE"
+#define VDS_SRC_DATASET "DATASET"
+#define VDS_NONE "SELECTION NONE"
+#define VDS_ALL "SELECTION ALL"
#define BEGIN "{"
#define END "}"
@@ -182,6 +192,15 @@ typedef struct h5tools_dump_header_t {
const char *dataspacedimbegin;
const char *dataspacedimend;
+ const char *virtualselectionbegin;
+ const char *virtualselectionend;
+ const char *virtualselectionblockbegin;
+ const char *virtualselectionblockend;
+ const char *virtualfilenamebegin;
+ const char *virtualfilenameend;
+ const char *virtualdatasetnamebegin;
+ const char *virtualdatasetnameend;
+
} h5tools_dump_header_t;
/*
diff --git a/tools/lib/h5tools_dump.c b/tools/lib/h5tools_dump.c
index 1e6e9d6..0d39981 100644
--- a/tools/lib/h5tools_dump.c
+++ b/tools/lib/h5tools_dump.c
@@ -179,6 +179,15 @@ BLOCK, /*blockbegin */
"", /*dataspacedescriptionend */
"(", /*dataspacedimbegin */
")", /*dataspacedimend */
+
+"", /*virtualselectionbegin */
+"", /*virtualselectionend */
+"{", /*virtualselectionblockbegin */
+"}", /*virtualselectionblockend */
+"\"", /*virtualfilenamebeginbegin */
+"\"", /*virtualfilenamebeginend */
+"\"", /*virtualdatasetnamebegin */
+"\"", /*virtualdtatasetnameend */
};
const h5tools_dump_header_t* h5tools_dump_header_format;
@@ -216,6 +225,13 @@ void h5tools_print_dims(h5tools_str_t *buffer, hsize_t *s, int dims);
void h5tools_dump_subsetting_header(FILE *stream, const h5tool_format_t *info,
h5tools_context_t *ctx, struct subset_t *sset, int dims);
+static void h5tools_print_virtual_selection(hid_t vspace,
+ FILE *stream, const h5tool_format_t *info,
+ h5tools_context_t *ctx/*in,out*/,
+ h5tools_str_t *buffer/*string into which to render */,
+ hsize_t *curr_pos/*total data element position*/,
+ size_t ncols);
+
void
h5tools_dump_init(void)
{
@@ -1523,6 +1539,7 @@ h5tools_dump_simple_dset(FILE *stream, const h5tool_format_t *info, h5tools_cont
/* Hyperslab info */
hsize_t hs_offset[H5S_MAX_RANK]; /* starting offset */
hsize_t hs_size[H5S_MAX_RANK]; /* size this pass */
+ //hsize_t hs_count[H5S_MAX_RANK]; /* size this pass */
hsize_t hs_nelmts; /* elements in request */
/* VL data special information */
@@ -1605,9 +1622,11 @@ h5tools_dump_simple_dset(FILE *stream, const h5tool_format_t *info, h5tools_cont
hs_size[i] = MIN(total_size[i] - hs_offset[i], sm_size[i]);
ctx->p_max_idx[i] = ctx->p_min_idx[i] + hs_size[i];
hs_nelmts *= hs_size[i];
+// hs_count[i] = 1;
}
H5Sselect_hyperslab(f_space, H5S_SELECT_SET, hs_offset, NULL, hs_size, NULL);
+// H5Sselect_hyperslab(f_space, H5S_SELECT_SET, hs_offset, NULL, hs_count, hs_size);
H5Sselect_hyperslab(sm_space, H5S_SELECT_SET, zero, NULL, &hs_nelmts, NULL);
}
else {
@@ -2844,7 +2863,78 @@ h5tools_dump_oid(FILE *stream, const h5tool_format_t *info,
h5tools_str_close(&buffer);
}
+/*-------------------------------------------------------------------------
+ * Function: print_virtual_selection
+ *
+ * Purpose: Print the virtual dataset selection.
+ *
+ * Return: void
+ *-------------------------------------------------------------------------
+ */
+static void
+h5tools_print_virtual_selection(hid_t vspace,
+ FILE *stream, const h5tool_format_t *info,
+ h5tools_context_t *ctx/*in,out*/,
+ h5tools_str_t *buffer/*string into which to render */,
+ hsize_t *curr_pos/*total data element position*/,
+ size_t ncols)
+{
+ switch(H5Sget_select_type(vspace)) {
+ case H5S_SEL_NONE: /* Nothing selected */
+ ctx->need_prefix = TRUE;
+ h5tools_simple_prefix(stream, info, ctx, *curr_pos, 0);
+
+ h5tools_str_reset(buffer);
+ h5tools_str_append(buffer, "%s", VDS_NONE);
+ break;
+ case H5S_SEL_POINTS: /* Sequence of points selected */
+ h5tools_str_reset(buffer);
+ h5tools_str_append(buffer, "%s %s ", VDS_POINT, h5tools_dump_header_format->virtualselectionblockbegin);
+ h5tools_str_dump_space_points(buffer, vspace, info);
+ h5tools_str_append(buffer, " %s", h5tools_dump_header_format->virtualselectionblockend);
+ break;
+ case H5S_SEL_HYPERSLABS: /* "New-style" hyperslab selection defined */
+ ctx->need_prefix = TRUE;
+ h5tools_simple_prefix(stream, info, ctx, *curr_pos, 0);
+
+ h5tools_str_reset(buffer);
+ if (H5Sis_regular_hyperslab(vspace)) {
+ h5tools_str_append(buffer, "%s %s ", VDS_REG_HYPERSLAB, h5tools_dump_header_format->virtualselectionblockbegin);
+ h5tools_render_element(stream, info, ctx, buffer, curr_pos, (size_t) ncols, (hsize_t) 0, (hsize_t) 0);
+
+ h5tools_str_reset(buffer);
+ h5tools_str_dump_space_slabs(buffer, vspace, info, ctx);
+ }
+ else {
+ h5tools_str_append(buffer, "%s %s ", VDS_IRR_HYPERSLAB, h5tools_dump_header_format->virtualselectionblockbegin);
+ h5tools_render_element(stream, info, ctx, buffer, curr_pos, (size_t) ncols, (hsize_t) 0, (hsize_t) 0);
+ ctx->indent_level++;
+ ctx->need_prefix = TRUE;
+ h5tools_simple_prefix(stream, info, ctx, *curr_pos, 0);
+
+ h5tools_str_reset(buffer);
+ h5tools_str_dump_space_blocks(buffer, vspace, info);
+ ctx->indent_level--;
+ }
+ h5tools_render_element(stream, info, ctx, buffer, curr_pos, (size_t) ncols, (hsize_t) 0, (hsize_t) 0);
+ ctx->need_prefix = TRUE;
+ h5tools_simple_prefix(stream, info, ctx, *curr_pos, 0);
+
+ h5tools_str_reset(buffer);
+ h5tools_str_append(buffer, "%s", h5tools_dump_header_format->virtualselectionblockend);
+ break;
+ case H5S_SEL_ALL: /* Entire extent selected */
+ ctx->need_prefix = TRUE;
+ h5tools_simple_prefix(stream, info, ctx, *curr_pos, 0);
+ h5tools_str_reset(buffer);
+ h5tools_str_append(buffer, "%s", VDS_ALL);
+ break;
+ default:
+ h5tools_str_append(buffer, "Unknown Selection");
+ }
+ h5tools_render_element(stream, info, ctx, buffer, curr_pos, (size_t) ncols, (hsize_t) 0, (hsize_t) 0);
+}
/*-------------------------------------------------------------------------
* Function: dump_fill_value
@@ -2932,14 +3022,13 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info,
h5tools_str_append(&buffer, "%s %s", STORAGE_LAYOUT, BEGIN);
h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0);
- ctx->indent_level++;
-
- ctx->need_prefix = TRUE;
- h5tools_simple_prefix(stream, info, ctx, curr_pos, 0);
-
stl = H5Pget_layout(dcpl_id);
switch (stl) {
case H5D_CHUNKED:
+ ctx->indent_level++;
+ ctx->need_prefix = TRUE;
+ h5tools_simple_prefix(stream, info, ctx, curr_pos, 0);
+
h5tools_str_reset(&buffer);
h5tools_str_append(&buffer, "%s ", CHUNKED);
@@ -3002,8 +3091,13 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info,
h5tools_str_append(&buffer, "SIZE " HSIZE_T_FORMAT, storage_size);
}
h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t) ncols, (hsize_t) 0, (hsize_t) 0);
+ ctx->indent_level--;
break;
case H5D_COMPACT:
+ ctx->indent_level++;
+ ctx->need_prefix = TRUE;
+ h5tools_simple_prefix(stream, info, ctx, curr_pos, 0);
+
h5tools_str_reset(&buffer);
h5tools_str_append(&buffer, "%s", COMPACT);
h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t) ncols, (hsize_t) 0, (hsize_t) 0);
@@ -3014,6 +3108,7 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info,
h5tools_str_reset(&buffer);
h5tools_str_append(&buffer, "SIZE " HSIZE_T_FORMAT, storage_size);
h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t) ncols, (hsize_t) 0, (hsize_t) 0);
+ ctx->indent_level--;
break;
case H5D_CONTIGUOUS:
{
@@ -3025,7 +3120,11 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info,
* EXTERNAL_FILE
*-------------------------------------------------------------------------
*/
+ ctx->indent_level++;
if (next) {
+ ctx->need_prefix = TRUE;
+ h5tools_simple_prefix(stream, info, ctx, curr_pos, 0);
+
h5tools_str_reset(&buffer);
h5tools_str_append(&buffer, "%s", CONTIGUOUS);
h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t) ncols, (hsize_t) 0, (hsize_t) 0);
@@ -3061,6 +3160,9 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info,
else {
haddr_t ioffset;
+ ctx->need_prefix = TRUE;
+ h5tools_simple_prefix(stream, info, ctx, curr_pos, 0);
+
h5tools_str_reset(&buffer);
h5tools_str_append(&buffer, "%s", CONTIGUOUS);
h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t) ncols, (hsize_t) 0, (hsize_t) 0);
@@ -3080,8 +3182,116 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info,
h5tools_str_append(&buffer, "OFFSET "H5_PRINTF_HADDR_FMT, ioffset);
h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t) ncols, (hsize_t) 0, (hsize_t) 0);
}
+ ctx->indent_level--;
}
break;
+
+ case H5D_VIRTUAL:
+ {
+ char dsetname[256]; /* virtual datset name */
+ size_t vmaps;
+
+ H5Pget_virtual_count(dcpl_id, &vmaps);
+
+ if (vmaps) {
+ size_t next;
+ ssize_t ssize_out;
+
+ ctx->indent_level++;
+ for (next = 0; next < (unsigned) vmaps; next++) {
+ hid_t virtual_vspace = H5Pget_virtual_vspace(dcpl_id, next);
+ hid_t virtual_srcspace = H5Pget_virtual_srcspace(dcpl_id, next);
+
+ ctx->need_prefix = TRUE;
+ h5tools_simple_prefix(stream, info, ctx, curr_pos, 0);
+
+ h5tools_str_reset(&buffer);
+ h5tools_str_append(&buffer, "%s %ld %s ", VDS_MAPPING, next, BEGIN);
+ h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t) ncols, (hsize_t) 0, (hsize_t) 0);
+
+ ctx->indent_level++;
+
+ ctx->need_prefix = TRUE;
+ h5tools_simple_prefix(stream, info, ctx, curr_pos, 0);
+
+ h5tools_str_reset(&buffer);
+ h5tools_str_append(&buffer, "%s %s", VDS_VIRTUAL, BEGIN);
+ h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t) ncols, (hsize_t) 0, (hsize_t) 0);
+
+ ctx->indent_level++;
+
+ h5tools_print_virtual_selection(virtual_vspace, stream, info, ctx, &buffer, &curr_pos, (size_t) ncols);
+
+ ctx->indent_level--;
+
+ ctx->need_prefix = TRUE;
+ h5tools_simple_prefix(stream, info, ctx, curr_pos, 0);
+
+ h5tools_str_reset(&buffer);
+ h5tools_str_append(&buffer, "%s", END);
+ h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t) ncols, (hsize_t) 0, (hsize_t) 0);
+
+ ctx->need_prefix = TRUE;
+ h5tools_simple_prefix(stream, info, ctx, curr_pos, 0);
+
+ h5tools_str_reset(&buffer);
+ h5tools_str_append(&buffer, "%s %s", VDS_SOURCE, BEGIN);
+ h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t) ncols, (hsize_t) 0, (hsize_t) 0);
+
+ ctx->indent_level++;
+
+ ssize_out = H5Pget_virtual_filename(dcpl_id, next, NULL, 0);
+ HDassert(ssize_out > 0);
+ HDassert((size_t)ssize_out < sizeof(name));
+ H5Pget_virtual_filename(dcpl_id, next, name, sizeof(name));
+ ssize_out = H5Pget_virtual_dsetname(dcpl_id, next, NULL, 0);
+ HDassert(ssize_out > 0);
+ HDassert((size_t)ssize_out < sizeof(name));
+ H5Pget_virtual_dsetname(dcpl_id, next, dsetname, sizeof(dsetname));
+
+ ctx->need_prefix = TRUE;
+ h5tools_simple_prefix(stream, info, ctx, curr_pos, 0);
+
+ h5tools_str_reset(&buffer);
+ h5tools_str_append(&buffer, "%s %s", VDS_SRC_FILE, h5tools_dump_header_format->virtualfilenamebegin);
+ h5tools_str_append(&buffer, "%s", name);
+ h5tools_str_append(&buffer, "%s", h5tools_dump_header_format->virtualfilenameend);
+ h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t) ncols, (hsize_t) 0, (hsize_t) 0);
+
+ ctx->need_prefix = TRUE;
+ h5tools_simple_prefix(stream, info, ctx, curr_pos, 0);
+
+ h5tools_str_reset(&buffer);
+ h5tools_str_append(&buffer, "%s %s", VDS_SRC_DATASET, h5tools_dump_header_format->virtualdatasetnamebegin);
+ h5tools_str_append(&buffer, "%s", dsetname);
+ h5tools_str_append(&buffer, "%s", h5tools_dump_header_format->virtualdatasetnameend);
+ h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t) ncols, (hsize_t) 0, (hsize_t) 0);
+
+ h5tools_print_virtual_selection(virtual_srcspace, stream, info, ctx, &buffer, &curr_pos, (size_t) ncols);
+
+ ctx->indent_level--;
+
+ ctx->need_prefix = TRUE;
+ h5tools_simple_prefix(stream, info, ctx, curr_pos, 0);
+
+ h5tools_str_reset(&buffer);
+ h5tools_str_append(&buffer, "%s", END);
+ h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t) ncols, (hsize_t) 0, (hsize_t) 0);
+
+ ctx->indent_level--;
+
+ ctx->need_prefix = TRUE;
+ h5tools_simple_prefix(stream, info, ctx, curr_pos, 0);
+
+ h5tools_str_reset(&buffer);
+ h5tools_str_append(&buffer, "%s", END);
+ h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t) ncols, (hsize_t) 0, (hsize_t) 0);
+ }
+ ctx->indent_level--;
+ }
+ }
+ break;
+
case H5D_LAYOUT_ERROR:
case H5D_NLAYOUTS:
default:
@@ -3090,8 +3300,6 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info,
h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t) ncols, (hsize_t) 0, (hsize_t) 0);
}/*switch*/
- ctx->indent_level--;
-
ctx->need_prefix = TRUE;
h5tools_simple_prefix(stream, info, ctx, curr_pos, 0);
diff --git a/tools/lib/h5tools_str.c b/tools/lib/h5tools_str.c
index 9d151d0..bdb82a4 100644
--- a/tools/lib/h5tools_str.c
+++ b/tools/lib/h5tools_str.c
@@ -413,9 +413,9 @@ h5tools_str_region_prefix(h5tools_str_t *str, const h5tool_format_t *info,
}
/*-------------------------------------------------------------------------
- * Function: h5tools_str_dump_region_blocks
+ * Function: h5tools_str_dump_space_slabs
*
- * Purpose: Prints information about a dataspace region by appending
+ * Purpose: Prints information about a dataspace selection by appending
* the information to the specified string.
*
* Return: none
@@ -426,19 +426,85 @@ h5tools_str_region_prefix(h5tools_str_t *str, const h5tool_format_t *info,
*-------------------------------------------------------------------------
*/
void
-h5tools_str_dump_region_blocks(h5tools_str_t *str, hid_t region,
+h5tools_str_dump_space_slabs(h5tools_str_t *str, hid_t rspace,
+ const h5tool_format_t *info, h5tools_context_t *ctx)
+{
+ hsize_t start[H5S_MAX_RANK];
+ hsize_t stride[H5S_MAX_RANK];
+ hsize_t count[H5S_MAX_RANK];
+ hsize_t block[H5S_MAX_RANK];
+ int j;
+ int ndims = H5Sget_simple_extent_ndims(rspace);
+
+ H5Sget_regular_hyperslab(rspace, start, stride, count, block);
+
+ /* Print hyperslab information */
+
+ /* Start coordinates */
+ h5tools_str_append(str, "%s%s ", info->line_indent, START);
+ for (j = 0; j < ndims; j++)
+ h5tools_str_append(str, "%s" HSIZE_T_FORMAT, j ? "," : "(", start[j]);
+ h5tools_str_append(str, ")");
+ h5tools_str_append(str, "%s", "\n");
+ h5tools_str_indent(str, info, ctx);
+
+ /* Stride coordinates */
+ h5tools_str_append(str, "%s ", STRIDE);
+ for (j = 0; j < ndims; j++)
+ h5tools_str_append(str, "%s" HSIZE_T_FORMAT, j ? "," : "(", stride[j]);
+ h5tools_str_append(str, ")");
+ h5tools_str_append(str, "%s", "\n");
+ h5tools_str_indent(str, info, ctx);
+
+ /* Count coordinates */
+ h5tools_str_append(str, "%s ", COUNT);
+ for (j = 0; j < ndims; j++) {
+ if(count[j] == H5S_UNLIMITED)
+ h5tools_str_append(str, "%s%s", j ? "," : "(","H5S_UNLIMITED");
+ else
+ h5tools_str_append(str, "%s" HSIZE_T_FORMAT, j ? "," : "(", count[j]);
+ }
+ h5tools_str_append(str, ")");
+ h5tools_str_append(str, "%s", "\n");
+ h5tools_str_indent(str, info, ctx);
+
+ /* Block coordinates */
+ h5tools_str_append(str, "%s ", BLOCK);
+ for (j = 0; j < ndims; j++) {
+ if(block[j] == H5S_UNLIMITED)
+ h5tools_str_append(str, "%s%s", j ? "," : "(","H5S_UNLIMITED");
+ else
+ h5tools_str_append(str, "%s" HSIZE_T_FORMAT, j ? "," : "(", block[j]);
+ }
+ h5tools_str_append(str, ")");
+}
+
+/*-------------------------------------------------------------------------
+ * Function: h5tools_str_dump_space_blocks
+ *
+ * Purpose: Prints information about a dataspace selection by appending
+ * the information to the specified string.
+ *
+ * Return: none
+ *
+ * In/Out:
+ * h5tools_str_t *str
+ *-------------------------------------------------------------------------
+ */
+void
+h5tools_str_dump_space_blocks(h5tools_str_t *str, hid_t rspace,
const h5tool_format_t *info)
{
hssize_t nblocks;
hsize_t alloc_size;
hsize_t *ptdata;
- int ndims = H5Sget_simple_extent_ndims(region);
+ int ndims = H5Sget_simple_extent_ndims(rspace);
/*
- * This function fails if the region does not have blocks.
+ * This function fails if the rspace does not have blocks.
*/
H5E_BEGIN_TRY {
- nblocks = H5Sget_select_hyper_nblocks(region);
+ nblocks = H5Sget_select_hyper_nblocks(rspace);
} H5E_END_TRY;
/* Print block information */
@@ -449,7 +515,7 @@ h5tools_str_dump_region_blocks(h5tools_str_t *str, hid_t region,
HDassert(alloc_size == (hsize_t) ((size_t) alloc_size)); /*check for overflow*/
ptdata = (hsize_t *)HDmalloc((size_t) alloc_size);
H5_CHECK_OVERFLOW(nblocks, hssize_t, hsize_t);
- H5Sget_select_hyper_blocklist(region, (hsize_t)0, (hsize_t)nblocks, ptdata);
+ H5Sget_select_hyper_blocklist(rspace, (hsize_t)0, (hsize_t)nblocks, ptdata);
for (i = 0; i < nblocks; i++) {
int j;
@@ -473,32 +539,31 @@ h5tools_str_dump_region_blocks(h5tools_str_t *str, hid_t region,
}
/*-------------------------------------------------------------------------
- * Function: h5tools_str_dump_region_points
+ * Function: h5tools_str_dump_space_points
*
- * Purpose: Prints information about a dataspace region by appending
+ * Purpose: Prints information about a dataspace selection by appending
* the information to the specified string.
*
* Return: none
*
* In/Out:
- * h5tools_context_t *ctx
* h5tools_str_t *str
*-------------------------------------------------------------------------
*/
void
-h5tools_str_dump_region_points(h5tools_str_t *str, hid_t region,
+h5tools_str_dump_space_points(h5tools_str_t *str, hid_t rspace,
const h5tool_format_t *info)
{
hssize_t npoints;
hsize_t alloc_size;
hsize_t *ptdata;
- int ndims = H5Sget_simple_extent_ndims(region);
+ int ndims = H5Sget_simple_extent_ndims(rspace);
/*
- * This function fails if the region does not have points.
+ * This function fails if the rspace does not have points.
*/
H5E_BEGIN_TRY {
- npoints = H5Sget_select_elem_npoints(region);
+ npoints = H5Sget_select_elem_npoints(rspace);
} H5E_END_TRY;
/* Print point information */
@@ -509,7 +574,7 @@ h5tools_str_dump_region_points(h5tools_str_t *str, hid_t region,
HDassert(alloc_size == (hsize_t) ((size_t) alloc_size)); /*check for overflow*/
ptdata = (hsize_t *)HDmalloc((size_t) alloc_size);
H5_CHECK_OVERFLOW(npoints, hssize_t, hsize_t);
- H5Sget_select_elem_pointlist(region, (hsize_t)0, (hsize_t)npoints, ptdata);
+ H5Sget_select_elem_pointlist(rspace, (hsize_t)0, (hsize_t)npoints, ptdata);
for (i = 0; i < npoints; i++) {
int j;
@@ -1243,9 +1308,9 @@ h5tools_str_sprint_region(h5tools_str_t *str, const h5tool_format_t *info,
region_type = H5Sget_select_type(region);
if(region_type==H5S_SEL_POINTS)
- h5tools_str_dump_region_points(str, region, info);
+ h5tools_str_dump_space_points(str, region, info);
else
- h5tools_str_dump_region_blocks(str, region, info);
+ h5tools_str_dump_space_blocks(str, region, info);
h5tools_str_append(str, "}");
diff --git a/tools/lib/h5tools_str.h b/tools/lib/h5tools_str.h
index 38697c6..6173b89 100644
--- a/tools/lib/h5tools_str.h
+++ b/tools/lib/h5tools_str.h
@@ -40,8 +40,9 @@ H5TOOLS_DLL char *h5tools_str_prefix(h5tools_str_t *str, const h5tool_format_
H5TOOLS_DLL char *h5tools_str_region_prefix(h5tools_str_t *str, const h5tool_format_t *info,
hsize_t elmtno, hsize_t *ptdata, unsigned ndims,
hsize_t max_idx[], h5tools_context_t *ctx);
-H5TOOLS_DLL void h5tools_str_dump_region_blocks(h5tools_str_t *, hid_t, const h5tool_format_t *);
-H5TOOLS_DLL void h5tools_str_dump_region_points(h5tools_str_t *, hid_t, const h5tool_format_t *);
+H5TOOLS_DLL void h5tools_str_dump_space_slabs(h5tools_str_t *, hid_t, const h5tool_format_t *, h5tools_context_t *ctx);
+H5TOOLS_DLL void h5tools_str_dump_space_blocks(h5tools_str_t *, hid_t, const h5tool_format_t *);
+H5TOOLS_DLL void h5tools_str_dump_space_points(h5tools_str_t *, hid_t, const h5tool_format_t *);
H5TOOLS_DLL void h5tools_str_sprint_region(h5tools_str_t *str, const h5tool_format_t *info, hid_t container,
void *vp);
H5TOOLS_DLL char *h5tools_str_sprint(h5tools_str_t *str, const h5tool_format_t *info,