Fixes SSE/AVX compilation under Windows
authorErik Lindahl <erik@kth.se>
Fri, 28 Dec 2012 18:40:53 +0000 (19:40 +0100)
committerErik Lindahl <erik@kth.se>
Thu, 10 Jan 2013 07:50:03 +0000 (08:50 +0100)
commit73dd31e846caefb9f3f9f4608b35b54738529deb
tree79942f9cc18ee3193683f51bb92b72cdccf87055
parentdd7ca1b2a0a4f14bc830421e0509c87c29a3616e
Fixes SSE/AVX compilation under Windows

- 32-bit MSVC cannot handle more than 3 xmm/ymm register
arguments due to stack alignment, so some group kernel
routines have been copied into optional macros. These are
only used for 32-bit MSVC compiles; other alternatives including
icc on windows use the normal functions that are easier to debug.
- Since the windows compilers control 32 vs 64 bit with flags, a
new log file entry has been added to show whether the present
build is a 32 or 64 bit one.
- Minor fixes to enable double precision AVX_128_FMA builds on
windows.
- Replace use of explicit binary constants with _MM_SHUFFLE()
macro in nbnxn kernels to make it compile under windows.
With these fixes, both SSE2, SSE4, and AVX256 group kernels pass
regressiontests in single and double with MSVC2010, MSVC2012, and
icc 2013.1 used with visual studio 2012. The nbnxn kernels pass
all tests with the exception of 32-bit double precision AVX_256
where all three compilers still fail (Refs #1097).
Fixes #1092, #1093, #1068.

Change-Id: I6807b102af1db01cafba26a45284f5c38c7498fd
13 files changed:
CMakeLists.txt
include/gmx_math_x86_avx_128_fma_double.h
include/gmx_x86_avx_128_fma.h
src/gmxlib/copyrite.c
src/gmxlib/nonbonded/nb_kernel_avx_128_fma_double/kernelutil_x86_avx_128_fma_double.h
src/gmxlib/nonbonded/nb_kernel_avx_128_fma_single/kernelutil_x86_avx_128_fma_single.h
src/gmxlib/nonbonded/nb_kernel_avx_256_double/kernelutil_x86_avx_256_double.h
src/gmxlib/nonbonded/nb_kernel_avx_256_single/kernelutil_x86_avx_256_single.h
src/gmxlib/nonbonded/nb_kernel_sse2_double/kernelutil_x86_sse2_double.h
src/gmxlib/nonbonded/nb_kernel_sse2_single/kernelutil_x86_sse2_single.h
src/gmxlib/nonbonded/nb_kernel_sse4_1_double/kernelutil_x86_sse4_1_double.h
src/gmxlib/nonbonded/nb_kernel_sse4_1_single/kernelutil_x86_sse4_1_single.h
src/mdlib/nbnxn_kernels/nbnxn_kernel_simd_utils.h