Silence warnings.

This commit is contained in:
Atgeirr Flø Rasmussen 2020-02-13 11:04:02 +01:00
parent 83a5cf1f91
commit 2cbeff2aca
2 changed files with 9 additions and 3 deletions

View File

@ -35,13 +35,19 @@ typedef Dune::InverseOperatorResult InverseOperatorResult;
namespace Opm
{
BdaBridge::BdaBridge(bool use_gpu_ OPM_UNUSED, int linear_solver_verbosity OPM_UNUSED, int maxit OPM_UNUSED, double tolerance OPM_UNUSED) : use_gpu(use_gpu_) {
#if HAVE_CUDA
BdaBridge::BdaBridge(bool use_gpu_, int linear_solver_verbosity, int maxit, double tolerance)
: use_gpu(use_gpu_)
{
if (use_gpu) {
backend.reset(new cusparseSolverBackend(linear_solver_verbosity, maxit, tolerance));
}
#endif
}
#else
BdaBridge::BdaBridge(bool use_gpu_ OPM_UNUSED, int linear_solver_verbosity OPM_UNUSED, int maxit OPM_UNUSED, double tolerance OPM_UNUSED)
{
}
#endif

View File

@ -42,8 +42,8 @@ class BdaBridge
private:
#if HAVE_CUDA
std::unique_ptr<cusparseSolverBackend> backend;
#endif
bool use_gpu;
#endif
public:
/// Construct a BdaBridge