opm-common
gpuistl_if_available.hpp
Go to the documentation of this file.
1 /*
2  Copyright 2025 Equinor ASA
3  This file is part of the Open Porous Media project (OPM).
4  OPM is free software: you can redistribute it and/or modify
5  it under the terms of the GNU General Public License as published by
6  the Free Software Foundation, either version 3 of the License, or
7  (at your option) any later version.
8  OPM is distributed in the hope that it will be useful,
9  but WITHOUT ANY WARRANTY; without even the implied warranty of
10  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11  GNU General Public License for more details.
12  You should have received a copy of the GNU General Public License
13  along with OPM. If not, see <http://www.gnu.org/licenses/>.
14 */
15 #ifndef OPM_GPUISTL_IF_AVAILABLE_HPP
16 #define OPM_GPUISTL_IF_AVAILABLE_HPP
17 
18 #include <opm/common/utility/gpuDecorators.hpp>
19 
27 #if HAVE_CUDA
28 #if USE_HIP
29 #include <opm/simulators/linalg/gpuistl_hip/GpuVector.hpp>
30 #include <opm/simulators/linalg/gpuistl_hip/GpuBuffer.hpp>
31 #include <opm/simulators/linalg/gpuistl_hip/GpuView.hpp>
32 #include <opm/simulators/linalg/gpuistl_hip/gpu_smart_pointer.hpp>
33 #else // USE_HIP is false underneath
34 #include <opm/simulators/linalg/gpuistl/GpuVector.hpp>
35 #include <opm/simulators/linalg/gpuistl/GpuBuffer.hpp>
36 #include <opm/simulators/linalg/gpuistl/GpuView.hpp>
37 #include <opm/simulators/linalg/gpuistl/gpu_smart_pointer.hpp>
38 #endif // USE_HIP
39 #endif // HAVE_CUDA
40 #endif // OPM_GPUISTL_IF_AVAILABLE_HPP