Skip to content

Commit

Permalink
10
Browse files Browse the repository at this point in the history
  • Loading branch information
K20shores committed Sep 23, 2024
1 parent 302e66c commit b4ec9b3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/unit/cuda/solver/test_cuda_lu_decomposition.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ void testCudaRandomMatrix(size_t n_grids)
gpu_LU.first.CopyToHost();
gpu_LU.second.CopyToHost();
check_results<typename GPUSparseMatrixPolicy::value_type, GPUSparseMatrixPolicy>(
gpu_A, gpu_LU.first, gpu_LU.second, [&](const double a, const double b) -> void { EXPECT_NEAR(a, b, 1.0e-5); });
gpu_A, gpu_LU.first, gpu_LU.second, [&](const double a, const double b) -> void { EXPECT_NEAR(a, b, 1.0e-10); });

micm::LuDecomposition cpu_lud = micm::LuDecomposition::Create<CPUSparseMatrixPolicy>(cpu_A);
auto cpu_LU = micm::LuDecomposition::GetLUMatrices<CPUSparseMatrixPolicy>(cpu_A, 1.0e-30);
Expand All @@ -65,13 +65,13 @@ void testCudaRandomMatrix(size_t n_grids)
{
auto gpu_L = gpu_L_vector[i];
auto cpu_L = cpu_L_vector[i];
EXPECT_LT(std::abs((gpu_L - cpu_L) / cpu_L), 1.0e-5);
EXPECT_LT(std::abs((gpu_L - cpu_L) / cpu_L), 1.0e-10);
};
for (int j = 0; j < U_size; ++j)
{
auto gpu_U = gpu_U_vector[j];
auto cpu_U = cpu_U_vector[j];
EXPECT_LT(std::abs((gpu_U - cpu_U) / cpu_U), 1.0e-5);
EXPECT_LT(std::abs((gpu_U - cpu_U) / cpu_U), 1.0e-10);
};
}

Expand Down

0 comments on commit b4ec9b3

Please sign in to comment.