2168d180aaf3abe72d2c0ea1fb9942abb161d2d6
[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.
5  * Copyright (c) 2021, by the GROMACS development team, led by
6  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
7  * and including many others, as listed in the AUTHORS file in the
8  * top-level source directory and at http://www.gromacs.org.
9  *
10  * GROMACS is free software; you can redistribute it and/or
11  * modify it under the terms of the GNU Lesser General Public License
12  * as published by the Free Software Foundation; either version 2.1
13  * of the License, or (at your option) any later version.
14  *
15  * GROMACS is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
18  * Lesser General Public License for more details.
19  *
20  * You should have received a copy of the GNU Lesser General Public
21  * License along with GROMACS; if not, see
22  * http://www.gnu.org/licenses, or write to the Free Software Foundation,
23  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA.
24  *
25  * If you want to redistribute modifications to GROMACS, please
26  * consider that scientific software is very special. Version
27  * control is crucial - bugs must be traceable. We will be happy to
28  * consider code for inclusion in the official distribution, but
29  * derived work must not be called official GROMACS. Details are found
30  * in the README & COPYING files - if they are missing, get the
31  * official version at http://www.gromacs.org.
32  *
33  * To help us fund GROMACS development, we humbly ask that you cite
34  * the research papers on the package. Check out http://www.gromacs.org.
35  */
36 /*
37  * Note: this file was generated by the Verlet kernel generator for
38  * kernel type 4xm.
39  */
40
41
42 #include "gromacs/nbnxm/kernel_common.h"
43
44 /* Declare all the different kernel functions.
45  */
46 nbk_func_noener nbnxm_kernel_ElecRF_VdwLJCombGeom_F_4xm;
47 nbk_func_noener nbnxm_kernel_ElecRF_VdwLJCombLB_F_4xm;
48 nbk_func_noener nbnxm_kernel_ElecRF_VdwLJ_F_4xm;
49 nbk_func_noener nbnxm_kernel_ElecRF_VdwLJFSw_F_4xm;
50 nbk_func_noener nbnxm_kernel_ElecRF_VdwLJPSw_F_4xm;
51 nbk_func_noener nbnxm_kernel_ElecRF_VdwLJEwCombGeom_F_4xm;
52 nbk_func_noener nbnxm_kernel_ElecQSTab_VdwLJCombGeom_F_4xm;
53 nbk_func_noener nbnxm_kernel_ElecQSTab_VdwLJCombLB_F_4xm;
54 nbk_func_noener nbnxm_kernel_ElecQSTab_VdwLJ_F_4xm;
55 nbk_func_noener nbnxm_kernel_ElecQSTab_VdwLJFSw_F_4xm;
56 nbk_func_noener nbnxm_kernel_ElecQSTab_VdwLJPSw_F_4xm;
57 nbk_func_noener nbnxm_kernel_ElecQSTab_VdwLJEwCombGeom_F_4xm;
58 nbk_func_noener nbnxm_kernel_ElecQSTabTwinCut_VdwLJCombGeom_F_4xm;
59 nbk_func_noener nbnxm_kernel_ElecQSTabTwinCut_VdwLJCombLB_F_4xm;
60 nbk_func_noener nbnxm_kernel_ElecQSTabTwinCut_VdwLJ_F_4xm;
61 nbk_func_noener nbnxm_kernel_ElecQSTabTwinCut_VdwLJFSw_F_4xm;
62 nbk_func_noener nbnxm_kernel_ElecQSTabTwinCut_VdwLJPSw_F_4xm;
63 nbk_func_noener nbnxm_kernel_ElecQSTabTwinCut_VdwLJEwCombGeom_F_4xm;
64 nbk_func_noener nbnxm_kernel_ElecEw_VdwLJCombGeom_F_4xm;
65 nbk_func_noener nbnxm_kernel_ElecEw_VdwLJCombLB_F_4xm;
66 nbk_func_noener nbnxm_kernel_ElecEw_VdwLJ_F_4xm;
67 nbk_func_noener nbnxm_kernel_ElecEw_VdwLJFSw_F_4xm;
68 nbk_func_noener nbnxm_kernel_ElecEw_VdwLJPSw_F_4xm;
69 nbk_func_noener nbnxm_kernel_ElecEw_VdwLJEwCombGeom_F_4xm;
70 nbk_func_noener nbnxm_kernel_ElecEwTwinCut_VdwLJCombGeom_F_4xm;
71 nbk_func_noener nbnxm_kernel_ElecEwTwinCut_VdwLJCombLB_F_4xm;
72 nbk_func_noener nbnxm_kernel_ElecEwTwinCut_VdwLJ_F_4xm;
73 nbk_func_noener nbnxm_kernel_ElecEwTwinCut_VdwLJFSw_F_4xm;
74 nbk_func_noener nbnxm_kernel_ElecEwTwinCut_VdwLJPSw_F_4xm;
75 nbk_func_noener nbnxm_kernel_ElecEwTwinCut_VdwLJEwCombGeom_F_4xm;
76
77 nbk_func_ener nbnxm_kernel_ElecRF_VdwLJCombGeom_VF_4xm;
78 nbk_func_ener nbnxm_kernel_ElecRF_VdwLJCombLB_VF_4xm;
79 nbk_func_ener nbnxm_kernel_ElecRF_VdwLJ_VF_4xm;
80 nbk_func_ener nbnxm_kernel_ElecRF_VdwLJFSw_VF_4xm;
81 nbk_func_ener nbnxm_kernel_ElecRF_VdwLJPSw_VF_4xm;
82 nbk_func_ener nbnxm_kernel_ElecRF_VdwLJEwCombGeom_VF_4xm;
83 nbk_func_ener nbnxm_kernel_ElecQSTab_VdwLJCombGeom_VF_4xm;
84 nbk_func_ener nbnxm_kernel_ElecQSTab_VdwLJCombLB_VF_4xm;
85 nbk_func_ener nbnxm_kernel_ElecQSTab_VdwLJ_VF_4xm;
86 nbk_func_ener nbnxm_kernel_ElecQSTab_VdwLJFSw_VF_4xm;
87 nbk_func_ener nbnxm_kernel_ElecQSTab_VdwLJPSw_VF_4xm;
88 nbk_func_ener nbnxm_kernel_ElecQSTab_VdwLJEwCombGeom_VF_4xm;
89 nbk_func_ener nbnxm_kernel_ElecQSTabTwinCut_VdwLJCombGeom_VF_4xm;
90 nbk_func_ener nbnxm_kernel_ElecQSTabTwinCut_VdwLJCombLB_VF_4xm;
91 nbk_func_ener nbnxm_kernel_ElecQSTabTwinCut_VdwLJ_VF_4xm;
92 nbk_func_ener nbnxm_kernel_ElecQSTabTwinCut_VdwLJFSw_VF_4xm;
93 nbk_func_ener nbnxm_kernel_ElecQSTabTwinCut_VdwLJPSw_VF_4xm;
94 nbk_func_ener nbnxm_kernel_ElecQSTabTwinCut_VdwLJEwCombGeom_VF_4xm;
95 nbk_func_ener nbnxm_kernel_ElecEw_VdwLJCombGeom_VF_4xm;
96 nbk_func_ener nbnxm_kernel_ElecEw_VdwLJCombLB_VF_4xm;
97 nbk_func_ener nbnxm_kernel_ElecEw_VdwLJ_VF_4xm;
98 nbk_func_ener nbnxm_kernel_ElecEw_VdwLJFSw_VF_4xm;
99 nbk_func_ener nbnxm_kernel_ElecEw_VdwLJPSw_VF_4xm;
100 nbk_func_ener nbnxm_kernel_ElecEw_VdwLJEwCombGeom_VF_4xm;
101 nbk_func_ener nbnxm_kernel_ElecEwTwinCut_VdwLJCombGeom_VF_4xm;
102 nbk_func_ener nbnxm_kernel_ElecEwTwinCut_VdwLJCombLB_VF_4xm;
103 nbk_func_ener nbnxm_kernel_ElecEwTwinCut_VdwLJ_VF_4xm;
104 nbk_func_ener nbnxm_kernel_ElecEwTwinCut_VdwLJFSw_VF_4xm;
105 nbk_func_ener nbnxm_kernel_ElecEwTwinCut_VdwLJPSw_VF_4xm;
106 nbk_func_ener nbnxm_kernel_ElecEwTwinCut_VdwLJEwCombGeom_VF_4xm;
107
108 nbk_func_ener nbnxm_kernel_ElecRF_VdwLJCombGeom_VgrpF_4xm;
109 nbk_func_ener nbnxm_kernel_ElecRF_VdwLJCombLB_VgrpF_4xm;
110 nbk_func_ener nbnxm_kernel_ElecRF_VdwLJ_VgrpF_4xm;
111 nbk_func_ener nbnxm_kernel_ElecRF_VdwLJFSw_VgrpF_4xm;
112 nbk_func_ener nbnxm_kernel_ElecRF_VdwLJPSw_VgrpF_4xm;
113 nbk_func_ener nbnxm_kernel_ElecRF_VdwLJEwCombGeom_VgrpF_4xm;
114 nbk_func_ener nbnxm_kernel_ElecQSTab_VdwLJCombGeom_VgrpF_4xm;
115 nbk_func_ener nbnxm_kernel_ElecQSTab_VdwLJCombLB_VgrpF_4xm;
116 nbk_func_ener nbnxm_kernel_ElecQSTab_VdwLJ_VgrpF_4xm;
117 nbk_func_ener nbnxm_kernel_ElecQSTab_VdwLJFSw_VgrpF_4xm;
118 nbk_func_ener nbnxm_kernel_ElecQSTab_VdwLJPSw_VgrpF_4xm;
119 nbk_func_ener nbnxm_kernel_ElecQSTab_VdwLJEwCombGeom_VgrpF_4xm;
120 nbk_func_ener nbnxm_kernel_ElecQSTabTwinCut_VdwLJCombGeom_VgrpF_4xm;
121 nbk_func_ener nbnxm_kernel_ElecQSTabTwinCut_VdwLJCombLB_VgrpF_4xm;
122 nbk_func_ener nbnxm_kernel_ElecQSTabTwinCut_VdwLJ_VgrpF_4xm;
123 nbk_func_ener nbnxm_kernel_ElecQSTabTwinCut_VdwLJFSw_VgrpF_4xm;
124 nbk_func_ener nbnxm_kernel_ElecQSTabTwinCut_VdwLJPSw_VgrpF_4xm;
125 nbk_func_ener nbnxm_kernel_ElecQSTabTwinCut_VdwLJEwCombGeom_VgrpF_4xm;
126 nbk_func_ener nbnxm_kernel_ElecEw_VdwLJCombGeom_VgrpF_4xm;
127 nbk_func_ener nbnxm_kernel_ElecEw_VdwLJCombLB_VgrpF_4xm;
128 nbk_func_ener nbnxm_kernel_ElecEw_VdwLJ_VgrpF_4xm;
129 nbk_func_ener nbnxm_kernel_ElecEw_VdwLJFSw_VgrpF_4xm;
130 nbk_func_ener nbnxm_kernel_ElecEw_VdwLJPSw_VgrpF_4xm;
131 nbk_func_ener nbnxm_kernel_ElecEw_VdwLJEwCombGeom_VgrpF_4xm;
132 nbk_func_ener nbnxm_kernel_ElecEwTwinCut_VdwLJCombGeom_VgrpF_4xm;
133 nbk_func_ener nbnxm_kernel_ElecEwTwinCut_VdwLJCombLB_VgrpF_4xm;
134 nbk_func_ener nbnxm_kernel_ElecEwTwinCut_VdwLJ_VgrpF_4xm;
135 nbk_func_ener nbnxm_kernel_ElecEwTwinCut_VdwLJFSw_VgrpF_4xm;
136 nbk_func_ener nbnxm_kernel_ElecEwTwinCut_VdwLJPSw_VgrpF_4xm;
137 nbk_func_ener nbnxm_kernel_ElecEwTwinCut_VdwLJEwCombGeom_VgrpF_4xm;
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 const p_nbk_func_noener nbnxm_kernel_noener_simd_4xm[coulktNR][vdwktNR] = {
147     {
148             nbnxm_kernel_ElecRF_VdwLJCombGeom_F_4xm,
149             nbnxm_kernel_ElecRF_VdwLJCombLB_F_4xm,
150             nbnxm_kernel_ElecRF_VdwLJ_F_4xm,
151             nbnxm_kernel_ElecRF_VdwLJFSw_F_4xm,
152             nbnxm_kernel_ElecRF_VdwLJPSw_F_4xm,
153             nbnxm_kernel_ElecRF_VdwLJEwCombGeom_F_4xm,
154     },
155     {
156             nbnxm_kernel_ElecQSTab_VdwLJCombGeom_F_4xm,
157             nbnxm_kernel_ElecQSTab_VdwLJCombLB_F_4xm,
158             nbnxm_kernel_ElecQSTab_VdwLJ_F_4xm,
159             nbnxm_kernel_ElecQSTab_VdwLJFSw_F_4xm,
160             nbnxm_kernel_ElecQSTab_VdwLJPSw_F_4xm,
161             nbnxm_kernel_ElecQSTab_VdwLJEwCombGeom_F_4xm,
162     },
163     {
164             nbnxm_kernel_ElecQSTabTwinCut_VdwLJCombGeom_F_4xm,
165             nbnxm_kernel_ElecQSTabTwinCut_VdwLJCombLB_F_4xm,
166             nbnxm_kernel_ElecQSTabTwinCut_VdwLJ_F_4xm,
167             nbnxm_kernel_ElecQSTabTwinCut_VdwLJFSw_F_4xm,
168             nbnxm_kernel_ElecQSTabTwinCut_VdwLJPSw_F_4xm,
169             nbnxm_kernel_ElecQSTabTwinCut_VdwLJEwCombGeom_F_4xm,
170     },
171     {
172             nbnxm_kernel_ElecEw_VdwLJCombGeom_F_4xm,
173             nbnxm_kernel_ElecEw_VdwLJCombLB_F_4xm,
174             nbnxm_kernel_ElecEw_VdwLJ_F_4xm,
175             nbnxm_kernel_ElecEw_VdwLJFSw_F_4xm,
176             nbnxm_kernel_ElecEw_VdwLJPSw_F_4xm,
177             nbnxm_kernel_ElecEw_VdwLJEwCombGeom_F_4xm,
178     },
179     {
180             nbnxm_kernel_ElecEwTwinCut_VdwLJCombGeom_F_4xm,
181             nbnxm_kernel_ElecEwTwinCut_VdwLJCombLB_F_4xm,
182             nbnxm_kernel_ElecEwTwinCut_VdwLJ_F_4xm,
183             nbnxm_kernel_ElecEwTwinCut_VdwLJFSw_F_4xm,
184             nbnxm_kernel_ElecEwTwinCut_VdwLJPSw_F_4xm,
185             nbnxm_kernel_ElecEwTwinCut_VdwLJEwCombGeom_F_4xm,
186     },
187 };
188
189 static const p_nbk_func_ener nbnxm_kernel_ener_simd_4xm[coulktNR][vdwktNR] = {
190     {
191             nbnxm_kernel_ElecRF_VdwLJCombGeom_VF_4xm,
192             nbnxm_kernel_ElecRF_VdwLJCombLB_VF_4xm,
193             nbnxm_kernel_ElecRF_VdwLJ_VF_4xm,
194             nbnxm_kernel_ElecRF_VdwLJFSw_VF_4xm,
195             nbnxm_kernel_ElecRF_VdwLJPSw_VF_4xm,
196             nbnxm_kernel_ElecRF_VdwLJEwCombGeom_VF_4xm,
197     },
198     {
199             nbnxm_kernel_ElecQSTab_VdwLJCombGeom_VF_4xm,
200             nbnxm_kernel_ElecQSTab_VdwLJCombLB_VF_4xm,
201             nbnxm_kernel_ElecQSTab_VdwLJ_VF_4xm,
202             nbnxm_kernel_ElecQSTab_VdwLJFSw_VF_4xm,
203             nbnxm_kernel_ElecQSTab_VdwLJPSw_VF_4xm,
204             nbnxm_kernel_ElecQSTab_VdwLJEwCombGeom_VF_4xm,
205     },
206     {
207             nbnxm_kernel_ElecQSTabTwinCut_VdwLJCombGeom_VF_4xm,
208             nbnxm_kernel_ElecQSTabTwinCut_VdwLJCombLB_VF_4xm,
209             nbnxm_kernel_ElecQSTabTwinCut_VdwLJ_VF_4xm,
210             nbnxm_kernel_ElecQSTabTwinCut_VdwLJFSw_VF_4xm,
211             nbnxm_kernel_ElecQSTabTwinCut_VdwLJPSw_VF_4xm,
212             nbnxm_kernel_ElecQSTabTwinCut_VdwLJEwCombGeom_VF_4xm,
213     },
214     {
215             nbnxm_kernel_ElecEw_VdwLJCombGeom_VF_4xm,
216             nbnxm_kernel_ElecEw_VdwLJCombLB_VF_4xm,
217             nbnxm_kernel_ElecEw_VdwLJ_VF_4xm,
218             nbnxm_kernel_ElecEw_VdwLJFSw_VF_4xm,
219             nbnxm_kernel_ElecEw_VdwLJPSw_VF_4xm,
220             nbnxm_kernel_ElecEw_VdwLJEwCombGeom_VF_4xm,
221     },
222     {
223             nbnxm_kernel_ElecEwTwinCut_VdwLJCombGeom_VF_4xm,
224             nbnxm_kernel_ElecEwTwinCut_VdwLJCombLB_VF_4xm,
225             nbnxm_kernel_ElecEwTwinCut_VdwLJ_VF_4xm,
226             nbnxm_kernel_ElecEwTwinCut_VdwLJFSw_VF_4xm,
227             nbnxm_kernel_ElecEwTwinCut_VdwLJPSw_VF_4xm,
228             nbnxm_kernel_ElecEwTwinCut_VdwLJEwCombGeom_VF_4xm,
229     },
230 };
231
232 static const p_nbk_func_ener nbnxm_kernel_energrp_simd_4xm[coulktNR][vdwktNR] = {
233     {
234             nbnxm_kernel_ElecRF_VdwLJCombGeom_VgrpF_4xm,
235             nbnxm_kernel_ElecRF_VdwLJCombLB_VgrpF_4xm,
236             nbnxm_kernel_ElecRF_VdwLJ_VgrpF_4xm,
237             nbnxm_kernel_ElecRF_VdwLJFSw_VgrpF_4xm,
238             nbnxm_kernel_ElecRF_VdwLJPSw_VgrpF_4xm,
239             nbnxm_kernel_ElecRF_VdwLJEwCombGeom_VgrpF_4xm,
240     },
241     {
242             nbnxm_kernel_ElecQSTab_VdwLJCombGeom_VgrpF_4xm,
243             nbnxm_kernel_ElecQSTab_VdwLJCombLB_VgrpF_4xm,
244             nbnxm_kernel_ElecQSTab_VdwLJ_VgrpF_4xm,
245             nbnxm_kernel_ElecQSTab_VdwLJFSw_VgrpF_4xm,
246             nbnxm_kernel_ElecQSTab_VdwLJPSw_VgrpF_4xm,
247             nbnxm_kernel_ElecQSTab_VdwLJEwCombGeom_VgrpF_4xm,
248     },
249     {
250             nbnxm_kernel_ElecQSTabTwinCut_VdwLJCombGeom_VgrpF_4xm,
251             nbnxm_kernel_ElecQSTabTwinCut_VdwLJCombLB_VgrpF_4xm,
252             nbnxm_kernel_ElecQSTabTwinCut_VdwLJ_VgrpF_4xm,
253             nbnxm_kernel_ElecQSTabTwinCut_VdwLJFSw_VgrpF_4xm,
254             nbnxm_kernel_ElecQSTabTwinCut_VdwLJPSw_VgrpF_4xm,
255             nbnxm_kernel_ElecQSTabTwinCut_VdwLJEwCombGeom_VgrpF_4xm,
256     },
257     {
258             nbnxm_kernel_ElecEw_VdwLJCombGeom_VgrpF_4xm,
259             nbnxm_kernel_ElecEw_VdwLJCombLB_VgrpF_4xm,
260             nbnxm_kernel_ElecEw_VdwLJ_VgrpF_4xm,
261             nbnxm_kernel_ElecEw_VdwLJFSw_VgrpF_4xm,
262             nbnxm_kernel_ElecEw_VdwLJPSw_VgrpF_4xm,
263             nbnxm_kernel_ElecEw_VdwLJEwCombGeom_VgrpF_4xm,
264     },
265     {
266             nbnxm_kernel_ElecEwTwinCut_VdwLJCombGeom_VgrpF_4xm,
267             nbnxm_kernel_ElecEwTwinCut_VdwLJCombLB_VgrpF_4xm,
268             nbnxm_kernel_ElecEwTwinCut_VdwLJ_VgrpF_4xm,
269             nbnxm_kernel_ElecEwTwinCut_VdwLJFSw_VgrpF_4xm,
270             nbnxm_kernel_ElecEwTwinCut_VdwLJPSw_VgrpF_4xm,
271             nbnxm_kernel_ElecEwTwinCut_VdwLJEwCombGeom_VgrpF_4xm,
272     },
273 };
274
275
276 #endif /* INCLUDE_KERNELFUNCTION_TABLES */