3ad2c58784d506b5394d8b044d337e393dd7cf85
[alexxy/gromacs.git] / src / gromacs / nbnxm / kernels_simd_4xm / 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 4xm.
38  */
39
40
41 #include "gromacs/nbnxm/kernel_common.h"
42
43 /* Declare all the different kernel functions.
44  */
45 nbk_func_ener         nbnxm_kernel_ElecRF_VdwLJCombGeom_VgrpF_4xm;
46 nbk_func_ener         nbnxm_kernel_ElecRF_VdwLJCombLB_VgrpF_4xm;
47 nbk_func_ener         nbnxm_kernel_ElecRF_VdwLJ_VgrpF_4xm;
48 nbk_func_ener         nbnxm_kernel_ElecRF_VdwLJFSw_VgrpF_4xm;
49 nbk_func_ener         nbnxm_kernel_ElecRF_VdwLJPSw_VgrpF_4xm;
50 nbk_func_ener         nbnxm_kernel_ElecRF_VdwLJEwCombGeom_VgrpF_4xm;
51 nbk_func_ener         nbnxm_kernel_ElecQSTab_VdwLJCombGeom_VgrpF_4xm;
52 nbk_func_ener         nbnxm_kernel_ElecQSTab_VdwLJCombLB_VgrpF_4xm;
53 nbk_func_ener         nbnxm_kernel_ElecQSTab_VdwLJ_VgrpF_4xm;
54 nbk_func_ener         nbnxm_kernel_ElecQSTab_VdwLJFSw_VgrpF_4xm;
55 nbk_func_ener         nbnxm_kernel_ElecQSTab_VdwLJPSw_VgrpF_4xm;
56 nbk_func_ener         nbnxm_kernel_ElecQSTab_VdwLJEwCombGeom_VgrpF_4xm;
57 nbk_func_ener         nbnxm_kernel_ElecQSTabTwinCut_VdwLJCombGeom_VgrpF_4xm;
58 nbk_func_ener         nbnxm_kernel_ElecQSTabTwinCut_VdwLJCombLB_VgrpF_4xm;
59 nbk_func_ener         nbnxm_kernel_ElecQSTabTwinCut_VdwLJ_VgrpF_4xm;
60 nbk_func_ener         nbnxm_kernel_ElecQSTabTwinCut_VdwLJFSw_VgrpF_4xm;
61 nbk_func_ener         nbnxm_kernel_ElecQSTabTwinCut_VdwLJPSw_VgrpF_4xm;
62 nbk_func_ener         nbnxm_kernel_ElecQSTabTwinCut_VdwLJEwCombGeom_VgrpF_4xm;
63 nbk_func_ener         nbnxm_kernel_ElecEw_VdwLJCombGeom_VgrpF_4xm;
64 nbk_func_ener         nbnxm_kernel_ElecEw_VdwLJCombLB_VgrpF_4xm;
65 nbk_func_ener         nbnxm_kernel_ElecEw_VdwLJ_VgrpF_4xm;
66 nbk_func_ener         nbnxm_kernel_ElecEw_VdwLJFSw_VgrpF_4xm;
67 nbk_func_ener         nbnxm_kernel_ElecEw_VdwLJPSw_VgrpF_4xm;
68 nbk_func_ener         nbnxm_kernel_ElecEw_VdwLJEwCombGeom_VgrpF_4xm;
69 nbk_func_ener         nbnxm_kernel_ElecEwTwinCut_VdwLJCombGeom_VgrpF_4xm;
70 nbk_func_ener         nbnxm_kernel_ElecEwTwinCut_VdwLJCombLB_VgrpF_4xm;
71 nbk_func_ener         nbnxm_kernel_ElecEwTwinCut_VdwLJ_VgrpF_4xm;
72 nbk_func_ener         nbnxm_kernel_ElecEwTwinCut_VdwLJFSw_VgrpF_4xm;
73 nbk_func_ener         nbnxm_kernel_ElecEwTwinCut_VdwLJPSw_VgrpF_4xm;
74 nbk_func_ener         nbnxm_kernel_ElecEwTwinCut_VdwLJEwCombGeom_VgrpF_4xm;
75
76 nbk_func_ener         nbnxm_kernel_ElecRF_VdwLJCombGeom_VF_4xm;
77 nbk_func_ener         nbnxm_kernel_ElecRF_VdwLJCombLB_VF_4xm;
78 nbk_func_ener         nbnxm_kernel_ElecRF_VdwLJ_VF_4xm;
79 nbk_func_ener         nbnxm_kernel_ElecRF_VdwLJFSw_VF_4xm;
80 nbk_func_ener         nbnxm_kernel_ElecRF_VdwLJPSw_VF_4xm;
81 nbk_func_ener         nbnxm_kernel_ElecRF_VdwLJEwCombGeom_VF_4xm;
82 nbk_func_ener         nbnxm_kernel_ElecQSTab_VdwLJCombGeom_VF_4xm;
83 nbk_func_ener         nbnxm_kernel_ElecQSTab_VdwLJCombLB_VF_4xm;
84 nbk_func_ener         nbnxm_kernel_ElecQSTab_VdwLJ_VF_4xm;
85 nbk_func_ener         nbnxm_kernel_ElecQSTab_VdwLJFSw_VF_4xm;
86 nbk_func_ener         nbnxm_kernel_ElecQSTab_VdwLJPSw_VF_4xm;
87 nbk_func_ener         nbnxm_kernel_ElecQSTab_VdwLJEwCombGeom_VF_4xm;
88 nbk_func_ener         nbnxm_kernel_ElecQSTabTwinCut_VdwLJCombGeom_VF_4xm;
89 nbk_func_ener         nbnxm_kernel_ElecQSTabTwinCut_VdwLJCombLB_VF_4xm;
90 nbk_func_ener         nbnxm_kernel_ElecQSTabTwinCut_VdwLJ_VF_4xm;
91 nbk_func_ener         nbnxm_kernel_ElecQSTabTwinCut_VdwLJFSw_VF_4xm;
92 nbk_func_ener         nbnxm_kernel_ElecQSTabTwinCut_VdwLJPSw_VF_4xm;
93 nbk_func_ener         nbnxm_kernel_ElecQSTabTwinCut_VdwLJEwCombGeom_VF_4xm;
94 nbk_func_ener         nbnxm_kernel_ElecEw_VdwLJCombGeom_VF_4xm;
95 nbk_func_ener         nbnxm_kernel_ElecEw_VdwLJCombLB_VF_4xm;
96 nbk_func_ener         nbnxm_kernel_ElecEw_VdwLJ_VF_4xm;
97 nbk_func_ener         nbnxm_kernel_ElecEw_VdwLJFSw_VF_4xm;
98 nbk_func_ener         nbnxm_kernel_ElecEw_VdwLJPSw_VF_4xm;
99 nbk_func_ener         nbnxm_kernel_ElecEw_VdwLJEwCombGeom_VF_4xm;
100 nbk_func_ener         nbnxm_kernel_ElecEwTwinCut_VdwLJCombGeom_VF_4xm;
101 nbk_func_ener         nbnxm_kernel_ElecEwTwinCut_VdwLJCombLB_VF_4xm;
102 nbk_func_ener         nbnxm_kernel_ElecEwTwinCut_VdwLJ_VF_4xm;
103 nbk_func_ener         nbnxm_kernel_ElecEwTwinCut_VdwLJFSw_VF_4xm;
104 nbk_func_ener         nbnxm_kernel_ElecEwTwinCut_VdwLJPSw_VF_4xm;
105 nbk_func_ener         nbnxm_kernel_ElecEwTwinCut_VdwLJEwCombGeom_VF_4xm;
106
107 nbk_func_noener       nbnxm_kernel_ElecRF_VdwLJCombGeom_F_4xm;
108 nbk_func_noener       nbnxm_kernel_ElecRF_VdwLJCombLB_F_4xm;
109 nbk_func_noener       nbnxm_kernel_ElecRF_VdwLJ_F_4xm;
110 nbk_func_noener       nbnxm_kernel_ElecRF_VdwLJFSw_F_4xm;
111 nbk_func_noener       nbnxm_kernel_ElecRF_VdwLJPSw_F_4xm;
112 nbk_func_noener       nbnxm_kernel_ElecRF_VdwLJEwCombGeom_F_4xm;
113 nbk_func_noener       nbnxm_kernel_ElecQSTab_VdwLJCombGeom_F_4xm;
114 nbk_func_noener       nbnxm_kernel_ElecQSTab_VdwLJCombLB_F_4xm;
115 nbk_func_noener       nbnxm_kernel_ElecQSTab_VdwLJ_F_4xm;
116 nbk_func_noener       nbnxm_kernel_ElecQSTab_VdwLJFSw_F_4xm;
117 nbk_func_noener       nbnxm_kernel_ElecQSTab_VdwLJPSw_F_4xm;
118 nbk_func_noener       nbnxm_kernel_ElecQSTab_VdwLJEwCombGeom_F_4xm;
119 nbk_func_noener       nbnxm_kernel_ElecQSTabTwinCut_VdwLJCombGeom_F_4xm;
120 nbk_func_noener       nbnxm_kernel_ElecQSTabTwinCut_VdwLJCombLB_F_4xm;
121 nbk_func_noener       nbnxm_kernel_ElecQSTabTwinCut_VdwLJ_F_4xm;
122 nbk_func_noener       nbnxm_kernel_ElecQSTabTwinCut_VdwLJFSw_F_4xm;
123 nbk_func_noener       nbnxm_kernel_ElecQSTabTwinCut_VdwLJPSw_F_4xm;
124 nbk_func_noener       nbnxm_kernel_ElecQSTabTwinCut_VdwLJEwCombGeom_F_4xm;
125 nbk_func_noener       nbnxm_kernel_ElecEw_VdwLJCombGeom_F_4xm;
126 nbk_func_noener       nbnxm_kernel_ElecEw_VdwLJCombLB_F_4xm;
127 nbk_func_noener       nbnxm_kernel_ElecEw_VdwLJ_F_4xm;
128 nbk_func_noener       nbnxm_kernel_ElecEw_VdwLJFSw_F_4xm;
129 nbk_func_noener       nbnxm_kernel_ElecEw_VdwLJPSw_F_4xm;
130 nbk_func_noener       nbnxm_kernel_ElecEw_VdwLJEwCombGeom_F_4xm;
131 nbk_func_noener       nbnxm_kernel_ElecEwTwinCut_VdwLJCombGeom_F_4xm;
132 nbk_func_noener       nbnxm_kernel_ElecEwTwinCut_VdwLJCombLB_F_4xm;
133 nbk_func_noener       nbnxm_kernel_ElecEwTwinCut_VdwLJ_F_4xm;
134 nbk_func_noener       nbnxm_kernel_ElecEwTwinCut_VdwLJFSw_F_4xm;
135 nbk_func_noener       nbnxm_kernel_ElecEwTwinCut_VdwLJPSw_F_4xm;
136 nbk_func_noener       nbnxm_kernel_ElecEwTwinCut_VdwLJEwCombGeom_F_4xm;
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_4xm[coulktNR][vdwktNR] =
147 {
148     {
149         nbnxm_kernel_ElecRF_VdwLJCombGeom_F_4xm,
150         nbnxm_kernel_ElecRF_VdwLJCombLB_F_4xm,
151         nbnxm_kernel_ElecRF_VdwLJ_F_4xm,
152         nbnxm_kernel_ElecRF_VdwLJFSw_F_4xm,
153         nbnxm_kernel_ElecRF_VdwLJPSw_F_4xm,
154         nbnxm_kernel_ElecRF_VdwLJEwCombGeom_F_4xm,
155     },
156     {
157         nbnxm_kernel_ElecQSTab_VdwLJCombGeom_F_4xm,
158         nbnxm_kernel_ElecQSTab_VdwLJCombLB_F_4xm,
159         nbnxm_kernel_ElecQSTab_VdwLJ_F_4xm,
160         nbnxm_kernel_ElecQSTab_VdwLJFSw_F_4xm,
161         nbnxm_kernel_ElecQSTab_VdwLJPSw_F_4xm,
162         nbnxm_kernel_ElecQSTab_VdwLJEwCombGeom_F_4xm,
163     },
164     {
165         nbnxm_kernel_ElecQSTabTwinCut_VdwLJCombGeom_F_4xm,
166         nbnxm_kernel_ElecQSTabTwinCut_VdwLJCombLB_F_4xm,
167         nbnxm_kernel_ElecQSTabTwinCut_VdwLJ_F_4xm,
168         nbnxm_kernel_ElecQSTabTwinCut_VdwLJFSw_F_4xm,
169         nbnxm_kernel_ElecQSTabTwinCut_VdwLJPSw_F_4xm,
170         nbnxm_kernel_ElecQSTabTwinCut_VdwLJEwCombGeom_F_4xm,
171     },
172     {
173         nbnxm_kernel_ElecEw_VdwLJCombGeom_F_4xm,
174         nbnxm_kernel_ElecEw_VdwLJCombLB_F_4xm,
175         nbnxm_kernel_ElecEw_VdwLJ_F_4xm,
176         nbnxm_kernel_ElecEw_VdwLJFSw_F_4xm,
177         nbnxm_kernel_ElecEw_VdwLJPSw_F_4xm,
178         nbnxm_kernel_ElecEw_VdwLJEwCombGeom_F_4xm,
179     },
180     {
181         nbnxm_kernel_ElecEwTwinCut_VdwLJCombGeom_F_4xm,
182         nbnxm_kernel_ElecEwTwinCut_VdwLJCombLB_F_4xm,
183         nbnxm_kernel_ElecEwTwinCut_VdwLJ_F_4xm,
184         nbnxm_kernel_ElecEwTwinCut_VdwLJFSw_F_4xm,
185         nbnxm_kernel_ElecEwTwinCut_VdwLJPSw_F_4xm,
186         nbnxm_kernel_ElecEwTwinCut_VdwLJEwCombGeom_F_4xm,
187     },
188 };
189
190 static p_nbk_func_ener nbnxm_kernel_ener_simd_4xm[coulktNR][vdwktNR] =
191 {
192     {
193         nbnxm_kernel_ElecRF_VdwLJCombGeom_VF_4xm,
194         nbnxm_kernel_ElecRF_VdwLJCombLB_VF_4xm,
195         nbnxm_kernel_ElecRF_VdwLJ_VF_4xm,
196         nbnxm_kernel_ElecRF_VdwLJFSw_VF_4xm,
197         nbnxm_kernel_ElecRF_VdwLJPSw_VF_4xm,
198         nbnxm_kernel_ElecRF_VdwLJEwCombGeom_VF_4xm,
199     },
200     {
201         nbnxm_kernel_ElecQSTab_VdwLJCombGeom_VF_4xm,
202         nbnxm_kernel_ElecQSTab_VdwLJCombLB_VF_4xm,
203         nbnxm_kernel_ElecQSTab_VdwLJ_VF_4xm,
204         nbnxm_kernel_ElecQSTab_VdwLJFSw_VF_4xm,
205         nbnxm_kernel_ElecQSTab_VdwLJPSw_VF_4xm,
206         nbnxm_kernel_ElecQSTab_VdwLJEwCombGeom_VF_4xm,
207     },
208     {
209         nbnxm_kernel_ElecQSTabTwinCut_VdwLJCombGeom_VF_4xm,
210         nbnxm_kernel_ElecQSTabTwinCut_VdwLJCombLB_VF_4xm,
211         nbnxm_kernel_ElecQSTabTwinCut_VdwLJ_VF_4xm,
212         nbnxm_kernel_ElecQSTabTwinCut_VdwLJFSw_VF_4xm,
213         nbnxm_kernel_ElecQSTabTwinCut_VdwLJPSw_VF_4xm,
214         nbnxm_kernel_ElecQSTabTwinCut_VdwLJEwCombGeom_VF_4xm,
215     },
216     {
217         nbnxm_kernel_ElecEw_VdwLJCombGeom_VF_4xm,
218         nbnxm_kernel_ElecEw_VdwLJCombLB_VF_4xm,
219         nbnxm_kernel_ElecEw_VdwLJ_VF_4xm,
220         nbnxm_kernel_ElecEw_VdwLJFSw_VF_4xm,
221         nbnxm_kernel_ElecEw_VdwLJPSw_VF_4xm,
222         nbnxm_kernel_ElecEw_VdwLJEwCombGeom_VF_4xm,
223     },
224     {
225         nbnxm_kernel_ElecEwTwinCut_VdwLJCombGeom_VF_4xm,
226         nbnxm_kernel_ElecEwTwinCut_VdwLJCombLB_VF_4xm,
227         nbnxm_kernel_ElecEwTwinCut_VdwLJ_VF_4xm,
228         nbnxm_kernel_ElecEwTwinCut_VdwLJFSw_VF_4xm,
229         nbnxm_kernel_ElecEwTwinCut_VdwLJPSw_VF_4xm,
230         nbnxm_kernel_ElecEwTwinCut_VdwLJEwCombGeom_VF_4xm,
231     },
232 };
233
234 static p_nbk_func_ener nbnxm_kernel_energrp_simd_4xm[coulktNR][vdwktNR] =
235 {
236     {
237         nbnxm_kernel_ElecRF_VdwLJCombGeom_VgrpF_4xm,
238         nbnxm_kernel_ElecRF_VdwLJCombLB_VgrpF_4xm,
239         nbnxm_kernel_ElecRF_VdwLJ_VgrpF_4xm,
240         nbnxm_kernel_ElecRF_VdwLJFSw_VgrpF_4xm,
241         nbnxm_kernel_ElecRF_VdwLJPSw_VgrpF_4xm,
242         nbnxm_kernel_ElecRF_VdwLJEwCombGeom_VgrpF_4xm,
243     },
244     {
245         nbnxm_kernel_ElecQSTab_VdwLJCombGeom_VgrpF_4xm,
246         nbnxm_kernel_ElecQSTab_VdwLJCombLB_VgrpF_4xm,
247         nbnxm_kernel_ElecQSTab_VdwLJ_VgrpF_4xm,
248         nbnxm_kernel_ElecQSTab_VdwLJFSw_VgrpF_4xm,
249         nbnxm_kernel_ElecQSTab_VdwLJPSw_VgrpF_4xm,
250         nbnxm_kernel_ElecQSTab_VdwLJEwCombGeom_VgrpF_4xm,
251     },
252     {
253         nbnxm_kernel_ElecQSTabTwinCut_VdwLJCombGeom_VgrpF_4xm,
254         nbnxm_kernel_ElecQSTabTwinCut_VdwLJCombLB_VgrpF_4xm,
255         nbnxm_kernel_ElecQSTabTwinCut_VdwLJ_VgrpF_4xm,
256         nbnxm_kernel_ElecQSTabTwinCut_VdwLJFSw_VgrpF_4xm,
257         nbnxm_kernel_ElecQSTabTwinCut_VdwLJPSw_VgrpF_4xm,
258         nbnxm_kernel_ElecQSTabTwinCut_VdwLJEwCombGeom_VgrpF_4xm,
259     },
260     {
261         nbnxm_kernel_ElecEw_VdwLJCombGeom_VgrpF_4xm,
262         nbnxm_kernel_ElecEw_VdwLJCombLB_VgrpF_4xm,
263         nbnxm_kernel_ElecEw_VdwLJ_VgrpF_4xm,
264         nbnxm_kernel_ElecEw_VdwLJFSw_VgrpF_4xm,
265         nbnxm_kernel_ElecEw_VdwLJPSw_VgrpF_4xm,
266         nbnxm_kernel_ElecEw_VdwLJEwCombGeom_VgrpF_4xm,
267     },
268     {
269         nbnxm_kernel_ElecEwTwinCut_VdwLJCombGeom_VgrpF_4xm,
270         nbnxm_kernel_ElecEwTwinCut_VdwLJCombLB_VgrpF_4xm,
271         nbnxm_kernel_ElecEwTwinCut_VdwLJ_VgrpF_4xm,
272         nbnxm_kernel_ElecEwTwinCut_VdwLJFSw_VgrpF_4xm,
273         nbnxm_kernel_ElecEwTwinCut_VdwLJPSw_VgrpF_4xm,
274         nbnxm_kernel_ElecEwTwinCut_VdwLJEwCombGeom_VgrpF_4xm,
275     },
276 };
277
278
279 #endif /* INCLUDE_KERNELFUNCTION_TABLES */