More SIMD math argument checking, added unsafe options
authorErik Lindahl <erik@kth.se>
Thu, 25 May 2017 13:05:36 +0000 (15:05 +0200)
committerKasson <kasson@gmail.com>
Mon, 4 Sep 2017 21:41:47 +0000 (23:41 +0200)
commite34ead15b327872ba9362de9416178cce53158b3
tree0ddd59ac8bf7289835db99ee8974d0a5b4dd36f3
parenta18e551901e83494c5bd686134fc98fcdf530032
More SIMD math argument checking, added unsafe options

This change adds more argument checking and safeguards
for sqrt, exp2, and exp-related SIMD math functions, and
properly documents allowed values. These functions now
have an (optional) template parameter that makes it possible
to avoid the checks where it is important to save every cycle,
and the developer is certain that this usage is fine. For
now we only use the unsafe versions in the nonbonded kernels.
The SIMD function test code has also been extended with options
to allow denormals to be considered zero.

Fixes #2164.
Refs #2163.

Change-Id: I93ddadf74dd0fa013f61cf27fd1993f11cde28bc
docs/doxygen/lib/simd.md
src/gromacs/math/utilities.h
src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_simd_2xnn_inner.h
src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_simd_4xn_inner.h
src/gromacs/simd/impl_x86_avx_512_knl/impl_x86_avx_512_knl_simd_float.h
src/gromacs/simd/impl_x86_mic/impl_x86_mic_simd_float.h
src/gromacs/simd/simd_math.h
src/gromacs/simd/tests/simd_math.cpp