[hdf5] fix: add support for aarch64 _Float16 16-bit floating point type (#39798)

Co-authored-by: 王方凯 <fk.wang@hydro-tech.cn>
This commit is contained in:
王太阳 2024-07-12 00:01:05 +08:00 committed by GitHub
parent e01906b2ba
commit adb391bd2c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 24 additions and 2 deletions

View File

@ -0,0 +1,16 @@
diff --git a/src/H5private.h b/src/H5private.h
index 904aa9f..e745c03 100644
--- a/src/H5private.h
+++ b/src/H5private.h
@@ -602,7 +602,11 @@
*/
#ifdef H5_HAVE__FLOAT16
#if defined(__GNUC__)
+#if defined(__aarch64__)
+typedef __fp16 H5__Float16;
+#else
__extension__ typedef _Float16 H5__Float16;
+#endif
#else
typedef _Float16 H5__Float16;
#endif

View File

@ -10,6 +10,7 @@ vcpkg_from_github(
PATCHES
hdf5_config.patch
szip.patch
add-_Float16-type-on-aarch64.patch
)
set(ALLOW_UNSUPPORTED OFF)

View File

@ -1,7 +1,7 @@
{
"name": "hdf5",
"version": "1.14.4.3",
"port-version": 1,
"port-version": 2,
"description": "HDF5 is a data model, library, and file format for storing and managing data",
"homepage": "https://www.hdfgroup.org/downloads/hdf5/",
"license": "BSD-3-Clause",

View File

@ -3398,7 +3398,7 @@
},
"hdf5": {
"baseline": "1.14.4.3",
"port-version": 1
"port-version": 2
},
"hdr-histogram": {
"baseline": "0.11.8",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "f13d0c544b6c489babc70c6aa60414761566feda",
"version": "1.14.4.3",
"port-version": 2
},
{
"git-tree": "78bbbbd55003edb72788c0d49851f16f1b0effbe",
"version": "1.14.4.3",