diff options
author | Dana Robinson <43805+derobins@users.noreply.github.com> | 2023-06-12 21:12:57 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-12 21:12:57 (GMT) |
commit | 1e1dac1dac58fa18f6b7788346d1ba7d3315b0f9 (patch) | |
tree | bcf0ae160f0990da3c5f6984c495ec0657d05de6 /config/cmake/ConfigureChecks.cmake | |
parent | d1d6a2187d2388e4b1c1a0f05f1f6773401f1187 (diff) | |
download | hdf5-1e1dac1dac58fa18f6b7788346d1ba7d3315b0f9.zip hdf5-1e1dac1dac58fa18f6b7788346d1ba7d3315b0f9.tar.gz hdf5-1e1dac1dac58fa18f6b7788346d1ba7d3315b0f9.tar.bz2 |
Remove long double conversion work-arounds (#3097)
Several options and public symbols that were provided to paper
over non-standard long double conversions between signed/unsigned
long and long long values were removed from the Autotools and
CMake. These were added twenty years ago, when C99 and 64-bit
platforms were less common and are no longer needed.
Autotools:
--enable-dconv-accuracy
CMake:
HDF5_WANT_DATA_ACCURACY
H5pubconf.h symbols:
H5_WANT_DATA_ACCURACY
H5_LDOUBLE_TO_LONG_SPECIAL
H5_LONG_TO_LDOUBLE_SPECIAL
H5_LDOUBLE_TO_LLONG_ACCURATE
H5_LLONG_TO_LDOUBLE_CORRECT
H5_DISABLE_SOME_LDOUBLE_CONV
Diffstat (limited to 'config/cmake/ConfigureChecks.cmake')
-rw-r--r-- | config/cmake/ConfigureChecks.cmake | 93 |
1 files changed, 0 insertions, 93 deletions
diff --git a/config/cmake/ConfigureChecks.cmake b/config/cmake/ConfigureChecks.cmake index 4be20a8..82cdb81 100644 --- a/config/cmake/ConfigureChecks.cmake +++ b/config/cmake/ConfigureChecks.cmake @@ -571,19 +571,6 @@ endif () MARK_AS_ADVANCED (HDF5_STRICT_FORMAT_CHECKS) # ---------------------------------------------------------------------- -# Decide whether the data accuracy has higher priority during data -# conversions. If not, some hard conversions will still be preferred even -# though the data may be wrong (for example, some compilers don't -# support denormalized floating values) to maximize speed. -#----------------------------------------------------------------------------- -option (HDF5_WANT_DATA_ACCURACY "IF data accuracy is guaranteed during data conversions" ON) -mark_as_advanced (HDF5_WANT_DATA_ACCURACY) -if (HDF5_WANT_DATA_ACCURACY) - set (${HDF_PREFIX}_WANT_DATA_ACCURACY 1) -endif () -MARK_AS_ADVANCED (HDF5_WANT_DATA_ACCURACY) - -# ---------------------------------------------------------------------- # Decide whether the presence of user's exception handling functions is # checked and data conversion exceptions are returned. This is mainly # for the speed optimization of hard conversions. Soft conversions can @@ -871,83 +858,3 @@ if (HDF5_BUILD_FORTRAN) message (STATUS "maximum decimal precision for C var - ${${HDF_PREFIX}_PAC_C_MAX_REAL_PRECISION}") endif() - -#----------------------------------------------------------------------------- -# Macro to determine the various conversion capabilities -#----------------------------------------------------------------------------- -macro (H5ConversionTests TEST msg) - if (NOT DEFINED ${TEST}) - TRY_RUN (${TEST}_RUN ${TEST}_COMPILE - ${CMAKE_BINARY_DIR} - ${HDF_RESOURCES_DIR}/ConversionTests.c - CMAKE_FLAGS -DCOMPILE_DEFINITIONS:STRING=-D${TEST}_TEST - OUTPUT_VARIABLE OUTPUT - ) - if (${TEST}_COMPILE) - if (${TEST}_RUN EQUAL "0") - set (${TEST} 1 CACHE INTERNAL ${msg}) - message (VERBOSE "${msg}... yes") - else () - set (${TEST} "" CACHE INTERNAL ${msg}) - message (VERBOSE "${msg}... no") - file (APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log - "Test ${TEST} Run failed with the following output and exit code:\n ${OUTPUT}\n" - ) - endif () - else () - set (${TEST} "" CACHE INTERNAL ${msg}) - message (VERBOSE "${msg}... no") - file (APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log - "Test ${TEST} Compile failed with the following output:\n ${OUTPUT}\n" - ) - endif () - - endif () -endmacro () - -#----------------------------------------------------------------------------- -# Check various conversion capabilities -#----------------------------------------------------------------------------- - -# ---------------------------------------------------------------------- -# Set the flag to indicate that the machine is using a special algorithm to convert -# 'long double' to '(unsigned) long' values. (This flag should only be set for -# the IBM Power6 Linux. When the bit sequence of long double is -# 0x4351ccf385ebc8a0bfcc2a3c3d855620, the converted value of (unsigned)long -# is 0x004733ce17af227f, not the same as the library's conversion to 0x004733ce17af2282. -# The machine's conversion gets the correct value. We define the macro and disable -# this kind of test until we figure out what algorithm they use. -#----------------------------------------------------------------------------- -H5ConversionTests (${HDF_PREFIX}_LDOUBLE_TO_LONG_SPECIAL "Checking IF your system converts long double to (unsigned) long values with special algorithm") -# ---------------------------------------------------------------------- -# Set the flag to indicate that the machine is using a special algorithm -# to convert some values of '(unsigned) long' to 'long double' values. -# (This flag should be off for all machines, except for IBM Power6 Linux, -# when the bit sequences are 003fff..., 007fff..., 00ffff..., 01ffff..., -# ..., 7fffff..., the compiler uses a unknown algorithm. We define a -# macro and skip the test for now until we know about the algorithm. -#----------------------------------------------------------------------------- -H5ConversionTests (${HDF_PREFIX}_LONG_TO_LDOUBLE_SPECIAL "Checking IF your system can convert (unsigned) long to long double values with special algorithm") -# ---------------------------------------------------------------------- -# Set the flag to indicate that the machine can accurately convert -# 'long double' to '(unsigned) long long' values. (This flag should be set for -# all machines, except for Mac OS 10.4 and SGI IRIX64 6.5. When the bit sequence -# of long double is 0x4351ccf385ebc8a0bfcc2a3c..., the values of (unsigned)long long -# start to go wrong on these two machines. Adjusting it higher to -# 0x4351ccf385ebc8a0dfcc... or 0x4351ccf385ebc8a0ffcc... will make the converted -# values wildly wrong. This test detects this wrong behavior and disable the test. -#----------------------------------------------------------------------------- -H5ConversionTests (${HDF_PREFIX}_LDOUBLE_TO_LLONG_ACCURATE "Checking IF correctly converting long double to (unsigned) long long values") -# ---------------------------------------------------------------------- -# Set the flag to indicate that the machine can accurately convert -# '(unsigned) long long' to 'long double' values. (This flag should be set for -# all machines, except for Mac OS 10.4, when the bit sequences are 003fff..., -# 007fff..., 00ffff..., 01ffff..., ..., 7fffff..., the converted values are twice -# as big as they should be. -#----------------------------------------------------------------------------- -H5ConversionTests (${HDF_PREFIX}_LLONG_TO_LDOUBLE_CORRECT "Checking IF correctly converting (unsigned) long long to long double values") -# ---------------------------------------------------------------------- -# Set the flag to indicate that the machine can accurately convert -# some long double values -#----------------------------------------------------------------------------- -H5ConversionTests (${HDF_PREFIX}_DISABLE_SOME_LDOUBLE_CONV "Checking IF the cpu is power9 and cannot correctly converting long double values") |