Added AVX2 detection to cmake and created CPU acceleration macro
authorErik Lindahl <erik@kth.se>
Wed, 11 Dec 2013 21:46:13 +0000 (22:46 +0100)
committerMark Abraham <mark.j.abraham@gmail.com>
Sat, 1 Feb 2014 23:37:57 +0000 (00:37 +0100)
commit153ebc6f6f19434953185662f7f46ce270bc5fdf
treea08a0ccebdbef95e5ec6cd22105941671e227ced
parentbe76f67e6b3ddb0440383e11d6423b74f7d6dfb1
Added AVX2 detection to cmake and created CPU acceleration macro

The main CMakeLists.txt has been cleaned up by moving
the CPU SIMD acceleration tests to a separate module,
which now also supports AVX2 detection. Acceleration
detection has been improved by actually testing SSE/AVX/AVX2
codes with the flags, rather than first testing flags and
then code (since some compilers silently accept illegal flags).
Cmake now also now detects options to use the clang built-in
assembler on OS X together with the gcc compiler when AVX
acceleration is selected, which makes it possible to use
AVX/AVX2 in combination with OpenMP support on OS X using
free compilers.

Change-Id: I6f9de80a87283cec4cf4211c4d0068d32315ba90
CMakeLists.txt
cmake/TestAVX.c [deleted file]
cmake/gmxFindFlagsForSource.cmake [new file with mode: 0644]
cmake/gmxTestAVXMaskload.cmake
cmake/gmxTestCPUAcceleration.cmake [new file with mode: 0644]
src/gromacs/gmxlib/gmx_cpuid.c
src/gromacs/legacyheaders/gmx_cpuid.h