merge with kernels from MH's master thesis
[LbmBenchmarkKernelsPublic.git] / src / KernelFunctions.h
1 // --------------------------------------------------------------------------
2 //
3 // Copyright
4 //   Markus Wittmann, 2016-2017
5 //   RRZE, University of Erlangen-Nuremberg, Germany
6 //   markus.wittmann -at- fau.de or hpc -at- rrze.fau.de
7 //
8 //   Viktor Haag, 2016
9 //   LSS, University of Erlangen-Nuremberg, Germany
10 //
11 //   Michael Hussnaetter, 2017-2018
12 //   University of Erlangen-Nuremberg, Germany
13 //   michael.hussnaetter -at- fau.de
14 //
15 //  This file is part of the Lattice Boltzmann Benchmark Kernels (LbmBenchKernels).
16 //
17 //  LbmBenchKernels is free software: you can redistribute it and/or modify
18 //  it under the terms of the GNU General Public License as published by
19 //  the Free Software Foundation, either version 3 of the License, or
20 //  (at your option) any later version.
21 //
22 //  LbmBenchKernels is distributed in the hope that it will be useful,
23 //  but WITHOUT ANY WARRANTY; without even the implied warranty of
24 //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
25 //  GNU General Public License for more details.
26 //
27 //  You should have received a copy of the GNU General Public License
28 //  along with LbmBenchKernels.  If not, see <http://www.gnu.org/licenses/>.
29 //
30 // --------------------------------------------------------------------------
31 #ifndef __KERNEL_FUNCTIONS_H__
32 #define __KERNEL_FUNCTIONS_H__
33
34 #include "BenchKernelD3Q19.h"
35 #include "BenchKernelD3Q19Aa.h"
36 #include "BenchKernelD3Q19AaVec.h"
37 #include "BenchKernelD3Q19AaVecSl.h"
38 #include "BenchKernelD3Q19List.h"
39 #include "BenchKernelD3Q19ListAa.h"
40 #include "BenchKernelD3Q19ListAaRia.h"
41 #include "BenchKernelD3Q19ListAaPv.h"
42 #ifdef VECTOR_AVX512
43 #include "BenchKernelD3Q19ListAaPvGatherAoSoA.h"
44 #include "BenchKernelD3Q19ListAaPvGather.h"
45 #include "BenchKernelD3Q19ListAaPvGatherHybrid.h"
46 #endif
47 #include "BenchKernelD3Q19ListPullSplitNt.h"
48
49 typedef struct KernelFunctions_
50 {
51         char Name[128];
52         void (* Init)(LatticeDesc * ld, KernelData ** kernelData, Parameters * params);
53         void (* Deinit)(LatticeDesc * ld, KernelData ** kernelData);
54 } KernelFunctions;
55
56 KernelFunctions g_kernels[] =
57 {
58         {
59                 .Name   = "list-aa-pv-soa",
60                 .Init   = D3Q19ListAaPvInit_PushSoA,
61                 .Deinit = D3Q19ListAaPvDeinit_PushSoA
62         },
63         {
64                 .Name   = "list-aa-ria-soa",
65                 .Init   = D3Q19ListAaRiaInit_PushSoA,
66                 .Deinit = D3Q19ListAaRiaDeinit_PushSoA
67         },
68         {
69                 .Name   = "list-aa-soa",
70                 .Init   = D3Q19ListAaInit_PushSoA,
71                 .Deinit = D3Q19ListAaDeinit_PushSoA
72         },
73         {
74                 .Name   = "list-aa-aos",
75                 .Init   = D3Q19ListAaInit_PushAoS,
76                 .Deinit = D3Q19ListAaDeinit_PushAoS
77         },
78 #ifdef VECTOR_AVX512
79         {
80                 .Name   = "list-aa-pv-gather-aosoa",
81                 .Init   = D3Q19ListAaPvGatherAoSoAInit_PushAoSoA,
82                 .Deinit = D3Q19ListAaPvGatherAoSoADeinit_PushAoSoA
83         },
84         {
85                 .Name   = "list-aa-pv-gather-soa",
86                 .Init   = D3Q19ListAaPvGatherInit_PushSoA,
87                 .Deinit = D3Q19ListAaPvGatherDeinit_PushSoA
88         },
89
90         {
91                 .Name   = "list-aa-pv-gather-hybrid-soa",
92                 .Init   = D3Q19ListAaPvGatherHybridInit_PushSoA,
93                 .Deinit = D3Q19ListAaPvGatherHybridDeinit_PushSoA
94         },
95 #endif
96         {
97                 .Name   = "list-pull-split-nt-1s-soa",
98                 .Init   = D3Q19ListPullSplitNt1SInit_PullSoA,
99                 .Deinit = D3Q19ListPullSplitNtDeinit_PullSoA
100         },
101         {
102                 .Name   = "list-pull-split-nt-2s-soa",
103                 .Init   = D3Q19ListPullSplitNt2SInit_PullSoA,
104                 .Deinit = D3Q19ListPullSplitNtDeinit_PullSoA
105         },
106         {
107                 .Name   = "list-push-soa",
108                 .Init   = D3Q19ListInit_PushSoA,
109                 .Deinit = D3Q19ListDeinit_PushSoA
110         },
111         {
112                 .Name   = "list-push-aos",
113                 .Init   = D3Q19ListInit_PushAoS,
114                 .Deinit = D3Q19ListDeinit_PushAoS
115         },
116         {
117                 .Name   = "list-pull-soa",
118                 .Init   = D3Q19ListInit_PullSoA,
119                 .Deinit = D3Q19ListDeinit_PullSoA
120         },
121         {
122                 .Name = "list-pull-aos",
123                 .Init = D3Q19ListInit_PullAoS,
124                 .Deinit = D3Q19ListDeinit_PullAoS
125         },
126         {
127                 .Name   = "push-soa",
128                 .Init   = D3Q19Init_PushSoA,
129                 .Deinit = D3Q19Deinit_PushSoA
130         },
131         {
132                 .Name   = "push-aos",
133                 .Init   = D3Q19Init_PushAoS,
134                 .Deinit = D3Q19Deinit_PushAoS
135         },
136         {
137                 .Name   = "pull-soa",
138                 .Init   = D3Q19Init_PullSoA,
139                 .Deinit = D3Q19Deinit_PullSoA
140         },
141         {
142                 .Name   = "pull-aos",
143                 .Init   = D3Q19Init_PullAoS,
144                 .Deinit = D3Q19Deinit_PullAoS
145         },
146         {
147                 .Name   = "blk-push-soa",
148                 .Init   = D3Q19BlkInit_PushSoA,
149                 .Deinit = D3Q19BlkDeinit_PushSoA
150         },
151         {
152                 .Name   = "blk-push-aos",
153                 .Init   = D3Q19BlkInit_PushAoS,
154                 .Deinit = D3Q19BlkDeinit_PushAoS
155         },
156         {
157                 .Name   = "blk-pull-soa",
158                 .Init   = D3Q19BlkInit_PullSoA,
159                 .Deinit = D3Q19BlkDeinit_PullSoA
160         },
161         {
162                 .Name   = "blk-pull-aos",
163                 .Init   = D3Q19BlkInit_PullAoS,
164                 .Deinit = D3Q19BlkDeinit_PullAoS
165         },
166         {
167                 .Name   = "aa-aos",
168                 .Init   = D3Q19AaInit_AaAoS,
169                 .Deinit = D3Q19AaDeinit_AaAoS
170         },
171         {
172                 .Name   = "aa-soa",
173                 .Init   = D3Q19AaInit_AaSoA,
174                 .Deinit = D3Q19AaDeinit_AaSoA
175         },
176         {
177                 .Name   = "aa-vec-soa",
178                 .Init   = D3Q19AaVecInit_AaSoA,
179                 .Deinit = D3Q19AaVecDeinit_AaSoA
180         },
181         {
182                 .Name   = "aa-vec-sl-soa",
183                 .Init   = D3Q19AaVecSlInit_AaSoA,
184                 .Deinit = D3Q19AaVecSlDeinit_AaSoA
185         }
186
187
188 };
189
190 #endif // __KERNEL_FUNCTIONS_H__
This page took 0.061278 seconds and 4 git commands to generate.