summaryrefslogtreecommitdiffstats
path: root/src/H5Ztrans.c
diff options
context:
space:
mode:
authorSean McBride <sean@rogue-research.com>2021-11-08 18:44:06 (GMT)
committerGitHub <noreply@github.com>2021-11-08 18:44:06 (GMT)
commit9cea7c9bb9c2a73649e586cdc3bb5483a521022f (patch)
tree305edbf8a3d02fd0907aa3c81a46cca1e21cd983 /src/H5Ztrans.c
parenta8d03d30ffae22682d044782a17cefa1854de8ea (diff)
downloadhdf5-9cea7c9bb9c2a73649e586cdc3bb5483a521022f.zip
hdf5-9cea7c9bb9c2a73649e586cdc3bb5483a521022f.tar.gz
hdf5-9cea7c9bb9c2a73649e586cdc3bb5483a521022f.tar.bz2
Assume C99 fixed sized ints exist, use them (#470)
* Committing clang-format changes * Assume C99 fixed sized ints exist, use them * Assume H5_SIZEOF_LONG_DOUBLE != 0, `long double` has existed since C89 Note, this is only assuming that `long double` exists, no assumptions about its size have been touched. Didn't remove any code that does things like test if `long double` and `double` have different sizes. * Committing clang-format changes Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Diffstat (limited to 'src/H5Ztrans.c')
-rw-r--r--src/H5Ztrans.c64
1 files changed, 0 insertions, 64 deletions
diff --git a/src/H5Ztrans.c b/src/H5Ztrans.c
index ab7e9be..ea532cf 100644
--- a/src/H5Ztrans.c
+++ b/src/H5Ztrans.c
@@ -150,7 +150,6 @@ static void H5Z__xform_reduce_tree(H5Z_node *tree);
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "Unexpected type conversion operation") \
}
-#if H5_SIZEOF_LONG_DOUBLE != 0
#if CHAR_MIN >= 0
#define H5Z_XFORM_TYPE_OP(RESL, RESR, TYPE, OP, SIZE) \
{ \
@@ -212,65 +211,6 @@ static void H5Z__xform_reduce_tree(H5Z_node *tree);
H5Z_XFORM_DO_OP1((RESL), (RESR), long double, OP, (SIZE)) \
}
#endif /* CHAR_MIN >= 0 */
-#else
-#if CHAR_MIN >= 0
-#define H5Z_XFORM_TYPE_OP(RESL, RESR, TYPE, OP, SIZE) \
- { \
- if ((TYPE) == H5T_NATIVE_CHAR) \
- H5Z_XFORM_DO_OP1((RESL), (RESR), char, OP, (SIZE)) \
- else if ((TYPE) == H5T_NATIVE_SCHAR) \
- H5Z_XFORM_DO_OP1((RESL), (RESR), signed char, OP, (SIZE)) \
- else if ((TYPE) == H5T_NATIVE_SHORT) \
- H5Z_XFORM_DO_OP1((RESL), (RESR), short, OP, (SIZE)) \
- else if ((TYPE) == H5T_NATIVE_USHORT) \
- H5Z_XFORM_DO_OP1((RESL), (RESR), unsigned short, OP, (SIZE)) \
- else if ((TYPE) == H5T_NATIVE_INT) \
- H5Z_XFORM_DO_OP1((RESL), (RESR), int, OP, (SIZE)) \
- else if ((TYPE) == H5T_NATIVE_UINT) \
- H5Z_XFORM_DO_OP1((RESL), (RESR), unsigned int, OP, (SIZE)) \
- else if ((TYPE) == H5T_NATIVE_LONG) \
- H5Z_XFORM_DO_OP1((RESL), (RESR), long, OP, (SIZE)) \
- else if ((TYPE) == H5T_NATIVE_ULONG) \
- H5Z_XFORM_DO_OP1((RESL), (RESR), unsigned long, OP, (SIZE)) \
- else if ((TYPE) == H5T_NATIVE_LLONG) \
- H5Z_XFORM_DO_OP1((RESL), (RESR), long long, OP, (SIZE)) \
- else if ((TYPE) == H5T_NATIVE_ULLONG) \
- H5Z_XFORM_DO_OP1((RESL), (RESR), unsigned long long, OP, (SIZE)) \
- else if ((TYPE) == H5T_NATIVE_FLOAT) \
- H5Z_XFORM_DO_OP1((RESL), (RESR), float, OP, (SIZE)) \
- else if ((TYPE) == H5T_NATIVE_DOUBLE) \
- H5Z_XFORM_DO_OP1((RESL), (RESR), double, OP, (SIZE)) \
- }
-#else /* CHAR_MIN >= 0 */
-#define H5Z_XFORM_TYPE_OP(RESL, RESR, TYPE, OP, SIZE) \
- { \
- if ((TYPE) == H5T_NATIVE_CHAR) \
- H5Z_XFORM_DO_OP1((RESL), (RESR), char, OP, (SIZE)) \
- else if ((TYPE) == H5T_NATIVE_UCHAR) \
- H5Z_XFORM_DO_OP1((RESL), (RESR), unsigned char, OP, (SIZE)) \
- else if ((TYPE) == H5T_NATIVE_SHORT) \
- H5Z_XFORM_DO_OP1((RESL), (RESR), short, OP, (SIZE)) \
- else if ((TYPE) == H5T_NATIVE_USHORT) \
- H5Z_XFORM_DO_OP1((RESL), (RESR), unsigned short, OP, (SIZE)) \
- else if ((TYPE) == H5T_NATIVE_INT) \
- H5Z_XFORM_DO_OP1((RESL), (RESR), int, OP, (SIZE)) \
- else if ((TYPE) == H5T_NATIVE_UINT) \
- H5Z_XFORM_DO_OP1((RESL), (RESR), unsigned int, OP, (SIZE)) \
- else if ((TYPE) == H5T_NATIVE_LONG) \
- H5Z_XFORM_DO_OP1((RESL), (RESR), long, OP, (SIZE)) \
- else if ((TYPE) == H5T_NATIVE_ULONG) \
- H5Z_XFORM_DO_OP1((RESL), (RESR), unsigned long, OP, (SIZE)) \
- else if ((TYPE) == H5T_NATIVE_LLONG) \
- H5Z_XFORM_DO_OP1((RESL), (RESR), long long, OP, (SIZE)) \
- else if ((TYPE) == H5T_NATIVE_ULLONG) \
- H5Z_XFORM_DO_OP1((RESL), (RESR), unsigned long long, OP, (SIZE)) \
- else if ((TYPE) == H5T_NATIVE_FLOAT) \
- H5Z_XFORM_DO_OP1((RESL), (RESR), float, OP, (SIZE)) \
- else if ((TYPE) == H5T_NATIVE_DOUBLE) \
- H5Z_XFORM_DO_OP1((RESL), (RESR), double, OP, (SIZE)) \
- }
-#endif /* CHAR_MIN >= 0 */
-#endif /*H5_SIZEOF_LONG_DOUBLE */
#define H5Z_XFORM_DO_OP3(OP) \
{ \
@@ -1056,10 +996,8 @@ H5Z_xform_eval(H5Z_data_xform_t *data_xform_prop, void *array, size_t array_size
H5Z_XFORM_DO_OP5(float, array_size)
else if (array_type == H5T_NATIVE_DOUBLE)
H5Z_XFORM_DO_OP5(double, array_size)
-#if H5_SIZEOF_LONG_DOUBLE != 0
else if (array_type == H5T_NATIVE_LDOUBLE)
H5Z_XFORM_DO_OP5(long double, array_size)
-#endif
} /* end if */
/* Otherwise, do the full data transform */
@@ -1267,11 +1205,9 @@ H5Z__xform_find_type(const H5T_t *type)
/* Check for DOUBLE type */
else if ((tmp = (H5T_t *)H5I_object(H5T_NATIVE_DOUBLE)) && 0 == H5T_cmp(type, tmp, FALSE))
HGOTO_DONE(H5T_NATIVE_DOUBLE)
-#if H5_SIZEOF_LONG_DOUBLE != 0
/* Check for LONGDOUBLE type */
else if ((tmp = (H5T_t *)H5I_object(H5T_NATIVE_LDOUBLE)) && 0 == H5T_cmp(type, tmp, FALSE))
HGOTO_DONE(H5T_NATIVE_LDOUBLE)
-#endif
else
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "could not find matching type")