X-Git-Url: http://git.rrze.uni-erlangen.de/gitweb/?p=LbmBenchmarkKernelsPublic.git;a=blobdiff_plain;f=src%2FBenchKernelD3Q19ListAaCommon.h;h=f33c512c5f4e1efefd20f8f8c85c820ba4235f34;hp=11ec5ffc3398807abe7eb9bf2e5a15db6d56f147;hb=8cafd9ea08a6b1103eab29811227a7ae536dffa6;hpb=0fde6e45e9be83893afae896cf49a799777f6d7c diff --git a/src/BenchKernelD3Q19ListAaCommon.h b/src/BenchKernelD3Q19ListAaCommon.h index 11ec5ff..f33c512 100644 --- a/src/BenchKernelD3Q19ListAaCommon.h +++ b/src/BenchKernelD3Q19ListAaCommon.h @@ -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