ILU_variants_helper_kernels.hpp
Go to the documentation of this file.
1/*
2 Copyright 2025 Equinor ASA
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
20#ifndef ILU_VARIANTS_HELPER_KERNELS_HPP
21#define ILU_VARIANTS_HELPER_KERNELS_HPP
22
23#include <cuda.h>
24#include <cuda_runtime.h>
27
29{
30
31/*
32 The computeDiagIndices(NoReorder) functions are used to speed up the factorization time by
33 not recomputing indices during each update kernel.
34*/
45template <class T>
46void computeDiagIndicesNoReorder(const int* rowIndices,
47 const int* colIndices,
48 const size_t* indexConversion,
49 int rows,
50 size_t* diagIndices);
51
62template <class T>
63void computeDiagIndices(const int* rowIndices,
64 const int* colIndices,
65 const int* reorderedToNatural,
66 int rows,
67 size_t* diagIndices);
68
69} // namespace Opm::gpuistl::detail
70
71#endif
Definition: autotuner.hpp:30
void computeDiagIndices(const int *rowIndices, const int *colIndices, const int *reorderedToNatural, int rows, size_t *diagIndices)
Computes indices of diagonal elements for reordered GPU preconditioner.
void computeDiagIndicesNoReorder(const int *rowIndices, const int *colIndices, const size_t *indexConversion, int rows, size_t *diagIndices)
Computes indices of diagonal elements for non-reordered GPU preconditioner.