merge with kernels from MH's master thesis
[LbmBenchmarkKernelsPublic.git] / src / BenchKernelD3Q19ListAaCommon.h
index 11ec5ffc3398807abe7eb9bf2e5a15db6d56f147..f33c512c5f4e1efefd20f8f8c85c820ba4235f34 100644 (file)
@@ -8,6 +8,10 @@
 //   Viktor Haag, 2016
 //   LSS, University of Erlangen-Nuremberg, Germany
 //
+//   Michael Hussnaetter, 2017-2018
+//   University of Erlangen-Nuremberg, Germany
+//   michael.hussnaetter -at- fau.de
+//
 //  This file is part of the Lattice Boltzmann Benchmark Kernels (LbmBenchKernels).
 //
 //  LbmBenchKernels is free software: you can redistribute it and/or modify
@@ -89,6 +93,10 @@ static inline int FNAME(PINDEX3)(int nCells, int cellIndex, int d)
        return d * nCells + cellIndex;
 #elif  DATA_LAYOUT_AOS
        return cellIndex * N_D3Q19 + d;
+#elif DATA_LAYOUT_AOSOA
+       return (cellIndex - (cellIndex % AOSOA_BLOCK_SIZE)) * N_D3Q19
+                       + (d * AOSOA_BLOCK_SIZE)
+                       + (cellIndex % AOSOA_BLOCK_SIZE); 
 #else
        #error P_INDEX_3 function not implemented for chosen data layout.
 #endif
This page took 0.049826 seconds and 5 git commands to generate.