diff options
author | Sebastián Barschkis <sebbas@sebbas.org> | 2021-09-13 16:03:52 +0300 |
---|---|---|
committer | Sebastián Barschkis <sebbas@sebbas.org> | 2021-09-13 16:03:52 +0300 |
commit | 063ce7f550f1612ab0e34c4ecb4b57f8401b84b4 (patch) | |
tree | 53584b6c514510b0bab33a480b3ec85274b48a6b /extern/mantaflow/preprocessed/kernel.h | |
parent | 4b06420e65040c642d2b0a7a1c9bf7515d3cec0c (diff) |
Fluid: Initial changes for OpenMP GPU supportfluid-mantaflow-gpu
Contains basic support for OpenMP GPU offloading.
That is, offloading of fluid KERNEL loops to the GPU.
This branch offloads pressure and advection calls only - the 2 most
expensive operation per step. In theory though, any function can be
offloaded.
For now, this branch needs to be build with a compiler that supports
Nvidia GPU offloading. Exact GPU models need to be specified via CMake.
Diffstat (limited to 'extern/mantaflow/preprocessed/kernel.h')
-rw-r--r-- | extern/mantaflow/preprocessed/kernel.h | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/extern/mantaflow/preprocessed/kernel.h b/extern/mantaflow/preprocessed/kernel.h index dbcc2342a11..90e30cd21e1 100644 --- a/extern/mantaflow/preprocessed/kernel.h +++ b/extern/mantaflow/preprocessed/kernel.h @@ -71,19 +71,6 @@ class ParticleBase; for (int j = bnd; j < (grid).getSizeY() - bnd; ++j) \ for (int i = bnd; i < (grid).getSizeX() - bnd; ++i) -#define FOR_NEIGHBORS_BND(grid, radius, bnd) \ - for (int zj = ((grid).is3D() ? std::max(bnd, k - radius) : 0); \ - zj <= ((grid).is3D() ? std::min(k + radius, (grid).getSizeZ() - 1 - bnd) : 0); \ - zj++) \ - for (int yj = std::max(bnd, j - radius); \ - yj <= std::min(j + radius, (grid).getSizeY() - 1 - bnd); \ - yj++) \ - for (int xj = std::max(bnd, i - radius); \ - xj <= std::min(i + radius, (grid).getSizeX() - 1 - bnd); \ - xj++) - -#define FOR_NEIGHBORS(grid, radius) FOR_NEIGHBORS_BND(grid, radius, 0) - //! Basic data structure for kernel data, initialized based on kernel type (e.g. single, idx, etc). struct KernelBase { int maxX, maxY, maxZ, minZ, maxT, minT; |