Improved SIMD test data to use all bits
authorErik Lindahl <erik@kth.se>
Thu, 25 May 2017 18:01:57 +0000 (20:01 +0200)
committerRoland Schulz <roland.schulz@intel.com>
Mon, 28 Aug 2017 20:17:57 +0000 (22:17 +0200)
commitb9057925955f066c1c88719f6bbff29cfc5fe666
treea7638f72707a5c7b55418950ff52b92b75e69fd5
parenta3502742b47b00cc1436511eaa7b8c355cdab757
Improved SIMD test data to use all bits

The SIMD test data now uses all available bits in the
current precision floating-point numbers, to catch errors
where we lose precision or have mistakes in single/double
conversions (e.g. return values). Since some operations now
depend on the least significant bit, a few tests have been
relaxed to allow a tolerance rather than require exact
binary matching.

The new tests caught a precision loss in a reduction
function for the SIMD-mimicking scalar functions, but this
has never been used apart from testing, and should be harmless.

Fixes #2163.

Change-Id: I6d8f19d2aafeee8f42a2034c6100fcb10f6d2e81
18 files changed:
src/gromacs/simd/scalar/scalar_util.h
src/gromacs/simd/tests/CMakeLists.txt
src/gromacs/simd/tests/data.cpp [new file with mode: 0644]
src/gromacs/simd/tests/data.h [new file with mode: 0644]
src/gromacs/simd/tests/scalar.cpp
src/gromacs/simd/tests/scalar_math.cpp
src/gromacs/simd/tests/scalar_util.cpp
src/gromacs/simd/tests/simd.cpp
src/gromacs/simd/tests/simd.h
src/gromacs/simd/tests/simd4.cpp
src/gromacs/simd/tests/simd4.h
src/gromacs/simd/tests/simd4_floatingpoint.cpp
src/gromacs/simd/tests/simd4_vector_operations.cpp
src/gromacs/simd/tests/simd_floatingpoint.cpp
src/gromacs/simd/tests/simd_floatingpoint_util.cpp
src/gromacs/simd/tests/simd_integer.cpp
src/gromacs/simd/tests/simd_math.cpp
src/gromacs/simd/tests/simd_vector_operations.cpp