Make nbnxm a proper module
[alexxy/gromacs.git] / src / gromacs / nbnxm / kernels_simd_2xmm / kernels.h
1 /*
2  * This file is part of the GROMACS molecular simulation package.
3  *
4  * Copyright (c) 2012,2013,2014,2015,2019, 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.
8  *
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.
13  *
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.
18  *
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.
23  *
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.
31  *
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.
34  */
35 /*
36  * Note: this file was generated by the Verlet kernel generator for
37  * kernel type 2xmm.
38  */
39
40
41 #include "gromacs/nbnxm/kernel_common.h"
42
43 /* Declare all the different kernel functions.
44  */
45 nbk_func_noener       nbnxm_kernel_ElecRF_VdwLJCombGeom_F_2xmm;
46 nbk_func_noener       nbnxm_kernel_ElecRF_VdwLJCombLB_F_2xmm;
47 nbk_func_noener       nbnxm_kernel_ElecRF_VdwLJ_F_2xmm;
48 nbk_func_noener       nbnxm_kernel_ElecRF_VdwLJFSw_F_2xmm;
49 nbk_func_noener       nbnxm_kernel_ElecRF_VdwLJPSw_F_2xmm;
50 nbk_func_noener       nbnxm_kernel_ElecRF_VdwLJEwCombGeom_F_2xmm;
51 nbk_func_noener       nbnxm_kernel_ElecQSTab_VdwLJCombGeom_F_2xmm;
52 nbk_func_noener       nbnxm_kernel_ElecQSTab_VdwLJCombLB_F_2xmm;
53 nbk_func_noener       nbnxm_kernel_ElecQSTab_VdwLJ_F_2xmm;
54 nbk_func_noener       nbnxm_kernel_ElecQSTab_VdwLJFSw_F_2xmm;
55 nbk_func_noener       nbnxm_kernel_ElecQSTab_VdwLJPSw_F_2xmm;
56 nbk_func_noener       nbnxm_kernel_ElecQSTab_VdwLJEwCombGeom_F_2xmm;
57 nbk_func_noener       nbnxm_kernel_ElecQSTabTwinCut_VdwLJCombGeom_F_2xmm;
58 nbk_func_noener       nbnxm_kernel_ElecQSTabTwinCut_VdwLJCombLB_F_2xmm;
59 nbk_func_noener       nbnxm_kernel_ElecQSTabTwinCut_VdwLJ_F_2xmm;
60 nbk_func_noener       nbnxm_kernel_ElecQSTabTwinCut_VdwLJFSw_F_2xmm;
61 nbk_func_noener       nbnxm_kernel_ElecQSTabTwinCut_VdwLJPSw_F_2xmm;
62 nbk_func_noener       nbnxm_kernel_ElecQSTabTwinCut_VdwLJEwCombGeom_F_2xmm;
63 nbk_func_noener       nbnxm_kernel_ElecEw_VdwLJCombGeom_F_2xmm;
64 nbk_func_noener       nbnxm_kernel_ElecEw_VdwLJCombLB_F_2xmm;
65 nbk_func_noener       nbnxm_kernel_ElecEw_VdwLJ_F_2xmm;
66 nbk_func_noener       nbnxm_kernel_ElecEw_VdwLJFSw_F_2xmm;
67 nbk_func_noener       nbnxm_kernel_ElecEw_VdwLJPSw_F_2xmm;
68 nbk_func_noener       nbnxm_kernel_ElecEw_VdwLJEwCombGeom_F_2xmm;
69 nbk_func_noener       nbnxm_kernel_ElecEwTwinCut_VdwLJCombGeom_F_2xmm;
70 nbk_func_noener       nbnxm_kernel_ElecEwTwinCut_VdwLJCombLB_F_2xmm;
71 nbk_func_noener       nbnxm_kernel_ElecEwTwinCut_VdwLJ_F_2xmm;
72 nbk_func_noener       nbnxm_kernel_ElecEwTwinCut_VdwLJFSw_F_2xmm;
73 nbk_func_noener       nbnxm_kernel_ElecEwTwinCut_VdwLJPSw_F_2xmm;
74 nbk_func_noener       nbnxm_kernel_ElecEwTwinCut_VdwLJEwCombGeom_F_2xmm;
75
76 nbk_func_ener         nbnxm_kernel_ElecRF_VdwLJCombGeom_VF_2xmm;
77 nbk_func_ener         nbnxm_kernel_ElecRF_VdwLJCombLB_VF_2xmm;
78 nbk_func_ener         nbnxm_kernel_ElecRF_VdwLJ_VF_2xmm;
79 nbk_func_ener         nbnxm_kernel_ElecRF_VdwLJFSw_VF_2xmm;
80 nbk_func_ener         nbnxm_kernel_ElecRF_VdwLJPSw_VF_2xmm;
81 nbk_func_ener         nbnxm_kernel_ElecRF_VdwLJEwCombGeom_VF_2xmm;
82 nbk_func_ener         nbnxm_kernel_ElecQSTab_VdwLJCombGeom_VF_2xmm;
83 nbk_func_ener         nbnxm_kernel_ElecQSTab_VdwLJCombLB_VF_2xmm;
84 nbk_func_ener         nbnxm_kernel_ElecQSTab_VdwLJ_VF_2xmm;
85 nbk_func_ener         nbnxm_kernel_ElecQSTab_VdwLJFSw_VF_2xmm;
86 nbk_func_ener         nbnxm_kernel_ElecQSTab_VdwLJPSw_VF_2xmm;
87 nbk_func_ener         nbnxm_kernel_ElecQSTab_VdwLJEwCombGeom_VF_2xmm;
88 nbk_func_ener         nbnxm_kernel_ElecQSTabTwinCut_VdwLJCombGeom_VF_2xmm;
89 nbk_func_ener         nbnxm_kernel_ElecQSTabTwinCut_VdwLJCombLB_VF_2xmm;
90 nbk_func_ener         nbnxm_kernel_ElecQSTabTwinCut_VdwLJ_VF_2xmm;
91 nbk_func_ener         nbnxm_kernel_ElecQSTabTwinCut_VdwLJFSw_VF_2xmm;
92 nbk_func_ener         nbnxm_kernel_ElecQSTabTwinCut_VdwLJPSw_VF_2xmm;
93 nbk_func_ener         nbnxm_kernel_ElecQSTabTwinCut_VdwLJEwCombGeom_VF_2xmm;
94 nbk_func_ener         nbnxm_kernel_ElecEw_VdwLJCombGeom_VF_2xmm;
95 nbk_func_ener         nbnxm_kernel_ElecEw_VdwLJCombLB_VF_2xmm;
96 nbk_func_ener         nbnxm_kernel_ElecEw_VdwLJ_VF_2xmm;
97 nbk_func_ener         nbnxm_kernel_ElecEw_VdwLJFSw_VF_2xmm;
98 nbk_func_ener         nbnxm_kernel_ElecEw_VdwLJPSw_VF_2xmm;
99 nbk_func_ener         nbnxm_kernel_ElecEw_VdwLJEwCombGeom_VF_2xmm;
100 nbk_func_ener         nbnxm_kernel_ElecEwTwinCut_VdwLJCombGeom_VF_2xmm;
101 nbk_func_ener         nbnxm_kernel_ElecEwTwinCut_VdwLJCombLB_VF_2xmm;
102 nbk_func_ener         nbnxm_kernel_ElecEwTwinCut_VdwLJ_VF_2xmm;
103 nbk_func_ener         nbnxm_kernel_ElecEwTwinCut_VdwLJFSw_VF_2xmm;
104 nbk_func_ener         nbnxm_kernel_ElecEwTwinCut_VdwLJPSw_VF_2xmm;
105 nbk_func_ener         nbnxm_kernel_ElecEwTwinCut_VdwLJEwCombGeom_VF_2xmm;
106
107 nbk_func_ener         nbnxm_kernel_ElecRF_VdwLJCombGeom_VgrpF_2xmm;
108 nbk_func_ener         nbnxm_kernel_ElecRF_VdwLJCombLB_VgrpF_2xmm;
109 nbk_func_ener         nbnxm_kernel_ElecRF_VdwLJ_VgrpF_2xmm;
110 nbk_func_ener         nbnxm_kernel_ElecRF_VdwLJFSw_VgrpF_2xmm;
111 nbk_func_ener         nbnxm_kernel_ElecRF_VdwLJPSw_VgrpF_2xmm;
112 nbk_func_ener         nbnxm_kernel_ElecRF_VdwLJEwCombGeom_VgrpF_2xmm;
113 nbk_func_ener         nbnxm_kernel_ElecQSTab_VdwLJCombGeom_VgrpF_2xmm;
114 nbk_func_ener         nbnxm_kernel_ElecQSTab_VdwLJCombLB_VgrpF_2xmm;
115 nbk_func_ener         nbnxm_kernel_ElecQSTab_VdwLJ_VgrpF_2xmm;
116 nbk_func_ener         nbnxm_kernel_ElecQSTab_VdwLJFSw_VgrpF_2xmm;
117 nbk_func_ener         nbnxm_kernel_ElecQSTab_VdwLJPSw_VgrpF_2xmm;
118 nbk_func_ener         nbnxm_kernel_ElecQSTab_VdwLJEwCombGeom_VgrpF_2xmm;
119 nbk_func_ener         nbnxm_kernel_ElecQSTabTwinCut_VdwLJCombGeom_VgrpF_2xmm;
120 nbk_func_ener         nbnxm_kernel_ElecQSTabTwinCut_VdwLJCombLB_VgrpF_2xmm;
121 nbk_func_ener         nbnxm_kernel_ElecQSTabTwinCut_VdwLJ_VgrpF_2xmm;
122 nbk_func_ener         nbnxm_kernel_ElecQSTabTwinCut_VdwLJFSw_VgrpF_2xmm;
123 nbk_func_ener         nbnxm_kernel_ElecQSTabTwinCut_VdwLJPSw_VgrpF_2xmm;
124 nbk_func_ener         nbnxm_kernel_ElecQSTabTwinCut_VdwLJEwCombGeom_VgrpF_2xmm;
125 nbk_func_ener         nbnxm_kernel_ElecEw_VdwLJCombGeom_VgrpF_2xmm;
126 nbk_func_ener         nbnxm_kernel_ElecEw_VdwLJCombLB_VgrpF_2xmm;
127 nbk_func_ener         nbnxm_kernel_ElecEw_VdwLJ_VgrpF_2xmm;
128 nbk_func_ener         nbnxm_kernel_ElecEw_VdwLJFSw_VgrpF_2xmm;
129 nbk_func_ener         nbnxm_kernel_ElecEw_VdwLJPSw_VgrpF_2xmm;
130 nbk_func_ener         nbnxm_kernel_ElecEw_VdwLJEwCombGeom_VgrpF_2xmm;
131 nbk_func_ener         nbnxm_kernel_ElecEwTwinCut_VdwLJCombGeom_VgrpF_2xmm;
132 nbk_func_ener         nbnxm_kernel_ElecEwTwinCut_VdwLJCombLB_VgrpF_2xmm;
133 nbk_func_ener         nbnxm_kernel_ElecEwTwinCut_VdwLJ_VgrpF_2xmm;
134 nbk_func_ener         nbnxm_kernel_ElecEwTwinCut_VdwLJFSw_VgrpF_2xmm;
135 nbk_func_ener         nbnxm_kernel_ElecEwTwinCut_VdwLJPSw_VgrpF_2xmm;
136 nbk_func_ener         nbnxm_kernel_ElecEwTwinCut_VdwLJEwCombGeom_VgrpF_2xmm;
137
138
139
140 #ifdef INCLUDE_KERNELFUNCTION_TABLES
141
142 /* Declare and define the kernel function pointer lookup tables.
143  * The minor index of the array goes over both the LJ combination rules,
144  * which is only supported by plain cut-off, and the LJ switch/PME functions.
145  */
146 static p_nbk_func_noener nbnxm_kernel_noener_simd_2xmm[coulktNR][vdwktNR] =
147 {
148     {
149         nbnxm_kernel_ElecRF_VdwLJCombGeom_F_2xmm,
150         nbnxm_kernel_ElecRF_VdwLJCombLB_F_2xmm,
151         nbnxm_kernel_ElecRF_VdwLJ_F_2xmm,
152         nbnxm_kernel_ElecRF_VdwLJFSw_F_2xmm,
153         nbnxm_kernel_ElecRF_VdwLJPSw_F_2xmm,
154         nbnxm_kernel_ElecRF_VdwLJEwCombGeom_F_2xmm,
155     },
156     {
157         nbnxm_kernel_ElecQSTab_VdwLJCombGeom_F_2xmm,
158         nbnxm_kernel_ElecQSTab_VdwLJCombLB_F_2xmm,
159         nbnxm_kernel_ElecQSTab_VdwLJ_F_2xmm,
160         nbnxm_kernel_ElecQSTab_VdwLJFSw_F_2xmm,
161         nbnxm_kernel_ElecQSTab_VdwLJPSw_F_2xmm,
162         nbnxm_kernel_ElecQSTab_VdwLJEwCombGeom_F_2xmm,
163     },
164     {
165         nbnxm_kernel_ElecQSTabTwinCut_VdwLJCombGeom_F_2xmm,
166         nbnxm_kernel_ElecQSTabTwinCut_VdwLJCombLB_F_2xmm,
167         nbnxm_kernel_ElecQSTabTwinCut_VdwLJ_F_2xmm,
168         nbnxm_kernel_ElecQSTabTwinCut_VdwLJFSw_F_2xmm,
169         nbnxm_kernel_ElecQSTabTwinCut_VdwLJPSw_F_2xmm,
170         nbnxm_kernel_ElecQSTabTwinCut_VdwLJEwCombGeom_F_2xmm,
171     },
172     {
173         nbnxm_kernel_ElecEw_VdwLJCombGeom_F_2xmm,
174         nbnxm_kernel_ElecEw_VdwLJCombLB_F_2xmm,
175         nbnxm_kernel_ElecEw_VdwLJ_F_2xmm,
176         nbnxm_kernel_ElecEw_VdwLJFSw_F_2xmm,
177         nbnxm_kernel_ElecEw_VdwLJPSw_F_2xmm,
178         nbnxm_kernel_ElecEw_VdwLJEwCombGeom_F_2xmm,
179     },
180     {
181         nbnxm_kernel_ElecEwTwinCut_VdwLJCombGeom_F_2xmm,
182         nbnxm_kernel_ElecEwTwinCut_VdwLJCombLB_F_2xmm,
183         nbnxm_kernel_ElecEwTwinCut_VdwLJ_F_2xmm,
184         nbnxm_kernel_ElecEwTwinCut_VdwLJFSw_F_2xmm,
185         nbnxm_kernel_ElecEwTwinCut_VdwLJPSw_F_2xmm,
186         nbnxm_kernel_ElecEwTwinCut_VdwLJEwCombGeom_F_2xmm,
187     },
188 };
189
190 static p_nbk_func_ener nbnxm_kernel_ener_simd_2xmm[coulktNR][vdwktNR] =
191 {
192     {
193         nbnxm_kernel_ElecRF_VdwLJCombGeom_VF_2xmm,
194         nbnxm_kernel_ElecRF_VdwLJCombLB_VF_2xmm,
195         nbnxm_kernel_ElecRF_VdwLJ_VF_2xmm,
196         nbnxm_kernel_ElecRF_VdwLJFSw_VF_2xmm,
197         nbnxm_kernel_ElecRF_VdwLJPSw_VF_2xmm,
198         nbnxm_kernel_ElecRF_VdwLJEwCombGeom_VF_2xmm,
199     },
200     {
201         nbnxm_kernel_ElecQSTab_VdwLJCombGeom_VF_2xmm,
202         nbnxm_kernel_ElecQSTab_VdwLJCombLB_VF_2xmm,
203         nbnxm_kernel_ElecQSTab_VdwLJ_VF_2xmm,
204         nbnxm_kernel_ElecQSTab_VdwLJFSw_VF_2xmm,
205         nbnxm_kernel_ElecQSTab_VdwLJPSw_VF_2xmm,
206         nbnxm_kernel_ElecQSTab_VdwLJEwCombGeom_VF_2xmm,
207     },
208     {
209         nbnxm_kernel_ElecQSTabTwinCut_VdwLJCombGeom_VF_2xmm,
210         nbnxm_kernel_ElecQSTabTwinCut_VdwLJCombLB_VF_2xmm,
211         nbnxm_kernel_ElecQSTabTwinCut_VdwLJ_VF_2xmm,
212         nbnxm_kernel_ElecQSTabTwinCut_VdwLJFSw_VF_2xmm,
213         nbnxm_kernel_ElecQSTabTwinCut_VdwLJPSw_VF_2xmm,
214         nbnxm_kernel_ElecQSTabTwinCut_VdwLJEwCombGeom_VF_2xmm,
215     },
216     {
217         nbnxm_kernel_ElecEw_VdwLJCombGeom_VF_2xmm,
218         nbnxm_kernel_ElecEw_VdwLJCombLB_VF_2xmm,
219         nbnxm_kernel_ElecEw_VdwLJ_VF_2xmm,
220         nbnxm_kernel_ElecEw_VdwLJFSw_VF_2xmm,
221         nbnxm_kernel_ElecEw_VdwLJPSw_VF_2xmm,
222         nbnxm_kernel_ElecEw_VdwLJEwCombGeom_VF_2xmm,
223     },
224     {
225         nbnxm_kernel_ElecEwTwinCut_VdwLJCombGeom_VF_2xmm,
226         nbnxm_kernel_ElecEwTwinCut_VdwLJCombLB_VF_2xmm,
227         nbnxm_kernel_ElecEwTwinCut_VdwLJ_VF_2xmm,
228         nbnxm_kernel_ElecEwTwinCut_VdwLJFSw_VF_2xmm,
229         nbnxm_kernel_ElecEwTwinCut_VdwLJPSw_VF_2xmm,
230         nbnxm_kernel_ElecEwTwinCut_VdwLJEwCombGeom_VF_2xmm,
231     },
232 };
233
234 static p_nbk_func_ener nbnxm_kernel_energrp_simd_2xmm[coulktNR][vdwktNR] =
235 {
236     {
237         nbnxm_kernel_ElecRF_VdwLJCombGeom_VgrpF_2xmm,
238         nbnxm_kernel_ElecRF_VdwLJCombLB_VgrpF_2xmm,
239         nbnxm_kernel_ElecRF_VdwLJ_VgrpF_2xmm,
240         nbnxm_kernel_ElecRF_VdwLJFSw_VgrpF_2xmm,
241         nbnxm_kernel_ElecRF_VdwLJPSw_VgrpF_2xmm,
242         nbnxm_kernel_ElecRF_VdwLJEwCombGeom_VgrpF_2xmm,
243     },
244     {
245         nbnxm_kernel_ElecQSTab_VdwLJCombGeom_VgrpF_2xmm,
246         nbnxm_kernel_ElecQSTab_VdwLJCombLB_VgrpF_2xmm,
247         nbnxm_kernel_ElecQSTab_VdwLJ_VgrpF_2xmm,
248         nbnxm_kernel_ElecQSTab_VdwLJFSw_VgrpF_2xmm,
249         nbnxm_kernel_ElecQSTab_VdwLJPSw_VgrpF_2xmm,
250         nbnxm_kernel_ElecQSTab_VdwLJEwCombGeom_VgrpF_2xmm,
251     },
252     {
253         nbnxm_kernel_ElecQSTabTwinCut_VdwLJCombGeom_VgrpF_2xmm,
254         nbnxm_kernel_ElecQSTabTwinCut_VdwLJCombLB_VgrpF_2xmm,
255         nbnxm_kernel_ElecQSTabTwinCut_VdwLJ_VgrpF_2xmm,
256         nbnxm_kernel_ElecQSTabTwinCut_VdwLJFSw_VgrpF_2xmm,
257         nbnxm_kernel_ElecQSTabTwinCut_VdwLJPSw_VgrpF_2xmm,
258         nbnxm_kernel_ElecQSTabTwinCut_VdwLJEwCombGeom_VgrpF_2xmm,
259     },
260     {
261         nbnxm_kernel_ElecEw_VdwLJCombGeom_VgrpF_2xmm,
262         nbnxm_kernel_ElecEw_VdwLJCombLB_VgrpF_2xmm,
263         nbnxm_kernel_ElecEw_VdwLJ_VgrpF_2xmm,
264         nbnxm_kernel_ElecEw_VdwLJFSw_VgrpF_2xmm,
265         nbnxm_kernel_ElecEw_VdwLJPSw_VgrpF_2xmm,
266         nbnxm_kernel_ElecEw_VdwLJEwCombGeom_VgrpF_2xmm,
267     },
268     {
269         nbnxm_kernel_ElecEwTwinCut_VdwLJCombGeom_VgrpF_2xmm,
270         nbnxm_kernel_ElecEwTwinCut_VdwLJCombLB_VgrpF_2xmm,
271         nbnxm_kernel_ElecEwTwinCut_VdwLJ_VgrpF_2xmm,
272         nbnxm_kernel_ElecEwTwinCut_VdwLJFSw_VgrpF_2xmm,
273         nbnxm_kernel_ElecEwTwinCut_VdwLJPSw_VgrpF_2xmm,
274         nbnxm_kernel_ElecEwTwinCut_VdwLJEwCombGeom_VgrpF_2xmm,
275     },
276 };
277
278
279 #endif /* INCLUDE_KERNELFUNCTION_TABLES */