mirror of
https://github.com/OPM/opm-simulators.git
synced 2024-12-22 15:33:29 -06:00
Update test properties of new tests using CUDA. Avoid comparison causing new warning
This commit is contained in:
parent
533c5a1a3e
commit
8b396fa3dc
@ -654,7 +654,10 @@ if(CUDA_FOUND)
|
||||
cuda_safe_call
|
||||
cuda_check_last_error
|
||||
cublas_handle
|
||||
cujac
|
||||
cusparse_handle
|
||||
cuSparse_matrix_operations
|
||||
cuVector_operations
|
||||
cuvector
|
||||
cusparsematrix
|
||||
cuseqilu0
|
||||
|
@ -367,8 +367,8 @@ public:
|
||||
{
|
||||
std::vector<T> v = asStdVector();
|
||||
std::string res = "";
|
||||
for (int i = 0; i < v.size(); i++){
|
||||
res += std::to_string(v[i]) + " ";
|
||||
for (T element : v){
|
||||
res += std::to_string(element) + " ";
|
||||
}
|
||||
res += std::to_string(v[v.size()-1]);
|
||||
return res;
|
||||
|
@ -31,8 +31,6 @@
|
||||
#include <opm/simulators/linalg/cuistl/detail/fix_zero_diagonal.hpp>
|
||||
#include <opm/simulators/linalg/cuistl/detail/vector_operations.hpp>
|
||||
|
||||
#include <iostream>
|
||||
|
||||
using NumericTypes = boost::mpl::list<double, float>;
|
||||
|
||||
BOOST_AUTO_TEST_CASE_TEMPLATE(CUJACApplyBlocksize2, T, NumericTypes)
|
||||
@ -83,7 +81,6 @@ BOOST_AUTO_TEST_CASE_TEMPLATE(CUJACApplyBlocksize2, T, NumericTypes)
|
||||
|
||||
const T expectedAns[2][2] = {{1.0 / 2.0, -1.0 / 2.0}, {-3.0 / 2.0, -2.0}};
|
||||
|
||||
|
||||
cujac.apply(vVector, dVector);
|
||||
BOOST_CHECK_CLOSE(vVector[0][0], expectedAns[0][0], 1e-7);
|
||||
BOOST_CHECK_CLOSE(vVector[0][1], expectedAns[0][1], 1e-7);
|
||||
|
Loading…
Reference in New Issue
Block a user