Skip to content

Commit

Permalink
Post-rebase fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
jhendersonHDF committed Oct 29, 2024
1 parent d815e2b commit d5746cc
Show file tree
Hide file tree
Showing 16 changed files with 51 additions and 51 deletions.
File renamed without changes.
10 changes: 5 additions & 5 deletions doxygen/dox/DDLBNF116.dox → doxygen/dox/DDLBNF200.dox
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
/** \page DDLBNF116 DDL in BNF for HDF5 1.16.0 and above
/** \page DDLBNF200 DDL in BNF for HDF5 2.0.0 and above

\todo Revise this & break it up!

\section intro116 Introduction
\section intro200 Introduction

This document contains the data description language (DDL) for an HDF5 file. The
description is in Backus-Naur Form (BNF).

\section expo116 Explanation of Symbols
\section expo200 Explanation of Symbols

This section contains a brief explanation of the symbols used in the DDL.

Expand All @@ -23,7 +23,7 @@ This section contains a brief explanation of the symbols used in the DDL.
TBD To Be Decided
\endcode

\section ddl116 The DDL
\section ddl200 The DDL

\code{.unparsed}
<file> ::= HDF5 <file_name> { <file_super_block>opt <root_group> }
Expand Down Expand Up @@ -526,7 +526,7 @@ This section contains a brief explanation of the symbols used in the DDL.
<hex_value> ::= 0x[0-F][0-F]+ | [0-F][0-F]+
\endcode

\section example116 An Example of an HDF5 File in DDL
\section example200 An Example of an HDF5 File in DDL

\code{.unparsed}
HDF5 "example.h5" {
Expand Down
2 changes: 1 addition & 1 deletion doxygen/dox/IntroHDF5.dox
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ Useful tools for working with HDF5 files include:
\li HDFView: A java browser to view HDF (HDF4 and HDF5) files

<h4>h5dump</h4>
The h5dump utility displays the contents of an HDF5 file in Data Description Language (\ref DDLBNF116).
The h5dump utility displays the contents of an HDF5 file in Data Description Language (\ref DDLBNF200).
Below is an example of h5dump output for an HDF5 file that contains no objects:
\code
$ h5dump file.h5
Expand Down
4 changes: 2 additions & 2 deletions doxygen/dox/LearnBasics1.dox
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,7 @@ inadvertently left open. A File Access property controls how the file is closed.
The HDF Group has developed tools for examining the contents of HDF5 files. The tool used throughout the HDF5 tutorial
is the HDF5 dumper, <code style="background-color:whitesmoke;">h5dump</code>, which displays the file contents in human-readable form. The output of <code style="background-color:whitesmoke;">h5dump</code> is an ASCII
display formatted according to the HDF5 DDL grammar. This grammar is defined, using Backus-Naur Form, in the
\ref DDLBNF116.
\ref DDLBNF200.

To view the HDF5 file contents, simply type:
\code
Expand Down Expand Up @@ -394,7 +394,7 @@ HDF5 "file.h5" {

\subsection subsecLBFileExampleDDL File Definition in DDL
The simplified DDL file definition for creating an HDF5 file. For simplicity, a simplified DDL is used in this tutorial. A
complete and more rigorous DDL can be found in the \ref DDLBNF116.
complete and more rigorous DDL can be found in the \ref DDLBNF200.

The following symbol definitions are used in the DDL:
\code
Expand Down
2 changes: 1 addition & 1 deletion doxygen/dox/Specifications.dox
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
\li \ref DDLBNF110
\li \ref DDLBNF112
\li \ref DDLBNF114
\li \ref DDLBNF116
\li \ref DDLBNF200

\section File Format

Expand Down
6 changes: 3 additions & 3 deletions doxygen/examples/H5.format.html
Original file line number Diff line number Diff line change
Expand Up @@ -476,10 +476,10 @@
and do not represent any values or padding in the file.
</p>

<a name="ChangesForHdf5_1_16">
<h3>I.B. Changes for HDF5 1.16</h3></a>
<a name="ChangesForHdf5_2_0">
<h3>I.B. Changes for HDF5 2.0</h3></a>
<p>The following sections have been
changed or added for the 1.16 release:</p>
changed or added for the 2.0 release:</p>
<ul>
<li>Under <a href="#DatatypeMessage">&ldquo;The Datatype Message&rdquo;</a>,
in the Description for &ldquo;Fields:Datatype Message&rdquo;,
Expand Down
8 changes: 4 additions & 4 deletions release_docs/RELEASE.txt
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ New Features
platforms/compilers that support them. These types have been implemented with a
new datatype class, H5T_COMPLEX. Note that any datatypes of class H5T_COMPLEX
will not be readable with previous versions of HDF5. If a file is accessed with
a library version bounds "high" setting less than H5F_LIBVER_V116, an error will
a library version bounds "high" setting less than H5F_LIBVER_V200, an error will
occur if the application tries to create an object with a complex number datatype.
If compatibility with previous versions of HDF5 is desired, applications should
instead consider adopting one of the existing conventions at
Expand Down Expand Up @@ -340,9 +340,9 @@ New Features
Simple example programs showing how to use complex number datatypes have
been added in the following files:

- HDF5Examples/C/H5T/116/h5ex_t_complex.c (Uses C99 complex number types)
- HDF5Examples/C/H5T/116/h5ex_t_complex_msvc.c (Uses MSVC complex number types)
- HDF5Examples/C/H5T/116/h5ex_t_complex_custom.c (Uses H5Tcomplex_create to create
- HDF5Examples/C/H5T/200/h5ex_t_complex.c (Uses C99 complex number types)
- HDF5Examples/C/H5T/200/h5ex_t_complex_msvc.c (Uses MSVC complex number types)
- HDF5Examples/C/H5T/200/h5ex_t_complex_custom.c (Uses H5Tcomplex_create to create
a custom complex number type)

- The H5VLstart_lib_state / H5VLfinish_lib_state API routines for pass-
Expand Down
2 changes: 1 addition & 1 deletion src/H5Fmodule.h
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@
* Tools</a>
* page under
* <a href="https://\DOXURL/_view_tools_command.html">Command-line Tools</a>.
* The HDF5 DDL grammar is described in the document \ref DDLBNF116.
* The HDF5 DDL grammar is described in the document \ref DDLBNF200.
*
* \subsection subsec_file_summary File Function Summaries
* General library (\ref H5 functions and macros), (\ref H5F functions), file related
Expand Down
2 changes: 1 addition & 1 deletion src/H5Gmodule.h
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,7 @@
*
* h5dump is described on the “HDF5 Tools” page of the \ref RM.
*
* The HDF5 DDL grammar is described in the @ref DDLBNF116.
* The HDF5 DDL grammar is described in the @ref DDLBNF200.
*
* \subsection subsec_group_function Group Function Summaries
* Functions that can be used with groups (\ref H5G functions) and property list functions that can used
Expand Down
32 changes: 16 additions & 16 deletions src/H5Tconv_float.c
Original file line number Diff line number Diff line change
Expand Up @@ -202,15 +202,15 @@ H5T__conv_f_f_loop(const H5T_t *src_p, const H5T_t *dst_p, const H5T_conv_ctx_t
for (size_t elmtno = 0; elmtno < nelmts; elmtno++) {
H5T_conv_float_specval_t specval_type; /* floating-point value type (regular, +/-Inf, +/-0, NaN) */
H5T_conv_ret_t except_ret = H5T_CONV_UNHANDLED; /* return of conversion exception callback function */
ssize_t bitno = 0; /* bit number */
int64_t expo; /* exponent */
size_t implied; /* destination implied bits */
size_t mpos; /* offset to useful mant in src */
size_t msize = 0; /* useful size of mantissa in src */
size_t mrsh; /* amount to right shift mantissa */
bool reverse = true; /* if reversed the order of destination */
bool denormalized = false; /* is either source or destination denormalized? */
bool carry = false; /* carry after rounding mantissa */
ssize_t bitno = 0; /* bit number */
int64_t expo; /* exponent */
size_t implied; /* destination implied bits */
size_t mpos; /* offset to useful mant in src */
size_t msize = 0; /* useful size of mantissa in src */
size_t mrsh; /* amount to right shift mantissa */
bool reverse = true; /* if reversed the order of destination */
bool denormalized = false; /* is either source or destination denormalized? */
bool carry = false; /* carry after rounding mantissa */

