Skip to content

Commit

Permalink
Merge branch 'HDFGroup:develop' into develop-comp-search
Browse files Browse the repository at this point in the history
  • Loading branch information
byrnHDF authored Dec 11, 2024
2 parents 38a8895 + 44cff23 commit 51c436c
Show file tree
Hide file tree
Showing 29 changed files with 1,598 additions and 274 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ are tentative.

| Release | New Features |
| ------- | ------------ |
| 2.0.0 | Drop Autotools support, drop the C++ API, drop the HDF5 <--> GIF tools, add complex number support, update library defaults (cache sizes, etc.), use semantic versioning |
| 2.0.0 | Drop Autotools support, drop the HDF5 <--> GIF tools, add complex number support, update library defaults (cache sizes, etc.), use semantic versioning |
| FUTURE | Multi-threaded HDF5, crashproofing / metadata journaling, Full (VFD) SWMR, encryption, digital signatures, sparse datasets, improved storage for variable-length datatypes, better Unicode support (especially on Windows) |

NOTE: In the March 2025 release we will begin using semantic versioning (https://semver.org/) and the previously announced 1.16.0 version will instead be numbered 2.0.0.
Expand Down
308 changes: 146 additions & 162 deletions bin/make_vers

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion c++/src/C2Cppfunction_map.htm
Original file line number Diff line number Diff line change
Expand Up @@ -9992,7 +9992,7 @@
none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
padding:0in 5.4pt 0in 5.4pt'>
<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
normal'>H5Iregister_type</p>
normal'>H5Iregister_type2</p>
</td>
<td width=474 valign=top style='width:355.2pt;border-top:none;border-left:
none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
Expand Down
2 changes: 1 addition & 1 deletion doxygen/dox/Overview.dox
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ documents cover a mix of tasks, concepts, and reference, to help a specific
<em>audience</em> succeed.

\par Offline reading
You can <a href="https://\RELURL/v1_14/v1_14_5/hdf5-1.14.5.doxygen.zip">download</a> it as an archive for offline reading.
You can <a href="https://\RELURL/v1_14/v1_14_5/downloads/hdf5-1.14.5.doxygen.zip">download</a> it as an archive for offline reading.

\par ToDo List
There is plenty of <a href="./todo.html">unfinished business</a>.
Expand Down
17 changes: 17 additions & 0 deletions doxygen/dox/UsersGuide.dox
Original file line number Diff line number Diff line change
Expand Up @@ -335,6 +335,23 @@

\ref sec_map

\section sec_hl HDF5 High Level APIs
\li \ref H5DO_UG
<ul>
<li> \ref sec_hldo_direct_chunk
</ul>
\li \ref H5DS_UG
<ul>
<li> \ref sec_dim_scales_stand
<li> \ref sec_dim_scales_concept
<li> \ref sec_dim_scales_spec
<li> \ref sec_dim_scales_api
</ul>
\li \ref H5IM_UG
\li \ref H5LT_UG
\li \ref H5TB_UG
\li \ref H5PT_UG

\ref sec_cltools
\li \ref H5TOOL_CP_UG
\li \ref H5TOOL_DF_UG
Expand Down
3 changes: 2 additions & 1 deletion doxygen/dox/VOLConnGuide.dox
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,8 @@ are for connector testing and should not be found in the wild. Values of 512 to
connectors.

As is the case with HDF5 filters, The HDF Group can assign you an official VOL connector value. Please
contact <a href="[email protected]">[email protected]</a> for help with this. We currently do not register connector names, though the
contact <a href="mailto:[email protected]">[email protected]</a> for help with this. We currently do not
register connector names, though the
name you've chosen will appear on the registered VOL connectors page.

As noted above, registered VOL connectors will be listed at:
Expand Down
Binary file removed doxygen/examples/H5DS_Spec.pdf
Binary file not shown.
8 changes: 4 additions & 4 deletions doxygen/examples/H5I_examples.c
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ fail_dcpl:;
hid_t obj_id;

// register a new ID type
if ((type = H5Iregister_type(128, 1024, &free_func)) < 0) {
if ((type = H5Iregister_type2(1024, &free_func)) < 0) {
ret_val = EXIT_FAILURE;
goto fail_register;
}
Expand Down Expand Up @@ -167,7 +167,7 @@ fail_register:;
hsize_t count;

// register a new ID type
if ((type = H5Iregister_type(128, 1024, NULL)) < 0) {
if ((type = H5Iregister_type2(1024, NULL)) < 0) {
ret_val = EXIT_FAILURE;
goto fail_register;
}
Expand All @@ -194,7 +194,7 @@ fail_register:;
hid_t obj_id;

// register a new ID type
if ((type = H5Iregister_type(128, 1024, NULL)) < 0) {
if ((type = H5Iregister_type2(1024, NULL)) < 0) {
ret_val = EXIT_FAILURE;
goto fail_register;
}
Expand Down Expand Up @@ -224,7 +224,7 @@ fail_register:;
H5I_type_t type;

// register a new ID type
if ((type = H5Iregister_type(128, 1024, NULL)) < 0) {
if ((type = H5Iregister_type2(1024, NULL)) < 0) {
ret_val = EXIT_FAILURE;
goto fail_register;
}
Expand Down
Binary file added doxygen/img/H5DS_fig1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doxygen/img/H5DS_fig2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doxygen/img/H5DS_fig3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doxygen/img/H5DS_fig4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doxygen/img/H5DS_fig5.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
719 changes: 719 additions & 0 deletions hl/src/H5DSpublic.h

Large diffs are not rendered by default.

11 changes: 3 additions & 8 deletions hl/src/H5PT.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@ typedef struct {
static hsize_t H5PT_ptable_count = 0;
static H5I_type_t H5PT_ptable_id_type = H5I_UNINIT;

#define H5PT_HASH_TABLE_SIZE 64

/* Packet Table private functions */
static herr_t H5PT_free_id(void *id, void **_ctx);
static herr_t H5PT_close(htbl_t *table);
Expand Down Expand Up @@ -73,8 +71,7 @@ H5PTcreate(hid_t loc_id, const char *dset_name, hid_t dtype_id, hsize_t chunk_si

/* Register the packet table ID type if this is the first table created */
if (H5PT_ptable_id_type < 0)
if ((H5PT_ptable_id_type =
H5Iregister_type((size_t)H5PT_HASH_TABLE_SIZE, 0, (H5I_free_t)H5PT_free_id)) < 0)
if ((H5PT_ptable_id_type = H5Iregister_type2(0, (H5I_free_t)H5PT_free_id)) < 0)
goto error;

/* Get memory for the table identifier */
Expand Down Expand Up @@ -187,8 +184,7 @@ H5PTcreate_fl(hid_t loc_id, const char *dset_name, hid_t dtype_id, hsize_t chunk

/* Register the packet table ID type if this is the first table created */
if (H5PT_ptable_id_type < 0)
if ((H5PT_ptable_id_type =
H5Iregister_type((size_t)H5PT_HASH_TABLE_SIZE, 0, (H5I_free_t)H5PT_free_id)) < 0)
if ((H5PT_ptable_id_type = H5Iregister_type2(0, (H5I_free_t)H5PT_free_id)) < 0)
goto error;

/* Get memory for the table identifier */
Expand Down Expand Up @@ -287,8 +283,7 @@ H5PTopen(hid_t loc_id, const char *dset_name)

/* Register the packet table ID type if this is the first table created */
if (H5PT_ptable_id_type < 0)
if ((H5PT_ptable_id_type =
H5Iregister_type((size_t)H5PT_HASH_TABLE_SIZE, 0, (H5I_free_t)H5PT_free_id)) < 0)
if ((H5PT_ptable_id_type = H5Iregister_type2(0, (H5I_free_t)H5PT_free_id)) < 0)
goto error;

table = (htbl_t *)malloc(sizeof(htbl_t));
Expand Down
2 changes: 1 addition & 1 deletion java/src/hdf/hdf5lib/H5.java
Original file line number Diff line number Diff line change
Expand Up @@ -6306,7 +6306,7 @@ public synchronized static native void H5Iclear_type(int type_id, boolean force)
// hid_t H5Iregister(H5I_type_t type, const void *object);

// typedef herr_t (*H5I_free_t)(void *);
// H5I_type_t H5Iregister_type(size_t hash_size, unsigned reserved, H5I_free_t free_func);
// H5I_type_t H5Iregister_type2(unsigned reserved, H5I_free_t free_func);

// void *H5Iremove_verify(hid_t id, H5I_type_t id_type);

Expand Down
18 changes: 18 additions & 0 deletions release_docs/RELEASE.txt
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,24 @@ New Features

Library:
--------
- The H5Iregister_type() signature has changed

The hash_size parameter has not been used since early versions of HDF5
1.8, so it has been removed and the API call has been versioned.

The old signature has been renamed to H5Iregister_type1() and is considered
deprecated:

H5I_type_t H5Iregister_type1(size_t hash_size, unsigned reserved, H5I_free_t free_func);

The new signature is H5Iregister_type2(). New code should use this
version:

H5I_type_t H5Iregister_type2(unsigned reserved, H5I_free_t free_func);

H5Iregister_type() will map to the new signature unless the library is
explicitly configured to use an older version of the API.

- H5F_LIBVER_LATEST is now an enum value

This was previously #defined to the latest H5F_libver_t API version, but
Expand Down
1 change: 1 addition & 0 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -387,6 +387,7 @@ IDE_GENERATED_PROPERTIES ("H5HL" "${H5HL_HDRS}" "${H5HL_SOURCES}" )
set (H5I_SOURCES
${HDF5_SRC_DIR}/H5I.c
${HDF5_SRC_DIR}/H5Idbg.c
${HDF5_SRC_DIR}/H5Ideprec.c
${HDF5_SRC_DIR}/H5Iint.c
${HDF5_SRC_DIR}/H5Itest.c
)
Expand Down
66 changes: 9 additions & 57 deletions src/H5I.c
Original file line number Diff line number Diff line change
Expand Up @@ -73,82 +73,34 @@ static int H5I__iterate_pub_cb(void *obj, hid_t id, void *udata);
/*******************/

/*-------------------------------------------------------------------------
* Function: H5Iregister_type
* Function: H5Iregister_type2
*
* Purpose: Public interface to H5I_register_type. Creates a new type
* Purpose: Public interface to H5I_register_type2. Creates a new type
* of ID's to give out. A specific number (RESERVED) of type
* entries may be reserved to enable "constant" values to be handed
* out which are valid IDs in the type, but which do not map to any
* data structures and are not allocated dynamically later. HASH_SIZE is
* the minimum hash table size to use for the type. FREE_FUNC is
* called with an object pointer when the object is removed from
* the type.
* data structures and are not allocated dynamically later.
* FREE_FUNC is called with an object pointer when the object is
* removed from the type.
*
* Return: Success: Type ID of the new type
* Failure: H5I_BADID
*
*-------------------------------------------------------------------------
*/
H5I_type_t
H5Iregister_type(size_t H5_ATTR_UNUSED hash_size, unsigned reserved, H5I_free_t free_func)
H5Iregister_type2(unsigned reserved, H5I_free_t free_func)
{
H5I_class_t *cls = NULL; /* New ID class */
H5I_type_t new_type = H5I_BADID; /* New ID type value */
H5I_type_t ret_value = H5I_BADID; /* Return value */
H5I_type_t ret_value = H5I_BADID;

FUNC_ENTER_API(H5I_BADID)

/* Generate a new H5I_type_t value */

/* Increment the number of types */
if (H5I_next_type_g < H5I_MAX_NUM_TYPES) {
new_type = (H5I_type_t)H5I_next_type_g;
H5I_next_type_g++;
}
else {
bool done; /* Indicate that search was successful */
int i;

/* Look for a free type to give out */
done = false;
for (i = H5I_NTYPES; i < H5I_MAX_NUM_TYPES && done == false; i++) {
if (NULL == H5I_type_info_array_g[i]) {
/* Found a free type ID */
new_type = (H5I_type_t)i;
done = true;
}
}

/* Verify that we found a type to give out */
if (done == false)
HGOTO_ERROR(H5E_ID, H5E_NOSPACE, H5I_BADID, "Maximum number of ID types exceeded");
}

/* Allocate new ID class */
if (NULL == (cls = H5MM_calloc(sizeof(H5I_class_t))))
HGOTO_ERROR(H5E_ID, H5E_CANTALLOC, H5I_BADID, "ID class allocation failed");

/* Initialize class fields */
cls->type = new_type;
cls->flags = H5I_CLASS_IS_APPLICATION;
cls->reserved = reserved;
cls->free_func = free_func;

/* Register the new ID class */
if (H5I_register_type(cls) < 0)
if (H5I_BADID == (ret_value = H5I__register_type_common(reserved, free_func)))
HGOTO_ERROR(H5E_ID, H5E_CANTINIT, H5I_BADID, "can't initialize ID class");

/* Set return value */
ret_value = new_type;

done:
/* Clean up on error */
if (ret_value < 0)
if (cls)
cls = H5MM_xfree(cls);

FUNC_LEAVE_API(ret_value)
} /* end H5Iregister_type() */
} /* end H5Iregister_type2() */

/*-------------------------------------------------------------------------
* Function: H5Itype_exists
Expand Down
97 changes: 97 additions & 0 deletions src/H5Ideprec.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright by The HDF Group. *
* All rights reserved. *
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the LICENSE file, which can be found at the root of the source code *
* distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* [email protected]. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */

/*-------------------------------------------------------------------------
*
* Created: H5Ideprec.c
*
* Purpose: Deprecated functions from the H5I interface. These
* functions are here for compatibility purposes and may be
* removed in the future. Applications should switch to the
* newer APIs.
*
*-------------------------------------------------------------------------
*/

/****************/
/* Module Setup */
/****************/

#include "H5Imodule.h" /* This source code file is part of the H5I module */

/***********/
/* Headers */
/***********/
#include "H5private.h" /* Generic Functions */
#include "H5Eprivate.h" /* Error handling */
#include "H5Ipkg.h" /* File access */

/****************/
/* Local Macros */
/****************/

/******************/
/* Local Typedefs */
/******************/

/********************/
/* Package Typedefs */
/********************/

/********************/
/* Local Prototypes */
/********************/

/*********************/
/* Package Variables */
/*********************/

/*****************************/
/* Library Private Variables */
/*****************************/

/*******************/
/* Local Variables */
/*******************/

#ifndef H5_NO_DEPRECATED_SYMBOLS
/*-------------------------------------------------------------------------
* Function: H5Iregister_type1
*
* Purpose: Public interface to H5I_register_type. Creates a new type
* of ID's to give out. A specific number (RESERVED) of type
* entries may be reserved to enable "constant" values to be handed
* out which are valid IDs in the type, but which do not map to any
* data structures and are not allocated dynamically later. HASH_SIZE is
* the minimum hash table size to use for the type. FREE_FUNC is
* called with an object pointer when the object is removed from
* the type.
*
* Return: Success: Type ID of the new type
* Failure: H5I_BADID
*
*-------------------------------------------------------------------------
*/
H5I_type_t
H5Iregister_type1(size_t H5_ATTR_UNUSED hash_size, unsigned reserved, H5I_free_t free_func)
{
H5I_type_t ret_value = H5I_BADID;

FUNC_ENTER_API(H5I_BADID)

if (H5I_BADID == (ret_value = H5I__register_type_common(reserved, free_func)))
HGOTO_ERROR(H5E_ID, H5E_CANTINIT, H5I_BADID, "can't initialize ID class");

done:
FUNC_LEAVE_API(ret_value)
} /* end H5Iregister_type1() */
#endif /* H5_NO_DEPRECATED_SYMBOLS */
Loading

0 comments on commit 51c436c

Please sign in to comment.