diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2015-03-24 22:06:27 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2015-03-24 22:06:27 (GMT) |
commit | 460b629e0384bd8780e0a47407d4b33a8e02b1f4 (patch) | |
tree | 56ecf3d4cbb8f8bb0ee75a1afcb8e4951797f062 | |
parent | 92b1916151c9162141f153136117b03730882873 (diff) | |
download | hdf5-460b629e0384bd8780e0a47407d4b33a8e02b1f4.zip hdf5-460b629e0384bd8780e0a47407d4b33a8e02b1f4.tar.gz hdf5-460b629e0384bd8780e0a47407d4b33a8e02b1f4.tar.bz2 |
[svn-r26560] Description:
Bring r26483 from autotools_rework branch back to trunk:
Remove INTEGER_TO_LDOUBLE_ACCURATE macro/define - we no longer support
SGI systems.
Tested on:
Linux/32 2.6.18 (jam) w/serial & parallel
(daily tested on branch for >1 week)
-rw-r--r-- | config/cmake/ConfigureChecks.cmake | 6 | ||||
-rw-r--r-- | config/cmake/H5pubconf.h.in | 4 | ||||
-rwxr-xr-x | configure | 30 | ||||
-rw-r--r-- | configure.ac | 21 | ||||
-rw-r--r-- | src/H5T.c | 14 | ||||
-rw-r--r-- | src/H5Tconv.c | 14 | ||||
-rw-r--r-- | src/H5Tpkg.h | 10 | ||||
-rw-r--r-- | src/H5config.h.in | 4 | ||||
-rw-r--r-- | test/dt_arith.c | 17 |
9 files changed, 2 insertions, 118 deletions
diff --git a/config/cmake/ConfigureChecks.cmake b/config/cmake/ConfigureChecks.cmake index 217f81f..eaf2431 100644 --- a/config/cmake/ConfigureChecks.cmake +++ b/config/cmake/ConfigureChecks.cmake @@ -258,12 +258,6 @@ ENDMACRO (H5MiscConversionTest) # Check various conversion capabilities #----------------------------------------------------------------------------- -# ----------------------------------------------------------------------- -# Set flag to indicate that the machine can handle conversion from -# integers to long double. (This flag should be set "yes" for all -# machines except all SGIs, where some conversions are incorrect) -# -H5MiscConversionTest (H5_SIZEOF_LONG_DOUBLE H5_INTEGER_TO_LDOUBLE_ACCURATE "checking IF accurately converting from integers to long double") # ---------------------------------------------------------------------- # Set the flag to indicate that the machine can accurately convert # 'unsigned long' to 'float' values. diff --git a/config/cmake/H5pubconf.h.in b/config/cmake/H5pubconf.h.in index d59032f..1698005 100644 --- a/config/cmake/H5pubconf.h.in +++ b/config/cmake/H5pubconf.h.in @@ -453,10 +453,6 @@ /* Define if HDF5's high-level library headers should be included in hdf5.h */ #cmakedefine H5_INCLUDE_HL @H5_INCLUDE_HL@ -/* Define if your system can accurately convert from integers to long double - values. */ -#cmakedefine H5_INTEGER_TO_LDOUBLE_ACCURATE @H5_INTEGER_TO_LDOUBLE_ACCURATE@ - /* Define if your system can convert long double to (unsigned) long long values correctly. */ #cmakedefine H5_LDOUBLE_TO_LLONG_ACCURATE @H5_LDOUBLE_TO_LLONG_ACCURATE@ @@ -28150,36 +28150,6 @@ $as_echo "no" >&6; } ;; esac -## ----------------------------------------------------------------------- -## Set flag to indicate that the machine can handle conversion from -## integers to long double. (This flag should be set "yes" for all -## machines except all SGIs, where some conversions are incorrect) -## -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if accurately converting from integers to long double" >&5 -$as_echo_n "checking if accurately converting from integers to long double... " >&6; } - -if test ${ac_cv_sizeof_long_double} = 0; then - hdf5_cv_integer_to_ldouble_accurate=${hdf5_cv_integer_to_ldouble_accurate=no} -else - if ${hdf5_cv_integer_to_ldouble_accurate+:} false; then : - $as_echo_n "(cached) " >&6 -else - hdf5_cv_integer_to_ldouble_accurate=yes -fi - -fi - -if test ${hdf5_cv_integer_to_ldouble_accurate} = "yes"; then - -$as_echo "#define INTEGER_TO_LDOUBLE_ACCURATE 1" >>confdefs.h - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - ## ---------------------------------------------------------------------- ## Set the flag to indicate that the machine can accurately convert ## 'unsigned long' to 'float' values. diff --git a/configure.ac b/configure.ac index 68927a0..04122e8 100644 --- a/configure.ac +++ b/configure.ac @@ -2574,27 +2574,6 @@ case "`uname`" in ;; esac -## ----------------------------------------------------------------------- -## Set flag to indicate that the machine can handle conversion from -## integers to long double. (This flag should be set "yes" for all -## machines except all SGIs, where some conversions are incorrect) -## -AC_MSG_CHECKING([if accurately converting from integers to long double]) - -if test ${ac_cv_sizeof_long_double} = 0; then - hdf5_cv_integer_to_ldouble_accurate=${hdf5_cv_integer_to_ldouble_accurate=no} -else - AC_CACHE_VAL([hdf5_cv_integer_to_ldouble_accurate], [hdf5_cv_integer_to_ldouble_accurate=yes]) -fi - -if test ${hdf5_cv_integer_to_ldouble_accurate} = "yes"; then - AC_DEFINE([INTEGER_TO_LDOUBLE_ACCURATE], [1], - [Define if your system can accurately convert from integers to long double values.]) - AC_MSG_RESULT([yes]) -else - AC_MSG_RESULT([no]) -fi - ## ---------------------------------------------------------------------- ## Set the flag to indicate that the machine can accurately convert ## 'unsigned long' to 'float' values. @@ -1187,51 +1187,37 @@ H5T_init_interface(void) /* From char to floats */ status |= H5T_register(H5T_PERS_HARD, "schar_flt", native_schar, native_float, H5T__conv_schar_float, H5AC_dxpl_id, FALSE); status |= H5T_register(H5T_PERS_HARD, "schar_dbl", native_schar, native_double, H5T__conv_schar_double, H5AC_dxpl_id, FALSE); -#if H5T_CONV_INTERNAL_INTEGER_LDOUBLE status |= H5T_register(H5T_PERS_HARD, "schar_ldbl", native_schar, native_ldouble, H5T__conv_schar_ldouble, H5AC_dxpl_id, FALSE); -#endif /* H5T_CONV_INTERNAL_INTEGER_LDOUBLE */ /* From unsigned char to floats */ status |= H5T_register(H5T_PERS_HARD, "uchar_flt", native_uchar, native_float, H5T__conv_uchar_float, H5AC_dxpl_id, FALSE); status |= H5T_register(H5T_PERS_HARD, "uchar_dbl", native_uchar, native_double, H5T__conv_uchar_double, H5AC_dxpl_id, FALSE); -#if H5T_CONV_INTERNAL_INTEGER_LDOUBLE status |= H5T_register(H5T_PERS_HARD, "uchar_ldbl", native_uchar, native_ldouble, H5T__conv_uchar_ldouble, H5AC_dxpl_id, FALSE); -#endif /* H5T_CONV_INTERNAL_INTEGER_LDOUBLE */ /* From short to floats */ status |= H5T_register(H5T_PERS_HARD, "short_flt", native_short, native_float, H5T__conv_short_float, H5AC_dxpl_id, FALSE); status |= H5T_register(H5T_PERS_HARD, "short_dbl", native_short, native_double, H5T__conv_short_double, H5AC_dxpl_id, FALSE); -#if H5T_CONV_INTERNAL_INTEGER_LDOUBLE status |= H5T_register(H5T_PERS_HARD, "short_ldbl", native_short, native_ldouble, H5T__conv_short_ldouble, H5AC_dxpl_id, FALSE); -#endif /* H5T_CONV_INTERNAL_INTEGER_LDOUBLE */ /* From unsigned short to floats */ status |= H5T_register(H5T_PERS_HARD, "ushort_flt", native_ushort, native_float, H5T__conv_ushort_float, H5AC_dxpl_id, FALSE); status |= H5T_register(H5T_PERS_HARD, "ushort_dbl", native_ushort, native_double, H5T__conv_ushort_double, H5AC_dxpl_id, FALSE); -#if H5T_CONV_INTERNAL_INTEGER_LDOUBLE status |= H5T_register(H5T_PERS_HARD, "ushort_ldbl", native_ushort, native_ldouble, H5T__conv_ushort_ldouble, H5AC_dxpl_id, FALSE); -#endif /* H5T_CONV_INTERNAL_INTEGER_LDOUBLE */ /* From int to floats */ status |= H5T_register(H5T_PERS_HARD, "int_flt", native_int, native_float, H5T__conv_int_float, H5AC_dxpl_id, FALSE); status |= H5T_register(H5T_PERS_HARD, "int_dbl", native_int, native_double, H5T__conv_int_double, H5AC_dxpl_id, FALSE); -#if H5T_CONV_INTERNAL_INTEGER_LDOUBLE status |= H5T_register(H5T_PERS_HARD, "int_ldbl", native_int, native_ldouble, H5T__conv_int_ldouble, H5AC_dxpl_id, FALSE); -#endif /* H5T_CONV_INTERNAL_INTEGER_LDOUBLE */ /* From unsigned int to floats */ status |= H5T_register(H5T_PERS_HARD, "uint_flt", native_uint, native_float, H5T__conv_uint_float, H5AC_dxpl_id, FALSE); status |= H5T_register(H5T_PERS_HARD, "uint_dbl", native_uint, native_double, H5T__conv_uint_double, H5AC_dxpl_id, FALSE); -#if H5T_CONV_INTERNAL_INTEGER_LDOUBLE status |= H5T_register(H5T_PERS_HARD, "uint_ldbl", native_uint, native_ldouble, H5T__conv_uint_ldouble, H5AC_dxpl_id, FALSE); -#endif /* H5T_CONV_INTERNAL_INTEGER_LDOUBLE */ /* From long to floats */ status |= H5T_register(H5T_PERS_HARD, "long_flt", native_long, native_float, H5T__conv_long_float, H5AC_dxpl_id, FALSE); status |= H5T_register(H5T_PERS_HARD, "long_dbl", native_long, native_double, H5T__conv_long_double, H5AC_dxpl_id, FALSE); -#if H5T_CONV_INTERNAL_INTEGER_LDOUBLE status |= H5T_register(H5T_PERS_HARD, "long_ldbl", native_long, native_ldouble, H5T__conv_long_ldouble, H5AC_dxpl_id, FALSE); -#endif /* H5T_CONV_INTERNAL_INTEGER_LDOUBLE */ /* From unsigned long to floats */ #if H5T_CONV_INTERNAL_ULONG_FLT diff --git a/src/H5Tconv.c b/src/H5Tconv.c index 0e0da0b..673bd6b 100644 --- a/src/H5Tconv.c +++ b/src/H5Tconv.c @@ -7305,7 +7305,6 @@ H5T__conv_schar_double (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, * *------------------------------------------------------------------------- */ -#if H5T_CONV_INTERNAL_INTEGER_LDOUBLE herr_t H5T__conv_schar_ldouble (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, @@ -7314,7 +7313,6 @@ H5T__conv_schar_ldouble (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, { H5T_CONV_xF(SCHAR, LDOUBLE, signed char, long double, -, -); } -#endif /* H5T_CONV_INTERNAL_INTEGER_LDOUBLE */ /*------------------------------------------------------------------------- @@ -7382,7 +7380,6 @@ H5T__conv_uchar_double (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, * *------------------------------------------------------------------------- */ -#if H5T_CONV_INTERNAL_INTEGER_LDOUBLE herr_t H5T__conv_uchar_ldouble (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, @@ -7391,7 +7388,6 @@ H5T__conv_uchar_ldouble (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, { H5T_CONV_xF(UCHAR, LDOUBLE, unsigned char, long double, -, -); } -#endif /* H5T_CONV_INTERNAL_INTEGER_LDOUBLE */ /*------------------------------------------------------------------------- @@ -7459,7 +7455,6 @@ H5T__conv_short_double (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, * *------------------------------------------------------------------------- */ -#if H5T_CONV_INTERNAL_INTEGER_LDOUBLE herr_t H5T__conv_short_ldouble (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, @@ -7468,7 +7463,6 @@ H5T__conv_short_ldouble (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, { H5T_CONV_xF(SHORT, LDOUBLE, short, long double, -, -); } -#endif /* H5T_CONV_INTERNAL_INTEGER_LDOUBLE */ /*------------------------------------------------------------------------- @@ -7536,7 +7530,6 @@ H5T__conv_ushort_double (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, * *------------------------------------------------------------------------- */ -#if H5T_CONV_INTERNAL_INTEGER_LDOUBLE herr_t H5T__conv_ushort_ldouble (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, @@ -7545,7 +7538,6 @@ H5T__conv_ushort_ldouble (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, { H5T_CONV_xF(USHORT, LDOUBLE, unsigned short, long double, -, -); } -#endif /* H5T_CONV_INTERNAL_INTEGER_LDOUBLE */ /*------------------------------------------------------------------------- @@ -7613,7 +7605,6 @@ H5T__conv_int_double (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, * *------------------------------------------------------------------------- */ -#if H5T_CONV_INTERNAL_INTEGER_LDOUBLE herr_t H5T__conv_int_ldouble (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, @@ -7622,7 +7613,6 @@ H5T__conv_int_ldouble (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, { H5T_CONV_xF(INT, LDOUBLE, int, long double, -, -); } -#endif /* H5T_CONV_INTERNAL_INTEGER_LDOUBLE */ /*------------------------------------------------------------------------- @@ -7690,7 +7680,6 @@ H5T__conv_uint_double (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, * *------------------------------------------------------------------------- */ -#if H5T_CONV_INTERNAL_INTEGER_LDOUBLE herr_t H5T__conv_uint_ldouble (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, @@ -7699,7 +7688,6 @@ H5T__conv_uint_ldouble (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, { H5T_CONV_xF(UINT, LDOUBLE, unsigned int, long double, -, -); } -#endif /* H5T_CONV_INTERNAL_INTEGER_LDOUBLE */ /*------------------------------------------------------------------------- @@ -7767,7 +7755,6 @@ H5T__conv_long_double (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, * *------------------------------------------------------------------------- */ -#if H5T_CONV_INTERNAL_INTEGER_LDOUBLE herr_t H5T__conv_long_ldouble (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, @@ -7776,7 +7763,6 @@ H5T__conv_long_ldouble (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, { H5T_CONV_xF(LONG, LDOUBLE, long, long double, -, -); } -#endif /* H5T_CONV_INTERNAL_INTEGER_LDOUBLE */ /*------------------------------------------------------------------------- diff --git a/src/H5Tpkg.h b/src/H5Tpkg.h index fcc351f..3b56ac4 100644 --- a/src/H5Tpkg.h +++ b/src/H5Tpkg.h @@ -124,12 +124,6 @@ #define H5T_CONV_INTERNAL_FP_LDOUBLE 1 #endif /*H5_SIZEOF_LONG_DOUBLE && H5_CONVERT_DENORMAL_FLOAT*/ -/* Define an internal macro for converting all integers to long double. SGI compilers give some - * incorrect conversions. */ -#if (H5_WANT_DATA_ACCURACY && H5_INTEGER_TO_LDOUBLE_ACCURATE) || (!H5_WANT_DATA_ACCURACY) -#define H5T_CONV_INTERNAL_INTEGER_LDOUBLE 1 -#endif - /* 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. */ @@ -146,14 +140,14 @@ /* Define an internal macro for converting unsigned long to long double. SGI compilers give some * incorrect conversions. 64-bit Solaris does different rounding. */ -#if (H5_WANT_DATA_ACCURACY && H5_INTEGER_TO_LDOUBLE_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_LDOUBLE 1 #endif /* Define an internal macro for converting long long to long double. Mac OS 10.4 gives some * incorrect conversions. */ -#if (H5_WANT_DATA_ACCURACY && H5_INTEGER_TO_LDOUBLE_ACCURATE && defined(H5_LLONG_TO_LDOUBLE_CORRECT)) || \ +#if (H5_WANT_DATA_ACCURACY && defined(H5_LLONG_TO_LDOUBLE_CORRECT)) || \ (!H5_WANT_DATA_ACCURACY) #define H5T_CONV_INTERNAL_LLONG_LDOUBLE 1 #endif diff --git a/src/H5config.h.in b/src/H5config.h.in index e96fcdd..00fb8be 100644 --- a/src/H5config.h.in +++ b/src/H5config.h.in @@ -382,10 +382,6 @@ /* Define if HDF5's high-level library headers should be included in hdf5.h */ #undef INCLUDE_HL -/* Define if your system can accurately convert from integers to long double - values. */ -#undef INTEGER_TO_LDOUBLE_ACCURATE - /* Define if your system can convert long double to (unsigned) long long values correctly. */ #undef LDOUBLE_TO_LLONG_ACCURATE diff --git a/test/dt_arith.c b/test/dt_arith.c index 80860b1..e821da5 100644 --- a/test/dt_arith.c +++ b/test/dt_arith.c @@ -5144,7 +5144,6 @@ run_int_fp_conv(const char *name) #endif /* H5_ULLONG_TO_FP_CAST_WORKS */ #endif -#if H5_INTEGER_TO_LDOUBLE_ACCURATE #if H5_SIZEOF_LONG_DOUBLE!=H5_SIZEOF_DOUBLE nerrors += test_conv_int_fp(name, TEST_NORMAL, H5T_NATIVE_SCHAR, H5T_NATIVE_LDOUBLE); nerrors += test_conv_int_fp(name, TEST_NORMAL, H5T_NATIVE_UCHAR, H5T_NATIVE_LDOUBLE); @@ -5201,22 +5200,6 @@ run_int_fp_conv(const char *name) #endif /* H5_ULLONG_TO_FP_CAST_WORKS && H5_ULLONG_TO_LDOUBLE_PRECISION && H5_LLONG_TO_LDOUBLE_CORRECT */ #endif #endif -#else /*H5_INTEGER_TO_LDOUBLE_ACCURATE*/ - { - char str[256]; /*string */ - - HDsnprintf(str, sizeof(str), "Testing %s %s -> %s conversions", - name, "all integers", "long double"); - printf("%-70s", str); - SKIPPED(); -#if H5_SIZEOF_LONG_DOUBLE !=0 - HDputs(" Test skipped due to hardware conversion error."); -#else - HDputs(" Test skipped due to disabled long double."); -#endif - - } -#endif /*H5_INTEGER_TO_LDOUBLE_ACCURATE*/ return nerrors; } |