mirror of
https://github.com/HDFGroup/hdf5.git
synced 2024-11-27 02:10:55 +08:00
[svn-r26485] Description:
Remove the ULONG_TO_FLOAT_ACCURATE macro/define, we no longer support the Sandia system where it was necessary. Tested on: Mac OSX 10.10.2 (amazon) w/serial & parallel (h5committest not necessary on this branch)
This commit is contained in:
parent
cac405283f
commit
74dc896691
@ -258,15 +258,6 @@ ENDMACRO (H5MiscConversionTest)
|
||||
# Check various conversion capabilities
|
||||
#-----------------------------------------------------------------------------
|
||||
|
||||
# ----------------------------------------------------------------------
|
||||
# Set the flag to indicate that the machine can accurately convert
|
||||
# 'unsigned long' to 'float' values.
|
||||
# (This flag should be set for all machines, except for Pathscale compiler
|
||||
# on Sandia's Linux machine where the compiler interprets 'unsigned long'
|
||||
# values as negative when the first bit of 'unsigned long' is on during
|
||||
# the conversion to float.)
|
||||
#
|
||||
H5ConversionTests (H5_ULONG_TO_FLOAT_ACCURATE "Checking IF accurately converting unsigned long to float values")
|
||||
# ----------------------------------------------------------------------
|
||||
# Set the flag to indicate that the machine can accurately convert
|
||||
# 'unsigned (long) long' values to 'float' and 'double' values.
|
||||
|
@ -410,38 +410,6 @@ done:
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef H5_ULONG_TO_FLOAT_ACCURATE_TEST
|
||||
|
||||
int main(void)
|
||||
{
|
||||
int ret = 0;
|
||||
unsigned long l1;
|
||||
unsigned long l2;
|
||||
unsigned long l3;
|
||||
float f1;
|
||||
float f2;
|
||||
float f3;
|
||||
|
||||
|
||||
if(sizeof(unsigned long)==8) {
|
||||
l1 = 0xffffffffffffffffUL;
|
||||
l2 = 0xffffffffffff0000UL;
|
||||
l3 = 0xf000000000000000UL;
|
||||
|
||||
f1 = (float)l1;
|
||||
f2 = (float)l2;
|
||||
f3 = (float)l3;
|
||||
|
||||
if((f1 < 0) || (f2 < 0) || (f3 < 0))
|
||||
ret = 1;
|
||||
}
|
||||
|
||||
done:
|
||||
exit(ret);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef H5_ULONG_TO_FP_BOTTOM_BIT_ACCURATE_TEST
|
||||
|
||||
#include <string.h>
|
||||
|
@ -676,10 +676,6 @@
|
||||
correct precision. */
|
||||
#cmakedefine H5_ULLONG_TO_LDOUBLE_PRECISION @H5_ULLONG_TO_LDOUBLE_PRECISION@
|
||||
|
||||
/* Define if your system accurately converting unsigned long to float values.
|
||||
*/
|
||||
#cmakedefine H5_ULONG_TO_FLOAT_ACCURATE @H5_ULONG_TO_FLOAT_ACCURATE@
|
||||
|
||||
/* Define if your system can accurately convert unsigned (long) long values to
|
||||
floating-point values. */
|
||||
#cmakedefine H5_ULONG_TO_FP_BOTTOM_BIT_ACCURATE @H5_ULONG_TO_FP_BOTTOM_BIT_ACCURATE@
|
||||
|
49
configure.ac
49
configure.ac
@ -2442,55 +2442,6 @@ case "`uname`" in
|
||||
;;
|
||||
esac
|
||||
|
||||
## ----------------------------------------------------------------------
|
||||
## Set the flag to indicate that the machine can accurately convert
|
||||
## 'unsigned long' to 'float' values.
|
||||
## (This flag should be set for all machines, except for Pathscale compiler
|
||||
## on Sandia's Linux machine where the compiler interprets 'unsigned long'
|
||||
## values as negative when the first bit of 'unsigned long' is on during
|
||||
## the conversion to float.)
|
||||
##
|
||||
AC_MSG_CHECKING([if accurately converting unsigned long to float values])
|
||||
|
||||
AC_CACHE_VAL([hdf5_cv_ulong_to_float_accurate],
|
||||
[AC_TRY_RUN([
|
||||
int main(void)
|
||||
{
|
||||
int ret = 0;
|
||||
unsigned long l1;
|
||||
unsigned long l2;
|
||||
unsigned long l3;
|
||||
float f1;
|
||||
float f2;
|
||||
float f3;
|
||||
|
||||
|
||||
if(sizeof(unsigned long)==8) {
|
||||
l1 = 0xffffffffffffffffUL;
|
||||
l2 = 0xffffffffffff0000UL;
|
||||
l3 = 0xf000000000000000UL;
|
||||
|
||||
f1 = (float)l1;
|
||||
f2 = (float)l2;
|
||||
f3 = (float)l3;
|
||||
|
||||
if((f1 < 0) || (f2 < 0) || (f3 < 0))
|
||||
ret = 1;
|
||||
}
|
||||
|
||||
done:
|
||||
exit(ret);
|
||||
}
|
||||
], [hdf5_cv_ulong_to_float_accurate=yes], [hdf5_cv_ulong_to_float_accurate=no],)])
|
||||
|
||||
if test ${hdf5_cv_ulong_to_float_accurate} = "yes"; then
|
||||
AC_DEFINE([ULONG_TO_FLOAT_ACCURATE], [1],
|
||||
[Define if your system accurately converting unsigned long to float values.])
|
||||
AC_MSG_RESULT([yes])
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
fi
|
||||
|
||||
|
||||
## ----------------------------------------------------------------------
|
||||
## Set the flag to indicate that the machine can accurately convert
|
||||
|
@ -127,7 +127,7 @@
|
||||
/* Define an internal macro for converting unsigned long to float.
|
||||
* Pathscale compiler on Sandia's Linux machine has some problem.
|
||||
* 64-bit Solaris does different rounding. */
|
||||
#if (H5_WANT_DATA_ACCURACY && H5_ULONG_TO_FLOAT_ACCURATE && H5_ULONG_TO_FP_BOTTOM_BIT_ACCURATE) || \
|
||||
#if (H5_WANT_DATA_ACCURACY && H5_ULONG_TO_FP_BOTTOM_BIT_ACCURATE) || \
|
||||
(!H5_WANT_DATA_ACCURACY)
|
||||
#define H5T_CONV_INTERNAL_ULONG_FLT 1
|
||||
#endif
|
||||
|
@ -5112,9 +5112,7 @@ run_int_fp_conv(const char *name)
|
||||
nerrors += test_conv_int_fp(name, TEST_NORMAL, H5T_NATIVE_LONG, H5T_NATIVE_FLOAT);
|
||||
nerrors += test_conv_int_fp(name, TEST_NORMAL, H5T_NATIVE_LONG, H5T_NATIVE_DOUBLE);
|
||||
|
||||
#if H5_ULONG_TO_FLOAT_ACCURATE
|
||||
nerrors += test_conv_int_fp(name, TEST_NORMAL, H5T_NATIVE_ULONG, H5T_NATIVE_FLOAT);
|
||||
#endif
|
||||
nerrors += test_conv_int_fp(name, TEST_NORMAL, H5T_NATIVE_ULONG, H5T_NATIVE_DOUBLE);
|
||||
#endif
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user