From 88eb01d06cf22a34617bfb299f2bfa24e578f0b7 Mon Sep 17 00:00:00 2001 From: Yuuichi Asahi Date: Sun, 8 Dec 2024 04:06:45 +0900 Subject: [PATCH] simplify tests for serial trsv Signed-off-by: Yuuichi Asahi --- .../dense/unit_test/Test_Batched_SerialTrsv.hpp | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/batched/dense/unit_test/Test_Batched_SerialTrsv.hpp b/batched/dense/unit_test/Test_Batched_SerialTrsv.hpp index 62e6e87601..e8b501373c 100644 --- a/batched/dense/unit_test/Test_Batched_SerialTrsv.hpp +++ b/batched/dense/unit_test/Test_Batched_SerialTrsv.hpp @@ -319,29 +319,19 @@ void impl_test_batched_trsv(const std::size_t N, const std::size_t BlkSize) { Kokkos::deep_copy(x_s, x); // Create triangluar matrix - create_triangular_matrix(A, AT); + create_triangular_matrix(A, AT); // trsv to solve U * x = b or L * x = b Functor_BatchedSerialTrsv(1.0, - AT, x) + A, x) .run(); Functor_BatchedSerialTrsv( - 1.0, AT, x_s) + 1.0, A, x_s) .run(); Kokkos::fence(); - if constexpr (std::is_same_v) { - auto h_AT = Kokkos::create_mirror_view_and_copy(Kokkos::HostSpace(), AT); - for (std::size_t ib = 0; ib < N; ib++) { - for (std::size_t i = 0; i < BlkSize; i++) { - h_AT(ib, i, i) = 1.0; - } - } - Kokkos::deep_copy(AT, h_AT); - } - // Compute A * x by gemv // Gemv to compute A*x, this should be identical to b Functor_BatchedSerialGemv(1.0, AT, x, 0.0,