remove unused variables

This commit is contained in:
Arne Morten Kvarving 2024-08-13 11:21:47 +02:00
parent 8667a18144
commit a1fe421de9
4 changed files with 6 additions and 11 deletions

View File

@ -253,7 +253,6 @@ update_system_on_gpu(Scalar *d_Avals) {
template <class Scalar, unsigned int block_size>
void rocsparseBILU0<Scalar, block_size>::
apply(Scalar& y, Scalar& x) {
Scalar zero = 0.0;
Scalar one = 1.0;
Timer t_apply;

View File

@ -223,8 +223,6 @@ amg_cycle_gpu(const int level,
RocmMatrix<Scalar> *A = &d_Amatrices[level];
RocmMatrix<Scalar> *R = &d_Rmatrices[level];
int Ncur = A->Nb;
Scalar zero = 0.0;
Scalar one = 1.0;
rocsparse_mat_info spmv_info;
rocsparse_mat_descr descr_R;

View File

@ -38,11 +38,11 @@ create(PreconditionerType type,
return std::make_unique<Opm::Accelerator::rocsparseBILU0<Scalar, block_size> >(verbosity);
case PreconditionerType::CPR:
return std::make_unique<Opm::Accelerator::rocsparseCPR<Scalar, block_size> >(verbosity);
}
default:
OPM_THROW(std::logic_error,
"Invalid preconditioner type " + std::to_string(static_cast<int>(type)));
}
}
template <class Scalar, unsigned int block_size>
void rocsparsePreconditioner<Scalar, block_size>::

View File

@ -63,18 +63,16 @@ rocsparseSolverBackend(int verbosity_, int maxit_, Scalar tolerance_,
: Base(verbosity_, maxit_, tolerance_, platformID_, deviceID_)
{
int numDevices = 0;
bool use_cpr, use_isai;
bool use_cpr;
if (linsolver.compare("ilu0") == 0) {
use_cpr = false;
use_isai = false;
} else if (linsolver.compare("cpr_quasiimpes") == 0) {
use_cpr = true;
use_isai = false;
} else if (linsolver.compare("isai") == 0) {
OPM_THROW(std::logic_error, "Error rocsparseSolver does not support --linerar-solver=isai");
OPM_THROW(std::logic_error, "Error rocsparseSolver does not support --linear-solver=isai");
} else if (linsolver.compare("cpr_trueimpes") == 0) {
OPM_THROW(std::logic_error, "Error rocsparseSolver does not support --linerar-solver=cpr_trueimpes");
OPM_THROW(std::logic_error, "Error rocsparseSolver does not support --linear-solver=cpr_trueimpes");
} else {
OPM_THROW(std::logic_error, "Error unknown value for argument --linear-solver, " + linsolver);
}