Skip to content

Commit

Permalink
use EXPECT_NEAR_KK_REL for general tests
Browse files Browse the repository at this point in the history
Signed-off-by: Yuuichi Asahi <[email protected]>
  • Loading branch information
Yuuichi Asahi committed Jan 13, 2025
1 parent 8500939 commit cb93fa6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions batched/dense/unit_test/Test_Batched_SerialTbsv.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ void impl_test_batched_tbsv(const int N, const int k, const int BlkSize) {
auto h_x1 = Kokkos::create_mirror_view_and_copy(Kokkos::HostSpace(), x1);
for (int i = 0; i < N; i++) {
for (int j = 0; j < BlkSize; j++) {
EXPECT_NEAR_KK(h_x0(i, j), h_x1(i, j), eps);
Test::EXPECT_NEAR_KK_REL(h_x0(i, j), h_x1(i, j), eps);
}
}
}
Expand Down Expand Up @@ -252,7 +252,7 @@ void impl_test_batched_tbsv_analytical(const std::size_t N) {
auto h_x_ref = Kokkos::create_mirror_view_and_copy(Kokkos::HostSpace(), x_ref);
for (std::size_t ib = 0; ib < N; ib++) {
for (std::size_t j = 0; j < BlkSize; j++) {
Test::EXPECT_NEAR_KK_REL(h_x0(ib, j), h_x_ref(ib, j), eps);
EXPECT_NEAR_KK(h_x0(ib, j), h_x_ref(ib, j), eps);
}
}

Expand All @@ -261,7 +261,7 @@ void impl_test_batched_tbsv_analytical(const std::size_t N) {
Kokkos::deep_copy(h_x0, x0);
for (std::size_t ib = 0; ib < N; ib++) {
for (std::size_t j = 0; j < BlkSize; j++) {
Test::EXPECT_NEAR_KK_REL(h_x0(ib, j), h_x_ref(ib, j), eps);
EXPECT_NEAR_KK(h_x0(ib, j), h_x_ref(ib, j), eps);
}
}
}
Expand Down

0 comments on commit cb93fa6

Please sign in to comment.