remove duplicate macros and enable Wundef in CUDA
commit533651b13c7a2a3a3e99418fa66bea3c90b6c252
authorSzilard Pall <pall.szilard@gmail.com>
Thu, 2 Jul 2015 18:38:14 +0000 (2 20:38 +0200)
committerSzilárd Páll <pall.szilard@gmail.com>
Tue, 5 Jan 2016 20:48:06 +0000 (5 21:48 +0100)
tree58e0b4fcfa56dca3cb238f4d74fb3dc2fd9f0f9e
parent4b5ebece4e3337c0e3ebea65ac750e74f9f3f5ff
remove duplicate macros and enable Wundef in CUDA

Commit adbada4 left a checks of the host-side undefined __CUDA_ARCH__
undefined macro behind in nbnxn_cuda.cu as well as some unused macros.
This change cleans up these leftovers.

Additionally, this change enables -Wundef for CUDA files, but only for
CUDA >=v7.5 as prior versions come with a header that uses a macro check
without checking.

As the host-side code still includes kernels with __CUDA_ARCH__ which is
not defined in the host compilation pass, we need create our own copy
of this arch macro in a new header that is meant to contain CUDA
arch-specific stuff.

Refs #1855

Change-Id: Ibab891eaee11ea8952a67125f7ac4cc620b88d1c
cmake/gmxCFlags.cmake
cmake/gmxManageNvccConfig.cmake
src/gromacs/gpu_utils/cuda_arch_utils.cuh [new file with mode: 0644]
src/gromacs/mdlib/nbnxn_cuda/nbnxn_cuda.cu
src/gromacs/mdlib/nbnxn_cuda/nbnxn_cuda_kernel.cuh
src/gromacs/mdlib/nbnxn_cuda/nbnxn_cuda_kernel_utils.cuh