Loading...
Searching...
No Matches
ILU_variants_helper_kernels.hpp
/*
Copyright 2025 Equinor ASA
This file is part of the Open Porous Media project (OPM).
OPM is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OPM is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with OPM. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef ILU_VARIANTS_HELPER_KERNELS_HPP
#define ILU_VARIANTS_HELPER_KERNELS_HPP
#include <cuda.h>
#include <cuda_runtime.h>
#include <opm/simulators/linalg/gpuistl/detail/gpuThreadUtils.hpp>
#include <opm/simulators/linalg/gpuistl/detail/gpu_safe_call.hpp>
namespace Opm::gpuistl::detail
{
/*
The computeDiagIndices(NoReorder) functions are used to speed up the factorization time by
not recomputing indices during each update kernel.
*/
template <class T>
void computeDiagIndicesNoReorder(const int* rowIndices,
const int* colIndices,
const size_t* indexConversion,
int rows,
size_t* diagIndices);
template <class T>
void computeDiagIndices(const int* rowIndices,
const int* colIndices,
const int* reorderedToNatural,
int rows,
size_t* diagIndices);
} // namespace Opm::gpuistl::detail
#endif
Opm::gpuistl::detail
Contains wrappers to make the CuBLAS library behave as a modern C++ library with function overlading.
Definition autotuner.hpp:30
Opm::gpuistl::detail::computeDiagIndices
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.
Opm::gpuistl::detail::computeDiagIndicesNoReorder
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.