2 * This file is part of the GROMACS molecular simulation package.
4 * Copyright (c) 2012,2013,2014,2015,2017,2018, by the GROMACS development team, led by
5 * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
6 * and including many others, as listed in the AUTHORS file in the
7 * top-level source directory and at http://www.gromacs.org.
9 * GROMACS is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Lesser General Public License
11 * as published by the Free Software Foundation; either version 2.1
12 * of the License, or (at your option) any later version.
14 * GROMACS is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 * Lesser General Public License for more details.
19 * You should have received a copy of the GNU Lesser General Public
20 * License along with GROMACS; if not, see
21 * http://www.gnu.org/licenses, or write to the Free Software Foundation,
22 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
24 * If you want to redistribute modifications to GROMACS, please
25 * consider that scientific software is very special. Version
26 * control is crucial - bugs must be traceable. We will be happy to
27 * consider code for inclusion in the official distribution, but
28 * derived work must not be called official GROMACS. Details are found
29 * in the README & COPYING files - if they are missing, get the
30 * official version at http://www.gromacs.org.
32 * To help us fund GROMACS development, we humbly ask that you cite
33 * the research papers on the package. Check out http://www.gromacs.org.
36 #include "nbnxn_kernel_common.h"
38 /* Declare all the different kernel functions.
40 nbk_func_noener nbnxn_kernel_ElecRF_VdwLJ_F_ref
;
41 nbk_func_noener nbnxn_kernel_ElecRF_VdwLJFsw_F_ref
;
42 nbk_func_noener nbnxn_kernel_ElecRF_VdwLJPsw_F_ref
;
43 nbk_func_noener nbnxn_kernel_ElecRF_VdwLJEwCombGeom_F_ref
;
44 nbk_func_noener nbnxn_kernel_ElecRF_VdwLJEwCombLB_F_ref
;
45 nbk_func_noener nbnxn_kernel_ElecQSTab_VdwLJ_F_ref
;
46 nbk_func_noener nbnxn_kernel_ElecQSTab_VdwLJFsw_F_ref
;
47 nbk_func_noener nbnxn_kernel_ElecQSTab_VdwLJPsw_F_ref
;
48 nbk_func_noener nbnxn_kernel_ElecQSTab_VdwLJEwCombGeom_F_ref
;
49 nbk_func_noener nbnxn_kernel_ElecQSTab_VdwLJEwCombLB_F_ref
;
50 nbk_func_noener nbnxn_kernel_ElecQSTabTwinCut_VdwLJ_F_ref
;
51 nbk_func_noener nbnxn_kernel_ElecQSTabTwinCut_VdwLJFsw_F_ref
;
52 nbk_func_noener nbnxn_kernel_ElecQSTabTwinCut_VdwLJPsw_F_ref
;
53 nbk_func_noener nbnxn_kernel_ElecQSTabTwinCut_VdwLJEwCombGeom_F_ref
;
54 nbk_func_noener nbnxn_kernel_ElecQSTabTwinCut_VdwLJEwCombLB_F_ref
;
56 nbk_func_ener nbnxn_kernel_ElecRF_VdwLJ_VF_ref
;
57 nbk_func_ener nbnxn_kernel_ElecRF_VdwLJFsw_VF_ref
;
58 nbk_func_ener nbnxn_kernel_ElecRF_VdwLJPsw_VF_ref
;
59 nbk_func_ener nbnxn_kernel_ElecRF_VdwLJEwCombGeom_VF_ref
;
60 nbk_func_ener nbnxn_kernel_ElecRF_VdwLJEwCombLB_VF_ref
;
61 nbk_func_ener nbnxn_kernel_ElecQSTab_VdwLJ_VF_ref
;
62 nbk_func_ener nbnxn_kernel_ElecQSTab_VdwLJFsw_VF_ref
;
63 nbk_func_ener nbnxn_kernel_ElecQSTab_VdwLJPsw_VF_ref
;
64 nbk_func_ener nbnxn_kernel_ElecQSTab_VdwLJEwCombGeom_VF_ref
;
65 nbk_func_ener nbnxn_kernel_ElecQSTab_VdwLJEwCombLB_VF_ref
;
66 nbk_func_ener nbnxn_kernel_ElecQSTabTwinCut_VdwLJ_VF_ref
;
67 nbk_func_ener nbnxn_kernel_ElecQSTabTwinCut_VdwLJFsw_VF_ref
;
68 nbk_func_ener nbnxn_kernel_ElecQSTabTwinCut_VdwLJPsw_VF_ref
;
69 nbk_func_ener nbnxn_kernel_ElecQSTabTwinCut_VdwLJEwCombGeom_VF_ref
;
70 nbk_func_ener nbnxn_kernel_ElecQSTabTwinCut_VdwLJEwCombLB_VF_ref
;
72 nbk_func_ener nbnxn_kernel_ElecRF_VdwLJ_VgrpF_ref
;
73 nbk_func_ener nbnxn_kernel_ElecRF_VdwLJFsw_VgrpF_ref
;
74 nbk_func_ener nbnxn_kernel_ElecRF_VdwLJPsw_VgrpF_ref
;
75 nbk_func_ener nbnxn_kernel_ElecRF_VdwLJEwCombGeom_VgrpF_ref
;
76 nbk_func_ener nbnxn_kernel_ElecRF_VdwLJEwCombLB_VgrpF_ref
;
77 nbk_func_ener nbnxn_kernel_ElecQSTab_VdwLJ_VgrpF_ref
;
78 nbk_func_ener nbnxn_kernel_ElecQSTab_VdwLJFsw_VgrpF_ref
;
79 nbk_func_ener nbnxn_kernel_ElecQSTab_VdwLJPsw_VgrpF_ref
;
80 nbk_func_ener nbnxn_kernel_ElecQSTab_VdwLJEwCombGeom_VgrpF_ref
;
81 nbk_func_ener nbnxn_kernel_ElecQSTab_VdwLJEwCombLB_VgrpF_ref
;
82 nbk_func_ener nbnxn_kernel_ElecQSTabTwinCut_VdwLJ_VgrpF_ref
;
83 nbk_func_ener nbnxn_kernel_ElecQSTabTwinCut_VdwLJFsw_VgrpF_ref
;
84 nbk_func_ener nbnxn_kernel_ElecQSTabTwinCut_VdwLJPsw_VgrpF_ref
;
85 nbk_func_ener nbnxn_kernel_ElecQSTabTwinCut_VdwLJEwCombGeom_VgrpF_ref
;
86 nbk_func_ener nbnxn_kernel_ElecQSTabTwinCut_VdwLJEwCombLB_VgrpF_ref
;
88 #ifdef INCLUDE_KERNELFUNCTION_TABLES
90 /* Declare and define the kernel function pointer lookup tables.
91 * The minor index of the array goes over both the LJ combination rules,
92 * which is only supported by plain cut-off, and the LJ switch/PME functions.
93 * For the C reference kernels, unlike the SIMD kernels, there is not much
94 * advantage in using combination rules, so we (re-)use the same kernel.
96 static p_nbk_func_noener nbnxn_kernel_noener_ref
[coulktNR
][vdwktNR_ref
] =
99 nbnxn_kernel_ElecRF_VdwLJ_F_ref
,
100 nbnxn_kernel_ElecRF_VdwLJ_F_ref
,
101 nbnxn_kernel_ElecRF_VdwLJ_F_ref
,
102 nbnxn_kernel_ElecRF_VdwLJFsw_F_ref
,
103 nbnxn_kernel_ElecRF_VdwLJPsw_F_ref
,
104 nbnxn_kernel_ElecRF_VdwLJEwCombGeom_F_ref
,
105 nbnxn_kernel_ElecRF_VdwLJEwCombLB_F_ref
108 nbnxn_kernel_ElecQSTab_VdwLJ_F_ref
,
109 nbnxn_kernel_ElecQSTab_VdwLJ_F_ref
,
110 nbnxn_kernel_ElecQSTab_VdwLJ_F_ref
,
111 nbnxn_kernel_ElecQSTab_VdwLJFsw_F_ref
,
112 nbnxn_kernel_ElecQSTab_VdwLJPsw_F_ref
,
113 nbnxn_kernel_ElecQSTab_VdwLJEwCombGeom_F_ref
,
114 nbnxn_kernel_ElecQSTab_VdwLJEwCombLB_F_ref
117 nbnxn_kernel_ElecQSTabTwinCut_VdwLJ_F_ref
,
118 nbnxn_kernel_ElecQSTabTwinCut_VdwLJ_F_ref
,
119 nbnxn_kernel_ElecQSTabTwinCut_VdwLJ_F_ref
,
120 nbnxn_kernel_ElecQSTabTwinCut_VdwLJFsw_F_ref
,
121 nbnxn_kernel_ElecQSTabTwinCut_VdwLJPsw_F_ref
,
122 nbnxn_kernel_ElecQSTabTwinCut_VdwLJEwCombGeom_F_ref
,
123 nbnxn_kernel_ElecQSTabTwinCut_VdwLJEwCombLB_F_ref
126 nbnxn_kernel_ElecQSTabTwinCut_VdwLJ_F_ref
,
127 nbnxn_kernel_ElecQSTabTwinCut_VdwLJ_F_ref
,
128 nbnxn_kernel_ElecQSTabTwinCut_VdwLJ_F_ref
,
129 nbnxn_kernel_ElecQSTabTwinCut_VdwLJFsw_F_ref
,
130 nbnxn_kernel_ElecQSTabTwinCut_VdwLJPsw_F_ref
,
131 nbnxn_kernel_ElecQSTabTwinCut_VdwLJEwCombGeom_F_ref
,
132 nbnxn_kernel_ElecQSTabTwinCut_VdwLJEwCombLB_F_ref
136 static p_nbk_func_ener nbnxn_kernel_ener_ref
[coulktNR
][vdwktNR_ref
] =
139 nbnxn_kernel_ElecRF_VdwLJ_VF_ref
,
140 nbnxn_kernel_ElecRF_VdwLJ_VF_ref
,
141 nbnxn_kernel_ElecRF_VdwLJ_VF_ref
,
142 nbnxn_kernel_ElecRF_VdwLJFsw_VF_ref
,
143 nbnxn_kernel_ElecRF_VdwLJPsw_VF_ref
,
144 nbnxn_kernel_ElecRF_VdwLJEwCombGeom_VF_ref
,
145 nbnxn_kernel_ElecRF_VdwLJEwCombLB_VF_ref
148 nbnxn_kernel_ElecQSTab_VdwLJ_VF_ref
,
149 nbnxn_kernel_ElecQSTab_VdwLJ_VF_ref
,
150 nbnxn_kernel_ElecQSTab_VdwLJ_VF_ref
,
151 nbnxn_kernel_ElecQSTab_VdwLJFsw_VF_ref
,
152 nbnxn_kernel_ElecQSTab_VdwLJPsw_VF_ref
,
153 nbnxn_kernel_ElecQSTab_VdwLJEwCombGeom_VF_ref
,
154 nbnxn_kernel_ElecQSTab_VdwLJEwCombLB_VF_ref
157 nbnxn_kernel_ElecQSTabTwinCut_VdwLJ_VF_ref
,
158 nbnxn_kernel_ElecQSTabTwinCut_VdwLJ_VF_ref
,
159 nbnxn_kernel_ElecQSTabTwinCut_VdwLJ_VF_ref
,
160 nbnxn_kernel_ElecQSTabTwinCut_VdwLJFsw_VF_ref
,
161 nbnxn_kernel_ElecQSTabTwinCut_VdwLJPsw_VF_ref
,
162 nbnxn_kernel_ElecQSTabTwinCut_VdwLJEwCombGeom_VF_ref
,
163 nbnxn_kernel_ElecQSTabTwinCut_VdwLJEwCombLB_VF_ref
166 nbnxn_kernel_ElecQSTabTwinCut_VdwLJ_VF_ref
,
167 nbnxn_kernel_ElecQSTabTwinCut_VdwLJ_VF_ref
,
168 nbnxn_kernel_ElecQSTabTwinCut_VdwLJ_VF_ref
,
169 nbnxn_kernel_ElecQSTabTwinCut_VdwLJFsw_VF_ref
,
170 nbnxn_kernel_ElecQSTabTwinCut_VdwLJPsw_VF_ref
,
171 nbnxn_kernel_ElecQSTabTwinCut_VdwLJEwCombGeom_VF_ref
,
172 nbnxn_kernel_ElecQSTabTwinCut_VdwLJEwCombLB_VF_ref
176 static p_nbk_func_ener nbnxn_kernel_energrp_ref
[coulktNR
][vdwktNR_ref
] =
179 nbnxn_kernel_ElecRF_VdwLJ_VgrpF_ref
,
180 nbnxn_kernel_ElecRF_VdwLJ_VgrpF_ref
,
181 nbnxn_kernel_ElecRF_VdwLJ_VgrpF_ref
,
182 nbnxn_kernel_ElecRF_VdwLJFsw_VgrpF_ref
,
183 nbnxn_kernel_ElecRF_VdwLJPsw_VgrpF_ref
,
184 nbnxn_kernel_ElecRF_VdwLJEwCombGeom_VgrpF_ref
,
185 nbnxn_kernel_ElecRF_VdwLJEwCombLB_VgrpF_ref
188 nbnxn_kernel_ElecQSTab_VdwLJ_VgrpF_ref
,
189 nbnxn_kernel_ElecQSTab_VdwLJ_VgrpF_ref
,
190 nbnxn_kernel_ElecQSTab_VdwLJ_VgrpF_ref
,
191 nbnxn_kernel_ElecQSTab_VdwLJFsw_VgrpF_ref
,
192 nbnxn_kernel_ElecQSTab_VdwLJPsw_VgrpF_ref
,
193 nbnxn_kernel_ElecQSTab_VdwLJEwCombGeom_VgrpF_ref
,
194 nbnxn_kernel_ElecQSTab_VdwLJEwCombLB_VgrpF_ref
197 nbnxn_kernel_ElecQSTabTwinCut_VdwLJ_VgrpF_ref
,
198 nbnxn_kernel_ElecQSTabTwinCut_VdwLJ_VgrpF_ref
,
199 nbnxn_kernel_ElecQSTabTwinCut_VdwLJ_VgrpF_ref
,
200 nbnxn_kernel_ElecQSTabTwinCut_VdwLJFsw_VgrpF_ref
,
201 nbnxn_kernel_ElecQSTabTwinCut_VdwLJPsw_VgrpF_ref
,
202 nbnxn_kernel_ElecQSTabTwinCut_VdwLJEwCombGeom_VgrpF_ref
,
203 nbnxn_kernel_ElecQSTabTwinCut_VdwLJEwCombLB_VgrpF_ref
206 nbnxn_kernel_ElecQSTabTwinCut_VdwLJ_VgrpF_ref
,
207 nbnxn_kernel_ElecQSTabTwinCut_VdwLJ_VgrpF_ref
,
208 nbnxn_kernel_ElecQSTabTwinCut_VdwLJ_VgrpF_ref
,
209 nbnxn_kernel_ElecQSTabTwinCut_VdwLJFsw_VgrpF_ref
,
210 nbnxn_kernel_ElecQSTabTwinCut_VdwLJPsw_VgrpF_ref
,
211 nbnxn_kernel_ElecQSTabTwinCut_VdwLJEwCombGeom_VgrpF_ref
,
212 nbnxn_kernel_ElecQSTabTwinCut_VdwLJEwCombLB_VgrpF_ref
216 #endif /* INCLUDE_KERNELFUNCTION_TABLES */