From f14db0acb4859b5ef2923dddf4128c9d6c35d713 Mon Sep 17 00:00:00 2001 From: Nathan Ellingwood Date: Sun, 14 Oct 2018 21:20:31 -0600 Subject: [PATCH] Make team abs error checking consistent with other PR #325 changes Reimplement use of dot(r,y,y) instead of the subview and manual dot reductions. --- unit_test/blas/Test_Blas1_team_abs.hpp | 29 ++++++++++++++------------ 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/unit_test/blas/Test_Blas1_team_abs.hpp b/unit_test/blas/Test_Blas1_team_abs.hpp index 59d24f277b..a54f96296e 100644 --- a/unit_test/blas/Test_Blas1_team_abs.hpp +++ b/unit_test/blas/Test_Blas1_team_abs.hpp @@ -134,7 +134,10 @@ namespace Test { expected_result[j] += AT::abs(h_x(i,j)) * AT::abs(h_x(i,j)); } - double eps = std::is_same::value?2*1e-5:1e-7; +// double eps = std::is_same::value?2*1e-5:1e-7; + typename AT::mag_type eps = AT::epsilon()*1000; + typename AT::mag_type zero = AT::abs( AT::zero() ); + typename AT::mag_type one = AT::abs( AT::one() ); Kokkos::View r("Dot::Result",K); @@ -144,13 +147,13 @@ namespace Test { KokkosBlas::Experimental::abs(teamMember, Kokkos::subview(y,Kokkos::ALL(),teamId), Kokkos::subview(x,Kokkos::ALL(),teamId)); } ); + KokkosBlas::dot(r,y,y); for(int k=0;k