summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLarry Knox <lrknox@hdfgroup.org>2022-04-02 20:45:43 (GMT)
committerGitHub <noreply@github.com>2022-04-02 20:45:43 (GMT)
commit309601db39422dc7843566b197678b262a634f7b (patch)
tree580e47989b25e1f87b6cd6cd3c7759763106dec1 /src
parent2f9c53739b5149875dbb45f3a12091c0782b1d10 (diff)
downloadhdf5-309601db39422dc7843566b197678b262a634f7b.zip
hdf5-309601db39422dc7843566b197678b262a634f7b.tar.gz
hdf5-309601db39422dc7843566b197678b262a634f7b.tar.bz2
1.12 New References for Dimension Scales (#1139) (#1574)
* New references for Dimension Scale APIs (#1139) * Enable usage of new-style references with dimension scale APIs * Add API to check if an object ID represents a native connector object * Modified code to use new function H5DSwith_new_ref to determine if new references should be used with Dimension Scales. The new function return TRUE if non-native connector is used or if H5_DIMENSION_SCALES_WITH_NEW_REF varible is define at configure time (--enable-dimension-scales-with-new-ref). Tested on jelly. ToDo: generate testing file on BE system and enable the test; add flag to CMake; test netCDF-4 with the new references. * Adding new test files generated on BE system (hedgehog) created by 32 and 64-bit library. test_ds chokes on test_ds_le_new_ref.h5 on BE system; test passes for test_ds_be_new_ref-32bit.h5 for the 32-bit library and fails for the 64-bit library, and vice versa. I am checking the files for further investigation; but current implementation of the new references is not portable between LE and BE systems, and 32 and 64-bit systems. * Minor fixes for testing issues * Update test_ds.c Enabled broken test; tests pass now. * Update RELEASE.txt Documented new option to use new references with the HDF5 dimension scales APIs (H5DS*). * Update MANIFEST for new 32-bit new-style references test file for H5DS APIs * Update 'dimension scales w/ new-style refs' feature based on review Co-authored-by: Elena <epourmal@hdfgroup.org> * Fix H5DS warnings related to new H5DSwith_new_ref and H5VLobject_is_native APIs (#1184) Co-authored-by: jhendersonHDF <jhenderson@hdfgroup.org> Co-authored-by: Elena <epourmal@hdfgroup.org>
Diffstat (limited to 'src')
-rw-r--r--src/H5VL.c33
-rw-r--r--src/H5VLpublic.h13
-rw-r--r--src/libhdf5.settings.in51
3 files changed, 72 insertions, 25 deletions
diff --git a/src/H5VL.c b/src/H5VL.c
index f65d149..bbfbd82 100644
--- a/src/H5VL.c
+++ b/src/H5VL.c
@@ -654,6 +654,39 @@ done:
FUNC_LEAVE_API(ret_value)
} /* H5VLobject() */
+/*---------------------------------------------------------------------------
+ * Function: H5VLobject_is_native
+ *
+ * Purpose: Determines whether an object ID represents a native VOL
+ * connector object.
+ *
+ * Return: Non-negative on success/Negative on failure
+ *
+ *---------------------------------------------------------------------------
+ */
+herr_t
+H5VLobject_is_native(hid_t obj_id, hbool_t *is_native)
+{
+ H5VL_object_t *vol_obj = NULL;
+ herr_t ret_value = SUCCEED;
+
+ FUNC_ENTER_API(FAIL)
+ H5TRACE2("e", "i*b", obj_id, is_native);
+
+ if (!is_native)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "`is_native` argument is NULL")
+
+ /* Get the location object for the ID */
+ if (NULL == (vol_obj = H5VL_vol_object(obj_id)))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid object identifier")
+
+ if (H5VL_object_is_native(vol_obj, is_native) < 0)
+ HGOTO_ERROR(H5E_VOL, H5E_CANTGET, FAIL, "can't determine if object is a native connector object")
+
+done:
+ FUNC_LEAVE_API(ret_value)
+} /* H5VLobject_is_native() */
+
/*-------------------------------------------------------------------------
* Function: H5VLget_file_type
*
diff --git a/src/H5VLpublic.h b/src/H5VLpublic.h
index 1f62f3a..a55c2b98 100644
--- a/src/H5VLpublic.h
+++ b/src/H5VLpublic.h
@@ -334,6 +334,19 @@ H5_DLL herr_t H5VLunregister_connector(hid_t connector_id);
* \since 1.12.0
*/
H5_DLL herr_t H5VLquery_optional(hid_t obj_id, H5VL_subclass_t subcls, int opt_type, hbool_t *supported);
+/**
+ * \ingroup H5VL
+ * \brief Determines whether an object ID represents a native
+ * VOL connector object.
+ *
+ * \param[in] obj_id Object identifier
+ * \param[in] is_native Boolean determining whether object is a native
+ * VOL connector object
+ * \return \herr_t
+ *
+ * \since 1.13.0
+ */
+H5_DLL herr_t H5VLobject_is_native(hid_t obj_id, hbool_t *is_native);
#ifdef __cplusplus
}
diff --git a/src/libhdf5.settings.in b/src/libhdf5.settings.in
index a4d4af6..7fe1a36 100644
--- a/src/libhdf5.settings.in
+++ b/src/libhdf5.settings.in
@@ -67,28 +67,29 @@ Languages:
Features:
---------
- Parallel HDF5: @PARALLEL@
-Parallel Filtered Dataset Writes: @PARALLEL_FILTERED_WRITES@
- Large Parallel I/O: @LARGE_PARALLEL_IO@
- High-level library: @HDF5_HL@
- Build HDF5 Tests: @HDF5_TESTS@
- Build HDF5 Tools: @HDF5_TOOLS@
- Threadsafety: @THREADSAFE@ (recursive RW locks: @RECURSIVE_RW_LOCKS@)
- Default API mapping: @DEFAULT_API_VERSION@
- With deprecated public symbols: @DEPRECATED_SYMBOLS@
- I/O filters (external): @EXTERNAL_FILTERS@
- MPE: @MPE@
- Map (H5M) API: @MAP_API@
- Direct VFD: @DIRECT_VFD@
- Mirror VFD: @MIRROR_VFD@
- (Read-Only) S3 VFD: @ROS3_VFD@
- (Read-Only) HDFS VFD: @HAVE_LIBHDFS@
- dmalloc: @HAVE_DMALLOC@
- Packages w/ extra debug output: @INTERNAL_DEBUG_OUTPUT@
- API tracing: @TRACE_API@
- Using memory checker: @USINGMEMCHECKER@
- Memory allocation sanity checks: @MEMORYALLOCSANITYCHECK@
- Function stack tracing: @CODESTACK@
- Use file locking: @DESIRED_FILE_LOCKING@
- Strict file format checks: @STRICT_FORMAT_CHECKS@
- Optimization instrumentation: @INSTRUMENT_LIBRARY@
+ Parallel HDF5: @PARALLEL@
+ Parallel Filtered Dataset Writes: @PARALLEL_FILTERED_WRITES@
+ Large Parallel I/O: @LARGE_PARALLEL_IO@
+ High-level library: @HDF5_HL@
+Dimension scales w/ new references: @DIMENSION_SCALES_WITH_NEW_REF@
+ Build HDF5 Tests: @HDF5_TESTS@
+ Build HDF5 Tools: @HDF5_TOOLS@
+ Threadsafety: @THREADSAFE@
+ Default API mapping: @DEFAULT_API_VERSION@
+ With deprecated public symbols: @DEPRECATED_SYMBOLS@
+ I/O filters (external): @EXTERNAL_FILTERS@
+ MPE: @MPE@
+ Map (H5M) API: @MAP_API@
+ Direct VFD: @DIRECT_VFD@
+ Mirror VFD: @MIRROR_VFD@
+ (Read-Only) S3 VFD: @ROS3_VFD@
+ (Read-Only) HDFS VFD: @HAVE_LIBHDFS@
+ dmalloc: @HAVE_DMALLOC@
+ Packages w/ extra debug output: @INTERNAL_DEBUG_OUTPUT@
+ API tracing: @TRACE_API@
+ Using memory checker: @USINGMEMCHECKER@
+ Memory allocation sanity checks: @MEMORYALLOCSANITYCHECK@
+ Function stack tracing: @CODESTACK@
+ Use file locking: @DESIRED_FILE_LOCKING@
+ Strict file format checks: @STRICT_FORMAT_CHECKS@
+ Optimization instrumentation: @INSTRUMENT_LIBRARY@