Minor code reordering in GPU kernels
commitcb313c7e66b36b25e4c54db9934cad613418ecd1
authorBerk Hess <hess@kth.se>
Wed, 24 Feb 2016 13:53:08 +0000 (24 14:53 +0100)
committerGerrit Code Review <gerrit@gerrit.gromacs.org>
Sat, 27 Feb 2016 17:48:49 +0000 (27 18:48 +0100)
tree5690033d17a42ca0757794bb65f235814e2e0b92
parent34f6027048b863a2909e09b3dd4bfb1a0fe7557b
Minor code reordering in GPU kernels

Updating bCalcFshift just before use instead at the top of the kernel
improves performance by 1-2% on CUDA. This also improves readability.
Making specialized (no)shift kernels will only add 1% gain.
Also updated the OpenCL kernels for consistency and readability
(the perfromance impact is negligible with current hardware/compiler).

Change-Id: I309f90ad61e5815726d55254e2cd38d5e4e7662d
src/gromacs/mdlib/nbnxn_cuda/nbnxn_cuda_kernel.cuh
src/gromacs/mdlib/nbnxn_ocl/nbnxn_ocl_kernel_amd.clh
src/gromacs/mdlib/nbnxn_ocl/nbnxn_ocl_kernel_nowarp.clh
src/gromacs/mdlib/nbnxn_ocl/nbnxn_ocl_kernel_nvidia.clh