ILU0Kernels.hpp
Go to the documentation of this file.
1/*
2 Copyright 2024 SINTEF AS
3
4 This file is part of the Open Porous Media project (OPM).
5
6 OPM is free software: you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation, either version 3 of the License, or
9 (at your option) any later version.
10
11 OPM is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
15
16 You should have received a copy of the GNU General Public License
17 along with OPM. If not, see <http://www.gnu.org/licenses/>.
18*/
19#ifndef OPM_ILU0_KERNELS_HPP
20#define OPM_ILU0_KERNELS_HPP
21#include <cstddef>
22#include <vector>
24{
25
40template <class T, int blocksize>
41void solveUpperLevelSet(T* reorderedMat,
42 int* rowIndices,
43 int* colIndices,
44 int* indexConversion,
45 int startIdx,
46 int rowsInLevelSet,
47 T* v,
48 int threadBlockSize);
49
65template <class T, int blocksize>
66void solveLowerLevelSet(T* reorderedMat,
67 int* rowIndices,
68 int* colIndices,
69 int* indexConversion,
70 int startIdx,
71 int rowsInLevelSet,
72 const T* d,
73 T* v,
74 int threadBlockSize);
75
92template <class T, int blocksize>
93void solveUpperLevelSetSplit(T* reorderedMat,
94 int* rowIndices,
95 int* colIndices,
96 int* indexConversion,
97 int startIdx,
98 int rowsInLevelSet,
99 const T* dInv,
100 T* v,
101 int threadBlockSize);
102
120template <class T, int blocksize>
121void solveLowerLevelSetSplit(T* reorderedLowerMat,
122 int* rowIndices,
123 int* colIndices,
124 int* indexConversion,
125 int startIdx,
126 int rowsInLevelSet,
127 const T* d,
128 T* v,
129 int threadBlockSize);
130
147template <class T, int blocksize>
148void LUFactorization(T* reorderedMat,
149 int* rowIndices,
150 int* columnIndices,
151 int* naturalToReordered,
152 int* reorderedToNatual,
153 size_t rowsInLevelSet,
154 int startIdx,
155 int threadBlockSize);
156
178template <class T, int blocksize>
179void LUFactorizationSplit(T* reorderedLowerMat,
180 int* lowerRowIndices,
181 int* lowerColIndices,
182 T* reorderedUpperMat,
183 int* upperRowIndices,
184 int* upperColIndices,
185 T* diagonal,
186 int* reorderedToNatural,
187 int* naturalToReordered,
188 int startIdx,
189 int rowsInLevelSet,
190 int threadBlockSize);
191
192} // namespace Opm::gpuistl::detail::ILU0
193#endif
Definition: ILU0Kernels.hpp:24
void LUFactorizationSplit(T *reorderedLowerMat, int *lowerRowIndices, int *lowerColIndices, T *reorderedUpperMat, int *upperRowIndices, int *upperColIndices, T *diagonal, int *reorderedToNatural, int *naturalToReordered, int startIdx, int rowsInLevelSet, int threadBlockSize)
Computes the ILU0 factorization in-place of a bcsr matrix stored in a split format (lower,...
void solveUpperLevelSet(T *reorderedMat, int *rowIndices, int *colIndices, int *indexConversion, int startIdx, int rowsInLevelSet, T *v, int threadBlockSize)
Perform a upper solve on certain rows in a matrix that can safely be computed in parallel.
void solveLowerLevelSetSplit(T *reorderedLowerMat, int *rowIndices, int *colIndices, int *indexConversion, int startIdx, int rowsInLevelSet, const T *d, T *v, int threadBlockSize)
Perform an lower solve on certain rows in a matrix that can safely be computed in parallel.
void solveUpperLevelSetSplit(T *reorderedMat, int *rowIndices, int *colIndices, int *indexConversion, int startIdx, int rowsInLevelSet, const T *dInv, T *v, int threadBlockSize)
Perform an upper solve on certain rows in a matrix that can safely be computed in parallel.
void LUFactorization(T *reorderedMat, int *rowIndices, int *columnIndices, int *naturalToReordered, int *reorderedToNatual, size_t rowsInLevelSet, int startIdx, int threadBlockSize)
Computes the ILU Factorization of the input bcsr matrix, which is stored in a reordered way....
void solveLowerLevelSet(T *reorderedMat, int *rowIndices, int *colIndices, int *indexConversion, int startIdx, int rowsInLevelSet, const T *d, T *v, int threadBlockSize)
Perform a lower solve on certain rows in a matrix that can safely be computed in parallel.