diff --git a/batched/KokkosBatched_Util.hpp b/batched/KokkosBatched_Util.hpp index acfd5cab68..f6b08764c9 100644 --- a/batched/KokkosBatched_Util.hpp +++ b/batched/KokkosBatched_Util.hpp @@ -69,13 +69,12 @@ struct is_vector : public std::false_type {}; template struct is_same_mag_type { - static const bool is_specialized = - (Kokkos::Details::ArithTraits::is_specialized && - Kokkos::Details::ArithTraits::is_specialized); + static const bool is_specialized = (Kokkos::ArithTraits::is_specialized && + Kokkos::ArithTraits::is_specialized); static const bool is_mag_type_same = - std::is_same::mag_type, - typename Kokkos::Details::ArithTraits::mag_type>::value; + std::is_same::mag_type, + typename Kokkos::ArithTraits::mag_type>::value; static const bool value = is_specialized && is_mag_type_same; }; diff --git a/batched/dense/impl/KokkosBatched_AddRadial_Internal.hpp b/batched/dense/impl/KokkosBatched_AddRadial_Internal.hpp index cd90657e30..24ecafe0a0 100644 --- a/batched/dense/impl/KokkosBatched_AddRadial_Internal.hpp +++ b/batched/dense/impl/KokkosBatched_AddRadial_Internal.hpp @@ -38,8 +38,7 @@ struct SerialAddRadialInternal { #endif for (int i = 0; i < m; ++i) { // const auto a_real = RealPart(A[i*as]); - const auto a_real = - Kokkos::Details::ArithTraits::real(A[i * as]); + const auto a_real = Kokkos::ArithTraits::real(A[i * as]); A[i * as] += ValueType(minus_abs_tiny) * ValueType(a_real < 0); A[i * as] += ValueType(abs_tiny) * ValueType(a_real >= 0); } @@ -62,8 +61,7 @@ struct TeamAddRadialInternal { Kokkos::parallel_for(Kokkos::TeamThreadRange(member, m), [&](const int &i) { // const auto a_real = RealPart(A[i*as]); - const auto a_real = - Kokkos::Details::ArithTraits::real(A[i * as]); + const auto a_real = Kokkos::ArithTraits::real(A[i * as]); A[i * as] += ValueType(minus_abs_tiny) * ValueType(a_real < 0); A[i * as] += ValueType(abs_tiny) * ValueType(a_real >= 0); }); diff --git a/batched/dense/impl/KokkosBatched_ApplyHouseholder_Serial_Internal.hpp b/batched/dense/impl/KokkosBatched_ApplyHouseholder_Serial_Internal.hpp index da8e989b47..611e9440b5 100644 --- a/batched/dense/impl/KokkosBatched_ApplyHouseholder_Serial_Internal.hpp +++ b/batched/dense/impl/KokkosBatched_ApplyHouseholder_Serial_Internal.hpp @@ -56,7 +56,7 @@ struct SerialApplyLeftHouseholderInternal { for (int j = 0; j < n; ++j) { value_type tmp = a1t[j * a1ts]; for (int i = 0; i < m; ++i) - tmp += Kokkos::Details::ArithTraits::conj(u2[i * u2s]) * + tmp += Kokkos::ArithTraits::conj(u2[i * u2s]) * A2[i * as0 + j * as1]; w1t[j] = tmp * inv_tau; // /= (*tau); } @@ -109,7 +109,7 @@ struct SerialApplyRightHouseholderInternal { for (int j = 0; j < n; ++j) for (int i = 0; i < m; ++i) A2[i * as0 + j * as1] -= - w1[i] * Kokkos::Details::ArithTraits::conj(u2[j * u2s]); + w1[i] * Kokkos::ArithTraits::conj(u2[j * u2s]); return 0; } diff --git a/batched/dense/impl/KokkosBatched_ApplyHouseholder_TeamVector_Internal.hpp b/batched/dense/impl/KokkosBatched_ApplyHouseholder_TeamVector_Internal.hpp index 4d513fcf3d..2754818fbf 100644 --- a/batched/dense/impl/KokkosBatched_ApplyHouseholder_TeamVector_Internal.hpp +++ b/batched/dense/impl/KokkosBatched_ApplyHouseholder_TeamVector_Internal.hpp @@ -59,7 +59,7 @@ struct TeamVectorApplyLeftHouseholderInternal { Kokkos::parallel_reduce( Kokkos::ThreadVectorRange(member, m), [&](const int &i, value_type &val) { - val += Kokkos::Details::ArithTraits::conj(u2[i * u2s]) * + val += Kokkos::ArithTraits::conj(u2[i * u2s]) * A2[i * as0 + j * as1]; }, tmp); @@ -146,8 +146,7 @@ struct TeamVectorApplyRightHouseholderInternal { Kokkos::parallel_for( Kokkos::ThreadVectorRange(member, m), [&](const int &i) { A2[i * as0 + j * as1] -= - w1[i] * Kokkos::Details::ArithTraits::conj( - u2[j * u2s]); + w1[i] * Kokkos::ArithTraits::conj(u2[j * u2s]); }); }); } else { @@ -156,8 +155,7 @@ struct TeamVectorApplyRightHouseholderInternal { Kokkos::parallel_for( Kokkos::TeamThreadRange(member, m), [&](const int &i) { A2[i * as0 + j * as1] -= - w1[i] * Kokkos::Details::ArithTraits::conj( - u2[j * u2s]); + w1[i] * Kokkos::ArithTraits::conj(u2[j * u2s]); }); }); } diff --git a/batched/dense/impl/KokkosBatched_Eigendecomposition_Serial_Internal.hpp b/batched/dense/impl/KokkosBatched_Eigendecomposition_Serial_Internal.hpp index f89b76e162..c857de19c2 100644 --- a/batched/dense/impl/KokkosBatched_Eigendecomposition_Serial_Internal.hpp +++ b/batched/dense/impl/KokkosBatched_Eigendecomposition_Serial_Internal.hpp @@ -72,7 +72,7 @@ struct SerialEigendecompositionInternal { "Serial eigendecomposition on device and/or without LAPACK " "is not implemented yet"); // typedef RealType real_type; - // typedef Kokkos::Details::ArithTraits ats; + // typedef Kokkos::ArithTraits ats; // const real_type one(1), zero(0), tol = 1e2*ats::epsilon(); // //const Kokkos::pair identity(one, zero); diff --git a/batched/dense/impl/KokkosBatched_Eigenvalue_Serial_Internal.hpp b/batched/dense/impl/KokkosBatched_Eigenvalue_Serial_Internal.hpp index ed2e442342..ae4cf10634 100644 --- a/batched/dense/impl/KokkosBatched_Eigenvalue_Serial_Internal.hpp +++ b/batched/dense/impl/KokkosBatched_Eigenvalue_Serial_Internal.hpp @@ -68,7 +68,7 @@ struct SerialEigenvalueInternal { const bool restart = false, const int user_max_iteration = -1) { typedef RealType real_type; - typedef Kokkos::Details::ArithTraits ats; + typedef Kokkos::ArithTraits ats; const real_type zero(0), nan(ats::nan()), tol = 1e2 * ats::epsilon(); const int max_iteration = user_max_iteration < 0 ? 300 : user_max_iteration; diff --git a/batched/dense/impl/KokkosBatched_Francis_Serial_Internal.hpp b/batched/dense/impl/KokkosBatched_Francis_Serial_Internal.hpp index ba4bc0ed9c..21587f4481 100644 --- a/batched/dense/impl/KokkosBatched_Francis_Serial_Internal.hpp +++ b/batched/dense/impl/KokkosBatched_Francis_Serial_Internal.hpp @@ -82,9 +82,9 @@ struct SerialFrancisInternal { } else { const value_type val = H[(m - 1) * hs]; const auto dist_lambda1 = - Kokkos::Details::ArithTraits::abs(lambda1.real() - val); + Kokkos::ArithTraits::abs(lambda1.real() - val); const auto dist_lambda2 = - Kokkos::Details::ArithTraits::abs(lambda2.real() - val); + Kokkos::ArithTraits::abs(lambda2.real() - val); const value_type lambda = dist_lambda1 < dist_lambda2 ? lambda1.real() : lambda2.real(); s = 2 * lambda; diff --git a/batched/dense/impl/KokkosBatched_Givens_Serial_Internal.hpp b/batched/dense/impl/KokkosBatched_Givens_Serial_Internal.hpp index f20e754010..4d80c6a250 100644 --- a/batched/dense/impl/KokkosBatched_Givens_Serial_Internal.hpp +++ b/batched/dense/impl/KokkosBatched_Givens_Serial_Internal.hpp @@ -54,13 +54,12 @@ struct SerialGivensInternal { } else { // here we do not care overflow caused by the division although it is // probable.... - r = Kokkos::Details::ArithTraits::sqrt(chi1 * chi1 + - chi2 * chi2); + r = Kokkos::ArithTraits::sqrt(chi1 * chi1 + chi2 * chi2); cs = chi1 / r; sn = chi2 / r; - if (Kokkos::Details::ArithTraits::abs(chi1) > - Kokkos::Details::ArithTraits::abs(chi2) && + if (Kokkos::ArithTraits::abs(chi1) > + Kokkos::ArithTraits::abs(chi2) && cs < zero) { cs = -cs; sn = -sn; diff --git a/batched/dense/impl/KokkosBatched_HessenbergQR_WithShift_Serial_Internal.hpp b/batched/dense/impl/KokkosBatched_HessenbergQR_WithShift_Serial_Internal.hpp index eba6cdfc59..3d2b75e64d 100644 --- a/batched/dense/impl/KokkosBatched_HessenbergQR_WithShift_Serial_Internal.hpp +++ b/batched/dense/impl/KokkosBatched_HessenbergQR_WithShift_Serial_Internal.hpp @@ -37,7 +37,7 @@ struct SerialHessenbergQR_WithShiftInternal { /* */ ValueType *HH, const int hs0, const int hs1, const ValueType shift, /* */ Kokkos::pair *GG, const bool request_schur) { typedef ValueType value_type; - // typedef Kokkos::Details::ArithTraits ats; + // typedef Kokkos::ArithTraits ats; const int hs = hs0 + hs1; const value_type zero(0), one(1); diff --git a/batched/dense/impl/KokkosBatched_Householder_Serial_Internal.hpp b/batched/dense/impl/KokkosBatched_Householder_Serial_Internal.hpp index bf2bd7d954..05654a2f37 100644 --- a/batched/dense/impl/KokkosBatched_Householder_Serial_Internal.hpp +++ b/batched/dense/impl/KokkosBatched_Householder_Serial_Internal.hpp @@ -35,7 +35,7 @@ struct SerialLeftHouseholderInternal { /* */ ValueType* x2, const int x2s, /* */ ValueType* tau) { typedef ValueType value_type; - typedef typename Kokkos::Details::ArithTraits::mag_type mag_type; + typedef typename Kokkos::ArithTraits::mag_type mag_type; const mag_type zero(0); const mag_type half(0.5); @@ -58,11 +58,10 @@ struct SerialLeftHouseholderInternal { } /// compute magnitude of chi1, equal to norm2 of chi1 - const mag_type norm_chi1 = - Kokkos::Details::ArithTraits::abs(*chi1); + const mag_type norm_chi1 = Kokkos::ArithTraits::abs(*chi1); /// compute 2 norm of x using norm_chi1 and norm_x2 - const mag_type norm_x = Kokkos::Details::ArithTraits::sqrt( + const mag_type norm_x = Kokkos::ArithTraits::sqrt( norm_x2_square + norm_chi1 * norm_chi1); /// compute alpha diff --git a/batched/dense/impl/KokkosBatched_Householder_TeamVector_Internal.hpp b/batched/dense/impl/KokkosBatched_Householder_TeamVector_Internal.hpp index 40cc0714e3..64fe24fa31 100644 --- a/batched/dense/impl/KokkosBatched_Householder_TeamVector_Internal.hpp +++ b/batched/dense/impl/KokkosBatched_Householder_TeamVector_Internal.hpp @@ -36,7 +36,7 @@ struct TeamVectorLeftHouseholderInternal { /* */ ValueType *x2, const int x2s, /* */ ValueType *tau) { typedef ValueType value_type; - typedef typename Kokkos::Details::ArithTraits::mag_type mag_type; + typedef typename Kokkos::ArithTraits::mag_type mag_type; const mag_type zero(0); const mag_type half(0.5); @@ -64,11 +64,10 @@ struct TeamVectorLeftHouseholderInternal { } /// compute magnitude of chi1, equal to norm2 of chi1 - const mag_type norm_chi1 = - Kokkos::Details::ArithTraits::abs(*chi1); + const mag_type norm_chi1 = Kokkos::ArithTraits::abs(*chi1); /// compute 2 norm of x using norm_chi1 and norm_x2 - const mag_type norm_x = Kokkos::Details::ArithTraits::sqrt( + const mag_type norm_x = Kokkos::ArithTraits::sqrt( norm_x2_square + norm_chi1 * norm_chi1); /// compute alpha diff --git a/batched/dense/impl/KokkosBatched_LU_Serial_Internal.hpp b/batched/dense/impl/KokkosBatched_LU_Serial_Internal.hpp index 4b9c215aba..e6b34d8f1b 100644 --- a/batched/dense/impl/KokkosBatched_LU_Serial_Internal.hpp +++ b/batched/dense/impl/KokkosBatched_LU_Serial_Internal.hpp @@ -62,7 +62,7 @@ KOKKOS_INLINE_FUNCTION int SerialLU_Internal::invoke( if (tiny != 0) { ValueType &alpha11_reference = A[p * as0 + p * as1]; const auto alpha11_real = - Kokkos::Details::ArithTraits::real(alpha11_reference); + Kokkos::ArithTraits::real(alpha11_reference); alpha11_reference += minus_abs_tiny * ValueType(alpha11_real < 0); alpha11_reference += abs_tiny * ValueType(alpha11_real >= 0); } diff --git a/batched/dense/impl/KokkosBatched_LU_Team_Internal.hpp b/batched/dense/impl/KokkosBatched_LU_Team_Internal.hpp index a5a033b451..cbc811de5e 100644 --- a/batched/dense/impl/KokkosBatched_LU_Team_Internal.hpp +++ b/batched/dense/impl/KokkosBatched_LU_Team_Internal.hpp @@ -68,7 +68,7 @@ KOKKOS_INLINE_FUNCTION int TeamLU_Internal::invoke( if (member.team_rank() == 0) { ValueType &alpha11_reference = A[p * as0 + p * as1]; const auto alpha11_real = - Kokkos::Details::ArithTraits::real(alpha11_reference); + Kokkos::ArithTraits::real(alpha11_reference); alpha11_reference += minus_abs_tiny * ValueType(alpha11_real < 0); alpha11_reference += abs_tiny * ValueType(alpha11_real >= 0); } diff --git a/batched/dense/impl/KokkosBatched_LeftEigenvectorFromSchur_Serial_Internal.hpp b/batched/dense/impl/KokkosBatched_LeftEigenvectorFromSchur_Serial_Internal.hpp index 9a4ce3378d..ea87217a37 100644 --- a/batched/dense/impl/KokkosBatched_LeftEigenvectorFromSchur_Serial_Internal.hpp +++ b/batched/dense/impl/KokkosBatched_LeftEigenvectorFromSchur_Serial_Internal.hpp @@ -52,7 +52,7 @@ struct SerialLeftEigenvectorFromSchurInternal { /* */ ValueType *w, const int *blks) { typedef ValueType value_type; - typedef Kokkos::Details::ArithTraits ats; + typedef Kokkos::ArithTraits ats; // typedef typename ats::mag_type mag_type; typedef Kokkos::complex complex_type; diff --git a/batched/dense/impl/KokkosBatched_Normalize_Internal.hpp b/batched/dense/impl/KokkosBatched_Normalize_Internal.hpp index e2a7016422..42adf8eeba 100644 --- a/batched/dense/impl/KokkosBatched_Normalize_Internal.hpp +++ b/batched/dense/impl/KokkosBatched_Normalize_Internal.hpp @@ -31,7 +31,7 @@ struct SerialNormalizeInternal { /* */ ValueType *KOKKOS_RESTRICT v, const int vs) { typedef ValueType value_type; - typedef Kokkos::Details::ArithTraits ats; + typedef Kokkos::ArithTraits ats; typedef typename ats::mag_type mag_type; mag_type norm(0); @@ -42,7 +42,7 @@ struct SerialNormalizeInternal { const auto v_at_i = v[i * vs]; norm += ats::real(v_at_i * ats::conj(v_at_i)); } - norm = Kokkos::Details::ArithTraits::sqrt(norm); + norm = Kokkos::ArithTraits::sqrt(norm); #if defined(KOKKOS_ENABLE_PRAGMA_UNROLL) #pragma unroll #endif @@ -58,7 +58,7 @@ struct SerialNormalizeInternal { /* */ RealType *KOKKOS_RESTRICT vi, const int vis) { typedef RealType real_type; - typedef Kokkos::Details::ArithTraits ats; + typedef Kokkos::ArithTraits ats; typedef typename ats::mag_type mag_type; mag_type norm(0); @@ -70,7 +70,7 @@ struct SerialNormalizeInternal { const auto vi_at_i = vi[i * vis]; norm += vr_at_i * vr_at_i + vi_at_i * vi_at_i; } - norm = Kokkos::Details::ArithTraits::sqrt(norm); + norm = Kokkos::ArithTraits::sqrt(norm); #if defined(KOKKOS_ENABLE_PRAGMA_UNROLL) #pragma unroll #endif diff --git a/batched/dense/impl/KokkosBatched_RightEigenvectorFromSchur_Serial_Internal.hpp b/batched/dense/impl/KokkosBatched_RightEigenvectorFromSchur_Serial_Internal.hpp index 2eeb3ccbed..4716506064 100644 --- a/batched/dense/impl/KokkosBatched_RightEigenvectorFromSchur_Serial_Internal.hpp +++ b/batched/dense/impl/KokkosBatched_RightEigenvectorFromSchur_Serial_Internal.hpp @@ -52,7 +52,7 @@ struct SerialRightEigenvectorFromSchurInternal { /* */ ValueType *w, const int *blks) { typedef ValueType value_type; - typedef Kokkos::Details::ArithTraits ats; + typedef Kokkos::ArithTraits ats; // typedef typename ats::mag_type mag_type; typedef Kokkos::complex complex_type; diff --git a/batched/dense/impl/KokkosBatched_Schur2x2_Serial_Internal.hpp b/batched/dense/impl/KokkosBatched_Schur2x2_Serial_Internal.hpp index 9e305186df..22a599ed58 100644 --- a/batched/dense/impl/KokkosBatched_Schur2x2_Serial_Internal.hpp +++ b/batched/dense/impl/KokkosBatched_Schur2x2_Serial_Internal.hpp @@ -37,7 +37,7 @@ struct SerialSchur2x2Internal { Kokkos::complex* lambda2, bool* is_complex) { typedef RealType real_type; - typedef Kokkos::Details::ArithTraits ats; + typedef Kokkos::ArithTraits ats; const real_type zero(0), one(1), half(0.5), minus_one(-1); /// compute G = [ gamma -sigma; /// sigma gamma ]; diff --git a/batched/dense/impl/KokkosBatched_Schur_Serial_Internal.hpp b/batched/dense/impl/KokkosBatched_Schur_Serial_Internal.hpp index 2ff19975fc..c7f35d5c4f 100644 --- a/batched/dense/impl/KokkosBatched_Schur_Serial_Internal.hpp +++ b/batched/dense/impl/KokkosBatched_Schur_Serial_Internal.hpp @@ -76,7 +76,7 @@ struct SerialSchurInternal { const bool restart = false, const int user_max_iteration = -1) { typedef RealType real_type; - typedef Kokkos::Details::ArithTraits ats; + typedef Kokkos::ArithTraits ats; const real_type /* one(1), */ zero(0), tol = 1e2 * ats::epsilon(); const int max_iteration = user_max_iteration < 0 ? 300 : user_max_iteration; if (wlen < m * 5) diff --git a/batched/dense/impl/KokkosBatched_Trmm_Serial_Internal.hpp b/batched/dense/impl/KokkosBatched_Trmm_Serial_Internal.hpp index e08089593a..3e4024974b 100644 --- a/batched/dense/impl/KokkosBatched_Trmm_Serial_Internal.hpp +++ b/batched/dense/impl/KokkosBatched_Trmm_Serial_Internal.hpp @@ -77,7 +77,7 @@ SerialTrmmInternalLeftLower::invoke( const ValueType *KOKKOS_RESTRICT A, const int as0, const int as1, /**/ ValueType *KOKKOS_RESTRICT B, const int bs0, const int bs1) { const ScalarType one(1.0), zero(0.0); - typedef Kokkos::Details::ArithTraits AT; + typedef Kokkos::ArithTraits AT; int left_m = am; int right_n = bn; // echo-TODO: See about coniditionally setting conjOp at compile time. @@ -162,7 +162,7 @@ SerialTrmmInternalRightLower::invoke( const ValueType *KOKKOS_RESTRICT A, const int as0, const int as1, /**/ ValueType *KOKKOS_RESTRICT B, const int bs0, const int bs1) { const ScalarType one(1.0), zero(0.0); - typedef Kokkos::Details::ArithTraits AT; + typedef Kokkos::ArithTraits AT; int left_m = bm; int right_n = an; // echo-TODO: See about coniditionally setting conjOp at compile time. @@ -248,7 +248,7 @@ SerialTrmmInternalLeftUpper::invoke( const ValueType *KOKKOS_RESTRICT A, const int as0, const int as1, /**/ ValueType *KOKKOS_RESTRICT B, const int bs0, const int bs1) { const ScalarType one(1.0), zero(0.0); - typedef Kokkos::Details::ArithTraits AT; + typedef Kokkos::ArithTraits AT; int left_m = am; int right_n = bn; // echo-TODO: See about coniditionally setting conjOp at compile time. @@ -330,7 +330,7 @@ SerialTrmmInternalRightUpper::invoke( const ValueType *KOKKOS_RESTRICT A, const int as0, const int as1, /**/ ValueType *KOKKOS_RESTRICT B, const int bs0, const int bs1) { const ScalarType one(1.0), zero(0.0); - typedef Kokkos::Details::ArithTraits AT; + typedef Kokkos::ArithTraits AT; int left_m = bm; int right_n = an; // echo-TODO: See about coniditionally setting conjOp at compile time. diff --git a/batched/dense/impl/KokkosBatched_Vector_SIMD_Arith.hpp b/batched/dense/impl/KokkosBatched_Vector_SIMD_Arith.hpp index 94f662a0a8..f87492ea5a 100644 --- a/batched/dense/impl/KokkosBatched_Vector_SIMD_Arith.hpp +++ b/batched/dense/impl/KokkosBatched_Vector_SIMD_Arith.hpp @@ -152,7 +152,7 @@ template KOKKOS_FORCEINLINE_FUNCTION static KOKKOSKERNELS_SIMD_ARITH_RETURN_TYPE(T, l) operator++(Vector, l> &a, int) { Vector, l> a0 = a; - a = a + typename Kokkos::Details::ArithTraits::mag_type(1); + a = a + typename Kokkos::ArithTraits::mag_type(1); return a0; } @@ -160,7 +160,7 @@ template KOKKOS_FORCEINLINE_FUNCTION static KOKKOSKERNELS_SIMD_ARITH_RETURN_REFERENCE_TYPE( T, l) operator++(Vector, l> &a) { - a = a + typename Kokkos::Details::ArithTraits::mag_type(1); + a = a + typename Kokkos::ArithTraits::mag_type(1); return a; } @@ -355,7 +355,7 @@ template KOKKOS_FORCEINLINE_FUNCTION static KOKKOSKERNELS_SIMD_ARITH_RETURN_TYPE(T, l) operator--(Vector, l> &a, int) { Vector, l> a0 = a; - a = a - typename Kokkos::Details::ArithTraits::mag_type(1); + a = a - typename Kokkos::ArithTraits::mag_type(1); return a0; } @@ -363,7 +363,7 @@ template KOKKOS_FORCEINLINE_FUNCTION static KOKKOSKERNELS_SIMD_ARITH_RETURN_REFERENCE_TYPE( T, l) operator--(Vector, l> &a) { - a = a - typename Kokkos::Details::ArithTraits::mag_type(1); + a = a - typename Kokkos::ArithTraits::mag_type(1); return a; } diff --git a/batched/dense/impl/KokkosBatched_Vector_SIMD_Math.hpp b/batched/dense/impl/KokkosBatched_Vector_SIMD_Math.hpp index 19f4fcb54f..69bbb53c6b 100644 --- a/batched/dense/impl/KokkosBatched_Vector_SIMD_Math.hpp +++ b/batched/dense/impl/KokkosBatched_Vector_SIMD_Math.hpp @@ -32,7 +32,7 @@ namespace KokkosBatched { template KOKKOS_INLINE_FUNCTION static KOKKOSKERNELS_SIMD_MATH_RETURN_TYPE(T, l) sqrt(const Vector, l> &a) { - typedef Kokkos::Details::ArithTraits ats; + typedef Kokkos::ArithTraits ats; Vector, l> r_val; #if defined(KOKKOS_ENABLE_PRAGMA_IVDEP) #pragma ivdep @@ -48,7 +48,7 @@ KOKKOS_INLINE_FUNCTION static KOKKOSKERNELS_SIMD_MATH_RETURN_TYPE(T, l) template KOKKOS_INLINE_FUNCTION static KOKKOSKERNELS_SIMD_MATH_RETURN_TYPE(T, l) cbrt(const Vector, l> &a) { - typedef Kokkos::Details::ArithTraits ats; + typedef Kokkos::ArithTraits ats; Vector, l> r_val; #if defined(KOKKOS_ENABLE_PRAGMA_IVDEP) #pragma ivdep @@ -64,7 +64,7 @@ KOKKOS_INLINE_FUNCTION static KOKKOSKERNELS_SIMD_MATH_RETURN_TYPE(T, l) template KOKKOS_INLINE_FUNCTION static KOKKOSKERNELS_SIMD_MATH_RETURN_TYPE(T, l) log(const Vector, l> &a) { - typedef Kokkos::Details::ArithTraits ats; + typedef Kokkos::ArithTraits ats; Vector, l> r_val; #if defined(KOKKOS_ENABLE_PRAGMA_IVDEP) #pragma ivdep @@ -80,7 +80,7 @@ KOKKOS_INLINE_FUNCTION static KOKKOSKERNELS_SIMD_MATH_RETURN_TYPE(T, l) template KOKKOS_INLINE_FUNCTION static KOKKOSKERNELS_SIMD_MATH_RETURN_TYPE(T, l) log10(const Vector, l> &a) { - typedef Kokkos::Details::ArithTraits ats; + typedef Kokkos::ArithTraits ats; Vector, l> r_val; #if defined(KOKKOS_ENABLE_PRAGMA_IVDEP) #pragma ivdep @@ -96,7 +96,7 @@ KOKKOS_INLINE_FUNCTION static KOKKOSKERNELS_SIMD_MATH_RETURN_TYPE(T, l) template KOKKOS_INLINE_FUNCTION static KOKKOSKERNELS_SIMD_MATH_RETURN_TYPE(T, l) exp(const Vector, l> &a) { - typedef Kokkos::Details::ArithTraits ats; + typedef Kokkos::ArithTraits ats; Vector, l> r_val; #if defined(KOKKOS_ENABLE_PRAGMA_IVDEP) #pragma ivdep @@ -112,7 +112,7 @@ KOKKOS_INLINE_FUNCTION static KOKKOSKERNELS_SIMD_MATH_RETURN_TYPE(T, l) template KOKKOS_INLINE_FUNCTION static KOKKOSKERNELS_SIMD_MATH_RETURN_TYPE(T0, l) pow(const Vector, l> &a, const Vector, l> &b) { - typedef Kokkos::Details::ArithTraits ats; + typedef Kokkos::ArithTraits ats; Vector, l> r_val; #if defined(KOKKOS_ENABLE_PRAGMA_IVDEP) #pragma ivdep @@ -140,7 +140,7 @@ KOKKOS_INLINE_FUNCTION static KOKKOSKERNELS_SIMD_MATH_RETURN_TYPE(T0, l) template KOKKOS_INLINE_FUNCTION static KOKKOSKERNELS_SIMD_MATH_RETURN_FLOAT_TYPE(T, l) sin(const Vector, l> &a) { - typedef Kokkos::Details::ArithTraits ats; + typedef Kokkos::ArithTraits ats; Vector, l> r_val; #if defined(KOKKOS_ENABLE_PRAGMA_IVDEP) #pragma ivdep @@ -156,7 +156,7 @@ KOKKOS_INLINE_FUNCTION static KOKKOSKERNELS_SIMD_MATH_RETURN_FLOAT_TYPE(T, l) template KOKKOS_INLINE_FUNCTION static KOKKOSKERNELS_SIMD_MATH_RETURN_FLOAT_TYPE(T, l) cos(const Vector, l> &a) { - typedef Kokkos::Details::ArithTraits ats; + typedef Kokkos::ArithTraits ats; Vector, l> r_val; #if defined(KOKKOS_ENABLE_PRAGMA_IVDEP) #pragma ivdep @@ -172,7 +172,7 @@ KOKKOS_INLINE_FUNCTION static KOKKOSKERNELS_SIMD_MATH_RETURN_FLOAT_TYPE(T, l) template KOKKOS_INLINE_FUNCTION static KOKKOSKERNELS_SIMD_MATH_RETURN_FLOAT_TYPE(T, l) tan(const Vector, l> &a) { - typedef Kokkos::Details::ArithTraits ats; + typedef Kokkos::ArithTraits ats; Vector, l> r_val; #if defined(KOKKOS_ENABLE_PRAGMA_IVDEP) #pragma ivdep @@ -188,7 +188,7 @@ KOKKOS_INLINE_FUNCTION static KOKKOSKERNELS_SIMD_MATH_RETURN_FLOAT_TYPE(T, l) template KOKKOS_INLINE_FUNCTION static KOKKOSKERNELS_SIMD_MATH_RETURN_FLOAT_TYPE(T, l) sinh(const Vector, l> &a) { - typedef Kokkos::Details::ArithTraits ats; + typedef Kokkos::ArithTraits ats; Vector, l> r_val; #if defined(KOKKOS_ENABLE_PRAGMA_IVDEP) #pragma ivdep @@ -204,7 +204,7 @@ KOKKOS_INLINE_FUNCTION static KOKKOSKERNELS_SIMD_MATH_RETURN_FLOAT_TYPE(T, l) template KOKKOS_INLINE_FUNCTION static KOKKOSKERNELS_SIMD_MATH_RETURN_FLOAT_TYPE(T, l) cosh(const Vector, l> &a) { - typedef Kokkos::Details::ArithTraits ats; + typedef Kokkos::ArithTraits ats; Vector, l> r_val; #if defined(KOKKOS_ENABLE_PRAGMA_IVDEP) #pragma ivdep @@ -220,7 +220,7 @@ KOKKOS_INLINE_FUNCTION static KOKKOSKERNELS_SIMD_MATH_RETURN_FLOAT_TYPE(T, l) template KOKKOS_INLINE_FUNCTION static KOKKOSKERNELS_SIMD_MATH_RETURN_FLOAT_TYPE(T, l) tanh(const Vector, l> &a) { - typedef Kokkos::Details::ArithTraits ats; + typedef Kokkos::ArithTraits ats; Vector, l> r_val; #if defined(KOKKOS_ENABLE_PRAGMA_IVDEP) #pragma ivdep @@ -236,7 +236,7 @@ KOKKOS_INLINE_FUNCTION static KOKKOSKERNELS_SIMD_MATH_RETURN_FLOAT_TYPE(T, l) template KOKKOS_INLINE_FUNCTION static KOKKOSKERNELS_SIMD_MATH_RETURN_FLOAT_TYPE(T, l) asin(const Vector, l> &a) { - typedef Kokkos::Details::ArithTraits ats; + typedef Kokkos::ArithTraits ats; Vector, l> r_val; #if defined(KOKKOS_ENABLE_PRAGMA_IVDEP) #pragma ivdep @@ -252,7 +252,7 @@ KOKKOS_INLINE_FUNCTION static KOKKOSKERNELS_SIMD_MATH_RETURN_FLOAT_TYPE(T, l) template KOKKOS_INLINE_FUNCTION static KOKKOSKERNELS_SIMD_MATH_RETURN_FLOAT_TYPE(T, l) acos(const Vector, l> &a) { - typedef Kokkos::Details::ArithTraits ats; + typedef Kokkos::ArithTraits ats; Vector, l> r_val; #if defined(KOKKOS_ENABLE_PRAGMA_IVDEP) #pragma ivdep @@ -268,7 +268,7 @@ KOKKOS_INLINE_FUNCTION static KOKKOSKERNELS_SIMD_MATH_RETURN_FLOAT_TYPE(T, l) template KOKKOS_INLINE_FUNCTION static KOKKOSKERNELS_SIMD_MATH_RETURN_FLOAT_TYPE(T, l) atan(const Vector, l> &a) { - typedef Kokkos::Details::ArithTraits ats; + typedef Kokkos::ArithTraits ats; Vector, l> r_val; #if defined(KOKKOS_ENABLE_PRAGMA_IVDEP) #pragma ivdep @@ -284,7 +284,7 @@ KOKKOS_INLINE_FUNCTION static KOKKOSKERNELS_SIMD_MATH_RETURN_FLOAT_TYPE(T, l) template KOKKOS_INLINE_FUNCTION static KOKKOSKERNELS_SIMD_MATH_RETURN_FLOAT_TYPE(T, l) atan2(const Vector, l> &a, const Vector, l> &b) { - // typedef Kokkos::Details::ArithTraits ats; + // typedef Kokkos::ArithTraits ats; Vector, l> r_val; #if defined(KOKKOS_ENABLE_PRAGMA_IVDEP) #pragma ivdep diff --git a/batched/dense/impl/KokkosBatched_WilkinsonShift_Serial_Internal.hpp b/batched/dense/impl/KokkosBatched_WilkinsonShift_Serial_Internal.hpp index 6b90b6a962..0d3a9b3df9 100644 --- a/batched/dense/impl/KokkosBatched_WilkinsonShift_Serial_Internal.hpp +++ b/batched/dense/impl/KokkosBatched_WilkinsonShift_Serial_Internal.hpp @@ -52,18 +52,16 @@ struct SerialWilkinsonShiftInternal { if (v < 0) { // complex - const value_type sqrt_v = - Kokkos::Details::ArithTraits::sqrt(-v); - *lambda1 = Kokkos::complex(p, sqrt_v); - *lambda2 = Kokkos::complex(p, -sqrt_v); - *is_complex = true; + const value_type sqrt_v = Kokkos::ArithTraits::sqrt(-v); + *lambda1 = Kokkos::complex(p, sqrt_v); + *lambda2 = Kokkos::complex(p, -sqrt_v); + *is_complex = true; } else { // real - const value_type sqrt_v = - Kokkos::Details::ArithTraits::sqrt(v); - *lambda1 = Kokkos::complex(p + sqrt_v); - *lambda2 = Kokkos::complex(p - sqrt_v); - *is_complex = false; + const value_type sqrt_v = Kokkos::ArithTraits::sqrt(v); + *lambda1 = Kokkos::complex(p + sqrt_v); + *lambda2 = Kokkos::complex(p - sqrt_v); + *is_complex = false; } return 0; } diff --git a/batched/dense/src/KokkosBatched_Vector.hpp b/batched/dense/src/KokkosBatched_Vector.hpp index 30b8677d17..23fd62655a 100644 --- a/batched/dense/src/KokkosBatched_Vector.hpp +++ b/batched/dense/src/KokkosBatched_Vector.hpp @@ -251,7 +251,6 @@ struct MagnitudeScalarType>, l>> { // arith traits overload for vector types namespace Kokkos { -namespace Details { // do not use Vector alone as other can use the name. @@ -337,7 +336,6 @@ class ArithTraits< } }; -} // namespace Details } // namespace Kokkos #endif diff --git a/batched/dense/src/KokkosBatched_Vector_SIMD.hpp b/batched/dense/src/KokkosBatched_Vector_SIMD.hpp index e938198467..e27419e7c2 100644 --- a/batched/dense/src/KokkosBatched_Vector_SIMD.hpp +++ b/batched/dense/src/KokkosBatched_Vector_SIMD.hpp @@ -36,7 +36,7 @@ class Vector, l> { public: using type = Vector, l>; using value_type = T; - using mag_type = typename Kokkos::Details::ArithTraits::mag_type; + using mag_type = typename Kokkos::ArithTraits::mag_type; enum : int { vector_length = l }; diff --git a/batched/dense/unit_test/Test_Batched_BatchedGemm.hpp b/batched/dense/unit_test/Test_Batched_BatchedGemm.hpp index c4e09d6e68..ac38da8270 100644 --- a/batched/dense/unit_test/Test_Batched_BatchedGemm.hpp +++ b/batched/dense/unit_test/Test_Batched_BatchedGemm.hpp @@ -37,7 +37,7 @@ void impl_test_batched_gemm_with_handle(BatchedGemmHandle* batchedGemmHandle, using transB = typename ParamTagType::transB; using batchLayout = typename ParamTagType::batchLayout; using view_layout = typename ViewType::array_layout; - using ats = Kokkos::Details::ArithTraits; + using ats = Kokkos::ArithTraits; int ret = 0; auto algo_type = batchedGemmHandle->get_kernel_algo_type(); diff --git a/batched/dense/unit_test/Test_Batched_SerialAxpy.hpp b/batched/dense/unit_test/Test_Batched_SerialAxpy.hpp index ebefbbabd2..2bde3f7fad 100644 --- a/batched/dense/unit_test/Test_Batched_SerialAxpy.hpp +++ b/batched/dense/unit_test/Test_Batched_SerialAxpy.hpp @@ -65,7 +65,7 @@ void impl_test_batched_axpy(const int N, const int BlkSize) { typedef typename ViewType::value_type value_type; typedef typename ViewType::const_value_type const_value_type; typedef typename alphaViewType::const_value_type alpha_const_value_type; - typedef Kokkos::Details::ArithTraits ats; + typedef Kokkos::ArithTraits ats; ViewType X0("x0", N, BlkSize), X1("x1", N, BlkSize), Y0("y0", N, BlkSize), Y1("y1", N, BlkSize); diff --git a/batched/dense/unit_test/Test_Batched_SerialGemm.hpp b/batched/dense/unit_test/Test_Batched_SerialGemm.hpp index c8f745b006..8304657849 100644 --- a/batched/dense/unit_test/Test_Batched_SerialGemm.hpp +++ b/batched/dense/unit_test/Test_Batched_SerialGemm.hpp @@ -81,7 +81,7 @@ void impl_test_batched_gemm(const int N, const int matAdim1, const int matAdim2, using transA = typename ParamTagType::transA; using transB = typename ParamTagType::transB; using value_type = typename ViewType::value_type; - using ats = Kokkos::Details::ArithTraits; + using ats = Kokkos::ArithTraits; /// randomized input testing views ScalarType alpha = ScalarType(1.5); diff --git a/batched/dense/unit_test/Test_Batched_SerialGesv.hpp b/batched/dense/unit_test/Test_Batched_SerialGesv.hpp index f487515a7c..3b17d81d48 100644 --- a/batched/dense/unit_test/Test_Batched_SerialGesv.hpp +++ b/batched/dense/unit_test/Test_Batched_SerialGesv.hpp @@ -71,10 +71,9 @@ template void impl_test_batched_gesv(const int N, const int BlkSize) { typedef typename MatrixType::value_type value_type; - typedef Kokkos::Details::ArithTraits ats; + typedef Kokkos::ArithTraits ats; - using MagnitudeType = - typename Kokkos::Details::ArithTraits::mag_type; + using MagnitudeType = typename Kokkos::ArithTraits::mag_type; using NormViewType = Kokkos::View; diff --git a/batched/dense/unit_test/Test_Batched_SerialInverseLU.hpp b/batched/dense/unit_test/Test_Batched_SerialInverseLU.hpp index c59d1aed1b..d3cbd6c024 100644 --- a/batched/dense/unit_test/Test_Batched_SerialInverseLU.hpp +++ b/batched/dense/unit_test/Test_Batched_SerialInverseLU.hpp @@ -140,7 +140,7 @@ template void impl_test_batched_inverselu(const int N, const int BlkSize) { typedef typename AViewType::value_type value_type; - typedef Kokkos::Details::ArithTraits ats; + typedef Kokkos::ArithTraits ats; /// randomized input testing views AViewType a0("a0", N, BlkSize, BlkSize); diff --git a/batched/dense/unit_test/Test_Batched_SerialLU.hpp b/batched/dense/unit_test/Test_Batched_SerialLU.hpp index 335b4ee9bf..23b72893b2 100644 --- a/batched/dense/unit_test/Test_Batched_SerialLU.hpp +++ b/batched/dense/unit_test/Test_Batched_SerialLU.hpp @@ -61,7 +61,7 @@ struct Functor_TestBatchedSerialLU { template void impl_test_batched_lu(const int N, const int BlkSize) { typedef typename ViewType::value_type value_type; - typedef Kokkos::Details::ArithTraits ats; + typedef Kokkos::ArithTraits ats; /// randomized input testing views ViewType a0("a0", N, BlkSize, BlkSize), a1("a1", N, BlkSize, BlkSize); diff --git a/batched/dense/unit_test/Test_Batched_SerialSolveLU.hpp b/batched/dense/unit_test/Test_Batched_SerialSolveLU.hpp index dd39be3dd1..48e8e5dead 100644 --- a/batched/dense/unit_test/Test_Batched_SerialSolveLU.hpp +++ b/batched/dense/unit_test/Test_Batched_SerialSolveLU.hpp @@ -139,7 +139,7 @@ struct Functor_TestBatchedSerialSolveLU { template void impl_test_batched_solvelu(const int N, const int BlkSize) { typedef typename ViewType::value_type value_type; - typedef Kokkos::Details::ArithTraits ats; + typedef Kokkos::ArithTraits ats; /// randomized input testing views ViewType a0("a0", N, BlkSize, BlkSize); diff --git a/batched/dense/unit_test/Test_Batched_SerialTrmm.hpp b/batched/dense/unit_test/Test_Batched_SerialTrmm.hpp index 7082d183a5..af38e62e4d 100644 --- a/batched/dense/unit_test/Test_Batched_SerialTrmm.hpp +++ b/batched/dense/unit_test/Test_Batched_SerialTrmm.hpp @@ -61,7 +61,7 @@ struct VanillaGEMM { typedef typename ViewTypeA::value_type ScalarA; typedef typename ViewTypeB::value_type ScalarB; typedef typename ViewTypeC::value_type ScalarC; - typedef Kokkos::Details::ArithTraits APT; + typedef Kokkos::ArithTraits APT; typedef typename APT::mag_type mag_type; ScalarA alpha; ScalarC beta; @@ -150,7 +150,7 @@ void impl_test_batched_trmm(const int N, const int nRows, const int nCols, const char* trans) { typedef typename ViewType::value_type value_type; typedef typename DeviceType::execution_space execution_space; - typedef Kokkos::Details::ArithTraits ats; + typedef Kokkos::ArithTraits ats; ScalarType alpha(1.0); ScalarType beta(0.0); diff --git a/batched/dense/unit_test/Test_Batched_SerialTrsm.hpp b/batched/dense/unit_test/Test_Batched_SerialTrsm.hpp index f109c44e0b..c0ef098652 100644 --- a/batched/dense/unit_test/Test_Batched_SerialTrsm.hpp +++ b/batched/dense/unit_test/Test_Batched_SerialTrsm.hpp @@ -75,7 +75,7 @@ template void impl_test_batched_trsm(const int N, const int BlkSize, const int NumCols) { typedef typename ViewType::value_type value_type; - typedef Kokkos::Details::ArithTraits ats; + typedef Kokkos::ArithTraits ats; /// randomized input testing views ScalarType alpha(1.0); diff --git a/batched/dense/unit_test/Test_Batched_SerialTrsv.hpp b/batched/dense/unit_test/Test_Batched_SerialTrsv.hpp index 9dc003dd19..f05a6f7fa5 100644 --- a/batched/dense/unit_test/Test_Batched_SerialTrsv.hpp +++ b/batched/dense/unit_test/Test_Batched_SerialTrsv.hpp @@ -74,7 +74,7 @@ template void impl_test_batched_trsv(const int N, const int BlkSize) { typedef typename ViewType::value_type value_type; - typedef Kokkos::Details::ArithTraits ats; + typedef Kokkos::ArithTraits ats; /// randomized input testing views ScalarType alpha(1.5); diff --git a/batched/dense/unit_test/Test_Batched_SerialTrtri.hpp b/batched/dense/unit_test/Test_Batched_SerialTrtri.hpp index ee0982efd4..8f4ae64b7e 100644 --- a/batched/dense/unit_test/Test_Batched_SerialTrtri.hpp +++ b/batched/dense/unit_test/Test_Batched_SerialTrtri.hpp @@ -63,7 +63,7 @@ struct VanillaGEMM { typedef typename ViewTypeA::value_type ScalarA; typedef typename ViewTypeB::value_type ScalarB; typedef typename ViewTypeC::value_type ScalarC; - typedef Kokkos::Details::ArithTraits APT; + typedef Kokkos::ArithTraits APT; typedef typename APT::mag_type mag_type; ScalarA alpha; ScalarC beta; @@ -143,7 +143,7 @@ template ats; + typedef Kokkos::ArithTraits ats; ScalarType alpha(1.0); ScalarType beta(0.0); diff --git a/batched/dense/unit_test/Test_Batched_TeamAxpy.hpp b/batched/dense/unit_test/Test_Batched_TeamAxpy.hpp index 873b244bd8..7941fc0284 100644 --- a/batched/dense/unit_test/Test_Batched_TeamAxpy.hpp +++ b/batched/dense/unit_test/Test_Batched_TeamAxpy.hpp @@ -77,7 +77,7 @@ void impl_test_batched_axpy(const int N, const int BlkSize, const int N_team) { typedef typename ViewType::value_type value_type; typedef typename ViewType::const_value_type const_value_type; typedef typename alphaViewType::const_value_type alpha_const_value_type; - typedef Kokkos::Details::ArithTraits ats; + typedef Kokkos::ArithTraits ats; ViewType X0("x0", N, BlkSize), X1("x1", N, BlkSize), Y0("y0", N, BlkSize), Y1("y1", N, BlkSize); diff --git a/batched/dense/unit_test/Test_Batched_TeamGemm.hpp b/batched/dense/unit_test/Test_Batched_TeamGemm.hpp index c60552827e..9023a009af 100644 --- a/batched/dense/unit_test/Test_Batched_TeamGemm.hpp +++ b/batched/dense/unit_test/Test_Batched_TeamGemm.hpp @@ -90,7 +90,7 @@ void impl_test_batched_teamgemm(const int N, const int matAdim1, using transB = typename ParamTagType::transB; using execution_space = typename DeviceType::execution_space; using value_type = typename ViewType::value_type; - using ats = Kokkos::Details::ArithTraits; + using ats = Kokkos::ArithTraits; /// randomized input testing views ScalarType alpha = ScalarType(1.5), beta = ScalarType(3.0); diff --git a/batched/dense/unit_test/Test_Batched_TeamGesv.hpp b/batched/dense/unit_test/Test_Batched_TeamGesv.hpp index 2ecdb60bcf..89f67e2731 100644 --- a/batched/dense/unit_test/Test_Batched_TeamGesv.hpp +++ b/batched/dense/unit_test/Test_Batched_TeamGesv.hpp @@ -83,10 +83,9 @@ template void impl_test_batched_gesv(const int N, const int BlkSize) { typedef typename MatrixType::value_type value_type; - typedef Kokkos::Details::ArithTraits ats; + typedef Kokkos::ArithTraits ats; - using MagnitudeType = - typename Kokkos::Details::ArithTraits::mag_type; + using MagnitudeType = typename Kokkos::ArithTraits::mag_type; using NormViewType = Kokkos::View; diff --git a/batched/dense/unit_test/Test_Batched_TeamInverseLU.hpp b/batched/dense/unit_test/Test_Batched_TeamInverseLU.hpp index 4a0d60ba2f..8657de9856 100644 --- a/batched/dense/unit_test/Test_Batched_TeamInverseLU.hpp +++ b/batched/dense/unit_test/Test_Batched_TeamInverseLU.hpp @@ -161,7 +161,7 @@ template void impl_test_batched_inverselu(const int N, const int BlkSize) { typedef typename AViewType::value_type value_type; - typedef Kokkos::Details::ArithTraits ats; + typedef Kokkos::ArithTraits ats; /// randomized input testing views AViewType a0("a0", N, BlkSize, BlkSize); diff --git a/batched/dense/unit_test/Test_Batched_TeamLU.hpp b/batched/dense/unit_test/Test_Batched_TeamLU.hpp index f7ac07ce46..04e191b9cb 100644 --- a/batched/dense/unit_test/Test_Batched_TeamLU.hpp +++ b/batched/dense/unit_test/Test_Batched_TeamLU.hpp @@ -69,7 +69,7 @@ struct Functor_TestBatchedTeamLU { template void impl_test_batched_lu(const int N, const int BlkSize) { typedef typename ViewType::value_type value_type; - typedef Kokkos::Details::ArithTraits ats; + typedef Kokkos::ArithTraits ats; /// randomized input testing views ViewType a0("a0", N, BlkSize, BlkSize), a1("a1", N, BlkSize, BlkSize); diff --git a/batched/dense/unit_test/Test_Batched_TeamSolveLU.hpp b/batched/dense/unit_test/Test_Batched_TeamSolveLU.hpp index 77b3d697a8..41287f9b52 100644 --- a/batched/dense/unit_test/Test_Batched_TeamSolveLU.hpp +++ b/batched/dense/unit_test/Test_Batched_TeamSolveLU.hpp @@ -155,7 +155,7 @@ struct Functor_TestBatchedTeamSolveLU { template void impl_test_batched_solvelu(const int N, const int BlkSize) { typedef typename ViewType::value_type value_type; - typedef Kokkos::Details::ArithTraits ats; + typedef Kokkos::ArithTraits ats; /// randomized input testing views ViewType a0("a0", N, BlkSize, BlkSize); diff --git a/batched/dense/unit_test/Test_Batched_TeamTrsm.hpp b/batched/dense/unit_test/Test_Batched_TeamTrsm.hpp index 63effa103c..2f7781745d 100644 --- a/batched/dense/unit_test/Test_Batched_TeamTrsm.hpp +++ b/batched/dense/unit_test/Test_Batched_TeamTrsm.hpp @@ -85,7 +85,7 @@ template void impl_test_batched_trsm(const int N, const int BlkSize, const int NumCols) { typedef typename ViewType::value_type value_type; - typedef Kokkos::Details::ArithTraits ats; + typedef Kokkos::ArithTraits ats; /// randomized input testing views ScalarType alpha(1.0); diff --git a/batched/dense/unit_test/Test_Batched_TeamTrsv.hpp b/batched/dense/unit_test/Test_Batched_TeamTrsv.hpp index 4d20bbc7cf..bb00b78736 100644 --- a/batched/dense/unit_test/Test_Batched_TeamTrsv.hpp +++ b/batched/dense/unit_test/Test_Batched_TeamTrsv.hpp @@ -83,7 +83,7 @@ template void impl_test_batched_trsv(const int N, const int BlkSize) { typedef typename ViewType::value_type value_type; - typedef Kokkos::Details::ArithTraits ats; + typedef Kokkos::ArithTraits ats; /// randomized input testing views ScalarType alpha(1.5); diff --git a/batched/dense/unit_test/Test_Batched_TeamVectorAxpy.hpp b/batched/dense/unit_test/Test_Batched_TeamVectorAxpy.hpp index 83d47edf8f..5ea8a80717 100644 --- a/batched/dense/unit_test/Test_Batched_TeamVectorAxpy.hpp +++ b/batched/dense/unit_test/Test_Batched_TeamVectorAxpy.hpp @@ -78,7 +78,7 @@ void impl_test_batched_axpy(const int N, const int BlkSize, const int N_team) { typedef typename ViewType::value_type value_type; typedef typename ViewType::const_value_type const_value_type; typedef typename alphaViewType::const_value_type alpha_const_value_type; - typedef Kokkos::Details::ArithTraits ats; + typedef Kokkos::ArithTraits ats; ViewType X0("x0", N, BlkSize), X1("x1", N, BlkSize), Y0("y0", N, BlkSize), Y1("y1", N, BlkSize); diff --git a/batched/dense/unit_test/Test_Batched_TeamVectorGemm.hpp b/batched/dense/unit_test/Test_Batched_TeamVectorGemm.hpp index d3aa42c49a..327f28353e 100644 --- a/batched/dense/unit_test/Test_Batched_TeamVectorGemm.hpp +++ b/batched/dense/unit_test/Test_Batched_TeamVectorGemm.hpp @@ -85,7 +85,7 @@ void impl_test_batched_teamvectorgemm(const int N, const int matAdim1, using transB = typename ParamTagType::transB; using execution_space = typename DeviceType::execution_space; using value_type = typename ViewType::value_type; - using ats = Kokkos::Details::ArithTraits; + using ats = Kokkos::ArithTraits; /// randomized input testing views ScalarType alpha = ScalarType(1.5), beta = ScalarType(3.0); diff --git a/batched/dense/unit_test/Test_Batched_TeamVectorGesv.hpp b/batched/dense/unit_test/Test_Batched_TeamVectorGesv.hpp index 8392e1b9fc..2026f2f81d 100644 --- a/batched/dense/unit_test/Test_Batched_TeamVectorGesv.hpp +++ b/batched/dense/unit_test/Test_Batched_TeamVectorGesv.hpp @@ -84,10 +84,9 @@ template void impl_test_batched_gesv(const int N, const int BlkSize) { typedef typename MatrixType::value_type value_type; - typedef Kokkos::Details::ArithTraits ats; + typedef Kokkos::ArithTraits ats; - using MagnitudeType = - typename Kokkos::Details::ArithTraits::mag_type; + using MagnitudeType = typename Kokkos::ArithTraits::mag_type; using NormViewType = Kokkos::View; diff --git a/batched/dense/unit_test/Test_Batched_TeamVectorQR.hpp b/batched/dense/unit_test/Test_Batched_TeamVectorQR.hpp index d7e237094d..e6133be92a 100644 --- a/batched/dense/unit_test/Test_Batched_TeamVectorQR.hpp +++ b/batched/dense/unit_test/Test_Batched_TeamVectorQR.hpp @@ -110,7 +110,7 @@ template void impl_test_batched_qr(const int N, const int BlkSize) { typedef typename MatrixViewType::non_const_value_type value_type; - typedef Kokkos::Details::ArithTraits ats; + typedef Kokkos::ArithTraits ats; const value_type one(1); /// randomized input testing views MatrixViewType a("a", N, BlkSize, BlkSize); diff --git a/batched/dense/unit_test/Test_Batched_TeamVectorQR_WithColumnPivoting.hpp b/batched/dense/unit_test/Test_Batched_TeamVectorQR_WithColumnPivoting.hpp index 648ae43566..1abd45f93d 100644 --- a/batched/dense/unit_test/Test_Batched_TeamVectorQR_WithColumnPivoting.hpp +++ b/batched/dense/unit_test/Test_Batched_TeamVectorQR_WithColumnPivoting.hpp @@ -119,7 +119,7 @@ template void impl_test_batched_qr_with_columnpivoting(const int N, const int BlkSize) { typedef typename MatrixViewType::non_const_value_type value_type; - typedef Kokkos::Details::ArithTraits ats; + typedef Kokkos::ArithTraits ats; // const value_type one(1); /// randomized input testing views MatrixViewType a("a", N, BlkSize, BlkSize); diff --git a/batched/dense/unit_test/Test_Batched_TeamVectorSolveUTV.hpp b/batched/dense/unit_test/Test_Batched_TeamVectorSolveUTV.hpp index 9d080e6e48..29496c1b87 100644 --- a/batched/dense/unit_test/Test_Batched_TeamVectorSolveUTV.hpp +++ b/batched/dense/unit_test/Test_Batched_TeamVectorSolveUTV.hpp @@ -132,7 +132,7 @@ template void impl_test_batched_solve_utv(const int N, const int BlkSize) { typedef typename MatrixViewType::non_const_value_type value_type; - typedef Kokkos::Details::ArithTraits ats; + typedef Kokkos::ArithTraits ats; // const value_type one(1); /// randomized input testing views MatrixViewType r("r", N, BlkSize, 3); diff --git a/batched/dense/unit_test/Test_Batched_TeamVectorSolveUTV2.hpp b/batched/dense/unit_test/Test_Batched_TeamVectorSolveUTV2.hpp index 0d52d0d0e4..45d6093f2a 100644 --- a/batched/dense/unit_test/Test_Batched_TeamVectorSolveUTV2.hpp +++ b/batched/dense/unit_test/Test_Batched_TeamVectorSolveUTV2.hpp @@ -136,7 +136,7 @@ template void impl_test_batched_solve_utv2(const int N, const int BlkSize) { typedef typename MatrixViewType::non_const_value_type value_type; - typedef Kokkos::Details::ArithTraits ats; + typedef Kokkos::ArithTraits ats; // const value_type one(1); /// randomized input testing views MatrixViewType r("r", N, BlkSize, 3); diff --git a/batched/dense/unit_test/Test_Batched_TeamVectorUTV.hpp b/batched/dense/unit_test/Test_Batched_TeamVectorUTV.hpp index f61cf2729a..527c93e059 100644 --- a/batched/dense/unit_test/Test_Batched_TeamVectorUTV.hpp +++ b/batched/dense/unit_test/Test_Batched_TeamVectorUTV.hpp @@ -166,7 +166,7 @@ template void impl_test_batched_utv(const int N, const int BlkSize) { typedef typename MatrixViewType::non_const_value_type value_type; - typedef Kokkos::Details::ArithTraits ats; + typedef Kokkos::ArithTraits ats; // const value_type one(1); /// randomized input testing views MatrixViewType r("r", N, BlkSize, 3); diff --git a/batched/dense/unit_test/Test_Batched_VectorArithmatic.hpp b/batched/dense/unit_test/Test_Batched_VectorArithmatic.hpp index 0c0c80f7b8..1006325f94 100644 --- a/batched/dense/unit_test/Test_Batched_VectorArithmatic.hpp +++ b/batched/dense/unit_test/Test_Batched_VectorArithmatic.hpp @@ -52,10 +52,10 @@ void impl_test_complex_real_imag_value() { a[k].imag() = k * 5 + 4; } - const auto a_real = Kokkos::Details::ArithTraits::real(a); - const auto a_imag = Kokkos::Details::ArithTraits::imag(a); + const auto a_real = Kokkos::ArithTraits::real(a); + const auto a_imag = Kokkos::ArithTraits::imag(a); - typedef Kokkos::Details::ArithTraits ats; + typedef Kokkos::ArithTraits ats; const typename ats::mag_type eps = 1.0e3 * ats::epsilon(); for (int k = 0; k < vector_length; ++k) { EXPECT_NEAR(a[k].real(), a_real[k], eps); @@ -71,7 +71,7 @@ void impl_test_batched_vector_arithmatic() { typedef typename vector_type::value_type value_type; const int vector_length = vector_type::vector_length; - typedef Kokkos::Details::ArithTraits ats; + typedef Kokkos::ArithTraits ats; typedef typename ats::mag_type mag_type; vector_type a, b, c; diff --git a/batched/dense/unit_test/Test_Batched_VectorLogical.hpp b/batched/dense/unit_test/Test_Batched_VectorLogical.hpp index a740bac9dd..9393afd77b 100644 --- a/batched/dense/unit_test/Test_Batched_VectorLogical.hpp +++ b/batched/dense/unit_test/Test_Batched_VectorLogical.hpp @@ -45,7 +45,7 @@ void impl_test_batched_vector_logical() { typedef ValueType value_type; const int vector_length = VectorLength; - typedef Kokkos::Details::ArithTraits ats; + typedef Kokkos::ArithTraits ats; typedef typename ats::mag_type mag_type; vector_int_type a, b; diff --git a/batched/dense/unit_test/Test_Batched_VectorMath.hpp b/batched/dense/unit_test/Test_Batched_VectorMath.hpp index da0556fc0f..d2aa9eb7bc 100644 --- a/batched/dense/unit_test/Test_Batched_VectorMath.hpp +++ b/batched/dense/unit_test/Test_Batched_VectorMath.hpp @@ -46,7 +46,7 @@ void impl_test_batched_vector_math() { typedef typename vector_type::value_type value_type; const int vector_length = vector_type::vector_length; - typedef Kokkos::Details::ArithTraits ats; + typedef Kokkos::ArithTraits ats; typedef typename ats::mag_type mag_type; vector_type a, b, aref, bref; @@ -136,7 +136,7 @@ int test_batched_vector_math() { // template // int test_complex_pow() { -// typedef Kokkos::Details::ArithTraits > ats; +// typedef Kokkos::ArithTraits > ats; // typedef typename ats::mag_type mag_type; // const mag_type eps = 1.0e3 * ats::epsilon(); diff --git a/batched/dense/unit_test/Test_Batched_VectorMisc.hpp b/batched/dense/unit_test/Test_Batched_VectorMisc.hpp index e465af5417..70d0e10cd2 100644 --- a/batched/dense/unit_test/Test_Batched_VectorMisc.hpp +++ b/batched/dense/unit_test/Test_Batched_VectorMisc.hpp @@ -46,7 +46,7 @@ void impl_test_batched_vector_misc() { typedef typename vector_type::value_type value_type; const int vector_length = vector_type::vector_length; - typedef Kokkos::Details::ArithTraits ats; + typedef Kokkos::ArithTraits ats; typedef typename ats::mag_type mag_type; vector_type a, b, c; diff --git a/batched/dense/unit_test/Test_Batched_VectorRelation.hpp b/batched/dense/unit_test/Test_Batched_VectorRelation.hpp index bf6c76d1ec..54eb2938e5 100644 --- a/batched/dense/unit_test/Test_Batched_VectorRelation.hpp +++ b/batched/dense/unit_test/Test_Batched_VectorRelation.hpp @@ -46,7 +46,7 @@ void impl_test_batched_vector_relation() { typedef typename vector_type::value_type value_type; const int vector_length = vector_type::vector_length; - // typedef Kokkos::Details::ArithTraits ats; + // typedef Kokkos::ArithTraits ats; // typedef typename ats::mag_type mag_type; vector_type a, b; diff --git a/batched/dense/unit_test/Test_Batched_VectorView.hpp b/batched/dense/unit_test/Test_Batched_VectorView.hpp index a5b752b3d1..9c0e9845d9 100644 --- a/batched/dense/unit_test/Test_Batched_VectorView.hpp +++ b/batched/dense/unit_test/Test_Batched_VectorView.hpp @@ -67,7 +67,7 @@ void impl_verify_vector_view( const SimdViewAccess >& b) { typedef typename VectorViewType::value_type vector_type; constexpr int vl = vector_type::vector_length; - typedef Kokkos::Details::ArithTraits ats; + typedef Kokkos::ArithTraits ats; const typename ats::mag_type eps = 1.0e3 * ats::epsilon(); TEST_LOOP EXPECT_NEAR_KK(a.access(i0 / vl, i1, i2, i3, i4, i5, i6, i7)[i0 % vl], @@ -79,7 +79,7 @@ void impl_verify_vector_view( const SimdViewAccess >& b) { typedef typename VectorViewType::value_type vector_type; constexpr int vl = vector_type::vector_length; - typedef Kokkos::Details::ArithTraits ats; + typedef Kokkos::ArithTraits ats; const typename ats::mag_type eps = 1.0e3 * ats::epsilon(); TEST_LOOP EXPECT_NEAR_KK(a.access(i0, i1 / vl, i2, i3, i4, i5, i6, i7)[i1 % vl], @@ -91,7 +91,7 @@ void impl_verify_vector_view( const SimdViewAccess >& b) { typedef typename VectorViewType::value_type vector_type; constexpr int vl = vector_type::vector_length; - typedef Kokkos::Details::ArithTraits ats; + typedef Kokkos::ArithTraits ats; const typename ats::mag_type eps = 1.0e3 * ats::epsilon(); TEST_LOOP EXPECT_NEAR_KK(a.access(i0, i1, i2 / vl, i3, i4, i5, i6, i7)[i2 % vl], @@ -103,7 +103,7 @@ void impl_verify_vector_view( const SimdViewAccess >& b) { typedef typename VectorViewType::value_type vector_type; constexpr int vl = vector_type::vector_length; - typedef Kokkos::Details::ArithTraits ats; + typedef Kokkos::ArithTraits ats; const typename ats::mag_type eps = 1.0e3 * ats::epsilon(); TEST_LOOP EXPECT_NEAR_KK(a.access(i0, i1, i2, i3 / vl, i4, i5, i6, i7)[i3 % vl], @@ -115,7 +115,7 @@ void impl_verify_vector_view( const SimdViewAccess >& b) { typedef typename VectorViewType::value_type vector_type; constexpr int vl = vector_type::vector_length; - typedef Kokkos::Details::ArithTraits ats; + typedef Kokkos::ArithTraits ats; const typename ats::mag_type eps = 1.0e3 * ats::epsilon(); TEST_LOOP EXPECT_NEAR_KK(a.access(i0, i1, i2, i3, i4 / vl, i5, i6, i7)[i4 % vl], @@ -127,7 +127,7 @@ void impl_verify_vector_view( const SimdViewAccess >& b) { typedef typename VectorViewType::value_type vector_type; constexpr int vl = vector_type::vector_length; - typedef Kokkos::Details::ArithTraits ats; + typedef Kokkos::ArithTraits ats; const typename ats::mag_type eps = 1.0e3 * ats::epsilon(); TEST_LOOP EXPECT_NEAR_KK(a.access(i0, i1, i2, i3, i4, i5 / vl, i6, i7)[i5 % vl], @@ -139,7 +139,7 @@ void impl_verify_vector_view( const SimdViewAccess >& b) { typedef typename VectorViewType::value_type vector_type; constexpr int vl = vector_type::vector_length; - typedef Kokkos::Details::ArithTraits ats; + typedef Kokkos::ArithTraits ats; const typename ats::mag_type eps = 1.0e3 * ats::epsilon(); TEST_LOOP EXPECT_NEAR_KK(a.access(i0, i1, i2, i3, i4, i5, i6 / vl, i7)[i6 % vl], @@ -151,7 +151,7 @@ void impl_verify_vector_view( const SimdViewAccess >& b) { typedef typename VectorViewType::value_type vector_type; constexpr int vl = vector_type::vector_length; - typedef Kokkos::Details::ArithTraits ats; + typedef Kokkos::ArithTraits ats; const typename ats::mag_type eps = 1.0e3 * ats::epsilon(); TEST_LOOP EXPECT_NEAR_KK(a.access(i0, i1, i2, i3, i4, i5, i6, i7 / vl)[i7 % vl], diff --git a/batched/sparse/impl/KokkosBatched_CG_TeamVector_Impl.hpp b/batched/sparse/impl/KokkosBatched_CG_TeamVector_Impl.hpp index 030e452249..c11ad96959 100644 --- a/batched/sparse/impl/KokkosBatched_CG_TeamVector_Impl.hpp +++ b/batched/sparse/impl/KokkosBatched_CG_TeamVector_Impl.hpp @@ -43,7 +43,7 @@ KOKKOS_INLINE_FUNCTION int TeamVectorCG::invoke( const VectorViewType& _X, const KrylovHandleType& handle, const TMPViewType& _TMPView, const TMPNormViewType& _TMPNormView) { typedef int OrdinalType; - typedef typename Kokkos::Details::ArithTraits< + typedef typename Kokkos::ArithTraits< typename VectorViewType::non_const_value_type>::mag_type MagnitudeType; const size_t maximum_iteration = handle.get_max_iteration(); @@ -179,7 +179,7 @@ KOKKOS_INLINE_FUNCTION int TeamVectorCG::invoke( typename VectorViewType::array_layout, typename VectorViewType::execution_space::scratch_memory_space>; using ScratchPadNormViewType = Kokkos::View< - typename Kokkos::Details::ArithTraits< + typename Kokkos::ArithTraits< typename VectorViewType::non_const_value_type>::mag_type**, typename VectorViewType::execution_space::scratch_memory_space>; @@ -201,7 +201,7 @@ KOKKOS_INLINE_FUNCTION int TeamVectorCG::invoke( const int last_matrix = handle.last_index(member.league_rank()); using ScratchPadNormViewType = Kokkos::View< - typename Kokkos::Details::ArithTraits< + typename Kokkos::ArithTraits< typename VectorViewType::non_const_value_type>::mag_type**, typename VectorViewType::execution_space::scratch_memory_space>; diff --git a/batched/sparse/impl/KokkosBatched_CG_Team_Impl.hpp b/batched/sparse/impl/KokkosBatched_CG_Team_Impl.hpp index aa528322ad..bf2f1d2e86 100644 --- a/batched/sparse/impl/KokkosBatched_CG_Team_Impl.hpp +++ b/batched/sparse/impl/KokkosBatched_CG_Team_Impl.hpp @@ -41,7 +41,7 @@ KOKKOS_INLINE_FUNCTION int TeamCG::invoke( const VectorViewType& _X, const KrylovHandle& handle, const TMPViewType& _TMPView, const TMPNormViewType& _TMPNormView) { typedef int OrdinalType; - typedef typename Kokkos::Details::ArithTraits< + typedef typename Kokkos::ArithTraits< typename VectorViewType::non_const_value_type>::mag_type MagnitudeType; size_t maximum_iteration = handle.get_max_iteration(); @@ -177,7 +177,7 @@ KOKKOS_INLINE_FUNCTION int TeamCG::invoke( typename VectorViewType::array_layout, typename VectorViewType::execution_space::scratch_memory_space>; using ScratchPadNormViewType = Kokkos::View< - typename Kokkos::Details::ArithTraits< + typename Kokkos::ArithTraits< typename VectorViewType::non_const_value_type>::mag_type**, typename VectorViewType::execution_space::scratch_memory_space>; @@ -199,7 +199,7 @@ KOKKOS_INLINE_FUNCTION int TeamCG::invoke( const int last_matrix = handle.last_index(member.league_rank()); using ScratchPadNormViewType = Kokkos::View< - typename Kokkos::Details::ArithTraits< + typename Kokkos::ArithTraits< typename VectorViewType::non_const_value_type>::mag_type**, typename VectorViewType::execution_space::scratch_memory_space>; diff --git a/batched/sparse/impl/KokkosBatched_GMRES_Serial_Impl.hpp b/batched/sparse/impl/KokkosBatched_GMRES_Serial_Impl.hpp index 071b2d6634..923b67c105 100644 --- a/batched/sparse/impl/KokkosBatched_GMRES_Serial_Impl.hpp +++ b/batched/sparse/impl/KokkosBatched_GMRES_Serial_Impl.hpp @@ -45,9 +45,9 @@ KOKKOS_INLINE_FUNCTION int SerialGMRES::invoke(const OperatorType& A, const KrylovHandleType& handle, const int GMRES_id) { typedef int OrdinalType; - typedef typename Kokkos::Details::ArithTraits< + typedef typename Kokkos::ArithTraits< typename VectorViewType::non_const_value_type>::mag_type MagnitudeType; - typedef Kokkos::Details::ArithTraits ATM; + typedef Kokkos::ArithTraits ATM; using SerialCopy1D = SerialCopy; using SerialCopy2D = SerialCopy; diff --git a/batched/sparse/impl/KokkosBatched_GMRES_TeamVector_Impl.hpp b/batched/sparse/impl/KokkosBatched_GMRES_TeamVector_Impl.hpp index e76d8c4239..a7219ecc91 100644 --- a/batched/sparse/impl/KokkosBatched_GMRES_TeamVector_Impl.hpp +++ b/batched/sparse/impl/KokkosBatched_GMRES_TeamVector_Impl.hpp @@ -48,9 +48,9 @@ KOKKOS_INLINE_FUNCTION int TeamVectorGMRES::invoke( const KrylovHandleType& handle, const ArnoldiViewType& _ArnoldiView, const TMPViewType& _TMPView) { typedef int OrdinalType; - typedef typename Kokkos::Details::ArithTraits< + typedef typename Kokkos::ArithTraits< typename VectorViewType::non_const_value_type>::mag_type MagnitudeType; - typedef Kokkos::Details::ArithTraits ATM; + typedef Kokkos::ArithTraits ATM; using TeamVectorCopy1D = TeamVectorCopy; diff --git a/batched/sparse/impl/KokkosBatched_GMRES_Team_Impl.hpp b/batched/sparse/impl/KokkosBatched_GMRES_Team_Impl.hpp index 15cb7bdca9..bb8f446f07 100644 --- a/batched/sparse/impl/KokkosBatched_GMRES_Team_Impl.hpp +++ b/batched/sparse/impl/KokkosBatched_GMRES_Team_Impl.hpp @@ -47,9 +47,9 @@ KOKKOS_INLINE_FUNCTION int TeamGMRES::invoke( const KrylovHandleType& handle, const ArnoldiViewType& _ArnoldiView, const TMPViewType& _TMPView) { typedef int OrdinalType; - typedef typename Kokkos::Details::ArithTraits< + typedef typename Kokkos::ArithTraits< typename VectorViewType::non_const_value_type>::mag_type MagnitudeType; - typedef Kokkos::Details::ArithTraits ATM; + typedef Kokkos::ArithTraits ATM; using TeamCopy1D = TeamCopy; diff --git a/batched/sparse/impl/KokkosBatched_Spmv_Serial_Impl.hpp b/batched/sparse/impl/KokkosBatched_Spmv_Serial_Impl.hpp index cafdc602a0..b7527d923c 100644 --- a/batched/sparse/impl/KokkosBatched_Spmv_Serial_Impl.hpp +++ b/batched/sparse/impl/KokkosBatched_Spmv_Serial_Impl.hpp @@ -215,11 +215,11 @@ struct SerialSpmv { template KOKKOS_INLINE_FUNCTION static int invoke( - const typename Kokkos::Details::ArithTraits< + const typename Kokkos::ArithTraits< typename ValuesViewType::non_const_value_type>::mag_type& alpha, const ValuesViewType& values, const IntView& row_ptr, const IntView& colIndices, const xViewType& X, - const typename Kokkos::Details::ArithTraits< + const typename Kokkos::ArithTraits< typename ValuesViewType::non_const_value_type>::mag_type& beta, const yViewType& Y) { #if (KOKKOSKERNELS_DEBUG_LEVEL > 0) @@ -277,7 +277,7 @@ struct SerialSpmv { #endif return SerialSpmvInternal::template invoke< - typename Kokkos::Details::ArithTraits< + typename Kokkos::ArithTraits< typename ValuesViewType::non_const_value_type>::mag_type, typename ValuesViewType::non_const_value_type, typename IntView::non_const_value_type, diff --git a/batched/sparse/impl/KokkosBatched_Spmv_TeamVector_Impl.hpp b/batched/sparse/impl/KokkosBatched_Spmv_TeamVector_Impl.hpp index 5c0edbd390..516aded68e 100644 --- a/batched/sparse/impl/KokkosBatched_Spmv_TeamVector_Impl.hpp +++ b/batched/sparse/impl/KokkosBatched_Spmv_TeamVector_Impl.hpp @@ -403,11 +403,11 @@ struct TeamVectorSpmv { typename yViewType, int dobeta> KOKKOS_INLINE_FUNCTION static int invoke( const MemberType& member, - const typename Kokkos::Details::ArithTraits< + const typename Kokkos::ArithTraits< typename ValuesViewType::non_const_value_type>::mag_type& alpha, const ValuesViewType& values, const IntView& row_ptr, const IntView& colIndices, const xViewType& X, - const typename Kokkos::Details::ArithTraits< + const typename Kokkos::ArithTraits< typename ValuesViewType::non_const_value_type>::mag_type& beta, const yViewType& Y) { #if (KOKKOSKERNELS_DEBUG_LEVEL > 0) @@ -466,7 +466,7 @@ struct TeamVectorSpmv { return TeamVectorSpmvInternal::template invoke< MemberType, - typename Kokkos::Details::ArithTraits< + typename Kokkos::ArithTraits< typename ValuesViewType::non_const_value_type>::mag_type, typename ValuesViewType::non_const_value_type, typename IntView::non_const_value_type, diff --git a/batched/sparse/impl/KokkosBatched_Spmv_Team_Impl.hpp b/batched/sparse/impl/KokkosBatched_Spmv_Team_Impl.hpp index fb9f44e8b0..d8282d0aeb 100644 --- a/batched/sparse/impl/KokkosBatched_Spmv_Team_Impl.hpp +++ b/batched/sparse/impl/KokkosBatched_Spmv_Team_Impl.hpp @@ -254,11 +254,11 @@ struct TeamSpmv { typename yViewType, int dobeta> KOKKOS_INLINE_FUNCTION static int invoke( const MemberType& member, - const typename Kokkos::Details::ArithTraits< + const typename Kokkos::ArithTraits< typename ValuesViewType::non_const_value_type>::mag_type& alpha, const ValuesViewType& values, const IntView& row_ptr, const IntView& colIndices, const xViewType& X, - const typename Kokkos::Details::ArithTraits< + const typename Kokkos::ArithTraits< typename ValuesViewType::non_const_value_type>::mag_type& beta, const yViewType& Y) { #if (KOKKOSKERNELS_DEBUG_LEVEL > 0) @@ -317,7 +317,7 @@ struct TeamSpmv { return TeamSpmvInternal::template invoke< MemberType, - typename Kokkos::Details::ArithTraits< + typename Kokkos::ArithTraits< typename ValuesViewType::non_const_value_type>::mag_type, typename ValuesViewType::non_const_value_type, typename IntView::non_const_value_type, diff --git a/batched/sparse/src/KokkosBatched_CrsMatrix.hpp b/batched/sparse/src/KokkosBatched_CrsMatrix.hpp index 4ceddeea44..92acc91a9e 100644 --- a/batched/sparse/src/KokkosBatched_CrsMatrix.hpp +++ b/batched/sparse/src/KokkosBatched_CrsMatrix.hpp @@ -29,9 +29,8 @@ namespace KokkosBatched { template class CrsMatrix { public: - using ScalarType = typename ValuesViewType::non_const_value_type; - using MagnitudeType = - typename Kokkos::Details::ArithTraits::mag_type; + using ScalarType = typename ValuesViewType::non_const_value_type; + using MagnitudeType = typename Kokkos::ArithTraits::mag_type; private: ValuesViewType values; @@ -82,10 +81,9 @@ class CrsMatrix { typename XViewType, typename YViewType> KOKKOS_INLINE_FUNCTION void apply( const MemberType &member, const XViewType &X, const YViewType &Y, - MagnitudeType alpha = Kokkos::Details::ArithTraits::one(), - MagnitudeType beta = - Kokkos::Details::ArithTraits::zero()) const { - if (beta == Kokkos::Details::ArithTraits::zero()) { + MagnitudeType alpha = Kokkos::ArithTraits::one(), + MagnitudeType beta = Kokkos::ArithTraits::zero()) const { + if (beta == Kokkos::ArithTraits::zero()) { if (member.team_size() == 1 && n_operators == 8) KokkosBatched::TeamVectorSpmv::template invoke< ValuesViewType, IntViewType, XViewType, YViewType, 0>( @@ -109,10 +107,9 @@ class CrsMatrix { template KOKKOS_INLINE_FUNCTION void apply( const XViewType &X, const YViewType &Y, - MagnitudeType alpha = Kokkos::Details::ArithTraits::one(), - MagnitudeType beta = - Kokkos::Details::ArithTraits::zero()) const { - if (beta == Kokkos::Details::ArithTraits::zero()) + MagnitudeType alpha = Kokkos::ArithTraits::one(), + MagnitudeType beta = Kokkos::ArithTraits::zero()) const { + if (beta == Kokkos::ArithTraits::zero()) KokkosBatched::SerialSpmv::template invoke< ValuesViewType, IntViewType, XViewType, YViewType, 0>( alpha, values, row_ptr, colIndices, X, beta, Y); diff --git a/batched/sparse/src/KokkosBatched_JacobiPrec.hpp b/batched/sparse/src/KokkosBatched_JacobiPrec.hpp index 1185ec94d4..728bb2d921 100644 --- a/batched/sparse/src/KokkosBatched_JacobiPrec.hpp +++ b/batched/sparse/src/KokkosBatched_JacobiPrec.hpp @@ -29,9 +29,8 @@ namespace KokkosBatched { template class JacobiPrec { public: - using ScalarType = typename ValuesViewType::non_const_value_type; - using MagnitudeType = - typename Kokkos::Details::ArithTraits::mag_type; + using ScalarType = typename ValuesViewType::non_const_value_type; + using MagnitudeType = typename Kokkos::ArithTraits::mag_type; private: ValuesViewType diag_values; @@ -55,8 +54,8 @@ class JacobiPrec { template KOKKOS_INLINE_FUNCTION void computeInverse(const MemberType &member) const { - auto one = Kokkos::Details::ArithTraits::one(); - auto epsilon = Kokkos::Details::ArithTraits::epsilon(); + auto one = Kokkos::ArithTraits::one(); + auto epsilon = Kokkos::ArithTraits::epsilon(); int tooSmall = 0; if (std::is_same::value) { for (int i = 0; i < n_operators; ++i) @@ -118,8 +117,8 @@ class JacobiPrec { } KOKKOS_INLINE_FUNCTION void computeInverse() const { - auto one = Kokkos::Details::ArithTraits::one(); - auto epsilon = Kokkos::Details::ArithTraits::epsilon(); + auto one = Kokkos::ArithTraits::one(); + auto epsilon = Kokkos::ArithTraits::epsilon(); int tooSmall = 0; for (int i = 0; i < n_operators; ++i) diff --git a/batched/sparse/src/KokkosBatched_Krylov_Handle.hpp b/batched/sparse/src/KokkosBatched_Krylov_Handle.hpp index 89fbd79e04..9992742dd8 100644 --- a/batched/sparse/src/KokkosBatched_Krylov_Handle.hpp +++ b/batched/sparse/src/KokkosBatched_Krylov_Handle.hpp @@ -87,7 +87,7 @@ class KrylovHandle { batched_size(_batched_size), N_team(_N_team), monitor_residual(_monitor_residual) { - tolerance = Kokkos::Details::ArithTraits::epsilon(); + tolerance = Kokkos::ArithTraits::epsilon(); max_tolerance = 1e-30; if (std::is_same::value) max_tolerance = 1e-50; if (monitor_residual) { diff --git a/batched/sparse/src/KokkosBatched_Spmv.hpp b/batched/sparse/src/KokkosBatched_Spmv.hpp index 9debd0bc27..da70acb6bb 100644 --- a/batched/sparse/src/KokkosBatched_Spmv.hpp +++ b/batched/sparse/src/KokkosBatched_Spmv.hpp @@ -75,11 +75,11 @@ struct SerialSpmv { template KOKKOS_INLINE_FUNCTION static int invoke( - const typename Kokkos::Details::ArithTraits< + const typename Kokkos::ArithTraits< typename ValuesViewType::non_const_value_type>::mag_type &alpha, const ValuesViewType &values, const IntView &row_ptr, const IntView &colIndices, const xViewType &X, - const typename Kokkos::Details::ArithTraits< + const typename Kokkos::ArithTraits< typename ValuesViewType::non_const_value_type>::mag_type &beta, const yViewType &Y); }; @@ -139,11 +139,11 @@ struct TeamSpmv { typename yViewType, int dobeta> KOKKOS_INLINE_FUNCTION static int invoke( const MemberType &member, - const typename Kokkos::Details::ArithTraits< + const typename Kokkos::ArithTraits< typename ValuesViewType::non_const_value_type>::mag_type &alpha, const ValuesViewType &values, const IntView &row_ptr, const IntView &colIndices, const xViewType &x, - const typename Kokkos::Details::ArithTraits< + const typename Kokkos::ArithTraits< typename ValuesViewType::non_const_value_type>::mag_type &beta, const yViewType &y); }; @@ -205,11 +205,11 @@ struct TeamVectorSpmv { typename yViewType, int dobeta> KOKKOS_INLINE_FUNCTION static int invoke( const MemberType &member, - const typename Kokkos::Details::ArithTraits< + const typename Kokkos::ArithTraits< typename ValuesViewType::non_const_value_type>::mag_type &alpha, const ValuesViewType &values, const IntView &row_ptr, const IntView &colIndices, const xViewType &x, - const typename Kokkos::Details::ArithTraits< + const typename Kokkos::ArithTraits< typename ValuesViewType::non_const_value_type>::mag_type &beta, const yViewType &y); }; @@ -276,11 +276,11 @@ struct Spmv { typename yViewType, int dobeta> KOKKOS_INLINE_FUNCTION static int invoke( const MemberType &member, - const typename Kokkos::Details::ArithTraits< + const typename Kokkos::ArithTraits< typename ValuesViewType::non_const_value_type>::mag_type &alpha, const ValuesViewType &values, const IntView &row_ptr, const IntView &colIndices, const xViewType &x, - const typename Kokkos::Details::ArithTraits< + const typename Kokkos::ArithTraits< typename ValuesViewType::non_const_value_type>::mag_type &beta, const yViewType &y) { int r_val = 0; diff --git a/batched/sparse/unit_test/Test_Batched_SerialGMRES.hpp b/batched/sparse/unit_test/Test_Batched_SerialGMRES.hpp index c8833d27df..45b6a71f99 100644 --- a/batched/sparse/unit_test/Test_Batched_SerialGMRES.hpp +++ b/batched/sparse/unit_test/Test_Batched_SerialGMRES.hpp @@ -109,7 +109,7 @@ template void impl_test_batched_GMRES(const int N, const int BlkSize, const int N_team) { typedef typename ValuesViewType::value_type value_type; - typedef Kokkos::Details::ArithTraits ats; + typedef Kokkos::ArithTraits ats; const int nnz = (BlkSize - 2) * 3 + 2 * 2; @@ -125,9 +125,8 @@ void impl_test_batched_GMRES(const int N, const int BlkSize, const int N_team) { using Layout = typename ValuesViewType::array_layout; using EXSP = typename ValuesViewType::execution_space; - using MagnitudeType = - typename Kokkos::Details::ArithTraits::mag_type; - using NormViewType = Kokkos::View; + using MagnitudeType = typename Kokkos::ArithTraits::mag_type; + using NormViewType = Kokkos::View; using Norm2DViewType = Kokkos::View; using Scalar3DViewType = Kokkos::View; diff --git a/batched/sparse/unit_test/Test_Batched_SerialSpmv.hpp b/batched/sparse/unit_test/Test_Batched_SerialSpmv.hpp index 0aeb69fbc5..338a93d0eb 100644 --- a/batched/sparse/unit_test/Test_Batched_SerialSpmv.hpp +++ b/batched/sparse/unit_test/Test_Batched_SerialSpmv.hpp @@ -86,7 +86,7 @@ template void impl_test_batched_spmv(const int N, const int BlkSize) { typedef typename ValuesViewType::value_type value_type; - typedef Kokkos::Details::ArithTraits ats; + typedef Kokkos::ArithTraits ats; const int nnz = (BlkSize - 2) * 3 + 2 * 2; diff --git a/batched/sparse/unit_test/Test_Batched_TeamCG.hpp b/batched/sparse/unit_test/Test_Batched_TeamCG.hpp index d6aa0cc949..41fa682bdd 100644 --- a/batched/sparse/unit_test/Test_Batched_TeamCG.hpp +++ b/batched/sparse/unit_test/Test_Batched_TeamCG.hpp @@ -95,7 +95,7 @@ template void impl_test_batched_CG(const int N, const int BlkSize, const int N_team) { typedef typename ValuesViewType::value_type value_type; - typedef Kokkos::Details::ArithTraits ats; + typedef Kokkos::ArithTraits ats; const int nnz = (BlkSize - 2) * 3 + 2 * 2; @@ -110,9 +110,8 @@ void impl_test_batched_CG(const int N, const int BlkSize, const int N_team) { using Layout = typename ValuesViewType::array_layout; using EXSP = typename ValuesViewType::execution_space; - using MagnitudeType = - typename Kokkos::Details::ArithTraits::mag_type; - using NormViewType = Kokkos::View; + using MagnitudeType = typename Kokkos::ArithTraits::mag_type; + using NormViewType = Kokkos::View; using Norm2DViewType = Kokkos::View; using Scalar3DViewType = Kokkos::View; diff --git a/batched/sparse/unit_test/Test_Batched_TeamGMRES.hpp b/batched/sparse/unit_test/Test_Batched_TeamGMRES.hpp index a0ef9bdd4f..2b7ab73790 100644 --- a/batched/sparse/unit_test/Test_Batched_TeamGMRES.hpp +++ b/batched/sparse/unit_test/Test_Batched_TeamGMRES.hpp @@ -133,7 +133,7 @@ template void impl_test_batched_GMRES(const int N, const int BlkSize, const int N_team) { typedef typename ValuesViewType::value_type value_type; - typedef Kokkos::Details::ArithTraits ats; + typedef Kokkos::ArithTraits ats; const int nnz = (BlkSize - 2) * 3 + 2 * 2; @@ -149,9 +149,8 @@ void impl_test_batched_GMRES(const int N, const int BlkSize, const int N_team) { using Layout = typename ValuesViewType::array_layout; using EXSP = typename ValuesViewType::execution_space; - using MagnitudeType = - typename Kokkos::Details::ArithTraits::mag_type; - using NormViewType = Kokkos::View; + using MagnitudeType = typename Kokkos::ArithTraits::mag_type; + using NormViewType = Kokkos::View; using Norm2DViewType = Kokkos::View; using Scalar3DViewType = Kokkos::View; diff --git a/batched/sparse/unit_test/Test_Batched_TeamSpmv.hpp b/batched/sparse/unit_test/Test_Batched_TeamSpmv.hpp index 2efc3e9786..5c077f75ed 100644 --- a/batched/sparse/unit_test/Test_Batched_TeamSpmv.hpp +++ b/batched/sparse/unit_test/Test_Batched_TeamSpmv.hpp @@ -111,7 +111,7 @@ template void impl_test_batched_spmv(const int N, const int BlkSize, const int N_team) { typedef typename ValuesViewType::value_type value_type; - typedef Kokkos::Details::ArithTraits ats; + typedef Kokkos::ArithTraits ats; const int nnz = (BlkSize - 2) * 3 + 2 * 2; diff --git a/batched/sparse/unit_test/Test_Batched_TeamVectorCG.hpp b/batched/sparse/unit_test/Test_Batched_TeamVectorCG.hpp index d326d1429d..abadf27953 100644 --- a/batched/sparse/unit_test/Test_Batched_TeamVectorCG.hpp +++ b/batched/sparse/unit_test/Test_Batched_TeamVectorCG.hpp @@ -97,7 +97,7 @@ template void impl_test_batched_CG(const int N, const int BlkSize, const int N_team) { typedef typename ValuesViewType::value_type value_type; - typedef Kokkos::Details::ArithTraits ats; + typedef Kokkos::ArithTraits ats; const int nnz = (BlkSize - 2) * 3 + 2 * 2; @@ -112,9 +112,8 @@ void impl_test_batched_CG(const int N, const int BlkSize, const int N_team) { using Layout = typename ValuesViewType::array_layout; using EXSP = typename ValuesViewType::execution_space; - using MagnitudeType = - typename Kokkos::Details::ArithTraits::mag_type; - using NormViewType = Kokkos::View; + using MagnitudeType = typename Kokkos::ArithTraits::mag_type; + using NormViewType = Kokkos::View; using Norm2DViewType = Kokkos::View; using Scalar3DViewType = Kokkos::View; diff --git a/batched/sparse/unit_test/Test_Batched_TeamVectorGMRES.hpp b/batched/sparse/unit_test/Test_Batched_TeamVectorGMRES.hpp index d62e814e91..f4f208a829 100644 --- a/batched/sparse/unit_test/Test_Batched_TeamVectorGMRES.hpp +++ b/batched/sparse/unit_test/Test_Batched_TeamVectorGMRES.hpp @@ -133,7 +133,7 @@ template void impl_test_batched_GMRES(const int N, const int BlkSize, const int N_team) { typedef typename ValuesViewType::value_type value_type; - typedef Kokkos::Details::ArithTraits ats; + typedef Kokkos::ArithTraits ats; const int nnz = (BlkSize - 2) * 3 + 2 * 2; @@ -149,9 +149,8 @@ void impl_test_batched_GMRES(const int N, const int BlkSize, const int N_team) { using Layout = typename ValuesViewType::array_layout; using EXSP = typename ValuesViewType::execution_space; - using MagnitudeType = - typename Kokkos::Details::ArithTraits::mag_type; - using NormViewType = Kokkos::View; + using MagnitudeType = typename Kokkos::ArithTraits::mag_type; + using NormViewType = Kokkos::View; using Norm2DViewType = Kokkos::View; using Scalar3DViewType = Kokkos::View; diff --git a/batched/sparse/unit_test/Test_Batched_TeamVectorSpmv.hpp b/batched/sparse/unit_test/Test_Batched_TeamVectorSpmv.hpp index d54f3c20e4..67d944b159 100644 --- a/batched/sparse/unit_test/Test_Batched_TeamVectorSpmv.hpp +++ b/batched/sparse/unit_test/Test_Batched_TeamVectorSpmv.hpp @@ -119,7 +119,7 @@ template void impl_test_batched_spmv(const int N, const int BlkSize, const int N_team) { typedef typename ValuesViewType::value_type value_type; - typedef Kokkos::Details::ArithTraits ats; + typedef Kokkos::ArithTraits ats; const int nnz = (BlkSize - 2) * 3 + 2 * 2; diff --git a/blas/impl/KokkosBlas1_abs_impl.hpp b/blas/impl/KokkosBlas1_abs_impl.hpp index a1b86cffb7..d23ba1d7ed 100644 --- a/blas/impl/KokkosBlas1_abs_impl.hpp +++ b/blas/impl/KokkosBlas1_abs_impl.hpp @@ -32,7 +32,7 @@ template struct MV_Abs_Functor { typedef typename RMV::execution_space execution_space; typedef SizeType size_type; - typedef Kokkos::Details::ArithTraits ATS; + typedef Kokkos::ArithTraits ATS; const size_type numCols; RMV R_; @@ -70,7 +70,7 @@ template struct MV_AbsSelf_Functor { typedef typename RMV::execution_space execution_space; typedef SizeType size_type; - typedef Kokkos::Details::ArithTraits ATS; + typedef Kokkos::ArithTraits ATS; const size_type numCols; RMV R_; @@ -100,7 +100,7 @@ template struct V_Abs_Functor { typedef typename RV::execution_space execution_space; typedef SizeType size_type; - typedef Kokkos::Details::ArithTraits ATS; + typedef Kokkos::ArithTraits ATS; RV R_; XV X_; @@ -130,7 +130,7 @@ template struct V_AbsSelf_Functor { typedef typename RV::execution_space execution_space; typedef SizeType size_type; - typedef Kokkos::Details::ArithTraits ATS; + typedef Kokkos::ArithTraits ATS; RV R_; diff --git a/blas/impl/KokkosBlas1_axpby_impl.hpp b/blas/impl/KokkosBlas1_axpby_impl.hpp index f6242c1514..00fc445ec9 100644 --- a/blas/impl/KokkosBlas1_axpby_impl.hpp +++ b/blas/impl/KokkosBlas1_axpby_impl.hpp @@ -54,7 +54,7 @@ template ATS; + typedef Kokkos::ArithTraits ATS; XV m_x; YV m_y; @@ -188,7 +188,7 @@ struct Axpby_Functor { typedef typename YV::execution_space execution_space; typedef SizeType size_type; - typedef Kokkos::Details::ArithTraits ATS; + typedef Kokkos::ArithTraits ATS; XV m_x; YV m_y; diff --git a/blas/impl/KokkosBlas1_axpby_mv_impl.hpp b/blas/impl/KokkosBlas1_axpby_mv_impl.hpp index 38fe86ecd8..4ef3201163 100644 --- a/blas/impl/KokkosBlas1_axpby_mv_impl.hpp +++ b/blas/impl/KokkosBlas1_axpby_mv_impl.hpp @@ -45,7 +45,7 @@ template ATS; + typedef Kokkos::ArithTraits ATS; const size_type numCols; XMV m_x; @@ -288,7 +288,7 @@ struct Axpby_MV_Functor { typedef typename YMV::execution_space execution_space; typedef SizeType size_type; - typedef Kokkos::Details::ArithTraits ATS; + typedef Kokkos::ArithTraits ATS; const size_type numCols; XMV m_x; @@ -502,7 +502,7 @@ template ATS; + typedef Kokkos::ArithTraits ATS; XMV m_x; YMV m_y; @@ -730,7 +730,7 @@ struct Axpby_MV_Unroll_Functor { typedef typename YMV::execution_space execution_space; typedef SizeType size_type; - typedef Kokkos::Details::ArithTraits ATS; + typedef Kokkos::ArithTraits ATS; XMV m_x; YMV m_y; diff --git a/blas/impl/KokkosBlas1_axpby_spec.hpp b/blas/impl/KokkosBlas1_axpby_spec.hpp index a02c34eca3..6561163fd1 100644 --- a/blas/impl/KokkosBlas1_axpby_spec.hpp +++ b/blas/impl/KokkosBlas1_axpby_spec.hpp @@ -225,8 +225,8 @@ struct Axpby ATA; - typedef Kokkos::Details::ArithTraits ATB; + typedef Kokkos::ArithTraits ATA; + typedef Kokkos::ArithTraits ATB; static void axpby(const AV& alpha, const XMV& X, const BV& beta, const YMV& Y) { @@ -327,8 +327,8 @@ struct Axpby ATA; - typedef Kokkos::Details::ArithTraits ATB; + typedef Kokkos::ArithTraits ATA; + typedef Kokkos::ArithTraits ATB; static void axpby(const AV& alpha, const XV& X, const BV& beta, const YV& Y) { static_assert(Kokkos::is_view::value, diff --git a/blas/impl/KokkosBlas1_dot_impl.hpp b/blas/impl/KokkosBlas1_dot_impl.hpp index cfcd0020ef..56d964ca07 100644 --- a/blas/impl/KokkosBlas1_dot_impl.hpp +++ b/blas/impl/KokkosBlas1_dot_impl.hpp @@ -56,7 +56,7 @@ struct DotFunctor { } KOKKOS_INLINE_FUNCTION void init(value_type& update) const { - update = Kokkos::Details::ArithTraits::zero(); + update = Kokkos::ArithTraits::zero(); } KOKKOS_INLINE_FUNCTION void join(value_type& update, diff --git a/blas/impl/KokkosBlas1_iamax_impl.hpp b/blas/impl/KokkosBlas1_iamax_impl.hpp index 855a503422..369084aacb 100644 --- a/blas/impl/KokkosBlas1_iamax_impl.hpp +++ b/blas/impl/KokkosBlas1_iamax_impl.hpp @@ -82,7 +82,7 @@ struct V_Iamax_Functor { template void V_Iamax_Invoke(const RV& r, const XV& X) { using execution_space = typename XV::execution_space; - using AT = Kokkos::Details::ArithTraits; + using AT = Kokkos::ArithTraits; using mag_type = typename AT::mag_type; const SizeType numRows = static_cast(X.extent(0)); diff --git a/blas/impl/KokkosBlas1_mult_impl.hpp b/blas/impl/KokkosBlas1_mult_impl.hpp index 988b5cf534..754cce4d12 100644 --- a/blas/impl/KokkosBlas1_mult_impl.hpp +++ b/blas/impl/KokkosBlas1_mult_impl.hpp @@ -39,7 +39,7 @@ template ATS; + typedef Kokkos::ArithTraits ATS; const size_type m_n; typename CMV::const_value_type m_c; @@ -107,7 +107,7 @@ template ATS; + typedef Kokkos::ArithTraits ATS; typename CV::const_value_type m_c; CV m_C; @@ -152,8 +152,8 @@ void V_Mult_Generic(typename CV::const_value_type& c, const CV& C, const BV& B) { using Kokkos::ALL; using Kokkos::subview; - typedef Kokkos::Details::ArithTraits ATA; - typedef Kokkos::Details::ArithTraits ATC; + typedef Kokkos::ArithTraits ATA; + typedef Kokkos::ArithTraits ATC; typedef typename CV::execution_space execution_space; const SizeType numRows = C.extent(0); @@ -197,8 +197,8 @@ template void MV_Mult_Generic(typename CMV::const_value_type& c, const CMV& C, typename AV::const_value_type& ab, const AV& A, const BMV& B) { - typedef Kokkos::Details::ArithTraits ATA; - typedef Kokkos::Details::ArithTraits ATC; + typedef Kokkos::ArithTraits ATA; + typedef Kokkos::ArithTraits ATC; typedef typename CMV::execution_space execution_space; if (C.extent(1) == 1) { diff --git a/blas/impl/KokkosBlas1_nrm2_impl.hpp b/blas/impl/KokkosBlas1_nrm2_impl.hpp index 32f4660f18..c852447f7b 100644 --- a/blas/impl/KokkosBlas1_nrm2_impl.hpp +++ b/blas/impl/KokkosBlas1_nrm2_impl.hpp @@ -39,7 +39,7 @@ struct V_Nrm2_Functor { typedef SizeType size_type; typedef typename XV::non_const_value_type xvalue_type; typedef Kokkos::Details::InnerProductSpaceTraits IPT; - typedef Kokkos::Details::ArithTraits AT; + typedef Kokkos::ArithTraits AT; typedef typename IPT::mag_type value_type; typename XV::const_type m_x; @@ -80,8 +80,7 @@ struct V_Nrm2_Functor { KOKKOS_INLINE_FUNCTION void final(value_type& update) const { if (m_take_sqrt) update = - Kokkos::Details::ArithTraits::sqrt( - update); + Kokkos::ArithTraits::sqrt(update); } }; @@ -96,7 +95,7 @@ struct Nrm2_MV_Functor { typedef typename RV::non_const_value_type rvalue_type; typedef typename XV::non_const_value_type xvalue_type; typedef Kokkos::Details::InnerProductSpaceTraits IPT; - typedef Kokkos::Details::ArithTraits AT; + typedef Kokkos::ArithTraits AT; typedef typename IPT::mag_type value_type; using TeamMem = typename Kokkos::TeamPolicy::member_type; diff --git a/blas/impl/KokkosBlas1_nrm2w_impl.hpp b/blas/impl/KokkosBlas1_nrm2w_impl.hpp index 69667bf838..770846599f 100644 --- a/blas/impl/KokkosBlas1_nrm2w_impl.hpp +++ b/blas/impl/KokkosBlas1_nrm2w_impl.hpp @@ -40,7 +40,7 @@ struct V_Nrm2w_Functor { typedef SizeType size_type; typedef typename XV::non_const_value_type xvalue_type; typedef Kokkos::Details::InnerProductSpaceTraits IPT; - typedef Kokkos::Details::ArithTraits AT; + typedef Kokkos::ArithTraits AT; typedef typename IPT::mag_type value_type; typename XV::const_type m_x, m_w; @@ -83,8 +83,7 @@ struct V_Nrm2w_Functor { KOKKOS_INLINE_FUNCTION void final(value_type& update) const { if (m_take_sqrt) update = - Kokkos::Details::ArithTraits::sqrt( - update); + Kokkos::ArithTraits::sqrt(update); } }; @@ -93,7 +92,7 @@ struct Nrm2w_MV_Functor { typedef typename RV::non_const_value_type rvalue_type; typedef typename XV::non_const_value_type xvalue_type; typedef Kokkos::Details::InnerProductSpaceTraits IPT; - typedef Kokkos::Details::ArithTraits AT; + typedef Kokkos::ArithTraits AT; typedef typename IPT::mag_type value_type; using TeamMem = typename Kokkos::TeamPolicy::member_type; diff --git a/blas/impl/KokkosBlas1_nrminf_impl.hpp b/blas/impl/KokkosBlas1_nrminf_impl.hpp index c42aff8ba2..adbe5feb82 100644 --- a/blas/impl/KokkosBlas1_nrminf_impl.hpp +++ b/blas/impl/KokkosBlas1_nrminf_impl.hpp @@ -38,7 +38,7 @@ struct V_NrmInf_Functor { typedef SizeType size_type; typedef typename XV::non_const_value_type xvalue_type; typedef Kokkos::Details::InnerProductSpaceTraits IPT; - typedef Kokkos::Details::ArithTraits AT; + typedef Kokkos::ArithTraits AT; typedef typename IPT::mag_type value_type; typename XV::const_type m_x; @@ -72,7 +72,7 @@ struct V_NrmInf_Functor { template void V_NrmInf_Invoke(const RV& r, const XV& X) { typedef typename XV::execution_space execution_space; - typedef Kokkos::Details::ArithTraits AT; + typedef Kokkos::ArithTraits AT; const SizeType numRows = static_cast(X.extent(0)); diff --git a/blas/impl/KokkosBlas1_reciprocal_impl.hpp b/blas/impl/KokkosBlas1_reciprocal_impl.hpp index 1db1b9100d..6bef6080f0 100644 --- a/blas/impl/KokkosBlas1_reciprocal_impl.hpp +++ b/blas/impl/KokkosBlas1_reciprocal_impl.hpp @@ -32,7 +32,7 @@ template struct MV_Reciprocal_Functor { typedef typename RMV::execution_space execution_space; typedef SizeType size_type; - typedef Kokkos::Details::ArithTraits ATS; + typedef Kokkos::ArithTraits ATS; const size_type numCols; RMV R_; @@ -71,7 +71,7 @@ template struct MV_ReciprocalSelf_Functor { typedef typename RMV::execution_space execution_space; typedef SizeType size_type; - typedef Kokkos::Details::ArithTraits ATS; + typedef Kokkos::ArithTraits ATS; const size_type numCols; RMV R_; @@ -102,7 +102,7 @@ template struct V_Reciprocal_Functor { typedef typename RV::execution_space execution_space; typedef SizeType size_type; - typedef Kokkos::Details::ArithTraits ATS; + typedef Kokkos::ArithTraits ATS; RV R_; XV X_; @@ -132,7 +132,7 @@ template struct V_ReciprocalSelf_Functor { typedef typename RV::execution_space execution_space; typedef SizeType size_type; - typedef Kokkos::Details::ArithTraits ATS; + typedef Kokkos::ArithTraits ATS; RV R_; diff --git a/blas/impl/KokkosBlas1_scal_impl.hpp b/blas/impl/KokkosBlas1_scal_impl.hpp index 21974f1f7e..b1b3bd0264 100644 --- a/blas/impl/KokkosBlas1_scal_impl.hpp +++ b/blas/impl/KokkosBlas1_scal_impl.hpp @@ -46,7 +46,7 @@ template struct V_Scal_Functor { typedef typename RV::execution_space execution_space; typedef SizeType size_type; - typedef Kokkos::Details::ArithTraits ATS; + typedef Kokkos::ArithTraits ATS; RV m_r; XV m_x; @@ -103,7 +103,7 @@ struct V_Scal_Functor { typedef typename RV::execution_space execution_space; typedef SizeType size_type; - typedef Kokkos::Details::ArithTraits ATS; + typedef Kokkos::ArithTraits ATS; RV m_r; XV m_x; diff --git a/blas/impl/KokkosBlas1_scal_mv_impl.hpp b/blas/impl/KokkosBlas1_scal_mv_impl.hpp index f43101bd10..aded2fd19c 100644 --- a/blas/impl/KokkosBlas1_scal_mv_impl.hpp +++ b/blas/impl/KokkosBlas1_scal_mv_impl.hpp @@ -47,7 +47,7 @@ template ATS; + typedef Kokkos::ArithTraits ATS; const size_type numCols; RMV R_; @@ -129,7 +129,7 @@ struct MV_Scal_Functor { typedef typename RMV::execution_space execution_space; typedef SizeType size_type; - typedef Kokkos::Details::ArithTraits ATS; + typedef Kokkos::ArithTraits ATS; const size_type numCols; RMV m_r; @@ -200,7 +200,7 @@ template ATS; + typedef Kokkos::ArithTraits ATS; RMV m_r; XMV m_x; @@ -261,7 +261,7 @@ struct MV_Scal_Unroll_Functor { typedef typename RMV::execution_space execution_space; typedef SizeType size_type; - typedef Kokkos::Details::ArithTraits ATS; + typedef Kokkos::ArithTraits ATS; RMV m_r; XMV m_x; diff --git a/blas/impl/KokkosBlas1_scal_spec.hpp b/blas/impl/KokkosBlas1_scal_spec.hpp index 82bf4709b7..8d85f5f1e9 100644 --- a/blas/impl/KokkosBlas1_scal_spec.hpp +++ b/blas/impl/KokkosBlas1_scal_spec.hpp @@ -113,7 +113,7 @@ struct Scal { typedef typename XV::non_const_value_type AV; typedef typename XV::size_type size_type; - typedef Kokkos::Details::ArithTraits ATA; + typedef Kokkos::ArithTraits ATA; static void scal(const RV& R, const AV& alpha, const XV& X) { static_assert(Kokkos::is_view::value, @@ -172,7 +172,7 @@ struct Scal struct Scal { typedef typename XMV::size_type size_type; - typedef Kokkos::Details::ArithTraits ATA; + typedef Kokkos::ArithTraits ATA; static void scal(const RMV& R, const AV& av, const XMV& X) { static_assert(Kokkos::is_view::value, @@ -232,7 +232,7 @@ struct Scal { typedef typename XMV::non_const_value_type AV; typedef typename XMV::size_type size_type; - typedef Kokkos::Details::ArithTraits ATA; + typedef Kokkos::ArithTraits ATA; static void scal(const RMV& R, const AV& alpha, const XMV& X) { static_assert(Kokkos::is_view::value, diff --git a/blas/impl/KokkosBlas1_sum_impl.hpp b/blas/impl/KokkosBlas1_sum_impl.hpp index 08dc4e36e4..20f88e6845 100644 --- a/blas/impl/KokkosBlas1_sum_impl.hpp +++ b/blas/impl/KokkosBlas1_sum_impl.hpp @@ -40,7 +40,7 @@ struct V_Sum_Functor { typedef SizeType size_type; typedef typename XV::non_const_value_type xvalue_type; typedef Kokkos::Details::InnerProductSpaceTraits IPT; - typedef Kokkos::Details::ArithTraits AT; + typedef Kokkos::ArithTraits AT; typedef typename RV::non_const_value_type value_type; typename XV::const_type m_x; diff --git a/blas/impl/KokkosBlas1_team_abs_spec.hpp b/blas/impl/KokkosBlas1_team_abs_spec.hpp index 82418fe7d1..bcd9545738 100644 --- a/blas/impl/KokkosBlas1_team_abs_spec.hpp +++ b/blas/impl/KokkosBlas1_team_abs_spec.hpp @@ -35,7 +35,7 @@ struct team_abs_tpl_spec_avail { template ::value> struct TeamAbs { - typedef Kokkos::Details::ArithTraits ATS; + typedef Kokkos::ArithTraits ATS; static KOKKOS_INLINE_FUNCTION void team_abs(const TeamType& team, const RV& R, const XV& X); @@ -43,7 +43,7 @@ struct TeamAbs { template struct TeamAbs { - typedef Kokkos::Details::ArithTraits ATS; + typedef Kokkos::ArithTraits ATS; static KOKKOS_INLINE_FUNCTION void team_abs(const TeamType& team, const RV& R, const XV& X) { diff --git a/blas/impl/KokkosBlas1_team_dot_spec.hpp b/blas/impl/KokkosBlas1_team_dot_spec.hpp index c141694926..041920d109 100644 --- a/blas/impl/KokkosBlas1_team_dot_spec.hpp +++ b/blas/impl/KokkosBlas1_team_dot_spec.hpp @@ -53,7 +53,7 @@ struct TeamDot { static KOKKOS_INLINE_FUNCTION dot_type team_dot(const TeamType& team, const XV& X, const YV& Y) { - dot_type result = 0.0; // Kokkos::Details::ArithTraitszero(); + dot_type result = 0.0; // Kokkos::ArithTraitszero(); int N = X.extent(0); Kokkos::parallel_reduce( Kokkos::TeamThreadRange(team, N), diff --git a/blas/impl/KokkosBlas1_team_nrm2_spec.hpp b/blas/impl/KokkosBlas1_team_nrm2_spec.hpp index 4ed19ef5df..ef050cb73b 100644 --- a/blas/impl/KokkosBlas1_team_nrm2_spec.hpp +++ b/blas/impl/KokkosBlas1_team_nrm2_spec.hpp @@ -40,7 +40,7 @@ struct TeamNrm2 { typedef Kokkos::Details::InnerProductSpaceTraits< typename XV::non_const_value_type> IPT; - typedef Kokkos::Details::ArithTraits AT; + typedef Kokkos::ArithTraits AT; static KOKKOS_INLINE_FUNCTION mag_type team_nrm2(const TeamType& team, const XV& X); @@ -53,11 +53,11 @@ struct TeamNrm2 { typedef Kokkos::Details::InnerProductSpaceTraits< typename XV::non_const_value_type> IPT; - typedef Kokkos::Details::ArithTraits AT; + typedef Kokkos::ArithTraits AT; static KOKKOS_INLINE_FUNCTION mag_type team_nrm2(const TeamType& team, const XV& X) { - mag_type result = 0.0; // Kokkos::Details::ArithTraitszero(); + mag_type result = 0.0; // Kokkos::ArithTraitszero(); int N = X.extent(0); Kokkos::parallel_reduce( Kokkos::TeamThreadRange(team, N), diff --git a/blas/impl/KokkosBlas1_update_impl.hpp b/blas/impl/KokkosBlas1_update_impl.hpp index 5866764faf..99c80f8d3c 100644 --- a/blas/impl/KokkosBlas1_update_impl.hpp +++ b/blas/impl/KokkosBlas1_update_impl.hpp @@ -45,7 +45,7 @@ template ATS; + typedef Kokkos::ArithTraits ATS; const size_type numCols; const typename XMV::non_const_value_type alpha_; @@ -215,7 +215,7 @@ template ATS; + typedef Kokkos::ArithTraits ATS; const size_type numCols; const typename XV::non_const_value_type alpha_; diff --git a/blas/impl/KokkosBlas1_update_spec.hpp b/blas/impl/KokkosBlas1_update_spec.hpp index 78a6d9aa09..0b33e5224e 100644 --- a/blas/impl/KokkosBlas1_update_spec.hpp +++ b/blas/impl/KokkosBlas1_update_spec.hpp @@ -117,9 +117,9 @@ struct Update { template struct Update { typedef typename XMV::size_type size_type; - typedef Kokkos::Details::ArithTraits ATA; - typedef Kokkos::Details::ArithTraits ATB; - typedef Kokkos::Details::ArithTraits ATC; + typedef Kokkos::ArithTraits ATA; + typedef Kokkos::ArithTraits ATB; + typedef Kokkos::ArithTraits ATC; static void update(const typename XMV::non_const_value_type& alpha, const XMV& X, @@ -222,9 +222,9 @@ struct Update { template struct Update { typedef typename XV::size_type size_type; - typedef Kokkos::Details::ArithTraits ATA; - typedef Kokkos::Details::ArithTraits ATB; - typedef Kokkos::Details::ArithTraits ATC; + typedef Kokkos::ArithTraits ATA; + typedef Kokkos::ArithTraits ATB; + typedef Kokkos::ArithTraits ATC; static void update(const typename XV::non_const_value_type& alpha, const XV& X, const typename YV::non_const_value_type& beta, diff --git a/blas/impl/KokkosBlas2_gemv_impl.hpp b/blas/impl/KokkosBlas2_gemv_impl.hpp index 7d7403c14b..730f88602a 100644 --- a/blas/impl/KokkosBlas2_gemv_impl.hpp +++ b/blas/impl/KokkosBlas2_gemv_impl.hpp @@ -180,7 +180,7 @@ struct SingleLevelTransposeGEMV { KOKKOS_INLINE_FUNCTION void operator()(const IndexType& i, value_type y_cur) const { - using Kokkos::Details::ArithTraits; + using Kokkos::ArithTraits; using KAT = ArithTraits; const auto x_i = x_(i); @@ -238,9 +238,9 @@ void singleLevelGemv(const typename AViewType::execution_space& space, // depend on that or its implementation details. Instead, we reuse // an instantiation of the non-transpose case for alpha=0. if (A.extent(0) == 0 && (tr != 'N' && tr != 'n')) { - if (beta == Kokkos::Details::ArithTraits::zero()) { - Kokkos::deep_copy(y, Kokkos::Details::ArithTraits::zero()); - } else if (beta != Kokkos::Details::ArithTraits::one()) { + if (beta == Kokkos::ArithTraits::zero()) { + Kokkos::deep_copy(y, Kokkos::ArithTraits::zero()); + } else if (beta != Kokkos::ArithTraits::one()) { // "Fake out" a scal() by using the non-transpose alpha=0, // general beta case. This assumes that the functor doesn't // check dimensions. @@ -255,12 +255,11 @@ void singleLevelGemv(const typename AViewType::execution_space& space, } if (tr == 'N' || tr == 'n') { - if (alpha == Kokkos::Details::ArithTraits::zero()) { - if (beta == Kokkos::Details::ArithTraits::zero()) { + if (alpha == Kokkos::ArithTraits::zero()) { + if (beta == Kokkos::ArithTraits::zero()) { // Fill y with zeros - Kokkos::deep_copy(y, - Kokkos::Details::ArithTraits::zero()); - } else if (beta == Kokkos::Details::ArithTraits::one()) { + Kokkos::deep_copy(y, Kokkos::ArithTraits::zero()); + } else if (beta == Kokkos::ArithTraits::one()) { // Do nothing (y := 1 * y) } else { // beta != 0 && beta != 1 using functor_type = @@ -269,14 +268,14 @@ void singleLevelGemv(const typename AViewType::execution_space& space, functor_type functor(alpha, A, x, beta, y); Kokkos::parallel_for("KokkosBlas::gemv[SingleLevel]", range, functor); } - } else if (alpha == Kokkos::Details::ArithTraits::one()) { - if (beta == Kokkos::Details::ArithTraits::zero()) { + } else if (alpha == Kokkos::ArithTraits::one()) { + if (beta == Kokkos::ArithTraits::zero()) { using functor_type = SingleLevelNontransposeGEMV; functor_type functor(alpha, A, x, beta, y); Kokkos::parallel_for("KokkosBlas::gemv[SingleLevel]", range, functor); - } else if (beta == Kokkos::Details::ArithTraits::one()) { + } else if (beta == Kokkos::ArithTraits::one()) { using functor_type = SingleLevelNontransposeGEMV; @@ -290,13 +289,13 @@ void singleLevelGemv(const typename AViewType::execution_space& space, Kokkos::parallel_for("KokkosBlas::gemv[SingleLevel]", range, functor); } } else { // alpha != 0 and alpha != 1 - if (beta == Kokkos::Details::ArithTraits::zero()) { + if (beta == Kokkos::ArithTraits::zero()) { using functor_type = SingleLevelNontransposeGEMV; functor_type functor(alpha, A, x, beta, y); Kokkos::parallel_for("KokkosBlas::gemv[SingleLevel]", range, functor); - } else if (beta == Kokkos::Details::ArithTraits::one()) { + } else if (beta == Kokkos::ArithTraits::one()) { using functor_type = SingleLevelNontransposeGEMV; @@ -311,12 +310,11 @@ void singleLevelGemv(const typename AViewType::execution_space& space, } } } else if (tr == 'T' || tr == 't') { // transpose, no conjugate - if (alpha == Kokkos::Details::ArithTraits::zero()) { - if (beta == Kokkos::Details::ArithTraits::zero()) { + if (alpha == Kokkos::ArithTraits::zero()) { + if (beta == Kokkos::ArithTraits::zero()) { // Fill y with zeros - Kokkos::deep_copy(y, - Kokkos::Details::ArithTraits::zero()); - } else if (beta == Kokkos::Details::ArithTraits::one()) { + Kokkos::deep_copy(y, Kokkos::ArithTraits::zero()); + } else if (beta == Kokkos::ArithTraits::one()) { // Do nothing (y := 1 * y) } else { // beta != 0 && beta != 1 using functor_type = @@ -326,15 +324,15 @@ void singleLevelGemv(const typename AViewType::execution_space& space, Kokkos::parallel_reduce("KokkosBlas::gemv[SingleLevelTranspose]", range, functor); } - } else if (alpha == Kokkos::Details::ArithTraits::one()) { - if (beta == Kokkos::Details::ArithTraits::zero()) { + } else if (alpha == Kokkos::ArithTraits::one()) { + if (beta == Kokkos::ArithTraits::zero()) { using functor_type = SingleLevelTransposeGEMV; functor_type functor(alpha, A, x, beta, y); Kokkos::parallel_reduce("KokkosBlas::gemv[SingleLevelTranspose]", range, functor); - } else if (beta == Kokkos::Details::ArithTraits::one()) { + } else if (beta == Kokkos::ArithTraits::one()) { using functor_type = SingleLevelTransposeGEMV; @@ -350,14 +348,14 @@ void singleLevelGemv(const typename AViewType::execution_space& space, functor); } } else { // alpha != 0 and alpha != 1 - if (beta == Kokkos::Details::ArithTraits::zero()) { + if (beta == Kokkos::ArithTraits::zero()) { using functor_type = SingleLevelTransposeGEMV; functor_type functor(alpha, A, x, beta, y); Kokkos::parallel_reduce("KokkosBlas::gemv[SingleLevelTranspose]", range, functor); - } else if (beta == Kokkos::Details::ArithTraits::one()) { + } else if (beta == Kokkos::ArithTraits::one()) { using functor_type = SingleLevelTransposeGEMV; @@ -374,12 +372,11 @@ void singleLevelGemv(const typename AViewType::execution_space& space, } } } else if (tr == 'C' || tr == 'c' || tr == 'H' || tr == 'h') { // conj xpose - if (alpha == Kokkos::Details::ArithTraits::zero()) { - if (beta == Kokkos::Details::ArithTraits::zero()) { + if (alpha == Kokkos::ArithTraits::zero()) { + if (beta == Kokkos::ArithTraits::zero()) { // Fill y with zeros - Kokkos::deep_copy(y, - Kokkos::Details::ArithTraits::zero()); - } else if (beta == Kokkos::Details::ArithTraits::one()) { + Kokkos::deep_copy(y, Kokkos::ArithTraits::zero()); + } else if (beta == Kokkos::ArithTraits::one()) { // Do nothing (y := 1 * y) } else { // beta != 0 && beta != 1 using functor_type = @@ -389,15 +386,15 @@ void singleLevelGemv(const typename AViewType::execution_space& space, Kokkos::parallel_reduce("KokkosBlas::gemv[SingleLevelTranspose]", range, functor); } - } else if (alpha == Kokkos::Details::ArithTraits::one()) { - if (beta == Kokkos::Details::ArithTraits::zero()) { + } else if (alpha == Kokkos::ArithTraits::one()) { + if (beta == Kokkos::ArithTraits::zero()) { using functor_type = SingleLevelTransposeGEMV; functor_type functor(alpha, A, x, beta, y); Kokkos::parallel_reduce("KokkosBlas::gemv[SingleLevelTranspose]", range, functor); - } else if (beta == Kokkos::Details::ArithTraits::one()) { + } else if (beta == Kokkos::ArithTraits::one()) { using functor_type = SingleLevelTransposeGEMV; @@ -413,14 +410,14 @@ void singleLevelGemv(const typename AViewType::execution_space& space, functor); } } else { // alpha != 0 and alpha != 1 - if (beta == Kokkos::Details::ArithTraits::zero()) { + if (beta == Kokkos::ArithTraits::zero()) { using functor_type = SingleLevelTransposeGEMV; functor_type functor(alpha, A, x, beta, y); Kokkos::parallel_reduce("KokkosBlas::gemv[SingleLevelTranspose]", range, functor); - } else if (beta == Kokkos::Details::ArithTraits::one()) { + } else if (beta == Kokkos::ArithTraits::one()) { using functor_type = SingleLevelTransposeGEMV; @@ -604,7 +601,7 @@ struct TwoLevelTransposeGEMV { public: KOKKOS_INLINE_FUNCTION void operator()(const member_type& team) const { - using Kokkos::Details::ArithTraits; + using Kokkos::ArithTraits; using KAT_A = ArithTraits; using KAT_Y = ArithTraits; @@ -668,7 +665,7 @@ void twoLevelGemv(const typename AViewType::execution_space& space, using team_policy_type = Kokkos::TeamPolicy; using range_policy_type = Kokkos::RangePolicy; - using Kokkos::Details::ArithTraits; + using Kokkos::ArithTraits; using KAT = ArithTraits; using YKAT = ArithTraits; @@ -746,7 +743,7 @@ void twoLevelGemv(const typename AViewType::execution_space& space, } else { if (alpha == KAT::zero() && beta == KAT::zero()) { // Fill y with zeros - Kokkos::deep_copy(y, Kokkos::Details::ArithTraits::zero()); + Kokkos::deep_copy(y, Kokkos::ArithTraits::zero()); } else if (alpha == KAT::zero() && beta == KAT::one()) { // Do nothing (y := 1 * y) } else if (tr == 'T') { diff --git a/blas/impl/KokkosBlas2_serial_gemv_inner_multiple_dot.hpp b/blas/impl/KokkosBlas2_serial_gemv_inner_multiple_dot.hpp index 31975dfa9e..aa7efc9122 100644 --- a/blas/impl/KokkosBlas2_serial_gemv_inner_multiple_dot.hpp +++ b/blas/impl/KokkosBlas2_serial_gemv_inner_multiple_dot.hpp @@ -31,7 +31,7 @@ struct OpID { struct OpConj { template KOKKOS_INLINE_FUNCTION ValueType operator()(ValueType v) const { - using KAT = Kokkos::Details::ArithTraits; + using KAT = Kokkos::ArithTraits; return KAT::conj(v); } }; diff --git a/blas/impl/KokkosBlas3_gemm_dotbased_impl.hpp b/blas/impl/KokkosBlas3_gemm_dotbased_impl.hpp index 462ac0c744..f54a1dd68c 100644 --- a/blas/impl/KokkosBlas3_gemm_dotbased_impl.hpp +++ b/blas/impl/KokkosBlas3_gemm_dotbased_impl.hpp @@ -43,8 +43,8 @@ struct DotBasedGEMM { using size_A = typename AV::size_type; using scalar_C = typename CV::non_const_value_type; using size_C = typename CV::size_type; - using AVT = Kokkos::Details::ArithTraits; - using CVT = Kokkos::Details::ArithTraits; + using AVT = Kokkos::ArithTraits; + using CVT = Kokkos::ArithTraits; const scalar_A alpha; const scalar_C beta; diff --git a/blas/impl/KokkosBlas3_gemm_impl.hpp b/blas/impl/KokkosBlas3_gemm_impl.hpp index f1f89b9908..b0271ad23d 100644 --- a/blas/impl/KokkosBlas3_gemm_impl.hpp +++ b/blas/impl/KokkosBlas3_gemm_impl.hpp @@ -65,7 +65,7 @@ template { typedef typename ViewType::non_const_value_type value_type; - typedef Kokkos::Details::ArithTraits ATV; + typedef Kokkos::ArithTraits ATV; KOKKOS_INLINE_FUNCTION static void copy(const TeamHandle& team, const ViewTypeScratch& A_scr, @@ -115,7 +115,7 @@ struct impl_deep_copy_matrix_block { typedef typename ViewType::non_const_value_type value_type; - typedef Kokkos::Details::ArithTraits ATV; + typedef Kokkos::ArithTraits ATV; KOKKOS_INLINE_FUNCTION static void copy(const TeamHandle& team, const ViewTypeScratch& A_scr, @@ -159,7 +159,7 @@ template { typedef typename ViewType::non_const_value_type value_type; - typedef Kokkos::Details::ArithTraits ATV; + typedef Kokkos::ArithTraits ATV; KOKKOS_INLINE_FUNCTION static void copy(const TeamHandle& team, const ViewTypeScratch& A_scr, @@ -209,7 +209,7 @@ struct impl_deep_copy_matrix_block { typedef typename ViewType::non_const_value_type value_type; - typedef Kokkos::Details::ArithTraits ATV; + typedef Kokkos::ArithTraits ATV; KOKKOS_INLINE_FUNCTION static void copy(const TeamHandle& team, const ViewTypeScratch& A_scr, @@ -258,7 +258,7 @@ template { typedef typename ViewType::non_const_value_type value_type; - typedef Kokkos::Details::ArithTraits ATV; + typedef Kokkos::ArithTraits ATV; KOKKOS_INLINE_FUNCTION static void copy(const TeamHandle& team, const ViewTypeScratch& A_scr, @@ -308,7 +308,7 @@ struct impl_deep_copy_matrix_block { typedef typename ViewType::non_const_value_type value_type; - typedef Kokkos::Details::ArithTraits ATV; + typedef Kokkos::ArithTraits ATV; KOKKOS_INLINE_FUNCTION static void copy(const TeamHandle& team, const ViewTypeScratch& A_scr, @@ -356,7 +356,7 @@ template struct impl_update_matrix_block { typedef typename ViewType::non_const_value_type value_type; - typedef Kokkos::Details::ArithTraits ATV; + typedef Kokkos::ArithTraits ATV; KOKKOS_INLINE_FUNCTION static void update(const TeamHandle& team, const value_type& beta, @@ -417,7 +417,7 @@ template { typedef typename ViewType::non_const_value_type value_type; - typedef Kokkos::Details::ArithTraits ATV; + typedef Kokkos::ArithTraits ATV; KOKKOS_INLINE_FUNCTION static void update(const TeamHandle& team, const value_type& beta, diff --git a/blas/impl/KokkosBlas3_trsm_impl.hpp b/blas/impl/KokkosBlas3_trsm_impl.hpp index 9700b62e67..87cac8b86a 100644 --- a/blas/impl/KokkosBlas3_trsm_impl.hpp +++ b/blas/impl/KokkosBlas3_trsm_impl.hpp @@ -40,7 +40,7 @@ int SerialTrsmInternalLeftLowerConj(const bool use_unit_diag, const int m, const int as0, const int as1, /**/ ValueType* KOKKOS_RESTRICT B, const int bs0, const int bs1) { - typedef Kokkos::Details::ArithTraits AT; + typedef Kokkos::ArithTraits AT; const ScalarType one(1.0), zero(0.0); @@ -79,7 +79,7 @@ int SerialTrsmInternalLeftUpperConj(const bool use_unit_diag, const int m, const int as0, const int as1, /**/ ValueType* KOKKOS_RESTRICT B, const int bs0, const int bs1) { - typedef Kokkos::Details::ArithTraits AT; + typedef Kokkos::ArithTraits AT; const ScalarType one(1.0), zero(0.0); diff --git a/blas/src/KokkosBlas1_axpby.hpp b/blas/src/KokkosBlas1_axpby.hpp index ff037e59d1..45b82e8fcd 100644 --- a/blas/src/KokkosBlas1_axpby.hpp +++ b/blas/src/KokkosBlas1_axpby.hpp @@ -92,8 +92,7 @@ void axpby(const AV& a, const XMV& X, const BV& b, const YMV& Y) { template void axpy(const AV& a, const XMV& X, const YMV& Y) { - axpby(a, X, - Kokkos::Details::ArithTraits::one(), + axpby(a, X, Kokkos::ArithTraits::one(), Y); } diff --git a/blas/src/KokkosBlas1_team_axpby.hpp b/blas/src/KokkosBlas1_team_axpby.hpp index 165683df01..374bc42390 100644 --- a/blas/src/KokkosBlas1_team_axpby.hpp +++ b/blas/src/KokkosBlas1_team_axpby.hpp @@ -37,9 +37,7 @@ axpy(const TeamType& team, const typename XVector::non_const_value_type& a, const XVector& x, const YVector& y) { KokkosBlas::Experimental::axpby( team, a, x, - Kokkos::Details::ArithTraits< - typename YVector::non_const_value_type>::one(), - y); + Kokkos::ArithTraits::one(), y); } } // namespace Experimental diff --git a/blas/unit_test/Test_Blas1_abs.hpp b/blas/unit_test/Test_Blas1_abs.hpp index ff91087613..6ed2f9dbb3 100644 --- a/blas/unit_test/Test_Blas1_abs.hpp +++ b/blas/unit_test/Test_Blas1_abs.hpp @@ -24,7 +24,7 @@ template void impl_test_abs(int N) { typedef typename ViewTypeA::value_type ScalarA; typedef typename ViewTypeB::value_type ScalarB; - typedef Kokkos::Details::ArithTraits AT; + typedef Kokkos::ArithTraits AT; typedef Kokkos::View< ScalarA * [2], @@ -97,7 +97,7 @@ template void impl_test_abs_mv(int N, int K) { typedef typename ViewTypeA::value_type ScalarA; typedef typename ViewTypeB::value_type ScalarB; - typedef Kokkos::Details::ArithTraits AT; + typedef Kokkos::ArithTraits AT; typedef multivector_layout_adapter vfA_type; typedef multivector_layout_adapter vfB_type; diff --git a/blas/unit_test/Test_Blas1_asum.hpp b/blas/unit_test/Test_Blas1_asum.hpp index 624bfc9d09..b1d617061b 100644 --- a/blas/unit_test/Test_Blas1_asum.hpp +++ b/blas/unit_test/Test_Blas1_asum.hpp @@ -23,7 +23,7 @@ namespace Test { template void impl_test_asum(int N) { typedef typename ViewTypeA::value_type ScalarA; - typedef Kokkos::Details::ArithTraits AT; + typedef Kokkos::ArithTraits AT; typedef Kokkos::ArithTraits MAT; typedef Kokkos::View< diff --git a/blas/unit_test/Test_Blas1_iamax.hpp b/blas/unit_test/Test_Blas1_iamax.hpp index ced1759301..2b9885e30f 100644 --- a/blas/unit_test/Test_Blas1_iamax.hpp +++ b/blas/unit_test/Test_Blas1_iamax.hpp @@ -23,7 +23,7 @@ namespace Test { template void impl_test_iamax(int N) { typedef typename ViewTypeA::non_const_value_type ScalarA; - typedef Kokkos::Details::ArithTraits AT; + typedef Kokkos::ArithTraits AT; typedef typename AT::mag_type mag_type; using size_type = typename ViewTypeA::size_type; @@ -42,7 +42,7 @@ void impl_test_iamax(int N) { typename ViewTypeA::const_type c_a = a; - mag_type expected_result = Kokkos::Details::ArithTraits::min(); + mag_type expected_result = Kokkos::ArithTraits::min(); size_type expected_max_loc = 0; for (int i = 0; i < N; i++) { mag_type val = AT::abs(h_a(i)); @@ -114,7 +114,7 @@ void impl_test_iamax(int N) { template void impl_test_iamax_mv(int N, int K) { typedef typename ViewTypeA::non_const_value_type ScalarA; - typedef Kokkos::Details::ArithTraits AT; + typedef Kokkos::ArithTraits AT; typedef typename AT::mag_type mag_type; typedef typename ViewTypeA::size_type size_type; @@ -145,7 +145,7 @@ void impl_test_iamax_mv(int N, int K) { size_type* expected_max_loc = new size_type[K]; for (int j = 0; j < K; j++) { - expected_result[j] = Kokkos::Details::ArithTraits::min(); + expected_result[j] = Kokkos::ArithTraits::min(); for (int i = 0; i < N; i++) { mag_type val = AT::abs(h_a(i, j)); if (val > expected_result[j]) { diff --git a/blas/unit_test/Test_Blas1_nrm1.hpp b/blas/unit_test/Test_Blas1_nrm1.hpp index b64aab9c3c..e17f8b988a 100644 --- a/blas/unit_test/Test_Blas1_nrm1.hpp +++ b/blas/unit_test/Test_Blas1_nrm1.hpp @@ -66,7 +66,7 @@ void impl_test_nrm1(int N) { template void impl_test_nrm1_mv(int N, int K) { typedef typename ViewTypeA::value_type ScalarA; - typedef Kokkos::Details::ArithTraits AT; + typedef Kokkos::ArithTraits AT; typedef typename AT::mag_type mag_type; typedef Kokkos::ArithTraits MAT; diff --git a/blas/unit_test/Test_Blas1_nrm2.hpp b/blas/unit_test/Test_Blas1_nrm2.hpp index d17c9af505..b7444b76df 100644 --- a/blas/unit_test/Test_Blas1_nrm2.hpp +++ b/blas/unit_test/Test_Blas1_nrm2.hpp @@ -23,7 +23,7 @@ namespace Test { template void impl_test_nrm2(int N) { typedef typename ViewTypeA::value_type ScalarA; - typedef Kokkos::Details::ArithTraits AT; + typedef Kokkos::ArithTraits AT; ViewTypeA a("A", N); @@ -45,8 +45,8 @@ void impl_test_nrm2(int N) { for (int i = 0; i < N; i++) { expected_result += AT::abs(h_a(i)) * AT::abs(h_a(i)); } - expected_result = Kokkos::Details::ArithTraits::sqrt( - expected_result); + expected_result = + Kokkos::ArithTraits::sqrt(expected_result); typename AT::mag_type nonconst_result = KokkosBlas::nrm2(a); EXPECT_NEAR_KK(nonconst_result, expected_result, eps * expected_result); @@ -58,7 +58,7 @@ void impl_test_nrm2(int N) { template void impl_test_nrm2_mv(int N, int K) { typedef typename ViewTypeA::value_type ScalarA; - typedef Kokkos::Details::ArithTraits AT; + typedef Kokkos::ArithTraits AT; typedef multivector_layout_adapter vfA_type; @@ -90,8 +90,7 @@ void impl_test_nrm2_mv(int N, int K) { expected_result[j] += AT::abs(h_a(i, j)) * AT::abs(h_a(i, j)); } expected_result[j] = - Kokkos::Details::ArithTraits::sqrt( - expected_result[j]); + Kokkos::ArithTraits::sqrt(expected_result[j]); } double eps = std::is_same::value ? 2 * 1e-5 : 1e-7; diff --git a/blas/unit_test/Test_Blas1_nrm2_squared.hpp b/blas/unit_test/Test_Blas1_nrm2_squared.hpp index ebebd57b9a..7bfb46446f 100644 --- a/blas/unit_test/Test_Blas1_nrm2_squared.hpp +++ b/blas/unit_test/Test_Blas1_nrm2_squared.hpp @@ -23,7 +23,7 @@ namespace Test { template void impl_test_nrm2_squared(int N) { typedef typename ViewTypeA::value_type ScalarA; - typedef Kokkos::Details::ArithTraits AT; + typedef Kokkos::ArithTraits AT; typedef Kokkos::View< ScalarA * [2], @@ -68,7 +68,7 @@ void impl_test_nrm2_squared(int N) { template void impl_test_nrm2_squared_mv(int N, int K) { typedef typename ViewTypeA::value_type ScalarA; - typedef Kokkos::Details::ArithTraits AT; + typedef Kokkos::ArithTraits AT; typedef multivector_layout_adapter vfA_type; diff --git a/blas/unit_test/Test_Blas1_nrminf.hpp b/blas/unit_test/Test_Blas1_nrminf.hpp index 8da5550afa..9a8a79c115 100644 --- a/blas/unit_test/Test_Blas1_nrminf.hpp +++ b/blas/unit_test/Test_Blas1_nrminf.hpp @@ -23,7 +23,7 @@ namespace Test { template void impl_test_nrminf(int N) { typedef typename ViewTypeA::non_const_value_type ScalarA; - typedef Kokkos::Details::ArithTraits AT; + typedef Kokkos::ArithTraits AT; ViewTypeA a("A", N); @@ -42,7 +42,7 @@ void impl_test_nrminf(int N) { double eps = std::is_same::value ? 2 * 1e-5 : 1e-7; typename AT::mag_type expected_result = - Kokkos::Details::ArithTraits::min(); + Kokkos::ArithTraits::min(); for (int i = 0; i < N; i++) if (AT::abs(h_a(i)) > expected_result) expected_result = AT::abs(h_a(i)); @@ -58,7 +58,7 @@ void impl_test_nrminf(int N) { template void impl_test_nrminf_mv(int N, int K) { typedef typename ViewTypeA::non_const_value_type ScalarA; - typedef Kokkos::Details::ArithTraits AT; + typedef Kokkos::ArithTraits AT; typedef multivector_layout_adapter vfA_type; @@ -85,8 +85,7 @@ void impl_test_nrminf_mv(int N, int K) { typename AT::mag_type* expected_result = new typename AT::mag_type[K]; for (int j = 0; j < K; j++) { - expected_result[j] = - Kokkos::Details::ArithTraits::min(); + expected_result[j] = Kokkos::ArithTraits::min(); for (int i = 0; i < N; i++) { if (AT::abs(h_a(i, j)) > expected_result[j]) expected_result[j] = AT::abs(h_a(i, j)); diff --git a/blas/unit_test/Test_Blas1_reciprocal.hpp b/blas/unit_test/Test_Blas1_reciprocal.hpp index 49dd1c6119..687aacf1d9 100644 --- a/blas/unit_test/Test_Blas1_reciprocal.hpp +++ b/blas/unit_test/Test_Blas1_reciprocal.hpp @@ -25,7 +25,7 @@ template void impl_test_reciprocal(int N) { using ScalarA = typename ViewTypeA::value_type; using ScalarB = typename ViewTypeB::value_type; - using AT = Kokkos::Details::ArithTraits; + using AT = Kokkos::ArithTraits; using MagnitudeA = typename AT::mag_type; using MagnitudeB = typename Kokkos::ArithTraits::mag_type; diff --git a/blas/unit_test/Test_Blas1_scal.hpp b/blas/unit_test/Test_Blas1_scal.hpp index 1c572073a5..4c414ea735 100644 --- a/blas/unit_test/Test_Blas1_scal.hpp +++ b/blas/unit_test/Test_Blas1_scal.hpp @@ -25,7 +25,7 @@ template void impl_test_scal(int N) { typedef typename ViewTypeA::value_type ScalarA; typedef typename ViewTypeB::value_type ScalarB; - typedef Kokkos::Details::ArithTraits AT; + typedef Kokkos::ArithTraits AT; ScalarA a(3); typename AT::mag_type eps = AT::epsilon() * 1000; @@ -76,7 +76,7 @@ template void impl_test_scal_mv(int N, int K) { typedef typename ViewTypeA::value_type ScalarA; typedef typename ViewTypeB::value_type ScalarB; - typedef Kokkos::Details::ArithTraits AT; + typedef Kokkos::ArithTraits AT; typedef multivector_layout_adapter vfA_type; typedef multivector_layout_adapter vfB_type; diff --git a/blas/unit_test/Test_Blas1_serial_setscal.hpp b/blas/unit_test/Test_Blas1_serial_setscal.hpp index bb33aa451a..80a0561d60 100644 --- a/blas/unit_test/Test_Blas1_serial_setscal.hpp +++ b/blas/unit_test/Test_Blas1_serial_setscal.hpp @@ -99,7 +99,7 @@ template ats; + typedef Kokkos::ArithTraits ats; /// radomized input testing views const ScalarType alpha = 11.1; diff --git a/blas/unit_test/Test_Blas1_team_abs.hpp b/blas/unit_test/Test_Blas1_team_abs.hpp index 318f04c58e..8cb8d9cf43 100644 --- a/blas/unit_test/Test_Blas1_team_abs.hpp +++ b/blas/unit_test/Test_Blas1_team_abs.hpp @@ -39,7 +39,7 @@ void impl_test_team_abs(int N) { typedef typename ViewTypeA::value_type ScalarA; typedef typename ViewTypeB::value_type ScalarB; - typedef Kokkos::Details::ArithTraits AT; + typedef Kokkos::ArithTraits AT; typedef Kokkos::View< ScalarA * [2], @@ -141,7 +141,7 @@ void impl_test_team_abs_mv(int N, int K) { typedef typename ViewTypeA::value_type ScalarA; typedef typename ViewTypeB::value_type ScalarB; - typedef Kokkos::Details::ArithTraits AT; + typedef Kokkos::ArithTraits AT; typedef multivector_layout_adapter vfA_type; typedef multivector_layout_adapter vfB_type; diff --git a/blas/unit_test/Test_Blas1_team_axpby.hpp b/blas/unit_test/Test_Blas1_team_axpby.hpp index e776085a66..3e071e7537 100644 --- a/blas/unit_test/Test_Blas1_team_axpby.hpp +++ b/blas/unit_test/Test_Blas1_team_axpby.hpp @@ -193,7 +193,7 @@ void impl_test_team_axpby_mv(int N, int K) { Kokkos::View r("Dot::Result", K); - typedef Kokkos::Details::ArithTraits AT; + typedef Kokkos::ArithTraits AT; // KokkosBlas::axpby(a,x,b,y); Kokkos::parallel_for( diff --git a/blas/unit_test/Test_Blas1_team_nrm2.hpp b/blas/unit_test/Test_Blas1_team_nrm2.hpp index 8ac35e5cbc..05d4970bcd 100644 --- a/blas/unit_test/Test_Blas1_team_nrm2.hpp +++ b/blas/unit_test/Test_Blas1_team_nrm2.hpp @@ -35,7 +35,7 @@ void impl_test_team_nrm2(int N, int K) { const team_policy policy(K, Kokkos::AUTO); typedef typename ViewTypeA::value_type ScalarA; - typedef Kokkos::Details::ArithTraits AT; + typedef Kokkos::ArithTraits AT; typedef multivector_layout_adapter vfA_type; @@ -64,8 +64,7 @@ void impl_test_team_nrm2(int N, int K) { for (int i = 0; i < N; i++) expected_result[j] += AT::abs(h_a(i, j)) * AT::abs(h_a(i, j)); expected_result[j] = - Kokkos::Details::ArithTraits::sqrt( - expected_result[j]); + Kokkos::ArithTraits::sqrt(expected_result[j]); } double eps = std::is_same::value ? 2 * 1e-5 : 1e-7; diff --git a/blas/unit_test/Test_Blas1_team_scal.hpp b/blas/unit_test/Test_Blas1_team_scal.hpp index a33d5cd930..5d9f298d06 100644 --- a/blas/unit_test/Test_Blas1_team_scal.hpp +++ b/blas/unit_test/Test_Blas1_team_scal.hpp @@ -39,7 +39,7 @@ void impl_test_team_scal(int N) { typedef typename ViewTypeA::value_type ScalarA; typedef typename ViewTypeB::value_type ScalarB; - typedef Kokkos::Details::ArithTraits AT; + typedef Kokkos::ArithTraits AT; typedef Kokkos::View< ScalarA * [2], @@ -157,7 +157,7 @@ void impl_test_team_scal_mv(int N, int K) { typedef typename ViewTypeA::value_type ScalarA; typedef typename ViewTypeB::value_type ScalarB; - typedef Kokkos::Details::ArithTraits AT; + typedef Kokkos::ArithTraits AT; typedef multivector_layout_adapter vfA_type; typedef multivector_layout_adapter vfB_type; diff --git a/blas/unit_test/Test_Blas1_team_setscal.hpp b/blas/unit_test/Test_Blas1_team_setscal.hpp index fd30cc5bfb..ff593d3eeb 100644 --- a/blas/unit_test/Test_Blas1_team_setscal.hpp +++ b/blas/unit_test/Test_Blas1_team_setscal.hpp @@ -111,7 +111,7 @@ template ats; + typedef Kokkos::ArithTraits ats; /// radomized input testing views const ScalarType alpha = 11.1; diff --git a/blas/unit_test/Test_Blas3_gemm.hpp b/blas/unit_test/Test_Blas3_gemm.hpp index a210806929..adfe99f866 100644 --- a/blas/unit_test/Test_Blas3_gemm.hpp +++ b/blas/unit_test/Test_Blas3_gemm.hpp @@ -35,7 +35,7 @@ struct gemm_VanillaGEMM { typedef typename ViewTypeA::value_type ScalarA; typedef typename ViewTypeB::value_type ScalarB; typedef typename ViewTypeC::value_type ScalarC; - typedef Kokkos::Details::ArithTraits APT; + typedef Kokkos::ArithTraits APT; typedef typename APT::mag_type mag_type; ScalarA alpha; ScalarC beta; @@ -142,7 +142,7 @@ struct DiffGEMM { ViewTypeC C, C2; typedef typename ViewTypeC::value_type ScalarC; - typedef Kokkos::Details::ArithTraits APT; + typedef Kokkos::ArithTraits APT; typedef typename APT::mag_type mag_type; KOKKOS_INLINE_FUNCTION @@ -177,7 +177,7 @@ void impl_test_gemm(const char* TA, const char* TB, int M, int N, int K, typedef typename ViewTypeA::value_type ScalarA; typedef typename ViewTypeB::value_type ScalarB; typedef typename ViewTypeC::value_type ScalarC; - typedef Kokkos::Details::ArithTraits APT; + typedef Kokkos::ArithTraits APT; typedef typename APT::mag_type mag_type; double machine_eps = APT::epsilon(); @@ -265,7 +265,7 @@ void impl_test_stream_gemm(const int M, const int N, const int K, using ViewTypeB = Kokkos::View; using ViewTypeC = Kokkos::View; using ScalarC = typename ViewTypeC::value_type; - using APT = Kokkos::Details::ArithTraits; + using APT = Kokkos::ArithTraits; using mag_type = typename APT::mag_type; const char tA[] = {"N"}; diff --git a/blas/unit_test/Test_Blas3_trmm.hpp b/blas/unit_test/Test_Blas3_trmm.hpp index f52dd8dd54..188999c5e0 100644 --- a/blas/unit_test/Test_Blas3_trmm.hpp +++ b/blas/unit_test/Test_Blas3_trmm.hpp @@ -56,7 +56,7 @@ struct trmm_VanillaGEMM { typedef typename ViewTypeA::value_type ScalarA; typedef typename ViewTypeB::value_type ScalarB; typedef typename ViewTypeC::value_type ScalarC; - typedef Kokkos::Details::ArithTraits APT; + typedef Kokkos::ArithTraits APT; typedef typename APT::mag_type mag_type; ScalarA alpha; ScalarC beta; @@ -102,7 +102,7 @@ void impl_test_trmm(const char* side, const char* uplo, const char* trans, const char* diag, int M, int N, Scalar alpha) { using execution_space = typename ViewTypeA::device_type::execution_space; using ScalarA = typename ViewTypeA::value_type; - using APT = Kokkos::Details::ArithTraits; + using APT = Kokkos::ArithTraits; using mag_type = typename APT::mag_type; double machine_eps = APT::epsilon(); @@ -118,7 +118,7 @@ void impl_test_trmm(const char* side, const char* uplo, const char* trans, // printf("KokkosBlas::trmm test for alpha %g, %c %c %c %c, M %d, N %d, eps // %g, ViewType: %s\n", - // Kokkos::Details::ArithTraits::real(alpha),side[0],uplo[0],trans[0],diag[0],M,N,eps,typeid(ViewTypeA).name()); + // Kokkos::ArithTraits::real(alpha),side[0],uplo[0],trans[0],diag[0],M,N,eps,typeid(ViewTypeA).name()); typename ViewTypeA::HostMirror host_A = Kokkos::create_mirror_view(A); typename ViewTypeB::HostMirror host_B_actual = Kokkos::create_mirror_view(B); diff --git a/blas/unit_test/Test_Blas3_trsm.hpp b/blas/unit_test/Test_Blas3_trsm.hpp index 79859aa24a..5edd175652 100644 --- a/blas/unit_test/Test_Blas3_trsm.hpp +++ b/blas/unit_test/Test_Blas3_trsm.hpp @@ -56,7 +56,7 @@ struct trsm_VanillaGEMM { typedef typename ViewTypeA::value_type ScalarA; typedef typename ViewTypeB::value_type ScalarB; typedef typename ViewTypeC::value_type ScalarC; - typedef Kokkos::Details::ArithTraits APT; + typedef Kokkos::ArithTraits APT; typedef typename APT::mag_type mag_type; ScalarA alpha; ScalarC beta; @@ -104,7 +104,7 @@ void impl_test_trsm(const char* side, const char* uplo, const char* trans, typename ViewTypeA::value_type alpha) { using execution_space = typename ViewTypeA::device_type::execution_space; using ScalarA = typename ViewTypeA::value_type; - using APT = Kokkos::Details::ArithTraits; + using APT = Kokkos::ArithTraits; using mag_type = typename APT::mag_type; double machine_eps = APT::epsilon(); diff --git a/blas/unit_test/Test_Blas_gesv.hpp b/blas/unit_test/Test_Blas_gesv.hpp index 207a06db07..81c94b9109 100644 --- a/blas/unit_test/Test_Blas_gesv.hpp +++ b/blas/unit_test/Test_Blas_gesv.hpp @@ -36,7 +36,7 @@ template void impl_test_gesv(const char* mode, const char* padding, int N) { typedef typename Device::execution_space execution_space; typedef typename ViewTypeA::value_type ScalarA; - typedef Kokkos::Details::ArithTraits ats; + typedef Kokkos::ArithTraits ats; Kokkos::Random_XorShift64_Pool rand_pool(13718); @@ -141,7 +141,7 @@ void impl_test_gesv_mrhs(const char* mode, const char* padding, int N, int nrhs) { typedef typename Device::execution_space execution_space; typedef typename ViewTypeA::value_type ScalarA; - typedef Kokkos::Details::ArithTraits ats; + typedef Kokkos::ArithTraits ats; Kokkos::Random_XorShift64_Pool rand_pool(13718); diff --git a/blas/unit_test/Test_Blas_trtri.hpp b/blas/unit_test/Test_Blas_trtri.hpp index 518b96495f..0bebb9edf0 100644 --- a/blas/unit_test/Test_Blas_trtri.hpp +++ b/blas/unit_test/Test_Blas_trtri.hpp @@ -55,7 +55,7 @@ struct VanillaGEMM { typedef typename ViewTypeA::value_type ScalarA; typedef typename ViewTypeB::value_type ScalarB; typedef typename ViewTypeC::value_type ScalarC; - typedef Kokkos::Details::ArithTraits APT; + typedef Kokkos::ArithTraits APT; typedef typename APT::mag_type mag_type; ScalarA alpha; ScalarC beta; @@ -101,7 +101,7 @@ int impl_test_trtri(int bad_diag_idx, const char* uplo, const char* diag, const int M, const int N) { using execution_space = typename ViewTypeA::device_type::execution_space; using ScalarA = typename ViewTypeA::value_type; - using APT = Kokkos::Details::ArithTraits; + using APT = Kokkos::ArithTraits; using mag_type = typename APT::mag_type; double machine_eps = APT::epsilon(); diff --git a/common/src/KokkosKernels_SimpleUtils.hpp b/common/src/KokkosKernels_SimpleUtils.hpp index baefbe8c35..27a9d4ebe8 100644 --- a/common/src/KokkosKernels_SimpleUtils.hpp +++ b/common/src/KokkosKernels_SimpleUtils.hpp @@ -22,7 +22,7 @@ #define KOKKOSKERNELS_MACRO_MIN(x, y) ((x) < (y) ? (x) : (y)) #define KOKKOSKERNELS_MACRO_MAX(x, y) ((x) < (y) ? (y) : (x)) #define KOKKOSKERNELS_MACRO_ABS(x) \ - Kokkos::Details::ArithTraits::type>::abs(x) + Kokkos::ArithTraits::type>::abs(x) namespace KokkosKernels { @@ -38,7 +38,7 @@ class SquareRootFunctor { KOKKOS_INLINE_FUNCTION void operator()(const size_type i) const { typedef typename ViewType::value_type value_type; - theView_(i) = Kokkos::Details::ArithTraits::sqrt(theView_(i)); + theView_(i) = Kokkos::ArithTraits::sqrt(theView_(i)); } private: @@ -219,7 +219,7 @@ inline void kk_reduce_view2(size_t num_elements, view_t arr, } template ::mag_type> struct IsIdenticalFunctor { view_type1 view1; @@ -232,7 +232,7 @@ struct IsIdenticalFunctor { KOKKOS_INLINE_FUNCTION void operator()(const size_t &i, size_t &is_equal) const { typedef typename view_type2::non_const_value_type val_type; - typedef Kokkos::Details::ArithTraits KAT; + typedef Kokkos::ArithTraits KAT; typedef typename KAT::mag_type mag_type; const mag_type val_diff = KAT::abs(view1(i) - view2(i)); @@ -266,7 +266,7 @@ bool kk_is_identical_view(view_type1 view1, view_type2 view2, eps_type eps) { } template ::mag_type> struct IsRelativelyIdenticalFunctor { view_type1 view1; diff --git a/common/src/KokkosKernels_Utils.hpp b/common/src/KokkosKernels_Utils.hpp index fd04bd2529..2a4b749f92 100644 --- a/common/src/KokkosKernels_Utils.hpp +++ b/common/src/KokkosKernels_Utils.hpp @@ -837,7 +837,7 @@ template void zero_vector(typename value_array_type::value_type /* num_elements */, value_array_type &vector) { typedef typename value_array_type::non_const_value_type val_type; - Kokkos::deep_copy(vector, Kokkos::Details::ArithTraits::zero()); + Kokkos::deep_copy(vector, Kokkos::ArithTraits::zero()); } template diff --git a/common/src/Kokkos_ArithTraits.hpp b/common/src/Kokkos_ArithTraits.hpp index 98ac27f1c9..31744f7a8f 100644 --- a/common/src/Kokkos_ArithTraits.hpp +++ b/common/src/Kokkos_ArithTraits.hpp @@ -18,7 +18,7 @@ #define KOKKOS_ARITHTRAITS_HPP /// \file Kokkos_ArithTraits.hpp -/// \brief Declaration and definition of Kokkos::Details::ArithTraits +/// \brief Declaration and definition of Kokkos::ArithTraits #include #include @@ -195,7 +195,6 @@ KOKKOS_FORCEINLINE_FUNCTION IntType intPowUnsigned(const IntType x, } // namespace namespace Kokkos { -namespace Details { // Macro to automate the wrapping of Kokkos Mathematical Functions // in the ArithTraits struct for real floating point types, hopefully @@ -2043,13 +2042,12 @@ struct [[deprecated]] ArithTraits { }; #endif // HAVE_KOKKOS_QD -} // namespace Details +namespace Details { +template +using ArithTraits [[deprecated("Use Kokkos::ArithTraits instead")]] = + ::Kokkos::ArithTraits; -// Promote ArithTraits into Kokkos namespace. At some point, we -// will remove it from the Details namespace completely. We leave -// it there for now, because a lot of code depends on it being -// there. -using Details::ArithTraits; +} // namespace Details } // namespace Kokkos #endif // KOKKOS_ARITHTRAITS_HPP diff --git a/common/src/Kokkos_InnerProductSpaceTraits.hpp b/common/src/Kokkos_InnerProductSpaceTraits.hpp index 072125115c..c2bc475c45 100644 --- a/common/src/Kokkos_InnerProductSpaceTraits.hpp +++ b/common/src/Kokkos_InnerProductSpaceTraits.hpp @@ -105,7 +105,7 @@ namespace Details { /// /// \section Kokkos_IPST_new Adding a specialization for a new type T /// -/// You must first add a specialization of ArithTraits. Please +/// You must first add a specialization of Kokkos::ArithTraits. Please /// note that if CUDA does not support using T in device functions, /// then you must not mark norm() or dot() as device functions /// in your specialization. (Simply omit the KOKKOS_FORCEINLINE_FUNCTION @@ -119,14 +119,14 @@ class InnerProductSpaceTraits { typedef T val_type; //! The type returned by norm(x) for a value x of type val_type. - typedef typename ArithTraits::mag_type mag_type; + typedef typename Kokkos::ArithTraits::mag_type mag_type; //! The type returned by dot(x,y) for values x and y of type val_type. typedef val_type dot_type; //! The "norm" (absolute value or magnitude) of a value x of type val_type. static KOKKOS_FORCEINLINE_FUNCTION mag_type norm(const val_type& x) { - return ArithTraits::abs(x); + return Kokkos::ArithTraits::abs(x); } /// \brief The "dot product" of two values x and y of type val_type. /// @@ -146,11 +146,11 @@ class InnerProductSpaceTraits { template <> struct InnerProductSpaceTraits { typedef long double val_type; - typedef ArithTraits::mag_type mag_type; + typedef Kokkos::ArithTraits::mag_type mag_type; typedef val_type dot_type; static mag_type norm(const val_type& x) { - return ArithTraits::abs(x); + return Kokkos::ArithTraits::abs(x); } static dot_type dot(const val_type& x, const val_type& y) { return x * y; } }; @@ -160,11 +160,11 @@ template class InnerProductSpaceTraits> { public: typedef Kokkos::complex val_type; - typedef typename ArithTraits::mag_type mag_type; + typedef typename Kokkos::ArithTraits::mag_type mag_type; typedef val_type dot_type; static KOKKOS_FORCEINLINE_FUNCTION mag_type norm(const val_type& x) { - return ArithTraits::abs(x); + return Kokkos::ArithTraits::abs(x); } static KOKKOS_FORCEINLINE_FUNCTION dot_type dot(const val_type& x, const val_type& y) { @@ -179,11 +179,11 @@ class InnerProductSpaceTraits> { template struct InnerProductSpaceTraits> { typedef std::complex val_type; - typedef typename ArithTraits::mag_type mag_type; + typedef typename Kokkos::ArithTraits::mag_type mag_type; typedef val_type dot_type; static mag_type norm(const val_type& x) { - return ArithTraits::abs(x); + return Kokkos::ArithTraits::abs(x); } static dot_type dot(const val_type& x, const val_type& y) { return std::conj(x) * y; @@ -200,11 +200,11 @@ struct InnerProductSpaceTraits> { template <> struct InnerProductSpaceTraits<__float128> { typedef __float128 val_type; - typedef typename ArithTraits::mag_type mag_type; + typedef typename Kokkos::ArithTraits::mag_type mag_type; typedef val_type dot_type; static mag_type norm(const val_type& x) { - return ArithTraits::abs(x); + return Kokkos::ArithTraits::abs(x); } static dot_type dot(const val_type& x, const val_type& y) { return x * y; } }; @@ -223,17 +223,17 @@ struct InnerProductSpaceTraits<__float128> { // functions. It should be possible to use Kokkos' support for // aggregate types to implement device function support for dd_real // and qd_real, but we have not done this yet (as of 07 Jan 2014). -// Hence, the class methods of the ArithTraits specializations for +// Hence, the class methods of the Kokkos::ArithTraits specializations for // dd_real and qd_real are not marked as device functions. #ifdef HAVE_KOKKOS_QD template <> struct InnerProductSpaceTraits { typedef dd_real val_type; - typedef ArithTraits::mag_type mag_type; + typedef Kokkos::ArithTraits::mag_type mag_type; typedef val_type dot_type; static mag_type norm(const val_type& x) { - return ArithTraits::abs(x); + return Kokkos::ArithTraits::abs(x); } static dot_type dot(const val_type& x, const val_type& y) { return x * y; } }; @@ -241,11 +241,11 @@ struct InnerProductSpaceTraits { template <> struct InnerProductSpaceTraits { typedef qd_real val_type; - typedef ArithTraits::mag_type mag_type; + typedef Kokkos::ArithTraits::mag_type mag_type; typedef val_type dot_type; static mag_type norm(const val_type& x) { - return ArithTraits::abs(x); + return Kokkos::ArithTraits::abs(x); } static dot_type dot(const val_type& x, const val_type& y) { return x * y; } }; diff --git a/common/unit_test/Test_Common_ArithTraits.hpp b/common/unit_test/Test_Common_ArithTraits.hpp index 29d0498055..8aa963b2ab 100644 --- a/common/unit_test/Test_Common_ArithTraits.hpp +++ b/common/unit_test/Test_Common_ArithTraits.hpp @@ -15,15 +15,15 @@ //@HEADER /// \file ArithTraitsTest.hpp -/// \brief Templated test for Kokkos::Details::ArithTraits +/// \brief Templated test for Kokkos::ArithTraits /// /// This header file is an implementation detail of the tests for -/// Kokkos::Details::ArithTraits. Users must not rely on it existing, +/// Kokkos::ArithTraits. Users must not rely on it existing, /// or on its contents. This header file should not be /// installed with Kokkos' other header files. /// /// On the other hand, this header file does give examples of how to -/// use Kokkos::Details::ArithTraits, so it may be useful for users to +/// use Kokkos::ArithTraits, so it may be useful for users to /// read it. #ifndef KOKKOS_ARITHTRAITSTEST_HPP @@ -51,7 +51,7 @@ #endif namespace { -// Whether Kokkos::Details::ArithTraits implements +// Whether Kokkos::ArithTraits implements // transcendental functions. These include sqrt, pow, log, and // log10. template @@ -92,8 +92,8 @@ struct HasTranscendentals { } // namespace /// \class ArithTraitsTesterBase -/// \brief Base class providing tests for Kokkos::Details::ArithTraits -/// \tparam ScalarType Any type for which Kokkos::Details::ArithTraits +/// \brief Base class providing tests for Kokkos::ArithTraits +/// \tparam ScalarType Any type for which Kokkos::ArithTraits /// has a specialization, and which can be executed on the parallel /// device. /// \tparam DeviceType A Kokkos parallel device type. @@ -107,8 +107,8 @@ struct HasTranscendentals { /// types. /// /// This class provides a Kokkos reduction operator for testing -/// Kokkos::Details::ArithTraits. This test works for any type -/// ScalarType for which Kokkos::Details::ArithTraits has a +/// Kokkos::ArithTraits. This test works for any type +/// ScalarType for which Kokkos::ArithTraits has a /// specialization, and which can be executed on the parallel device. /// /// The tests include those suitable for execution on the parallel @@ -162,7 +162,7 @@ class ArithTraitsTesterBase { KOKKOS_INLINE_FUNCTION void operator()(size_type iwork, value_type& dst) const { TRACE(); - typedef Kokkos::Details::ArithTraits AT; + typedef Kokkos::ArithTraits AT; (void)iwork; // not using this argument int success = 1; @@ -273,7 +273,7 @@ class ArithTraitsTesterBase { /// /// \return \c 1 if all the tests pass, else \c 0. int testHost(std::ostream& out) const { - typedef Kokkos::Details::ArithTraits AT; + typedef Kokkos::ArithTraits AT; using std::endl; int success = 1; @@ -378,7 +378,7 @@ class ArithTraitsTesterBase { /// \brief Base class of ArithTraitsTester that exercises /// transcendental functions, if and only if ArithTraits /// implements them. -/// \tparam ScalarType Any type for which Kokkos::Details::ArithTraits +/// \tparam ScalarType Any type for which Kokkos::ArithTraits /// implements transcendental functions, along with the requirements /// imposed by ArithTraitsTesterBase. /// \tparam DeviceType A Kokkos parallel device type. @@ -441,7 +441,7 @@ class ArithTraitsTesterTranscendentalBase KOKKOS_INLINE_FUNCTION void operator()(size_type iwork, value_type& dst) const { TRACE(); - // typedef Kokkos::Details::ArithTraits AT; + // typedef Kokkos::ArithTraits AT; (void)iwork; // forestall compiler warning for unused variable int success = 1; @@ -462,7 +462,7 @@ class ArithTraitsTesterTranscendentalBase protected: virtual int testHostImpl(std::ostream& out) const { using std::endl; - // typedef Kokkos::Details::ArithTraits AT; + // typedef Kokkos::ArithTraits AT; int success = 1; if (HasTranscendentals::value) { @@ -495,20 +495,16 @@ class ArithTraitsTesterTranscendentalBase KOKKOS_INLINE_FUNCTION bool equal(const ScalarType& a, const ScalarType& b) const { - if (b != Kokkos::Details::ArithTraits::zero()) { + if (b != Kokkos::ArithTraits::zero()) { if (a > b) - return (a - b) / b < - 2 * Kokkos::Details::ArithTraits::epsilon(); + return (a - b) / b < 2 * Kokkos::ArithTraits::epsilon(); else - return (b - a) / b < - 2 * Kokkos::Details::ArithTraits::epsilon(); + return (b - a) / b < 2 * Kokkos::ArithTraits::epsilon(); } else { if (a > b) - return (a - b) < - 2 * Kokkos::Details::ArithTraits::epsilon(); + return (a - b) < 2 * Kokkos::ArithTraits::epsilon(); else - return (b - a) < - 2 * Kokkos::Details::ArithTraits::epsilon(); + return (b - a) < 2 * Kokkos::ArithTraits::epsilon(); } } @@ -524,7 +520,7 @@ class ArithTraitsTesterTranscendentalBase KOKKOS_INLINE_FUNCTION void operator()(size_type iwork, value_type& dst) const { TRACE(); - typedef Kokkos::Details::ArithTraits AT; + typedef Kokkos::ArithTraits AT; (void)iwork; // forestall compiler warning for unused variable int success = 1; @@ -733,7 +729,7 @@ class ArithTraitsTesterTranscendentalBase protected: virtual int testHostImpl(std::ostream& out) const { using std::endl; - typedef Kokkos::Details::ArithTraits AT; + typedef Kokkos::ArithTraits AT; int success = 1; if (!HasTranscendentals::value) { @@ -946,7 +942,7 @@ class ArithTraitsTesterTranscendentalBase }; /// \class ArithTraitsTesterComplexBase -/// \brief Execute Kokkos::Details::ArithTraits tests relevant to +/// \brief Execute Kokkos::ArithTraits tests relevant to /// complex numbers (whether or not \c ScalarType is itself a /// complex-valued type). /// @@ -958,8 +954,7 @@ class ArithTraitsTesterTranscendentalBase /// complex, but the specific tests that are run will depend on /// ScalarType. template ::is_complex> + const int is_complex = Kokkos::ArithTraits::is_complex> class ArithTraitsTesterComplexBase : public ArithTraitsTesterTranscendentalBase { private: @@ -1009,7 +1004,7 @@ class ArithTraitsTesterComplexBase KOKKOS_INLINE_FUNCTION void operator()(size_type iwork, value_type& dst) const { TRACE(); - typedef Kokkos::Details::ArithTraits AT; + typedef Kokkos::ArithTraits AT; (void)iwork; // forestall compiler warning for unused variable int success = 1; @@ -1048,7 +1043,7 @@ class ArithTraitsTesterComplexBase protected: virtual int testHostImpl(std::ostream& out) const { using std::endl; - typedef Kokkos::Details::ArithTraits AT; + typedef Kokkos::ArithTraits AT; int success = 1; // Apparently, std::numeric_limits::is_signed is 1 only for real @@ -1095,7 +1090,7 @@ class ArithTraitsTesterComplexBase KOKKOS_INLINE_FUNCTION void operator()(size_type iwork, value_type& dst) const { TRACE(); - typedef Kokkos::Details::ArithTraits AT; + typedef Kokkos::ArithTraits AT; (void)iwork; // forestall compiler warning for unused variable int success = 1; @@ -1103,7 +1098,7 @@ class ArithTraitsTesterComplexBase FAILURE(); } typedef typename AT::mag_type mag_type; - const mag_type one = Kokkos::Details::ArithTraits::one(); + const mag_type one = Kokkos::ArithTraits::one(); // This presumes that ScalarType, being a complex number, has a // constructor which takes two mag_type arguments. @@ -1129,7 +1124,7 @@ class ArithTraitsTesterComplexBase protected: virtual int testHostImpl(std::ostream& out) const { using std::endl; - typedef Kokkos::Details::ArithTraits AT; + typedef Kokkos::ArithTraits AT; int success = 1; if (!AT::is_complex) { @@ -1137,7 +1132,7 @@ class ArithTraitsTesterComplexBase FAILURE(); } typedef typename AT::mag_type mag_type; - const mag_type one = Kokkos::Details::ArithTraits::one(); + const mag_type one = Kokkos::ArithTraits::one(); // This presumes that ScalarType, being a complex number, has a // constructor which takes two mag_type arguments. @@ -1173,7 +1168,7 @@ class ArithTraitsTesterComplexBase /// \tparam DeviceType A Kokkos parallel device type. /// /// Kokkos reduction operator for testing those attributes of -/// Kokkos::Details::ArithTraits relevant to floating-point types. +/// Kokkos::ArithTraits relevant to floating-point types. /// /// The tests include those suitable for execution on the parallel /// device (operator()) and those suitable for execution on the host @@ -1181,17 +1176,14 @@ class ArithTraitsTesterComplexBase /// executions of the test. All redundant executions must return /// '1' (passed). template ::is_exact> + const int is_exact = Kokkos::ArithTraits::is_exact> class ArithTraitsTesterFloatingPointBase : public ArithTraitsTesterComplexBase< - ScalarType, DeviceType, - Kokkos::Details::ArithTraits::is_complex> { + ScalarType, DeviceType, Kokkos::ArithTraits::is_complex> { private: //! The base class of this class. typedef ArithTraitsTesterComplexBase< - ScalarType, DeviceType, - Kokkos::Details::ArithTraits::is_complex> + ScalarType, DeviceType, Kokkos::ArithTraits::is_complex> base_type; public: @@ -1217,13 +1209,11 @@ class ArithTraitsTesterFloatingPointBase template class ArithTraitsTesterFloatingPointBase : public ArithTraitsTesterComplexBase< - ScalarType, DeviceType, - Kokkos::Details::ArithTraits::is_complex> { + ScalarType, DeviceType, Kokkos::ArithTraits::is_complex> { private: //! The base class of this class. typedef ArithTraitsTesterComplexBase< - ScalarType, DeviceType, - Kokkos::Details::ArithTraits::is_complex> + ScalarType, DeviceType, Kokkos::ArithTraits::is_complex> base_type; public: @@ -1238,7 +1228,7 @@ class ArithTraitsTesterFloatingPointBase KOKKOS_INLINE_FUNCTION void operator()(size_type iwork, value_type& dst) const { TRACE(); - typedef Kokkos::Details::ArithTraits AT; + typedef Kokkos::ArithTraits AT; (void)iwork; // forestall compiler warning for unused variable int success = 1; @@ -1284,7 +1274,7 @@ class ArithTraitsTesterFloatingPointBase protected: virtual int testHostImpl(std::ostream& out) const { - typedef Kokkos::Details::ArithTraits AT; + typedef Kokkos::ArithTraits AT; using std::endl; int success = 1; @@ -1338,13 +1328,11 @@ class ArithTraitsTesterFloatingPointBase template class ArithTraitsTesterFloatingPointBase : public ArithTraitsTesterComplexBase< - ScalarType, DeviceType, - Kokkos::Details::ArithTraits::is_complex> { + ScalarType, DeviceType, Kokkos::ArithTraits::is_complex> { private: //! The base class of this class. typedef ArithTraitsTesterComplexBase< - ScalarType, DeviceType, - Kokkos::Details::ArithTraits::is_complex> + ScalarType, DeviceType, Kokkos::ArithTraits::is_complex> base_type; public: @@ -1359,7 +1347,7 @@ class ArithTraitsTesterFloatingPointBase KOKKOS_INLINE_FUNCTION void operator()(size_type iwork, value_type& dst) const { TRACE(); - typedef Kokkos::Details::ArithTraits AT; + typedef Kokkos::ArithTraits AT; (void)iwork; // forestall compiler warning for unused variable int success = 1; @@ -1380,7 +1368,7 @@ class ArithTraitsTesterFloatingPointBase protected: virtual int testHostImpl(std::ostream& out) const { - typedef Kokkos::Details::ArithTraits AT; + typedef Kokkos::ArithTraits AT; using std::endl; int success = 1; @@ -1399,8 +1387,8 @@ class ArithTraitsTesterFloatingPointBase }; /// \class ArithTraitsTester -/// \brief Tests for Kokkos::Details::ArithTraits -/// \tparam ScalarType Any type for which Kokkos::Details::ArithTraits +/// \brief Tests for Kokkos::ArithTraits +/// \tparam ScalarType Any type for which Kokkos::ArithTraits /// has a specialization, and which can be executed on the parallel /// device. /// \tparam DeviceType A Kokkos parallel device type. @@ -1415,9 +1403,9 @@ class ArithTraitsTesterFloatingPointBase /// for host functions do use run-time polymorphism. /// /// This class (through its base class) provides a Kokkos reduction -/// operator for testing Kokkos::Details::ArithTraits. This test +/// operator for testing Kokkos::ArithTraits. This test /// works for any type ScalarType for which -/// Kokkos::Details::ArithTraits has a specialization, and which can +/// Kokkos::ArithTraits has a specialization, and which can /// be executed on the parallel device. /// /// The tests include those suitable for execution on the parallel @@ -1438,8 +1426,8 @@ class ArithTraitsTester KOKKOS_INLINE_FUNCTION ArithTraitsTester() {} }; -/// \brief Run the Kokkos::Details::ArithTraits tests on the parallel device. -/// \tparam ScalarType Any type for which Kokkos::Details::ArithTraits +/// \brief Run the Kokkos::ArithTraits tests on the parallel device. +/// \tparam ScalarType Any type for which Kokkos::ArithTraits /// has a specialization, and which can be executed on the parallel /// device. /// \tparam DeviceType A Kokkos parallel device type. @@ -1457,17 +1445,15 @@ int testArithTraitsOnDevice(std::ostream& out, const int verbose) { functor_type(), success); if (success) { if (verbose) - out << Kokkos::Details::ArithTraits::name() << " passed" - << endl; + out << Kokkos::ArithTraits::name() << " passed" << endl; } else { - out << Kokkos::Details::ArithTraits::name() << " FAILED" - << endl; + out << Kokkos::ArithTraits::name() << " FAILED" << endl; } return success; } -/// \brief Run the Kokkos::Details::ArithTraits tests on the host. -/// \tparam ScalarType Any type for which Kokkos::Details::ArithTraits +/// \brief Run the Kokkos::ArithTraits tests on the host. +/// \tparam ScalarType Any type for which Kokkos::ArithTraits /// has a specialization. /// \tparam DeviceType A Kokkos parallel device type. /// @@ -1482,16 +1468,14 @@ int testArithTraitsOnHost(std::ostream& out, const int verbose) { if (localSuccess) { if (verbose) - out << Kokkos::Details::ArithTraits::name() << " passed" - << endl; + out << Kokkos::ArithTraits::name() << " passed" << endl; } else { - out << Kokkos::Details::ArithTraits::name() << " FAILED" - << endl; + out << Kokkos::ArithTraits::name() << " FAILED" << endl; } return localSuccess; } -/// \brief Run the Kokkos::Details::ArithTraits tests for all (valid) +/// \brief Run the Kokkos::ArithTraits tests for all (valid) /// scalar types, on the given parallel device. /// \tparam DeviceType A Kokkos parallel device type. /// @@ -1586,7 +1570,7 @@ int runAllArithTraitsDeviceTests(std::ostream& out, const int verbose) { return success && curSuccess; } -/// \brief Run the Kokkos::Details::ArithTraits tests for all scalar +/// \brief Run the Kokkos::ArithTraits tests for all scalar /// types, on the host. /// \tparam DeviceType A Kokkos parallel device type. /// diff --git a/example/batched_solve/team_GMRES.cpp b/example/batched_solve/team_GMRES.cpp index 057902b6f2..b543ddaad6 100644 --- a/example/batched_solve/team_GMRES.cpp +++ b/example/batched_solve/team_GMRES.cpp @@ -236,8 +236,7 @@ int main(int /*argc*/, char ** /*argv*/) { using Layout = typename AMatrixValueView::array_layout; using EXSP = typename AMatrixValueView::execution_space; - using MagnitudeType = - typename Kokkos::Details::ArithTraits::mag_type; + using MagnitudeType = typename Kokkos::ArithTraits::mag_type; using Norm2DViewType = Kokkos::View; using Scalar3DViewType = Kokkos::View; diff --git a/perf_test/batched/dense/KokkosBatched_Test_BlockTridiagDirect.cpp b/perf_test/batched/dense/KokkosBatched_Test_BlockTridiagDirect.cpp index 5d6bf72450..314439b6c0 100644 --- a/perf_test/batched/dense/KokkosBatched_Test_BlockTridiagDirect.cpp +++ b/perf_test/batched/dense/KokkosBatched_Test_BlockTridiagDirect.cpp @@ -245,7 +245,7 @@ int main(int argc, char *argv[]) { #endif Kokkos::print_configuration(std::cout); - // typedef Kokkos::Details::ArithTraits ats; + // typedef Kokkos::ArithTraits ats; Kokkos::Timer timer; /// diff --git a/perf_test/batched/dense/KokkosBatched_Test_BlockTridiagJacobi.cpp b/perf_test/batched/dense/KokkosBatched_Test_BlockTridiagJacobi.cpp index 950674e39e..3f15ca0b2d 100644 --- a/perf_test/batched/dense/KokkosBatched_Test_BlockTridiagJacobi.cpp +++ b/perf_test/batched/dense/KokkosBatched_Test_BlockTridiagJacobi.cpp @@ -178,7 +178,7 @@ int main(int argc, char *argv[]) { #endif Kokkos::print_configuration(std::cout); - // typedef Kokkos::Details::ArithTraits ats; + // typedef Kokkos::ArithTraits ats; Kokkos::Timer timer; /// diff --git a/perf_test/batched/sparse/CG/KokkosBatched_Test_CG.cpp b/perf_test/batched/sparse/CG/KokkosBatched_Test_CG.cpp index 40c0ad8f3d..5bf6061fe4 100644 --- a/perf_test/batched/sparse/CG/KokkosBatched_Test_CG.cpp +++ b/perf_test/batched/sparse/CG/KokkosBatched_Test_CG.cpp @@ -46,7 +46,7 @@ int main(int argc, char *argv[]) { #endif Kokkos::print_configuration(std::cout); - // typedef Kokkos::Details::ArithTraits ats; + // typedef Kokkos::ArithTraits ats; Kokkos::Timer timer; /// @@ -220,8 +220,7 @@ int main(int argc, char *argv[]) { using Layout = typename AMatrixValueViewLL::array_layout; using EXSP = typename AMatrixValueViewLL::execution_space; - using MagnitudeType = - typename Kokkos::Details::ArithTraits::mag_type; + using MagnitudeType = typename Kokkos::ArithTraits::mag_type; using Norm2DViewType = Kokkos::View; using Scalar3DViewType = Kokkos::View; diff --git a/perf_test/batched/sparse/GMRES/KokkosBatched_Test_GMRES.cpp b/perf_test/batched/sparse/GMRES/KokkosBatched_Test_GMRES.cpp index 6c6e88b8e0..c0ce8f0bd4 100644 --- a/perf_test/batched/sparse/GMRES/KokkosBatched_Test_GMRES.cpp +++ b/perf_test/batched/sparse/GMRES/KokkosBatched_Test_GMRES.cpp @@ -50,7 +50,7 @@ int main(int argc, char *argv[]) { #endif Kokkos::print_configuration(std::cout); - // typedef Kokkos::Details::ArithTraits ats; + // typedef Kokkos::ArithTraits ats; /// /// input arguments parsing @@ -250,8 +250,7 @@ int main(int argc, char *argv[]) { using Layout = typename AMatrixValueViewLL::array_layout; using EXSP = typename AMatrixValueViewLL::execution_space; - using MagnitudeType = - typename Kokkos::Details::ArithTraits::mag_type; + using MagnitudeType = typename Kokkos::ArithTraits::mag_type; using Norm2DViewType = Kokkos::View; using Scalar3DViewType = Kokkos::View; diff --git a/perf_test/batched/sparse/SPMV/KokkosBatched_SPMV_View.hpp b/perf_test/batched/sparse/SPMV/KokkosBatched_SPMV_View.hpp index 35efd40a16..17b8ad6d3e 100644 --- a/perf_test/batched/sparse/SPMV/KokkosBatched_SPMV_View.hpp +++ b/perf_test/batched/sparse/SPMV/KokkosBatched_SPMV_View.hpp @@ -23,7 +23,7 @@ struct BSPMV_Functor_View { typedef typename Kokkos::TeamPolicy team_policy; typedef typename team_policy::member_type team_member; typedef typename AMatrix::non_const_value_type entries_type; - typedef Kokkos::Details::ArithTraits ATV; + typedef Kokkos::ArithTraits ATV; const value_type* alpha; const AMatrix m_A_values; diff --git a/perf_test/batched/sparse/SPMV/KokkosBatched_Test_SPMV.cpp b/perf_test/batched/sparse/SPMV/KokkosBatched_Test_SPMV.cpp index 81d828c51d..06ea55e303 100644 --- a/perf_test/batched/sparse/SPMV/KokkosBatched_Test_SPMV.cpp +++ b/perf_test/batched/sparse/SPMV/KokkosBatched_Test_SPMV.cpp @@ -126,7 +126,7 @@ int main(int argc, char *argv[]) { #endif Kokkos::print_configuration(std::cout); - // typedef Kokkos::Details::ArithTraits ats; + // typedef Kokkos::ArithTraits ats; Kokkos::Timer timer; /// diff --git a/perf_test/batched/sparse/cusolver/KokkosBatched_Test_cusolverDn.cpp b/perf_test/batched/sparse/cusolver/KokkosBatched_Test_cusolverDn.cpp index 546cc84cab..2294c23805 100644 --- a/perf_test/batched/sparse/cusolver/KokkosBatched_Test_cusolverDn.cpp +++ b/perf_test/batched/sparse/cusolver/KokkosBatched_Test_cusolverDn.cpp @@ -163,7 +163,7 @@ int main(int argc, char *argv[]) { #endif Kokkos::print_configuration(std::cout); - // typedef Kokkos::Details::ArithTraits ats; + // typedef Kokkos::ArithTraits ats; /// /// input arguments parsing diff --git a/perf_test/batched/sparse/cusolver/KokkosBatched_Test_cusolverSp.cpp b/perf_test/batched/sparse/cusolver/KokkosBatched_Test_cusolverSp.cpp index d1a21b3053..808e235edc 100644 --- a/perf_test/batched/sparse/cusolver/KokkosBatched_Test_cusolverSp.cpp +++ b/perf_test/batched/sparse/cusolver/KokkosBatched_Test_cusolverSp.cpp @@ -381,7 +381,7 @@ int main(int argc, char *argv[]) { #endif Kokkos::print_configuration(std::cout); - // typedef Kokkos::Details::ArithTraits ats; + // typedef Kokkos::ArithTraits ats; /// /// input arguments parsing diff --git a/perf_test/sparse/KokkosSparse_sptrsv_aux.hpp b/perf_test/sparse/KokkosSparse_sptrsv_aux.hpp index c4deec656f..65120a8827 100644 --- a/perf_test/sparse/KokkosSparse_sptrsv_aux.hpp +++ b/perf_test/sparse/KokkosSparse_sptrsv_aux.hpp @@ -66,7 +66,7 @@ bool check_errors(mag_t tol, crsmat_t &Mtx, scalar_view_t rhs, using lno_t = typename entries_view_t::non_const_value_type; using values_view_t = typename crsmat_t::values_type::non_const_type; using scalar_t = typename values_view_t::value_type; - using STS = Kokkos::Details::ArithTraits; + using STS = Kokkos::ArithTraits; using execution_space = typename scalar_view_t::execution_space; diff --git a/perf_test/sparse/KokkosSparse_sptrsv_cholmod.cpp b/perf_test/sparse/KokkosSparse_sptrsv_cholmod.cpp index 87afbba79a..5de4e6be00 100644 --- a/perf_test/sparse/KokkosSparse_sptrsv_cholmod.cpp +++ b/perf_test/sparse/KokkosSparse_sptrsv_cholmod.cpp @@ -153,7 +153,7 @@ template int test_sptrsv_perf(std::vector tests, std::string &filename, bool u_in_csr, bool invert_diag, bool invert_offdiag, int block_size, int loop) { - using STS = Kokkos::Details::ArithTraits; + using STS = Kokkos::ArithTraits; using mag_type = typename STS::mag_type; // using cholmod_int_type = long; diff --git a/perf_test/sparse/KokkosSparse_sptrsv_superlu.cpp b/perf_test/sparse/KokkosSparse_sptrsv_superlu.cpp index cc9d698554..659874a32c 100644 --- a/perf_test/sparse/KokkosSparse_sptrsv_superlu.cpp +++ b/perf_test/sparse/KokkosSparse_sptrsv_superlu.cpp @@ -308,7 +308,7 @@ int test_sptrsv_perf(std::vector tests, bool verbose, int relax_size, int block_size, int loop) { using ordinal_type = int; using size_type = int; - using STS = Kokkos::Details::ArithTraits; + using STS = Kokkos::ArithTraits; using mag_type = typename STS::mag_type; // Default spaces diff --git a/perf_test/sparse/KokkosSparse_sptrsv_supernode.cpp b/perf_test/sparse/KokkosSparse_sptrsv_supernode.cpp index 7ddd6957a9..7301d5e741 100644 --- a/perf_test/sparse/KokkosSparse_sptrsv_supernode.cpp +++ b/perf_test/sparse/KokkosSparse_sptrsv_supernode.cpp @@ -52,7 +52,7 @@ int test_sptrsv_perf(std::vector tests, bool verbose, bool invert_offdiag, bool u_in_csr, int loop) { using ordinal_type = int; using size_type = int; - using STS = Kokkos::Details::ArithTraits; + using STS = Kokkos::ArithTraits; using mag_type = typename STS::mag_type; // Default spaces diff --git a/perf_test/sparse/spmv/Kokkos_SPMV.hpp b/perf_test/sparse/spmv/Kokkos_SPMV.hpp index a79e49b764..6668511c4a 100644 --- a/perf_test/sparse/spmv/Kokkos_SPMV.hpp +++ b/perf_test/sparse/spmv/Kokkos_SPMV.hpp @@ -25,7 +25,7 @@ struct SPMV_Functor { typedef typename AMatrix::non_const_value_type value_type; typedef typename Kokkos::TeamPolicy team_policy; typedef typename team_policy::member_type team_member; - typedef Kokkos::Details::ArithTraits ATV; + typedef Kokkos::ArithTraits ATV; const value_type alpha; AMatrix m_A; diff --git a/perf_test/sparse/spmv/Kokkos_SPMV_Inspector.hpp b/perf_test/sparse/spmv/Kokkos_SPMV_Inspector.hpp index 14ab6f8ebe..4e099e6f96 100644 --- a/perf_test/sparse/spmv/Kokkos_SPMV_Inspector.hpp +++ b/perf_test/sparse/spmv/Kokkos_SPMV_Inspector.hpp @@ -28,7 +28,7 @@ struct SPMV_Inspector_Functor { typedef typename AMatrix::non_const_size_type size_type; typedef typename Kokkos::TeamPolicy team_policy; typedef typename team_policy::member_type team_member; - typedef Kokkos::Details::ArithTraits ATV; + typedef Kokkos::ArithTraits ATV; const value_type alpha; AMatrix m_A; diff --git a/sparse/impl/KokkosSparse_cluster_gauss_seidel_impl.hpp b/sparse/impl/KokkosSparse_cluster_gauss_seidel_impl.hpp index ec6cb6f02d..501e71e3e7 100644 --- a/sparse/impl/KokkosSparse_cluster_gauss_seidel_impl.hpp +++ b/sparse/impl/KokkosSparse_cluster_gauss_seidel_impl.hpp @@ -247,16 +247,16 @@ class ClusterGaussSeidel { nnz_scalar_t _omega; - Team_PSGS( - const_lno_row_view_t xadj_, const_lno_nnz_view_t adj_, - const_scalar_nnz_view_t adj_vals_, x_value_array_type Xvector_, - y_value_array_type Yvector_, nnz_lno_t color_set_begin_, - nnz_lno_t color_set_end_, nnz_lno_persistent_work_view_t color_adj_, - nnz_lno_persistent_work_view_t cluster_offsets_, - nnz_lno_persistent_work_view_t cluster_verts_, - scalar_persistent_work_view_t inverse_diagonal_, - nnz_lno_t clusters_per_team_, - nnz_scalar_t omega_ = Kokkos::Details::ArithTraits::one()) + Team_PSGS(const_lno_row_view_t xadj_, const_lno_nnz_view_t adj_, + const_scalar_nnz_view_t adj_vals_, x_value_array_type Xvector_, + y_value_array_type Yvector_, nnz_lno_t color_set_begin_, + nnz_lno_t color_set_end_, + nnz_lno_persistent_work_view_t color_adj_, + nnz_lno_persistent_work_view_t cluster_offsets_, + nnz_lno_persistent_work_view_t cluster_verts_, + scalar_persistent_work_view_t inverse_diagonal_, + nnz_lno_t clusters_per_team_, + nnz_scalar_t omega_ = Kokkos::ArithTraits::one()) : _xadj(xadj_), _adj(adj_), _adj_vals(adj_vals_), @@ -691,7 +691,7 @@ class ClusterGaussSeidel { _diagonals(diagonals_), num_total_rows(num_total_rows_), rows_per_team(rows_per_team_), - one(Kokkos::Details::ArithTraits::one()) {} + one(Kokkos::ArithTraits::one()) {} KOKKOS_INLINE_FUNCTION void operator()(const nnz_lno_t row_id) const { @@ -781,12 +781,12 @@ class ClusterGaussSeidel { } template - void apply( - x_value_array_type x_lhs_output_vec, y_value_array_type y_rhs_input_vec, - bool init_zero_x_vector = false, int numIter = 1, - nnz_scalar_t omega = Kokkos::Details::ArithTraits::one(), - bool apply_forward = true, bool apply_backward = true, - bool /*update_y_vector*/ = true) { + void apply(x_value_array_type x_lhs_output_vec, + y_value_array_type y_rhs_input_vec, + bool init_zero_x_vector = false, int numIter = 1, + nnz_scalar_t omega = Kokkos::ArithTraits::one(), + bool apply_forward = true, bool apply_backward = true, + bool /*update_y_vector*/ = true) { auto gsHandle = get_gs_handle(); size_type nnz = entries.extent(0); diff --git a/sparse/impl/KokkosSparse_gauss_seidel_impl.hpp b/sparse/impl/KokkosSparse_gauss_seidel_impl.hpp index 75f827a84d..e4cfb4b047 100644 --- a/sparse/impl/KokkosSparse_gauss_seidel_impl.hpp +++ b/sparse/impl/KokkosSparse_gauss_seidel_impl.hpp @@ -260,21 +260,20 @@ class PointGaussSeidel { // long rows. nnz_lno_t _long_row_par; - Team_PSGS( - row_lno_persistent_work_view_t xadj_, - nnz_lno_persistent_work_view_t adj_, - scalar_persistent_work_view_t adj_vals_, - scalar_persistent_work_view2d_t Xvector_, - scalar_persistent_work_view2d_t Yvector_, nnz_lno_t color_set_begin, - nnz_lno_t color_set_end, - scalar_persistent_work_view_t permuted_inverse_diagonal_, - pool_memory_space pms, nnz_lno_t _num_max_vals_in_l1 = 0, - nnz_lno_t _num_max_vals_in_l2 = 0, - nnz_scalar_t omega_ = Kokkos::Details::ArithTraits::one(), - - nnz_lno_t block_size_ = 1, nnz_lno_t team_work_size_ = 1, - size_t shared_memory_size_ = 16, int suggested_team_size_ = 1, - int vector_size_ = 1) + Team_PSGS(row_lno_persistent_work_view_t xadj_, + nnz_lno_persistent_work_view_t adj_, + scalar_persistent_work_view_t adj_vals_, + scalar_persistent_work_view2d_t Xvector_, + scalar_persistent_work_view2d_t Yvector_, + nnz_lno_t color_set_begin, nnz_lno_t color_set_end, + scalar_persistent_work_view_t permuted_inverse_diagonal_, + pool_memory_space pms, nnz_lno_t _num_max_vals_in_l1 = 0, + nnz_lno_t _num_max_vals_in_l2 = 0, + nnz_scalar_t omega_ = Kokkos::ArithTraits::one(), + + nnz_lno_t block_size_ = 1, nnz_lno_t team_work_size_ = 1, + size_t shared_memory_size_ = 16, int suggested_team_size_ = 1, + int vector_size_ = 1) : _xadj(xadj_), _adj(adj_), _adj_vals(adj_vals_), @@ -1283,7 +1282,7 @@ class PointGaussSeidel { rows_per_team(rows_per_team_), block_size(block_size_), block_matrix_size(block_matrix_size_), - one(Kokkos::Details::ArithTraits::one()) {} + one(Kokkos::ArithTraits::one()) {} KOKKOS_INLINE_FUNCTION void operator()(const nnz_lno_t& row_id) const { @@ -1489,7 +1488,7 @@ class PointGaussSeidel { void block_apply( x_value_array_type x_lhs_output_vec, y_value_array_type y_rhs_input_vec, bool init_zero_x_vector = false, int numIter = 1, - nnz_scalar_t omega = Kokkos::Details::ArithTraits::one(), + nnz_scalar_t omega = Kokkos::ArithTraits::one(), bool apply_forward = true, bool apply_backward = true, bool update_y_vector = true) { auto gsHandle = this->get_gs_handle(); @@ -1613,7 +1612,7 @@ class PointGaussSeidel { void point_apply( x_value_array_type x_lhs_output_vec, y_value_array_type y_rhs_input_vec, bool init_zero_x_vector = false, int numIter = 1, - nnz_scalar_t omega = Kokkos::Details::ArithTraits::one(), + nnz_scalar_t omega = Kokkos::ArithTraits::one(), bool apply_forward = true, bool apply_backward = true, bool update_y_vector = true) { auto gsHandle = get_gs_handle(); @@ -1690,12 +1689,12 @@ class PointGaussSeidel { } template - void apply( - x_value_array_type x_lhs_output_vec, y_value_array_type y_rhs_input_vec, - bool init_zero_x_vector = false, int numIter = 1, - nnz_scalar_t omega = Kokkos::Details::ArithTraits::one(), - bool apply_forward = true, bool apply_backward = true, - bool update_y_vector = true) { + void apply(x_value_array_type x_lhs_output_vec, + y_value_array_type y_rhs_input_vec, + bool init_zero_x_vector = false, int numIter = 1, + nnz_scalar_t omega = Kokkos::ArithTraits::one(), + bool apply_forward = true, bool apply_backward = true, + bool update_y_vector = true) { auto gsHandle = get_gs_handle(); if (gsHandle->is_numeric_called() == false) { this->initialize_numeric(); diff --git a/sparse/impl/KokkosSparse_getDiagCopyWithOffsets_impl.hpp b/sparse/impl/KokkosSparse_getDiagCopyWithOffsets_impl.hpp index b1ec07e768..91145335f5 100644 --- a/sparse/impl/KokkosSparse_getDiagCopyWithOffsets_impl.hpp +++ b/sparse/impl/KokkosSparse_getDiagCopyWithOffsets_impl.hpp @@ -75,7 +75,7 @@ struct CrsMatrixGetDiagCopyWithOffsetsFunctor { /// \param lclRow [in] The current (local) row of the sparse matrix. KOKKOS_INLINE_FUNCTION void operator()(const LO& lclRow) const { const offset_type INV = KokkosSparse::OrdinalTraits::invalid(); - const scalar_type ZERO = Kokkos::Details::ArithTraits::zero(); + const scalar_type ZERO = Kokkos::ArithTraits::zero(); // If the row lacks a stored diagonal entry, then its value is zero. D_(lclRow) = ZERO; diff --git a/sparse/impl/KokkosSparse_sor_sequential_impl.hpp b/sparse/impl/KokkosSparse_sor_sequential_impl.hpp index fd3b88fb4b..3ca5ee08bf 100644 --- a/sparse/impl/KokkosSparse_sor_sequential_impl.hpp +++ b/sparse/impl/KokkosSparse_sor_sequential_impl.hpp @@ -77,7 +77,7 @@ void gaussSeidel(const LocalOrdinal numRows, const LocalOrdinal numCols, const OffsetType b_stride, RangeScalar* const X, const OffsetType x_stride, const MatrixScalar* const D, const MatrixScalar omega, const char direction[]) { - using Kokkos::Details::ArithTraits; + using Kokkos::ArithTraits; typedef LocalOrdinal LO; const OffsetType theNumRows = static_cast(numRows); const OffsetType theNumCols = static_cast(numCols); @@ -247,7 +247,7 @@ void reorderedGaussSeidel( const MatrixScalar* const D, const LocalOrdinal* const rowInd, const LocalOrdinal numRowInds, // length of rowInd const MatrixScalar omega, const char direction[]) { - using Kokkos::Details::ArithTraits; + using Kokkos::ArithTraits; typedef LocalOrdinal LO; const OffsetType theNumRows = static_cast(numRows); const OffsetType theNumCols = static_cast(numCols); @@ -323,7 +323,7 @@ void reorderedGaussSeidel( for (LO ii = 0; ii < numRowInds; ++ii) { LO i = rowInd[ii]; for (OffsetType c = 0; c < theNumCols; ++c) { - x_temp[c] = Kokkos::Details::ArithTraits::zero(); + x_temp[c] = Kokkos::ArithTraits::zero(); } for (OffsetType k = ptr[i]; k < ptr[i + 1]; ++k) { const LO j = ind[k]; @@ -344,7 +344,7 @@ void reorderedGaussSeidel( for (LO ii = numRowInds - 1; ii != 0; --ii) { LO i = rowInd[ii]; for (OffsetType c = 0; c < theNumCols; ++c) { - x_temp[c] = Kokkos::Details::ArithTraits::zero(); + x_temp[c] = Kokkos::ArithTraits::zero(); } for (OffsetType k = ptr[i]; k < ptr[i + 1]; ++k) { const LO j = ind[k]; @@ -362,7 +362,7 @@ void reorderedGaussSeidel( const LO ii = 0; LO i = rowInd[ii]; for (OffsetType c = 0; c < theNumCols; ++c) { - x_temp[c] = Kokkos::Details::ArithTraits::zero(); + x_temp[c] = Kokkos::ArithTraits::zero(); } for (OffsetType k = ptr[i]; k < ptr[i + 1]; ++k) { const LO j = ind[k]; diff --git a/sparse/impl/KokkosSparse_spmv_bsrmatrix_impl.hpp b/sparse/impl/KokkosSparse_spmv_bsrmatrix_impl.hpp index 1cd4241eae..abf44589f7 100644 --- a/sparse/impl/KokkosSparse_spmv_bsrmatrix_impl.hpp +++ b/sparse/impl/KokkosSparse_spmv_bsrmatrix_impl.hpp @@ -528,7 +528,7 @@ struct BSR_GEMV_Functor { typedef typename AMatrix::non_const_value_type value_type; typedef typename Kokkos::TeamPolicy team_policy; typedef typename team_policy::member_type team_member; - typedef Kokkos::Details::ArithTraits ATV; + typedef Kokkos::ArithTraits ATV; //! Nonconst version of the type of column indices in the sparse matrix. typedef typename AMatrix::non_const_ordinal_type ordinal_type; @@ -816,7 +816,7 @@ struct BSR_GEMV_Transpose_Functor { typedef typename AMatrix::non_const_value_type value_type; typedef typename Kokkos::TeamPolicy team_policy; typedef typename team_policy::member_type team_member; - typedef Kokkos::Details::ArithTraits ATV; + typedef Kokkos::ArithTraits ATV; //! Nonconst version of the type of column indices in the sparse matrix. typedef typename AMatrix::non_const_ordinal_type ordinal_type; @@ -1143,7 +1143,7 @@ struct BSR_GEMM_Functor { typedef typename AMatrix::non_const_value_type value_type; typedef typename Kokkos::TeamPolicy team_policy; typedef typename team_policy::member_type team_member; - typedef Kokkos::Details::ArithTraits ATV; + typedef Kokkos::ArithTraits ATV; //! Nonconst version of the type of column indices in the sparse matrix. typedef typename AMatrix::non_const_ordinal_type ordinal_type; @@ -1449,7 +1449,7 @@ struct BSR_GEMM_Transpose_Functor { typedef typename AMatrix::non_const_value_type value_type; typedef typename Kokkos::TeamPolicy team_policy; typedef typename team_policy::member_type team_member; - typedef Kokkos::Details::ArithTraits ATV; + typedef Kokkos::ArithTraits ATV; //! Nonconst version of the type of column indices in the sparse matrix. typedef typename AMatrix::non_const_ordinal_type ordinal_type; diff --git a/sparse/impl/KokkosSparse_spmv_bsrmatrix_spec.hpp b/sparse/impl/KokkosSparse_spmv_bsrmatrix_spec.hpp index 13b88b3271..ef5c2e0684 100644 --- a/sparse/impl/KokkosSparse_spmv_bsrmatrix_spec.hpp +++ b/sparse/impl/KokkosSparse_spmv_bsrmatrix_spec.hpp @@ -198,12 +198,9 @@ struct SPMV_MV_BSRMATRIX::is_complex) - method = Method::Fallback; - if (Kokkos::Details::ArithTraits::is_complex) - method = Method::Fallback; - if (Kokkos::Details::ArithTraits::is_complex) - method = Method::Fallback; + if (Kokkos::ArithTraits::is_complex) method = Method::Fallback; + if (Kokkos::ArithTraits::is_complex) method = Method::Fallback; + if (Kokkos::ArithTraits::is_complex) method = Method::Fallback; // can't use tensor cores outside GPU if (!KokkosKernels::Impl::kk_is_gpu_exec_space< typename AMatrix::execution_space>()) diff --git a/sparse/impl/KokkosSparse_spmv_impl.hpp b/sparse/impl/KokkosSparse_spmv_impl.hpp index e9eb301b23..6a82977e02 100644 --- a/sparse/impl/KokkosSparse_spmv_impl.hpp +++ b/sparse/impl/KokkosSparse_spmv_impl.hpp @@ -58,7 +58,7 @@ struct SPMV_Transpose_Functor { typedef typename AMatrix::non_const_value_type value_type; typedef typename Kokkos::TeamPolicy team_policy; typedef typename team_policy::member_type team_member; - typedef Kokkos::Details::ArithTraits ATV; + typedef Kokkos::ArithTraits ATV; typedef typename YVector::non_const_value_type coefficient_type; typedef typename YVector::non_const_value_type y_value_type; @@ -118,7 +118,7 @@ struct SPMV_Functor { typedef typename AMatrix::non_const_value_type value_type; typedef typename Kokkos::TeamPolicy team_policy; typedef typename team_policy::member_type team_member; - typedef Kokkos::Details::ArithTraits ATV; + typedef Kokkos::ArithTraits ATV; const value_type alpha; AMatrix m_A; @@ -515,7 +515,7 @@ static void spmv_beta_transpose(typename YVector::const_value_type& alpha, if (execution_space().concurrency() == 1) { /// serial impl typedef typename AMatrix::non_const_value_type value_type; - typedef Kokkos::Details::ArithTraits ATV; + typedef Kokkos::ArithTraits ATV; const size_type* KOKKOS_RESTRICT row_map_ptr = A.graph.row_map.data(); const ordinal_type* KOKKOS_RESTRICT col_idx_ptr = A.graph.entries.data(); const value_type* KOKKOS_RESTRICT values_ptr = A.values.data(); @@ -701,8 +701,7 @@ struct SPMV_MV_Transpose_Functor { for (ordinal_type iEntry = 0; iEntry < row_length; iEntry++) { const A_value_type val = - conjugate ? Kokkos::Details::ArithTraits::conj( - row.value(iEntry)) + conjugate ? Kokkos::ArithTraits::conj(row.value(iEntry)) : row.value(iEntry); const ordinal_type ind = row.colidx(iEntry); @@ -744,10 +743,9 @@ struct SPMV_MV_Transpose_Functor { Kokkos::ThreadVectorRange(dev, row_length), [&](ordinal_type iEntry) { const A_value_type val = - conjugate - ? Kokkos::Details::ArithTraits::conj( - row.value(iEntry)) - : row.value(iEntry); + conjugate ? Kokkos::ArithTraits::conj( + row.value(iEntry)) + : row.value(iEntry); const ordinal_type ind = row.colidx(iEntry); if (doalpha != 1) { @@ -821,7 +819,7 @@ struct SPMV_MV_LayoutLeft_Functor { #pragma unroll #endif for (int k = 0; k < UNROLL; ++k) { - sum[k] = Kokkos::Details::ArithTraits::zero(); + sum[k] = Kokkos::ArithTraits::zero(); } const auto row = m_A.rowConst(iRow); @@ -834,9 +832,9 @@ struct SPMV_MV_LayoutLeft_Functor { Kokkos::parallel_for( Kokkos::ThreadVectorRange(dev, row.length), [&](ordinal_type iEntry) { const A_value_type val = - conjugate ? Kokkos::Details::ArithTraits::conj( - row.value(iEntry)) - : row.value(iEntry); + conjugate + ? Kokkos::ArithTraits::conj(row.value(iEntry)) + : row.value(iEntry); const ordinal_type ind = row.colidx(iEntry); #ifdef KOKKOS_ENABLE_PRAGMA_UNROLL #pragma unroll @@ -911,7 +909,7 @@ struct SPMV_MV_LayoutLeft_Functor { #pragma unroll #endif for (int k = 0; k < UNROLL; ++k) { - sum[k] = Kokkos::Details::ArithTraits::zero(); + sum[k] = Kokkos::ArithTraits::zero(); } const auto row = m_A.rowConst(iRow); @@ -923,8 +921,7 @@ struct SPMV_MV_LayoutLeft_Functor { for (ordinal_type iEntry = 0; iEntry < row.length; iEntry++) { const A_value_type val = - conjugate ? Kokkos::Details::ArithTraits::conj( - row.value(iEntry)) + conjugate ? Kokkos::ArithTraits::conj(row.value(iEntry)) : row.value(iEntry); const ordinal_type ind = row.colidx(iEntry); #ifdef KOKKOS_ENABLE_PRAGMA_UNROLL @@ -968,9 +965,9 @@ struct SPMV_MV_LayoutLeft_Functor { Kokkos::ThreadVectorRange(dev, row.length), [&](ordinal_type iEntry, y_value_type& lsum) { const A_value_type val = - conjugate ? Kokkos::Details::ArithTraits::conj( - row.value(iEntry)) - : row.value(iEntry); + conjugate + ? Kokkos::ArithTraits::conj(row.value(iEntry)) + : row.value(iEntry); lsum += val * m_x(row.colidx(iEntry), 0); }, sum); @@ -1004,8 +1001,7 @@ struct SPMV_MV_LayoutLeft_Functor { y_value_type sum = y_value_type(); for (ordinal_type iEntry = 0; iEntry < row.length; iEntry++) { const A_value_type val = - conjugate ? Kokkos::Details::ArithTraits::conj( - row.value(iEntry)) + conjugate ? Kokkos::ArithTraits::conj(row.value(iEntry)) : row.value(iEntry); sum += val * m_x(row.colidx(iEntry), 0); } @@ -1488,7 +1484,7 @@ void spmv_alpha_mv(const char mode[], const typename YVector::non_const_value_type& beta, const YVector& y) { typedef typename YVector::non_const_value_type coefficient_type; - typedef Kokkos::Details::ArithTraits KAT; + typedef Kokkos::ArithTraits KAT; if (beta == KAT::zero()) { spmv_alpha_beta_mv(mode, alpha, A, x, diff --git a/sparse/impl/KokkosSparse_spmv_spec.hpp b/sparse/impl/KokkosSparse_spmv_spec.hpp index d196265b23..329e7b93e3 100644 --- a/sparse/impl/KokkosSparse_spmv_spec.hpp +++ b/sparse/impl/KokkosSparse_spmv_spec.hpp @@ -200,7 +200,7 @@ struct SPMV KAT; + typedef Kokkos::ArithTraits KAT; if (alpha == KAT::zero()) { if (beta != KAT::one()) { @@ -240,7 +240,7 @@ struct SPMV_MV KAT; + typedef Kokkos::ArithTraits KAT; if (alpha == KAT::zero()) { spmv_alpha_mv(mode, alpha, A, x, beta, y); diff --git a/sparse/impl/KokkosSparse_spmv_struct_impl.hpp b/sparse/impl/KokkosSparse_spmv_struct_impl.hpp index ac3da5e45f..8f217e05aa 100644 --- a/sparse/impl/KokkosSparse_spmv_struct_impl.hpp +++ b/sparse/impl/KokkosSparse_spmv_struct_impl.hpp @@ -37,7 +37,7 @@ struct SPMV_Struct_Transpose_Functor { typedef typename AMatrix::non_const_value_type value_type; typedef typename Kokkos::TeamPolicy team_policy; typedef typename team_policy::member_type team_member; - typedef Kokkos::Details::ArithTraits ATV; + typedef Kokkos::ArithTraits ATV; typedef typename YVector::non_const_value_type coefficient_type; typedef typename YVector::non_const_value_type y_value_type; @@ -102,7 +102,7 @@ struct SPMV_Struct_Functor { typedef typename KokkosSparse::SparseRowViewConst row_view_const; typedef typename Kokkos::TeamPolicy team_policy; typedef typename team_policy::member_type team_member; - typedef Kokkos::Details::ArithTraits ATV; + typedef Kokkos::ArithTraits ATV; typedef Kokkos::View > shared_ordinal_1d; @@ -979,10 +979,9 @@ struct SPMV_MV_Struct_Transpose_Functor { Kokkos::ThreadVectorRange(dev, row_length), [&](ordinal_type iEntry) { const A_value_type val = - conjugate - ? Kokkos::Details::ArithTraits::conj( - row.value(iEntry)) - : row.value(iEntry); + conjugate ? Kokkos::ArithTraits::conj( + row.value(iEntry)) + : row.value(iEntry); const ordinal_type ind = row.colidx(iEntry); if (doalpha != 1) { @@ -1054,7 +1053,7 @@ struct SPMV_MV_Struct_LayoutLeft_Functor { #pragma unroll #endif for (int k = 0; k < UNROLL; ++k) { - sum[k] = Kokkos::Details::ArithTraits::zero(); + sum[k] = Kokkos::ArithTraits::zero(); } const auto row = m_A.rowConst(iRow); @@ -1062,9 +1061,9 @@ struct SPMV_MV_Struct_LayoutLeft_Functor { Kokkos::parallel_for( Kokkos::ThreadVectorRange(dev, row.length), [&](ordinal_type iEntry) { const A_value_type val = - conjugate ? Kokkos::Details::ArithTraits::conj( - row.value(iEntry)) - : row.value(iEntry); + conjugate + ? Kokkos::ArithTraits::conj(row.value(iEntry)) + : row.value(iEntry); const ordinal_type ind = row.colidx(iEntry); #ifdef KOKKOS_ENABLE_PRAGMA_UNROLL @@ -1139,9 +1138,9 @@ struct SPMV_MV_Struct_LayoutLeft_Functor { Kokkos::ThreadVectorRange(dev, row.length), [&](ordinal_type iEntry, y_value_type& lsum) { const A_value_type val = - conjugate ? Kokkos::Details::ArithTraits::conj( - row.value(iEntry)) - : row.value(iEntry); + conjugate + ? Kokkos::ArithTraits::conj(row.value(iEntry)) + : row.value(iEntry); lsum += val * m_x(row.colidx(iEntry), 0); }, sum); @@ -1465,7 +1464,7 @@ void spmv_alpha_mv_struct(const char mode[], const typename YVector::non_const_value_type& beta, const YVector& y) { typedef typename YVector::non_const_value_type coefficient_type; - typedef Kokkos::Details::ArithTraits KAT; + typedef Kokkos::ArithTraits KAT; if (beta == KAT::zero()) { spmv_alpha_beta_mv_struct( diff --git a/sparse/impl/KokkosSparse_spmv_struct_spec.hpp b/sparse/impl/KokkosSparse_spmv_struct_spec.hpp index fde9bf4dcf..7ade8e2536 100644 --- a/sparse/impl/KokkosSparse_spmv_struct_spec.hpp +++ b/sparse/impl/KokkosSparse_spmv_struct_spec.hpp @@ -201,9 +201,9 @@ struct SPMV_STRUCT& structure, const coefficient_type& alpha, const AMatrix& A, const XVector& x, const coefficient_type& beta, const YVector& y) { - typedef Kokkos::Details::ArithTraits KAT; + typedef Kokkos::ArithTraits KAT; - typedef Kokkos::Details::ArithTraits KAT; + typedef Kokkos::ArithTraits KAT; if (alpha == KAT::zero()) { if (beta != KAT::one()) { @@ -242,7 +242,7 @@ struct SPMV_MV_STRUCT KAT; + typedef Kokkos::ArithTraits KAT; if (alpha == KAT::zero()) { spmv_alpha_mv_struct(mode, alpha, A, x, diff --git a/sparse/impl/KokkosSparse_trsv_impl.hpp b/sparse/impl/KokkosSparse_trsv_impl.hpp index f87ea5da82..fbbd547e34 100644 --- a/sparse/impl/KokkosSparse_trsv_impl.hpp +++ b/sparse/impl/KokkosSparse_trsv_impl.hpp @@ -72,7 +72,7 @@ void lowerTriSolveCsr(RangeMultiVectorType X, const CrsMatrixType& A, local_ordinal_type; typedef typename CrsMatrixType::values_type::non_const_value_type matrix_scalar_type; - typedef Kokkos::Details::ArithTraits STS; + typedef Kokkos::ArithTraits STS; const local_ordinal_type numRows = A.numRows(); // const local_ordinal_type numCols = A.numCols (); @@ -190,7 +190,7 @@ void upperTriSolveCsr(RangeMultiVectorType X, const CrsMatrixType& A, typename CrsMatrixType::row_map_type ptr = A.graph.row_map; typename CrsMatrixType::index_type ind = A.graph.entries; typename CrsMatrixType::values_type val = A.values; - typedef Kokkos::Details::ArithTraits STS; + typedef Kokkos::ArithTraits STS; // If local_ordinal_type is unsigned and numRows is 0, the loop // below will have entirely the wrong number of iterations. @@ -425,7 +425,7 @@ void upperTriSolveCscUnitDiagConj(RangeMultiVectorType X, local_ordinal_type; typedef typename CrsMatrixType::values_type::non_const_value_type matrix_scalar_type; - typedef Kokkos::Details::ArithTraits STS; + typedef Kokkos::ArithTraits STS; const local_ordinal_type numRows = A.numRows(); const local_ordinal_type numCols = A.numCols(); @@ -486,7 +486,7 @@ void upperTriSolveCscConj(RangeMultiVectorType X, const CrsMatrixType& A, local_ordinal_type; typedef typename CrsMatrixType::values_type::non_const_value_type matrix_scalar_type; - typedef Kokkos::Details::ArithTraits STS; + typedef Kokkos::ArithTraits STS; const local_ordinal_type numRows = A.numRows(); const local_ordinal_type numCols = A.numCols(); @@ -600,7 +600,7 @@ void lowerTriSolveCscUnitDiagConj(RangeMultiVectorType X, local_ordinal_type; typedef typename CrsMatrixType::values_type::non_const_value_type matrix_scalar_type; - typedef Kokkos::Details::ArithTraits STS; + typedef Kokkos::ArithTraits STS; const local_ordinal_type numRows = A.numRows(); const local_ordinal_type numCols = A.numCols(); @@ -638,7 +638,7 @@ void lowerTriSolveCscConj(RangeMultiVectorType X, const CrsMatrixType& A, local_ordinal_type; typedef typename CrsMatrixType::values_type::non_const_value_type matrix_scalar_type; - typedef Kokkos::Details::ArithTraits STS; + typedef Kokkos::ArithTraits STS; const local_ordinal_type numRows = A.numRows(); const local_ordinal_type numCols = A.numCols(); diff --git a/sparse/impl/KokkosSparse_twostage_gauss_seidel_impl.hpp b/sparse/impl/KokkosSparse_twostage_gauss_seidel_impl.hpp index a64d7f76a0..00fdcd2442 100644 --- a/sparse/impl/KokkosSparse_twostage_gauss_seidel_impl.hpp +++ b/sparse/impl/KokkosSparse_twostage_gauss_seidel_impl.hpp @@ -82,7 +82,7 @@ class TwostageGaussSeidel { using internal_vector_view_t = typename TwoStageGaussSeidelHandleType::vector_view_t; - using ST = Kokkos::Details::ArithTraits; + using ST = Kokkos::ArithTraits; using mag_t = typename ST::mag_type; private: @@ -407,7 +407,7 @@ class TwostageGaussSeidel { // functor for storing both valuesL & valuesU (with parallel_for) KOKKOS_INLINE_FUNCTION void operator()(const Tag_valuesLU &, const ordinal_t i) const { - const_scalar_t one = Kokkos::Details::ArithTraits::one(); + const_scalar_t one = Kokkos::ArithTraits::one(); ordinal_t nnzL = row_map(i); ordinal_t nnzU = row_map2(i); ordinal_t nnzLa = 0; @@ -851,8 +851,8 @@ class TwostageGaussSeidel { bool init_zero_x_vector = false, int numIter = 1, scalar_t omega = ST::one(), bool apply_forward = true, bool apply_backward = true, bool /*update_y_vector*/ = true) { - const_scalar_t one = Kokkos::Details::ArithTraits::one(); - const_scalar_t zero = Kokkos::Details::ArithTraits::zero(); + const_scalar_t one = Kokkos::ArithTraits::one(); + const_scalar_t zero = Kokkos::ArithTraits::zero(); #ifdef KOKKOSSPARSE_IMPL_TIME_TWOSTAGE_GS double tic; Kokkos::Timer timer; diff --git a/sparse/src/KokkosSparse_BsrMatrix.hpp b/sparse/src/KokkosSparse_BsrMatrix.hpp index ea4e50a8fe..2765bc116d 100644 --- a/sparse/src/KokkosSparse_BsrMatrix.hpp +++ b/sparse/src/KokkosSparse_BsrMatrix.hpp @@ -156,12 +156,12 @@ struct BsrRowView { } /// \brief Return offset into colidx_ for the requested block idx - /// If none found, return Kokkos::Details::ArithTraits::max + /// If none found, return Kokkos::ArithTraits::max /// \param idx_to_match [in] local block idx within block-row KOKKOS_INLINE_FUNCTION ordinal_type findRelBlockOffset(const ordinal_type idx_to_match, bool /*is_sorted*/ = false) const { - ordinal_type offset = Kokkos::Details::ArithTraits::max(); + ordinal_type offset = Kokkos::ArithTraits::max(); for (ordinal_type blk_offset = 0; blk_offset < length; ++blk_offset) { ordinal_type idx = colidx_[blk_offset]; if (idx == idx_to_match) { @@ -292,14 +292,14 @@ struct BsrRowViewConst { } /// \brief Return offset into colidx_ for the requested block idx - /// If none found, return Kokkos::Details::ArithTraits::max + /// If none found, return Kokkos::ArithTraits::max /// \param idx_to_match [in] local block idx within block-row KOKKOS_INLINE_FUNCTION ordinal_type findRelBlockOffset(const ordinal_type& idx_to_match, bool /*is_sorted*/ = false) const { typedef typename std::remove_cv::type non_const_ordinal_type; non_const_ordinal_type offset = - Kokkos::Details::ArithTraits::max(); + Kokkos::ArithTraits::max(); for (non_const_ordinal_type blk_offset = 0; blk_offset < length; ++blk_offset) { ordinal_type idx = colidx_[blk_offset]; @@ -979,7 +979,7 @@ class BsrMatrix { // + 1] (not global offset) colidx_ and values_ are already offset to the // beginning of blockrow rowi auto blk_offset = row_view.findRelBlockOffset(cols[i], is_sorted); - if (blk_offset != Kokkos::Details::ArithTraits::max()) { + if (blk_offset != Kokkos::ArithTraits::max()) { ordinal_type offset_into_vals = i * block_size * block_size; // stride == 1 assumed between elements diff --git a/sparse/src/KokkosSparse_IOUtils.hpp b/sparse/src/KokkosSparse_IOUtils.hpp index 77934b4f3e..c5f024f4f6 100644 --- a/sparse/src/KokkosSparse_IOUtils.hpp +++ b/sparse/src/KokkosSparse_IOUtils.hpp @@ -177,8 +177,7 @@ void kk_diagonally_dominant_sparseMatrix_generate( entriesInRow.insert(pos); colInd[k] = pos; values[k] = 100.0 * rand() / RAND_MAX - 50.0; - total_values += - Kokkos::Details::ArithTraits::abs(values[k]); + total_values += Kokkos::ArithTraits::abs(values[k]); break; } } diff --git a/sparse/unit_test/Test_Sparse_Utils.hpp b/sparse/unit_test/Test_Sparse_Utils.hpp index 73320e9358..cbd81e9b08 100644 --- a/sparse/unit_test/Test_Sparse_Utils.hpp +++ b/sparse/unit_test/Test_Sparse_Utils.hpp @@ -118,7 +118,7 @@ bool is_same_matrix(crsMat_t output_mat_actual, crsMat_t output_mat_reference) { return false; } - typedef typename Kokkos::Details::ArithTraits< + typedef typename Kokkos::ArithTraits< typename scalar_view_t::non_const_value_type>::mag_type eps_type; eps_type eps = std::is_same::value ? 3.7e-3 : 1e-7; diff --git a/sparse/unit_test/Test_Sparse_block_gauss_seidel.hpp b/sparse/unit_test/Test_Sparse_block_gauss_seidel.hpp index 4c445f439f..11830e0224 100644 --- a/sparse/unit_test/Test_Sparse_block_gauss_seidel.hpp +++ b/sparse/unit_test/Test_Sparse_block_gauss_seidel.hpp @@ -75,7 +75,7 @@ int run_block_gauss_seidel_1( GSApplyType apply_type = Test::symmetric, bool skip_symbolic = false, bool skip_numeric = false, size_t shmem_size = 32128, typename mtx_t::value_type omega = - Kokkos::Details::ArithTraits::one()) { + Kokkos::ArithTraits::one()) { typedef typename mtx_t::StaticCrsGraphType graph_t; typedef typename graph_t::row_map_type lno_view_t; typedef typename graph_t::entries_type lno_nnz_view_t; @@ -156,7 +156,7 @@ void test_block_gauss_seidel_rank1(lno_t numRows, size_type nnz, lno_view_t; typedef typename crsMat_t::StaticCrsGraphType::entries_type::non_const_type lno_nnz_view_t; - typedef typename Kokkos::Details::ArithTraits::mag_type mag_t; + typedef typename Kokkos::ArithTraits::mag_type mag_t; lno_t numCols = numRows; @@ -243,7 +243,7 @@ void test_block_gauss_seidel_rank2(lno_t numRows, size_type nnz, typedef typename crsMat_t::StaticCrsGraphType::entries_type::non_const_type lno_nnz_view_t; typedef Kokkos::View scalar_view2d_t; - typedef typename Kokkos::Details::ArithTraits::mag_type mag_t; + typedef typename Kokkos::ArithTraits::mag_type mag_t; lno_t numCols = numRows; @@ -289,8 +289,8 @@ void test_block_gauss_seidel_rank2(lno_t numRows, size_type nnz, for (lno_t j = 0; j < nv; j++) { sum += solution_host(j, i) * solution_host(j, i); } - initial_norms[i] = Kokkos::Details::ArithTraits::sqrt( - Kokkos::Details::ArithTraits::abs(sum)); + initial_norms[i] = Kokkos::ArithTraits::sqrt( + Kokkos::ArithTraits::abs(sum)); } for (const auto gs_algorithm : params.gs_algorithms) { @@ -322,8 +322,8 @@ void test_block_gauss_seidel_rank2(lno_t numRows, size_type nnz, scalar_t diff = x_host(r, c) - solution_host(r, c); sum += diff * diff; } - mag_t result_res = Kokkos::Details::ArithTraits::sqrt( - Kokkos::Details::ArithTraits::abs(sum)); + mag_t result_res = Kokkos::ArithTraits::sqrt( + Kokkos::ArithTraits::abs(sum)); EXPECT_LT(result_res, params.tolerance * initial_norms[c]); } } diff --git a/sparse/unit_test/Test_Sparse_bspgemm.hpp b/sparse/unit_test/Test_Sparse_bspgemm.hpp index b760e7e69c..58a2a18b8a 100644 --- a/sparse/unit_test/Test_Sparse_bspgemm.hpp +++ b/sparse/unit_test/Test_Sparse_bspgemm.hpp @@ -123,7 +123,7 @@ bool is_same_block_matrix(bsrMat_t output_mat_actual, return false; } - typedef typename Kokkos::Details::ArithTraits< + typedef typename Kokkos::ArithTraits< typename scalar_view_t::non_const_value_type>::mag_type eps_type; eps_type eps = std::is_same::value ? 3e-2 : 5e-7; diff --git a/sparse/unit_test/Test_Sparse_gauss_seidel.hpp b/sparse/unit_test/Test_Sparse_gauss_seidel.hpp index 7960a1a9bc..358205b713 100644 --- a/sparse/unit_test/Test_Sparse_gauss_seidel.hpp +++ b/sparse/unit_test/Test_Sparse_gauss_seidel.hpp @@ -153,7 +153,7 @@ void test_gauss_seidel_rank1(lno_t numRows, size_type nnz, lno_t bandwidth, typename KokkosSparse::CrsMatrix crsMat_t; typedef typename crsMat_t::values_type::non_const_type scalar_view_t; - typedef typename Kokkos::Details::ArithTraits::mag_type mag_t; + typedef typename Kokkos::ArithTraits::mag_type mag_t; srand(245); lno_t numCols = numRows; crsMat_t input_mat = @@ -177,8 +177,8 @@ void test_gauss_seidel_rank1(lno_t numRows, size_type nnz, lno_t bandwidth, int apply_count = 3; // test symmetric, forward, backward scalar_view_t x_vector( Kokkos::view_alloc(Kokkos::WithoutInitializing, "x vector"), nv); - const scalar_t one = Kokkos::Details::ArithTraits::one(); - const scalar_t zero = Kokkos::Details::ArithTraits::zero(); + const scalar_t one = Kokkos::ArithTraits::one(); + const scalar_t zero = Kokkos::ArithTraits::zero(); //*** Point-coloring version **** for (int apply_type = 0; apply_type < apply_count; ++apply_type) { Kokkos::Timer timer1; @@ -242,7 +242,7 @@ void test_gauss_seidel_rank2(lno_t numRows, size_type nnz, lno_t bandwidth, typedef Kokkos::View scalar_view2d_t; typedef Kokkos::View host_scalar_view2d_t; - typedef typename Kokkos::Details::ArithTraits::mag_type mag_t; + typedef typename Kokkos::ArithTraits::mag_type mag_t; lno_t numCols = numRows; crsMat_t input_mat = @@ -270,11 +270,11 @@ void test_gauss_seidel_rank2(lno_t numRows, size_type nnz, lno_t bandwidth, for (lno_t j = 0; j < nv; j++) { sum += solution_x(j, i) * solution_x(j, i); } - initial_norms[i] = Kokkos::Details::ArithTraits::sqrt( - Kokkos::Details::ArithTraits::abs(sum)); + initial_norms[i] = Kokkos::ArithTraits::sqrt( + Kokkos::ArithTraits::abs(sum)); } int apply_count = 3; // test symmetric, forward, backward - const scalar_t zero = Kokkos::Details::ArithTraits::zero(); + const scalar_t zero = Kokkos::ArithTraits::zero(); //*** Point-coloring version **** for (int apply_type = 0; apply_type < apply_count; ++apply_type) { Kokkos::Timer timer1; @@ -289,8 +289,8 @@ void test_gauss_seidel_rank2(lno_t numRows, size_type nnz, lno_t bandwidth, scalar_t diff = x_host(j, i) - solution_x(j, i); diffDot += diff * diff; } - mag_t res = Kokkos::Details::ArithTraits::sqrt( - Kokkos::Details::ArithTraits::abs(diffDot)); + mag_t res = Kokkos::ArithTraits::sqrt( + Kokkos::ArithTraits::abs(diffDot)); EXPECT_LT(res, initial_norms[i]); } } @@ -312,8 +312,8 @@ void test_gauss_seidel_rank2(lno_t numRows, size_type nnz, lno_t bandwidth, scalar_t diff = x_host(j, i) - solution_x(j, i); diffDot += diff * diff; } - mag_t res = Kokkos::Details::ArithTraits::sqrt( - Kokkos::Details::ArithTraits::abs(diffDot)); + mag_t res = Kokkos::ArithTraits::sqrt( + Kokkos::ArithTraits::abs(diffDot)); EXPECT_LT(res, initial_norms[i]); } } @@ -332,8 +332,8 @@ void test_gauss_seidel_rank2(lno_t numRows, size_type nnz, lno_t bandwidth, scalar_t diff = x_host(j, i) - solution_x(j, i); diffDot += diff * diff; } - mag_t res = Kokkos::Details::ArithTraits::sqrt( - Kokkos::Details::ArithTraits::abs(diffDot)); + mag_t res = Kokkos::ArithTraits::sqrt( + Kokkos::ArithTraits::abs(diffDot)); EXPECT_LT(res, initial_norms[i]); } } @@ -350,8 +350,8 @@ void test_gauss_seidel_rank2(lno_t numRows, size_type nnz, lno_t bandwidth, scalar_t diff = x_host(j, i) - solution_x(j, i); diffDot += diff * diff; } - mag_t res = Kokkos::Details::ArithTraits::sqrt( - Kokkos::Details::ArithTraits::abs(diffDot)); + mag_t res = Kokkos::ArithTraits::sqrt( + Kokkos::ArithTraits::abs(diffDot)); EXPECT_LT(res, initial_norms[i]); } } @@ -361,8 +361,8 @@ template void test_sequential_sor(lno_t numRows, size_type nnz, lno_t bandwidth, lno_t row_size_variance) { - const scalar_t zero = Kokkos::Details::ArithTraits::zero(); - const scalar_t one = Kokkos::Details::ArithTraits::one(); + const scalar_t zero = Kokkos::ArithTraits::zero(); + const scalar_t one = Kokkos::ArithTraits::one(); srand(245); typedef typename device::execution_space exec_space; typedef @@ -419,10 +419,9 @@ void test_sequential_sor(lno_t numRows, size_type nnz, lno_t bandwidth, // Copy solution back Kokkos::deep_copy(x, x_host); // Check against gold solution - scalar_t xSq = KokkosBlas::dot(x, x); - scalar_t solnDot = KokkosBlas::dot(x, xgold); - double scaledSolutionDot = - Kokkos::Details::ArithTraits::abs(solnDot / xSq); + scalar_t xSq = KokkosBlas::dot(x, x); + scalar_t solnDot = KokkosBlas::dot(x, xgold); + double scaledSolutionDot = Kokkos::ArithTraits::abs(solnDot / xSq); EXPECT_TRUE(0.99 < scaledSolutionDot); } @@ -533,7 +532,7 @@ void test_gauss_seidel_long_rows(lno_t numRows, lno_t numLongRows, typedef typename crsMat_t::values_type::non_const_type scalar_view_t; typedef typename crsMat_t::index_type::non_const_type entries_view_t; typedef typename crsMat_t::row_map_type::non_const_type rowmap_view_t; - typedef typename Kokkos::Details::ArithTraits::mag_type mag_t; + typedef typename Kokkos::ArithTraits::mag_type mag_t; const scalar_t one = Kokkos::ArithTraits::one(); srand(245); std::vector rowmap = {0}; @@ -630,7 +629,7 @@ void test_gauss_seidel_custom_coloring(lno_t numRows, lno_t nnzPerRow) { typename KokkosSparse::CrsMatrix crsMat_t; typedef typename crsMat_t::values_type::non_const_type scalar_view_t; - typedef typename Kokkos::Details::ArithTraits::mag_type mag_t; + typedef typename Kokkos::ArithTraits::mag_type mag_t; const scalar_t one = Kokkos::ArithTraits::one(); size_type nnz = nnzPerRow * numRows; crsMat_t input_mat = diff --git a/sparse/unit_test/Test_Sparse_replaceSumInto.hpp b/sparse/unit_test/Test_Sparse_replaceSumInto.hpp index af61aeb320..f8427dc925 100644 --- a/sparse/unit_test/Test_Sparse_replaceSumInto.hpp +++ b/sparse/unit_test/Test_Sparse_replaceSumInto.hpp @@ -50,7 +50,7 @@ class ModifyEvenNumberedRows { ordinal_type cols[1]; value_type vals[1]; - const value_type ONE = Kokkos::Details::ArithTraits::one(); + const value_type ONE = Kokkos::ArithTraits::one(); const value_type THREE = ONE + ONE + ONE; cols[0] = lclRow; @@ -97,7 +97,7 @@ bool checkWhetherEvenNumberedRowsWereModified(const CrsMatrixType& A, typedef typename CrsMatrixType::value_type SC; typedef typename CrsMatrixType::ordinal_type LO; - const SC ONE = Kokkos::Details::ArithTraits::one(); + const SC ONE = Kokkos::ArithTraits::one(); const SC TWO = ONE + ONE; const SC THREE = ONE + ONE + ONE; @@ -135,7 +135,7 @@ void testOneCase(bool& /*success*/, // Teuchos::FancyOStream& out, std::ostream& out, const CrsMatrixType& A, const bool replace, const bool sorted, const bool atomic) { - using Kokkos::Details::ArithTraits; + using Kokkos::ArithTraits; typedef typename CrsMatrixType::value_type value_type; // Teuchos::OSTab tab0 (out); diff --git a/sparse/unit_test/Test_Sparse_replaceSumIntoLonger.hpp b/sparse/unit_test/Test_Sparse_replaceSumIntoLonger.hpp index 76bbfe37a9..98affff57d 100644 --- a/sparse/unit_test/Test_Sparse_replaceSumIntoLonger.hpp +++ b/sparse/unit_test/Test_Sparse_replaceSumIntoLonger.hpp @@ -47,7 +47,7 @@ class ModifyEntries { KOKKOS_FUNCTION void operator()(const ordinal_type& lclRow, ordinal_type& numModified) const { - typedef Kokkos::Details::ArithTraits KAT; + typedef Kokkos::ArithTraits KAT; typedef typename KAT::mag_type mag_type; const scalar_type ONE = KAT::one(); @@ -171,7 +171,7 @@ void checkWhetherEntriesWereModified( // using Teuchos::RCP; typedef typename CrsMatrixType::value_type value_type; typedef typename CrsMatrixType::ordinal_type ordinal_type; - typedef Kokkos::Details::ArithTraits KAT; + typedef Kokkos::ArithTraits KAT; // If debug is false, we capture all output in an // std::ostringstream, and don't print it unless the test fails @@ -281,7 +281,7 @@ void testOneCaseImpl(bool& /*success*/, std::ostream& out, // Restore original values. auto val_h = Kokkos::create_mirror_view(A.values); - const scalar_type ONE = Kokkos::Details::ArithTraits::one(); + const scalar_type ONE = Kokkos::ArithTraits::one(); scalar_type curVal = ONE; for (ordinal_type k = 0; k < A.numCols(); ++k, curVal += ONE) { val_h[k] = curVal; @@ -388,7 +388,7 @@ void testAllSizes(bool& success, typedef typename matrix_type::value_type value_type; typedef typename matrix_type::ordinal_type ordinal_type; typedef typename matrix_type::size_type size_type; - const value_type ONE = Kokkos::Details::ArithTraits::one(); + const value_type ONE = Kokkos::ArithTraits::one(); // Teuchos::OSTab tab0 (out); out << "maxNumEnt: " << maxNumEnt << endl; diff --git a/sparse/unit_test/Test_Sparse_spgemm_jacobi.hpp b/sparse/unit_test/Test_Sparse_spgemm_jacobi.hpp index cfdf13a709..25a5d155a7 100644 --- a/sparse/unit_test/Test_Sparse_spgemm_jacobi.hpp +++ b/sparse/unit_test/Test_Sparse_spgemm_jacobi.hpp @@ -165,7 +165,7 @@ bool is_same_mat(crsMat_t output_mat1, crsMat_t output_mat2) { return false; } - typedef typename Kokkos::Details::ArithTraits< + typedef typename Kokkos::ArithTraits< typename scalar_view_t::non_const_value_type>::mag_type eps_type; eps_type eps = std::is_same::value ? 2 * 1e-3 : 1e-7; diff --git a/sparse/unit_test/Test_Sparse_spiluk.hpp b/sparse/unit_test/Test_Sparse_spiluk.hpp index 12065781f1..840a4702a0 100644 --- a/sparse/unit_test/Test_Sparse_spiluk.hpp +++ b/sparse/unit_test/Test_Sparse_spiluk.hpp @@ -50,7 +50,7 @@ void run_test_spiluk() { typedef Kokkos::View RowMapType; typedef Kokkos::View EntriesType; typedef Kokkos::View ValuesType; - typedef Kokkos::Details::ArithTraits AT; + typedef Kokkos::ArithTraits AT; const size_type nrows = 9; const size_type nnz = 21; diff --git a/test_common/KokkosKernels_TestUtils.hpp b/test_common/KokkosKernels_TestUtils.hpp index 761c919aac..fe68d68d07 100644 --- a/test_common/KokkosKernels_TestUtils.hpp +++ b/test_common/KokkosKernels_TestUtils.hpp @@ -106,8 +106,8 @@ struct multivector_layout_adapter { template void EXPECT_NEAR_KK(Scalar1 val1, Scalar2 val2, Scalar3 tol, std::string msg = "") { - typedef Kokkos::Details::ArithTraits AT1; - typedef Kokkos::Details::ArithTraits AT3; + typedef Kokkos::ArithTraits AT1; + typedef Kokkos::ArithTraits AT3; EXPECT_LE((double)AT1::abs(val1 - val2), (double)AT3::abs(tol)) << msg; } @@ -116,8 +116,8 @@ void EXPECT_NEAR_KK_REL(Scalar1 val1, Scalar2 val2, Scalar3 tol, std::string msg = "") { typedef typename std::remove_reference::type hv1_type; typedef typename std::remove_reference::type hv2_type; - const auto ahv1 = Kokkos::Details::ArithTraits::abs(val1); - const auto ahv2 = Kokkos::Details::ArithTraits::abs(val2); + const auto ahv1 = Kokkos::ArithTraits::abs(val1); + const auto ahv2 = Kokkos::ArithTraits::abs(val2); EXPECT_NEAR_KK(val1, val2, tol * Kokkos::max(ahv1, ahv2), msg); } @@ -205,7 +205,7 @@ struct SharedVanillaGEMM { typedef Kokkos::View SubviewTypeB; - typedef Kokkos::Details::ArithTraits APT; + typedef Kokkos::ArithTraits APT; typedef typename APT::mag_type mag_type; ScalarA alpha; ScalarC beta;