/*
* If the source and destination buffers overlap then use a
Expand Down Expand Up @@ -871,13 +871,13 @@ H5T__conv_f_i_loop(const H5T_t *src_p, const H5T_t *dst_p, const H5T_conv_ctx_t
for (size_t elmtno = 0; elmtno < nelmts; elmtno++) {
H5T_conv_float_specval_t specval_type; /* floating-point value type (regular, +/-Inf, +/-0, NaN) */
H5T_conv_ret_t except_ret = H5T_CONV_UNHANDLED; /* return of conversion exception callback function */
uint64_t sign; /* source sign bit value */
hssize_t expo; /* source exponent */
hssize_t shift_val; /* shift value when shifting mantissa by exponent */
ssize_t msb_pos_s; /* first bit(MSB) in an integer */
ssize_t new_msb_pos; /* MSB position after shifting mantissa by exponent */
bool truncated = false; /* if fraction value is dropped */
bool reverse = true; /* if reversed the order of destination */
uint64_t sign; /* source sign bit value */
hssize_t expo; /* source exponent */
hssize_t shift_val; /* shift value when shifting mantissa by exponent */
ssize_t msb_pos_s; /* first bit(MSB) in an integer */
ssize_t new_msb_pos; /* MSB position after shifting mantissa by exponent */
bool truncated = false; /* if fraction value is dropped */
bool reverse = true; /* if reversed the order of destination */

