30cff8abe7a23d571b2f7feeb5d60f181b24bc01
[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.
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 2xmm.
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_2xmm;
47 nbk_func_noener nbnxm_kernel_ElecRF_VdwLJCombLB_F_2xmm;
48 nbk_func_noener nbnxm_kernel_ElecRF_VdwLJ_F_2xmm;
49 nbk_func_noener nbnxm_kernel_ElecRF_VdwLJFSw_F_2xmm;
50 nbk_func_noener nbnxm_kernel_ElecRF_VdwLJPSw_F_2xmm;
51 nbk_func_noener nbnxm_kernel_ElecRF_VdwLJEwCombGeom_F_2xmm;
52 nbk_func_noener nbnxm_kernel_ElecQSTab_VdwLJCombGeom_F_2xmm;
53 nbk_func_noener nbnxm_kernel_ElecQSTab_VdwLJCombLB_F_2xmm;
54 nbk_func_noener nbnxm_kernel_ElecQSTab_VdwLJ_F_2xmm;
55 nbk_func_noener nbnxm_kernel_ElecQSTab_VdwLJFSw_F_2xmm;
56 nbk_func_noener nbnxm_kernel_ElecQSTab_VdwLJPSw_F_2xmm;
57 nbk_func_noener nbnxm_kernel_ElecQSTab_VdwLJEwCombGeom_F_2xmm;
58 nbk_func_noener nbnxm_kernel_ElecQSTabTwinCut_VdwLJCombGeom_F_2xmm;
59 nbk_func_noener nbnxm_kernel_ElecQSTabTwinCut_VdwLJCombLB_F_2xmm;
60 nbk_func_noener nbnxm_kernel_ElecQSTabTwinCut_VdwLJ_F_2xmm;
61 nbk_func_noener nbnxm_kernel_ElecQSTabTwinCut_VdwLJFSw_F_2xmm;
62 nbk_func_noener nbnxm_kernel_ElecQSTabTwinCut_VdwLJPSw_F_2xmm;
63 nbk_func_noener nbnxm_kernel_ElecQSTabTwinCut_VdwLJEwCombGeom_F_2xmm;
64 nbk_func_noener nbnxm_kernel_ElecEw_VdwLJCombGeom_F_2xmm;
65 nbk_func_noener nbnxm_kernel_ElecEw_VdwLJCombLB_F_2xmm;
66 nbk_func_noener nbnxm_kernel_ElecEw_VdwLJ_F_2xmm;
67 nbk_func_noener nbnxm_kernel_ElecEw_VdwLJFSw_F_2xmm;
68 nbk_func_noener nbnxm_kernel_ElecEw_VdwLJPSw_F_2xmm;
69 nbk_func_noener nbnxm_kernel_ElecEw_VdwLJEwCombGeom_F_2xmm;
70 nbk_func_noener nbnxm_kernel_ElecEwTwinCut_VdwLJCombGeom_F_2xmm;
71 nbk_func_noener nbnxm_kernel_ElecEwTwinCut_VdwLJCombLB_F_2xmm;
72 nbk_func_noener nbnxm_kernel_ElecEwTwinCut_VdwLJ_F_2xmm;
73 nbk_func_noener nbnxm_kernel_ElecEwTwinCut_VdwLJFSw_F_2xmm;
74 nbk_func_noener nbnxm_kernel_ElecEwTwinCut_VdwLJPSw_F_2xmm;
75 nbk_func_noener nbnxm_kernel_ElecEwTwinCut_VdwLJEwCombGeom_F_2xmm;
76
77 nbk_func_ener nbnxm_kernel_ElecRF_VdwLJCombGeom_VF_2xmm;
78 nbk_func_ener nbnxm_kernel_ElecRF_VdwLJCombLB_VF_2xmm;
79 nbk_func_ener nbnxm_kernel_ElecRF_VdwLJ_VF_2xmm;
80 nbk_func_ener nbnxm_kernel_ElecRF_VdwLJFSw_VF_2xmm;
81 nbk_func_ener nbnxm_kernel_ElecRF_VdwLJPSw_VF_2xmm;
82 nbk_func_ener nbnxm_kernel_ElecRF_VdwLJEwCombGeom_VF_2xmm;
83 nbk_func_ener nbnxm_kernel_ElecQSTab_VdwLJCombGeom_VF_2xmm;
84 nbk_func_ener nbnxm_kernel_ElecQSTab_VdwLJCombLB_VF_2xmm;
85 nbk_func_ener nbnxm_kernel_ElecQSTab_VdwLJ_VF_2xmm;
86 nbk_func_ener nbnxm_kernel_ElecQSTab_VdwLJFSw_VF_2xmm;
87 nbk_func_ener nbnxm_kernel_ElecQSTab_VdwLJPSw_VF_2xmm;
88 nbk_func_ener nbnxm_kernel_ElecQSTab_VdwLJEwCombGeom_VF_2xmm;
89 nbk_func_ener nbnxm_kernel_ElecQSTabTwinCut_VdwLJCombGeom_VF_2xmm;
90 nbk_func_ener nbnxm_kernel_ElecQSTabTwinCut_VdwLJCombLB_VF_2xmm;
91 nbk_func_ener nbnxm_kernel_ElecQSTabTwinCut_VdwLJ_VF_2xmm;
92 nbk_func_ener nbnxm_kernel_ElecQSTabTwinCut_VdwLJFSw_VF_2xmm;
93 nbk_func_ener nbnxm_kernel_ElecQSTabTwinCut_VdwLJPSw_VF_2xmm;
94 nbk_func_ener nbnxm_kernel_ElecQSTabTwinCut_VdwLJEwCombGeom_VF_2xmm;
95 nbk_func_ener nbnxm_kernel_ElecEw_VdwLJCombGeom_VF_2xmm;
96 nbk_func_ener nbnxm_kernel_ElecEw_VdwLJCombLB_VF_2xmm;
97 nbk_func_ener nbnxm_kernel_ElecEw_VdwLJ_VF_2xmm;
98 nbk_func_ener nbnxm_kernel_ElecEw_VdwLJFSw_VF_2xmm;
99 nbk_func_ener nbnxm_kernel_ElecEw_VdwLJPSw_VF_2xmm;
100 nbk_func_ener nbnxm_kernel_ElecEw_VdwLJEwCombGeom_VF_2xmm;
101 nbk_func_ener nbnxm_kernel_ElecEwTwinCut_VdwLJCombGeom_VF_2xmm;
102 nbk_func_ener nbnxm_kernel_ElecEwTwinCut_VdwLJCombLB_VF_2xmm;
103 nbk_func_ener nbnxm_kernel_ElecEwTwinCut_VdwLJ_VF_2xmm;
104 nbk_func_ener nbnxm_kernel_ElecEwTwinCut_VdwLJFSw_VF_2xmm;
105 nbk_func_ener nbnxm_kernel_ElecEwTwinCut_VdwLJPSw_VF_2xmm;
106 nbk_func_ener nbnxm_kernel_ElecEwTwinCut_VdwLJEwCombGeom_VF_2xmm;
107
108 nbk_func_ener nbnxm_kernel_ElecRF_VdwLJCombGeom_VgrpF_2xmm;
109 nbk_func_ener nbnxm_kernel_ElecRF_VdwLJCombLB_VgrpF_2xmm;
110 nbk_func_ener nbnxm_kernel_ElecRF_VdwLJ_VgrpF_2xmm;
111 nbk_func_ener nbnxm_kernel_ElecRF_VdwLJFSw_VgrpF_2xmm;
112 nbk_func_ener nbnxm_kernel_ElecRF_VdwLJPSw_VgrpF_2xmm;
113 nbk_func_ener nbnxm_kernel_ElecRF_VdwLJEwCombGeom_VgrpF_2xmm;
114 nbk_func_ener nbnxm_kernel_ElecQSTab_VdwLJCombGeom_VgrpF_2xmm;
115 nbk_func_ener nbnxm_kernel_ElecQSTab_VdwLJCombLB_VgrpF_2xmm;
116 nbk_func_ener nbnxm_kernel_ElecQSTab_VdwLJ_VgrpF_2xmm;
117 nbk_func_ener nbnxm_kernel_ElecQSTab_VdwLJFSw_VgrpF_2xmm;
118 nbk_func_ener nbnxm_kernel_ElecQSTab_VdwLJPSw_VgrpF_2xmm;
119 nbk_func_ener nbnxm_kernel_ElecQSTab_VdwLJEwCombGeom_VgrpF_2xmm;
120 nbk_func_ener nbnxm_kernel_ElecQSTabTwinCut_VdwLJCombGeom_VgrpF_2xmm;
121 nbk_func_ener nbnxm_kernel_ElecQSTabTwinCut_VdwLJCombLB_VgrpF_2xmm;
122 nbk_func_ener nbnxm_kernel_ElecQSTabTwinCut_VdwLJ_VgrpF_2xmm;
123 nbk_func_ener nbnxm_kernel_ElecQSTabTwinCut_VdwLJFSw_VgrpF_2xmm;
124 nbk_func_ener nbnxm_kernel_ElecQSTabTwinCut_VdwLJPSw_VgrpF_2xmm;
125 nbk_func_ener nbnxm_kernel_ElecQSTabTwinCut_VdwLJEwCombGeom_VgrpF_2xmm;
126 nbk_func_ener nbnxm_kernel_ElecEw_VdwLJCombGeom_VgrpF_2xmm;
127 nbk_func_ener nbnxm_kernel_ElecEw_VdwLJCombLB_VgrpF_2xmm;
128 nbk_func_ener nbnxm_kernel_ElecEw_VdwLJ_VgrpF_2xmm;
129 nbk_func_ener nbnxm_kernel_ElecEw_VdwLJFSw_VgrpF_2xmm;
130 nbk_func_ener nbnxm_kernel_ElecEw_VdwLJPSw_VgrpF_2xmm;
131 nbk_func_ener nbnxm_kernel_ElecEw_VdwLJEwCombGeom_VgrpF_2xmm;
132 nbk_func_ener nbnxm_kernel_ElecEwTwinCut_VdwLJCombGeom_VgrpF_2xmm;
133 nbk_func_ener nbnxm_kernel_ElecEwTwinCut_VdwLJCombLB_VgrpF_2xmm;
134 nbk_func_ener nbnxm_kernel_ElecEwTwinCut_VdwLJ_VgrpF_2xmm;
135 nbk_func_ener nbnxm_kernel_ElecEwTwinCut_VdwLJFSw_VgrpF_2xmm;
136 nbk_func_ener nbnxm_kernel_ElecEwTwinCut_VdwLJPSw_VgrpF_2xmm;
137 nbk_func_ener nbnxm_kernel_ElecEwTwinCut_VdwLJEwCombGeom_VgrpF_2xmm;
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_2xmm[coulktNR][vdwktNR] = {
147     {
148             nbnxm_kernel_ElecRF_VdwLJCombGeom_F_2xmm,
149             nbnxm_kernel_ElecRF_VdwLJCombLB_F_2xmm,
150             nbnxm_kernel_ElecRF_VdwLJ_F_2xmm,
151             nbnxm_kernel_ElecRF_VdwLJFSw_F_2xmm,
152             nbnxm_kernel_ElecRF_VdwLJPSw_F_2xmm,
153             nbnxm_kernel_ElecRF_VdwLJEwCombGeom_F_2xmm,
154     },
155     {
156             nbnxm_kernel_ElecQSTab_VdwLJCombGeom_F_2xmm,
157             nbnxm_kernel_ElecQSTab_VdwLJCombLB_F_2xmm,
158             nbnxm_kernel_ElecQSTab_VdwLJ_F_2xmm,
159             nbnxm_kernel_ElecQSTab_VdwLJFSw_F_2xmm,
160             nbnxm_kernel_ElecQSTab_VdwLJPSw_F_2xmm,
161             nbnxm_kernel_ElecQSTab_VdwLJEwCombGeom_F_2xmm,
162     },
163     {
164             nbnxm_kernel_ElecQSTabTwinCut_VdwLJCombGeom_F_2xmm,
165             nbnxm_kernel_ElecQSTabTwinCut_VdwLJCombLB_F_2xmm,
166             nbnxm_kernel_ElecQSTabTwinCut_VdwLJ_F_2xmm,
167             nbnxm_kernel_ElecQSTabTwinCut_VdwLJFSw_F_2xmm,
168             nbnxm_kernel_ElecQSTabTwinCut_VdwLJPSw_F_2xmm,
169             nbnxm_kernel_ElecQSTabTwinCut_VdwLJEwCombGeom_F_2xmm,
170     },
171     {
172             nbnxm_kernel_ElecEw_VdwLJCombGeom_F_2xmm,
173             nbnxm_kernel_ElecEw_VdwLJCombLB_F_2xmm,
174             nbnxm_kernel_ElecEw_VdwLJ_F_2xmm,
175             nbnxm_kernel_ElecEw_VdwLJFSw_F_2xmm,
176             nbnxm_kernel_ElecEw_VdwLJPSw_F_2xmm,
177             nbnxm_kernel_ElecEw_VdwLJEwCombGeom_F_2xmm,
178     },
179     {
180             nbnxm_kernel_ElecEwTwinCut_VdwLJCombGeom_F_2xmm,
181             nbnxm_kernel_ElecEwTwinCut_VdwLJCombLB_F_2xmm,
182             nbnxm_kernel_ElecEwTwinCut_VdwLJ_F_2xmm,
183             nbnxm_kernel_ElecEwTwinCut_VdwLJFSw_F_2xmm,
184             nbnxm_kernel_ElecEwTwinCut_VdwLJPSw_F_2xmm,
185             nbnxm_kernel_ElecEwTwinCut_VdwLJEwCombGeom_F_2xmm,
186     },
187 };
188
189 static const p_nbk_func_ener nbnxm_kernel_ener_simd_2xmm[coulktNR][vdwktNR] = {
190     {
191             nbnxm_kernel_ElecRF_VdwLJCombGeom_VF_2xmm,
192             nbnxm_kernel_ElecRF_VdwLJCombLB_VF_2xmm,
193             nbnxm_kernel_ElecRF_VdwLJ_VF_2xmm,
194             nbnxm_kernel_ElecRF_VdwLJFSw_VF_2xmm,
195             nbnxm_kernel_ElecRF_VdwLJPSw_VF_2xmm,
196             nbnxm_kernel_ElecRF_VdwLJEwCombGeom_VF_2xmm,
197     },
198     {
199             nbnxm_kernel_ElecQSTab_VdwLJCombGeom_VF_2xmm,
200             nbnxm_kernel_ElecQSTab_VdwLJCombLB_VF_2xmm,
201             nbnxm_kernel_ElecQSTab_VdwLJ_VF_2xmm,
202             nbnxm_kernel_ElecQSTab_VdwLJFSw_VF_2xmm,
203             nbnxm_kernel_ElecQSTab_VdwLJPSw_VF_2xmm,
204             nbnxm_kernel_ElecQSTab_VdwLJEwCombGeom_VF_2xmm,
205     },
206     {
207             nbnxm_kernel_ElecQSTabTwinCut_VdwLJCombGeom_VF_2xmm,
208             nbnxm_kernel_ElecQSTabTwinCut_VdwLJCombLB_VF_2xmm,
209             nbnxm_kernel_ElecQSTabTwinCut_VdwLJ_VF_2xmm,
210             nbnxm_kernel_ElecQSTabTwinCut_VdwLJFSw_VF_2xmm,
211             nbnxm_kernel_ElecQSTabTwinCut_VdwLJPSw_VF_2xmm,
212             nbnxm_kernel_ElecQSTabTwinCut_VdwLJEwCombGeom_VF_2xmm,
213     },
214     {
215             nbnxm_kernel_ElecEw_VdwLJCombGeom_VF_2xmm,
216             nbnxm_kernel_ElecEw_VdwLJCombLB_VF_2xmm,
217             nbnxm_kernel_ElecEw_VdwLJ_VF_2xmm,
218             nbnxm_kernel_ElecEw_VdwLJFSw_VF_2xmm,
219             nbnxm_kernel_ElecEw_VdwLJPSw_VF_2xmm,
220             nbnxm_kernel_ElecEw_VdwLJEwCombGeom_VF_2xmm,
221     },
222     {
223             nbnxm_kernel_ElecEwTwinCut_VdwLJCombGeom_VF_2xmm,
224             nbnxm_kernel_ElecEwTwinCut_VdwLJCombLB_VF_2xmm,
225             nbnxm_kernel_ElecEwTwinCut_VdwLJ_VF_2xmm,
226             nbnxm_kernel_ElecEwTwinCut_VdwLJFSw_VF_2xmm,
227             nbnxm_kernel_ElecEwTwinCut_VdwLJPSw_VF_2xmm,
228             nbnxm_kernel_ElecEwTwinCut_VdwLJEwCombGeom_VF_2xmm,
229     },
230 };
231
232 static const p_nbk_func_ener nbnxm_kernel_energrp_simd_2xmm[coulktNR][vdwktNR] = {
233     {
234             nbnxm_kernel_ElecRF_VdwLJCombGeom_VgrpF_2xmm,
235             nbnxm_kernel_ElecRF_VdwLJCombLB_VgrpF_2xmm,
236             nbnxm_kernel_ElecRF_VdwLJ_VgrpF_2xmm,
237             nbnxm_kernel_ElecRF_VdwLJFSw_VgrpF_2xmm,
238             nbnxm_kernel_ElecRF_VdwLJPSw_VgrpF_2xmm,
239             nbnxm_kernel_ElecRF_VdwLJEwCombGeom_VgrpF_2xmm,
240     },
241     {
242             nbnxm_kernel_ElecQSTab_VdwLJCombGeom_VgrpF_2xmm,
243             nbnxm_kernel_ElecQSTab_VdwLJCombLB_VgrpF_2xmm,
244             nbnxm_kernel_ElecQSTab_VdwLJ_VgrpF_2xmm,
245             nbnxm_kernel_ElecQSTab_VdwLJFSw_VgrpF_2xmm,
246             nbnxm_kernel_ElecQSTab_VdwLJPSw_VgrpF_2xmm,
247             nbnxm_kernel_ElecQSTab_VdwLJEwCombGeom_VgrpF_2xmm,
248     },
249     {
250             nbnxm_kernel_ElecQSTabTwinCut_VdwLJCombGeom_VgrpF_2xmm,
251             nbnxm_kernel_ElecQSTabTwinCut_VdwLJCombLB_VgrpF_2xmm,
252             nbnxm_kernel_ElecQSTabTwinCut_VdwLJ_VgrpF_2xmm,
253             nbnxm_kernel_ElecQSTabTwinCut_VdwLJFSw_VgrpF_2xmm,
254             nbnxm_kernel_ElecQSTabTwinCut_VdwLJPSw_VgrpF_2xmm,
255             nbnxm_kernel_ElecQSTabTwinCut_VdwLJEwCombGeom_VgrpF_2xmm,
256     },
257     {
258             nbnxm_kernel_ElecEw_VdwLJCombGeom_VgrpF_2xmm,
259             nbnxm_kernel_ElecEw_VdwLJCombLB_VgrpF_2xmm,
260             nbnxm_kernel_ElecEw_VdwLJ_VgrpF_2xmm,
261             nbnxm_kernel_ElecEw_VdwLJFSw_VgrpF_2xmm,
262             nbnxm_kernel_ElecEw_VdwLJPSw_VgrpF_2xmm,
263             nbnxm_kernel_ElecEw_VdwLJEwCombGeom_VgrpF_2xmm,
264     },
265     {
266             nbnxm_kernel_ElecEwTwinCut_VdwLJCombGeom_VgrpF_2xmm,
267             nbnxm_kernel_ElecEwTwinCut_VdwLJCombLB_VgrpF_2xmm,
268             nbnxm_kernel_ElecEwTwinCut_VdwLJ_VgrpF_2xmm,
269             nbnxm_kernel_ElecEwTwinCut_VdwLJFSw_VgrpF_2xmm,
270             nbnxm_kernel_ElecEwTwinCut_VdwLJPSw_VgrpF_2xmm,
271             nbnxm_kernel_ElecEwTwinCut_VdwLJEwCombGeom_VgrpF_2xmm,
272     },
273 };
274
275
276 #endif /* INCLUDE_KERNELFUNCTION_TABLES */