/*
* If the source and destination buffers overlap then use a
Expand Down
4 changes: 2 additions & 2 deletions src/H5Tmodule.h
Original file line number Diff line number Diff line change
Expand Up @@ -3931,8 +3931,8 @@ filled according to the value of this property. The padding can be:
* datatypes.
*
* The currently supported text format used by #H5LTtext_to_dtype and #H5LTdtype_to_text is the
* data description language (DDL) and conforms to the \ref DDLBNF116. The portion of the
* \ref DDLBNF116 that defines HDF5 datatypes appears below.
* data description language (DDL) and conforms to the \ref DDLBNF200. The portion of the
* \ref DDLBNF200 that defines HDF5 datatypes appears below.
*
* <em>The definition of HDF5 datatypes from the HDF5 DDL</em>
* \code
Expand Down
2 changes: 1 addition & 1 deletion src/H5Tpublic.h
Original file line number Diff line number Diff line change
Expand Up @@ -1807,7 +1807,7 @@ H5_DLL int H5Tget_array_dims2(hid_t type_id, hsize_t dims[]);
* The datatype identifier returned from this function should be
* released with H5Tclose() or resource leaks will result.
*
* \since 1.16.0
* \since 2.0.0
*
*/
H5_DLL hid_t H5Tcomplex_create(hid_t base_type_id);
Expand Down
20 changes: 10 additions & 10 deletions test/dtypes.c
Original file line number Diff line number Diff line change
Expand Up @@ -11999,7 +11999,7 @@ verify_version(hid_t dtype, H5F_libver_t low, H5F_libver_t high, unsigned *highe
H5T_t *base_dtypep = NULL; /* Internal structure of a datatype */

if (low == H5F_LIBVER_EARLIEST) {
if (high >= H5F_LIBVER_V116) {
if (high >= H5F_LIBVER_V200) {
/* Complex number type will upgrade other compound fields */
if (dtypep->shared->version != H5O_DTYPE_VERSION_5)
TEST_ERROR;
Expand All @@ -12010,7 +12010,7 @@ verify_version(hid_t dtype, H5F_libver_t low, H5F_libver_t high, unsigned *highe
}
}
else {
if (high >= H5F_LIBVER_V116) {
if (high >= H5F_LIBVER_V200) {
/* Complex number type will upgrade other compound fields */
if (dtypep->shared->version != MAX(H5O_DTYPE_VERSION_5, H5O_dtype_ver_bounds[low]))
TEST_ERROR;
Expand Down Expand Up @@ -12096,7 +12096,7 @@ verify_version(hid_t dtype, H5F_libver_t low, H5F_libver_t high, unsigned *highe
break;
}
case H5T_ENUM:
if (high >= H5F_LIBVER_V116) {
if (high >= H5F_LIBVER_V200) {
/* Insertion order of compound fields changes whether or not other
* fields get upgraded. Until this is fixed, special-case the logic
* for the enum datatype. Assumes complex number type gets inserted
Expand All @@ -12113,7 +12113,7 @@ verify_version(hid_t dtype, H5F_libver_t low, H5F_libver_t high, unsigned *highe
case H5T_COMPLEX: {
H5T_t *base_dtypep = NULL;

if (high < H5F_LIBVER_V116)
if (high < H5F_LIBVER_V200)
PUTS_ERROR("invalid high version bound for complex number datatype");
if (H5O_dtype_ver_bounds[high] < H5O_DTYPE_VERSION_5)
PUTS_ERROR("invalid datatype encoding version for complex number datatype");
Expand Down Expand Up @@ -12251,7 +12251,7 @@ test_versionbounds_create_datatype(H5F_libver_t low, H5F_libver_t high, hid_t *d
if (arr_chartype < 0)
PUTS_ERROR("couldn't create array datatype");

if (high >= H5F_LIBVER_V116) {
if (high >= H5F_LIBVER_V200) {
/* Create a float complex datatype */
float_cpxtype = H5Tcomplex_create(H5T_NATIVE_FLOAT);
if (float_cpxtype < 0)
Expand All @@ -12275,7 +12275,7 @@ test_versionbounds_create_datatype(H5F_libver_t low, H5F_libver_t high, hid_t *d
if (ret < 0)
PUTS_ERROR("couldn't insert compound datatype member");

if (high >= H5F_LIBVER_V116) {
if (high >= H5F_LIBVER_V200) {
/* Insert created float complex field */
ret = H5Tinsert(simple_cmp_type, "float_complex", HOFFSET(simple_cmp_t, float_complex_sim),
float_cpxtype);
Expand Down Expand Up @@ -12367,7 +12367,7 @@ test_versionbounds_create_datatype(H5F_libver_t low, H5F_libver_t high, hid_t *d

if (H5Tclose(arr_chartype) < 0)
PUTS_ERROR("couldn't close datatype");
if (high >= H5F_LIBVER_V116) {
if (high >= H5F_LIBVER_V200) {
if (H5Tclose(float_cpxtype) < 0)
PUTS_ERROR("couldn't close datatype");
}
Expand Down Expand Up @@ -12546,7 +12546,7 @@ static int
test_complex_type_versionbounds(void)
{
H5F_libver_t versions[] = {H5F_LIBVER_EARLIEST, H5F_LIBVER_V18, H5F_LIBVER_V110,
H5F_LIBVER_V112, H5F_LIBVER_V114, H5F_LIBVER_V116};
H5F_LIBVER_V112, H5F_LIBVER_V114, H5F_LIBVER_V200};
hsize_t arr_dim[] = {5}; /* Length of the array */
hid_t file = H5I_INVALID_HID; /* File ID */
hid_t space = H5I_INVALID_HID; /* Dataspace ID */
Expand Down Expand Up @@ -12607,9 +12607,9 @@ test_complex_type_versionbounds(void)
if (file < 0)
TEST_ERROR;

if (high < H5F_LIBVER_V116) {
if (high < H5F_LIBVER_V200) {
/* Ensure that complex number type objects can't be created with
* a library version bounds "high" setting < 1.16.
* a library version bounds "high" setting < 2.0.
*/

H5E_BEGIN_TRY
Expand Down
8 changes: 4 additions & 4 deletions test/tfile.c
Original file line number Diff line number Diff line change
Expand Up @@ -7163,9 +7163,9 @@ test_libver_bounds_datatype_check(hid_t fapl, hid_t tid)
ret = H5Pget_libver_bounds(fapl, &low, &high);
CHECK(ret, FAIL, "H5Pget_libver_bounds");

/* Complex numbers can't be created with a high version bound < 1.16 */
/* Complex numbers can't be created with a high version bound < 2.0 */
is_complex = (H5T_COMPLEX == H5Tget_class(tid));
if (is_complex && high < H5F_LIBVER_V116)
if (is_complex && high < H5F_LIBVER_V200)
return;

/* Create the file with the input fapl */
Expand Down Expand Up @@ -7267,8 +7267,8 @@ test_libver_bounds_datatype_check(hid_t fapl, hid_t tid)
if (ret < 0) /* Invalid low/high combinations */
continue;

/* Complex numbers can't be created with a high version bound < 1.16 */
if (is_complex && high < H5F_LIBVER_V116)
/* Complex numbers can't be created with a high version bound < 2.0 */
if (is_complex && high < H5F_LIBVER_V200)
continue;

/* Open the file */
Expand Down

0 comments on commit d5746cc

Please sign in to comment.