diff --git a/batched/dense/impl/KokkosBatched_Pbtrf_Serial_Impl.hpp b/batched/dense/impl/KokkosBatched_Pbtrf_Serial_Impl.hpp index 1687d82333..fa6e09220c 100644 --- a/batched/dense/impl/KokkosBatched_Pbtrf_Serial_Impl.hpp +++ b/batched/dense/impl/KokkosBatched_Pbtrf_Serial_Impl.hpp @@ -22,7 +22,7 @@ /// \author Yuuichi Asahi (yuuichi.asahi@cea.fr) namespace KokkosBatched { - +namespace Impl { template KOKKOS_INLINE_FUNCTION static int checkPbtrfInput([[maybe_unused]] const ABViewType &Ab) { static_assert(Kokkos::is_view_v, "KokkosBatched::pbtrf: ABViewType is not a Kokkos::View."); @@ -41,6 +41,7 @@ KOKKOS_INLINE_FUNCTION static int checkPbtrfInput([[maybe_unused]] const ABViewT #endif return 0; } +} // namespace Impl //// Lower //// template <> @@ -51,11 +52,12 @@ struct SerialPbtrf { const int n = Ab.extent(1); if (n == 0) return 0; - auto info = checkPbtrfInput(Ab); + auto info = Impl::checkPbtrfInput(Ab); if (info) return info; const int kd = Ab.extent(0) - 1; - return SerialPbtrfInternalLower::invoke(n, Ab.data(), Ab.stride_0(), Ab.stride_1(), kd); + return Impl::SerialPbtrfInternalLower::invoke(n, Ab.data(), Ab.stride_0(), Ab.stride_1(), + kd); } }; @@ -68,11 +70,12 @@ struct SerialPbtrf { const int n = Ab.extent(1); if (n == 0) return 0; - auto info = checkPbtrfInput(Ab); + auto info = Impl::checkPbtrfInput(Ab); if (info) return info; const int kd = Ab.extent(0) - 1; - return SerialPbtrfInternalUpper::invoke(n, Ab.data(), Ab.stride_0(), Ab.stride_1(), kd); + return Impl::SerialPbtrfInternalUpper::invoke(n, Ab.data(), Ab.stride_0(), Ab.stride_1(), + kd); } }; diff --git a/batched/dense/impl/KokkosBatched_Pbtrf_Serial_Internal.hpp b/batched/dense/impl/KokkosBatched_Pbtrf_Serial_Internal.hpp index 0a4ed7d697..ecea0a50e1 100644 --- a/batched/dense/impl/KokkosBatched_Pbtrf_Serial_Internal.hpp +++ b/batched/dense/impl/KokkosBatched_Pbtrf_Serial_Internal.hpp @@ -19,8 +19,11 @@ #include "KokkosBatched_Util.hpp" #include "KokkosBlas1_serial_scal_impl.hpp" +#include "KokkosBatched_Syr_Serial_Internal.hpp" +#include "KokkosBatched_Lacgv_Serial_Internal.hpp" namespace KokkosBatched { +namespace Impl { /// /// Serial Internal Impl @@ -36,17 +39,8 @@ struct SerialPbtrfInternalLower { KOKKOS_INLINE_FUNCTION static int invoke(const int an, /**/ ValueType *KOKKOS_RESTRICT AB, const int as0, const int as1, const int kd); - - template - KOKKOS_INLINE_FUNCTION static int invoke(const int an, - /**/ Kokkos::complex *KOKKOS_RESTRICT AB, const int as0, - const int as1, const int kd); }; -/// -/// Real matrix -/// - template <> template KOKKOS_INLINE_FUNCTION int SerialPbtrfInternalLower::invoke(const int an, @@ -55,7 +49,7 @@ KOKKOS_INLINE_FUNCTION int SerialPbtrfInternalLower::inv const int kd) { // Compute the Cholesky factorization A = L*L'. for (int j = 0; j < an; ++j) { - auto a_jj = AB[0 * as0 + j * as1]; + auto a_jj = Kokkos::ArithTraits::real(AB[0 * as0 + j * as1]); // Check if L (j, j) is positive definite #if (KOKKOSKERNELS_DEBUG_LEVEL > 0) @@ -75,68 +69,13 @@ KOKKOS_INLINE_FUNCTION int SerialPbtrfInternalLower::inv const ValueType alpha = 1.0 / a_jj; KokkosBlas::Impl::SerialScaleInternal::invoke(kn, alpha, &(AB[1 * as0 + j * as1]), 1); - // syr (lower) with alpha = -1.0 to diagonal elements - for (int k = 0; k < kn; ++k) { - auto x_k = AB[(k + 1) * as0 + j * as1]; - if (x_k != 0) { - auto temp = -1.0 * x_k; - for (int i = k; i < kn; ++i) { - auto x_i = AB[(i + 1) * as0 + j * as1]; - AB[i * as0 + (j + 1 + k - i) * as1] += x_i * temp; - } - } - } - } - } - - return 0; -} - -/// -/// Complex matrix -/// -template <> -template -KOKKOS_INLINE_FUNCTION int SerialPbtrfInternalLower::invoke( - const int an, - /**/ Kokkos::complex *KOKKOS_RESTRICT AB, const int as0, const int as1, const int kd) { - // Compute the Cholesky factorization A = L*L**H - for (int j = 0; j < an; ++j) { - auto a_jj = AB[0 * as0 + j * as1].real(); - - // Check if L (j, j) is positive definite -#if (KOKKOSKERNELS_DEBUG_LEVEL > 0) - if (a_jj <= 0) { - AB[0 * as0 + j * as1] = a_jj; - return j + 1; - } -#endif - - a_jj = Kokkos::sqrt(a_jj); - AB[0 * as0 + j * as1] = a_jj; - - // Compute elements J+1:J+KN of column J and update the - // trailing submatrix within the band. - int kn = Kokkos::min(kd, an - j - 1); - if (kn > 0) { - // scale to diagonal elements - const ValueType alpha = 1.0 / a_jj; - KokkosBlas::Impl::SerialScaleInternal::invoke(kn, alpha, &(AB[1 * as0 + j * as1]), 1); - - // zher (lower) with alpha = -1.0 to diagonal elements - for (int k = 0; k < kn; ++k) { - auto x_k = AB[(k + 1) * as0 + j * as1]; - if (x_k != 0) { - auto temp = -1.0 * Kokkos::conj(x_k); - AB[k * as0 + (j + 1) * as1] = AB[k * as0 + (j + 1) * as1].real() + (temp * x_k).real(); - for (int i = k + 1; i < kn; ++i) { - auto x_i = AB[(i + 1) * as0 + j * as1]; - AB[i * as0 + (j + 1 + k - i) * as1] += x_i * temp; - } - } else { - AB[k * as0 + (j + 1) * as1] = AB[k * as0 + (j + 1) * as1].real(); - } - } + // syr or zher (lower) with alpha = -1.0 to diagonal elements + using op = std::conditional_t::is_complex, KokkosBlas::Impl::OpConj, + KokkosBlas::Impl::OpID>; + using op_sym = std::conditional_t::is_complex, KokkosBlas::Impl::OpReal, + KokkosBlas::Impl::OpID>; + SerialSyrInternalLower::invoke(op(), op_sym(), kn, -1.0, &(AB[1 * as0 + j * as1]), as0, + &(AB[0 * as0 + (j + 1) * as1]), as0, (as1 - as0)); } } @@ -153,16 +92,8 @@ struct SerialPbtrfInternalUpper { KOKKOS_INLINE_FUNCTION static int invoke(const int an, /**/ ValueType *KOKKOS_RESTRICT AB, const int as0, const int as1, const int kd); - - template - KOKKOS_INLINE_FUNCTION static int invoke(const int an, - /**/ Kokkos::complex *KOKKOS_RESTRICT AB, const int as0, - const int as1, const int kd); }; -/// -/// Real matrix -/// template <> template KOKKOS_INLINE_FUNCTION int SerialPbtrfInternalUpper::invoke(const int an, @@ -171,7 +102,7 @@ KOKKOS_INLINE_FUNCTION int SerialPbtrfInternalUpper::inv const int kd) { // Compute the Cholesky factorization A = U'*U. for (int j = 0; j < an; ++j) { - auto a_jj = AB[kd * as0 + j * as1]; + auto a_jj = Kokkos::ArithTraits::real(AB[kd * as0 + j * as1]); // Check if U (j,j) is positive definite #if (KOKKOSKERNELS_DEBUG_LEVEL > 0) @@ -191,82 +122,26 @@ KOKKOS_INLINE_FUNCTION int SerialPbtrfInternalUpper::inv const ValueType alpha = 1.0 / a_jj; KokkosBlas::Impl::SerialScaleInternal::invoke(kn, alpha, &(AB[(kd - 1) * as0 + (j + 1) * as1]), kld); - // syr (upper) with alpha = -1.0 to diagonal elements - for (int k = 0; k < kn; ++k) { - auto x_k = AB[(k + kd - 1) * as0 + (j + 1 - k) * as1]; - if (x_k != 0) { - auto temp = -1.0 * x_k; - for (int i = 0; i < k + 1; ++i) { - auto x_i = AB[(i + kd - 1) * as0 + (j + 1 - i) * as1]; - AB[(kd + i) * as0 + (j + 1 + k - i) * as1] += x_i * temp; - } - } - } - } - } - - return 0; -} - -/// -/// Complex matrix -/// -template <> -template -KOKKOS_INLINE_FUNCTION int SerialPbtrfInternalUpper::invoke( - const int an, - /**/ Kokkos::complex *KOKKOS_RESTRICT AB, const int as0, const int as1, const int kd) { - // Compute the Cholesky factorization A = U**H * U. - for (int j = 0; j < an; ++j) { - auto a_jj = AB[kd * as0 + j * as1].real(); - - // Check if U (j,j) is positive definite -#if (KOKKOSKERNELS_DEBUG_LEVEL > 0) - if (a_jj <= 0) { - AB[kd * as0 + j * as1] = a_jj; - return j + 1; - } -#endif - - a_jj = Kokkos::sqrt(a_jj); - AB[kd * as0 + j * as1] = a_jj; - - // Compute elements J+1:J+KN of row J and update the - // trailing submatrix within the band. - int kn = Kokkos::min(kd, an - j - 1); - int kld = Kokkos::max(1, as0 - 1); - if (kn > 0) { - // scale to diagonal elements - const ValueType alpha = 1.0 / a_jj; - KokkosBlas::Impl::SerialScaleInternal::invoke(kn, alpha, &(AB[(kd - 1) * as0 + (j + 1) * as1]), kld); - - // zlacgv to diagonal elements - for (int i = 0; i < kn; ++i) { - AB[(i + kd - 1) * as0 + (j + 1 - i) * as1] = Kokkos::conj(AB[(i + kd - 1) * as0 + (j + 1 - i) * as1]); - } + // zlacgv to diagonal elements (no op for real matrix) + SerialLacgvInternal::invoke(kn, &(AB[(kd - 1) * as0 + (j + 1) * as1]), (as0 - as1)); - // zher (upper) with alpha = -1.0 to diagonal elements - for (int k = 0; k < kn; ++k) { - auto x_k = AB[(k + kd - 1) * as0 + (j + 1 - k) * as1]; - if (x_k != 0) { - auto temp = -1.0 * Kokkos::conj(x_k); - for (int i = 0; i < k + 1; ++i) { - auto x_i = AB[(i + kd - 1) * as0 + (j + 1 - i) * as1]; - AB[(kd + i) * as0 + (j + 1 + k - i) * as1] += x_i * temp; - } - } - } + // syr or zher (upper) with alpha = -1.0 to diagonal elements + using op = std::conditional_t::is_complex, KokkosBlas::Impl::OpConj, + KokkosBlas::Impl::OpID>; + using op_sym = std::conditional_t::is_complex, KokkosBlas::Impl::OpReal, + KokkosBlas::Impl::OpID>; + SerialSyrInternalUpper::invoke(op(), op_sym(), kn, -1.0, &(AB[(kd - 1) * as0 + (j + 1) * as1]), as0, + &(AB[kd * as0 + (j + 1) * as1]), as0, (as1 - as0)); - // zlacgv to diagonal elements - for (int i = 0; i < kn; ++i) { - AB[(i + kd - 1) * as0 + (j + 1 - i) * as1] = Kokkos::conj(AB[(i + kd - 1) * as0 + (j + 1 - i) * as1]); - } + // zlacgv to diagonal elements (no op for real matrix) + SerialLacgvInternal::invoke(kn, &(AB[(kd - 1) * as0 + (j + 1) * as1]), (as0 - as1)); } } return 0; } +} // namespace Impl } // namespace KokkosBatched #endif // KOKKOSBATCHED_PBTRF_SERIAL_INTERNAL_HPP_ diff --git a/batched/dense/src/KokkosBatched_Pbtrf.hpp b/batched/dense/src/KokkosBatched_Pbtrf.hpp index 879dfc0db3..4365a1a789 100644 --- a/batched/dense/src/KokkosBatched_Pbtrf.hpp +++ b/batched/dense/src/KokkosBatched_Pbtrf.hpp @@ -33,8 +33,11 @@ namespace KokkosBatched { /// L is lower triangular. /// This is the unblocked version of the algorithm, calling Level 2 BLAS. /// -/// \tparam ABViewType: Input type for a banded matrix, needs to be a 2D -/// view +/// \tparam ArgUplo: Type indicating whether A is the upper (Uplo::Upper) or lower (Uplo::Lower) triangular matrix +/// \tparam ArgAlgo: Type indicating the blocked (KokkosBatched::Algo::Pbtrf::Blocked) or unblocked +/// (KokkosBatched::Algo::Pbtrf::Unblocked) algorithm to be used +/// +/// \tparam ABViewType: Input type for a banded matrix, needs to be a 2D view /// /// \param ab [inout]: ab is a ldab by n banded matrix, with ( kd + 1 ) diagonals /// @@ -43,6 +46,10 @@ namespace KokkosBatched { template struct SerialPbtrf { + static_assert( + std::is_same_v || std::is_same_v, + "KokkosBatched::pbtrf: Use Uplo::Upper for upper triangular matrix or Uplo::Lower for lower triangular matrix"); + static_assert(std::is_same_v, "KokkosBatched::pbtrf: Use Algo::Pbtrf::Unblocked"); template KOKKOS_INLINE_FUNCTION static int invoke(const ABViewType &ab); }; diff --git a/batched/dense/unit_test/Test_Batched_Dense.hpp b/batched/dense/unit_test/Test_Batched_Dense.hpp index ef47000efe..731fd03cc4 100644 --- a/batched/dense/unit_test/Test_Batched_Dense.hpp +++ b/batched/dense/unit_test/Test_Batched_Dense.hpp @@ -56,8 +56,6 @@ #include "Test_Batched_SerialPttrs_Real.hpp" #include "Test_Batched_SerialPttrs_Complex.hpp" #include "Test_Batched_SerialPbtrf.hpp" -#include "Test_Batched_SerialPbtrf_Real.hpp" -#include "Test_Batched_SerialPbtrf_Complex.hpp" #include "Test_Batched_SerialPbtrs.hpp" #include "Test_Batched_SerialPbtrs_Real.hpp" #include "Test_Batched_SerialPbtrs_Complex.hpp" diff --git a/batched/dense/unit_test/Test_Batched_SerialPbtrf.hpp b/batched/dense/unit_test/Test_Batched_SerialPbtrf.hpp index 0b16fab242..80a4588eb0 100644 --- a/batched/dense/unit_test/Test_Batched_SerialPbtrf.hpp +++ b/batched/dense/unit_test/Test_Batched_SerialPbtrf.hpp @@ -22,8 +22,6 @@ #include "KokkosBatched_Pbtrf.hpp" #include "Test_Batched_DenseUtils.hpp" -using namespace KokkosBatched; - namespace Test { namespace Pbtrf { @@ -35,14 +33,14 @@ struct ParamTag { template struct Functor_BatchedSerialPbtrf { using execution_space = typename DeviceType::execution_space; - ABViewType _ab; + ABViewType m_ab; KOKKOS_INLINE_FUNCTION - Functor_BatchedSerialPbtrf(const ABViewType &ab) : _ab(ab) {} + Functor_BatchedSerialPbtrf(const ABViewType &ab) : m_ab(ab) {} KOKKOS_INLINE_FUNCTION void operator()(const ParamTagType &, const int k, int &info) const { - auto sub_ab = Kokkos::subview(_ab, k, Kokkos::ALL(), Kokkos::ALL()); + auto sub_ab = Kokkos::subview(m_ab, k, Kokkos::ALL(), Kokkos::ALL()); info += KokkosBatched::SerialPbtrf::invoke(sub_ab); } @@ -54,7 +52,7 @@ struct Functor_BatchedSerialPbtrf { std::string name = name_region + name_value_type; int info_sum = 0; Kokkos::Profiling::pushRegion(name.c_str()); - Kokkos::RangePolicy policy(0, _ab.extent(0)); + Kokkos::RangePolicy policy(0, m_ab.extent(0)); Kokkos::parallel_reduce(name.c_str(), policy, *this, info_sum); Kokkos::Profiling::popRegion(); return info_sum; @@ -65,23 +63,23 @@ template struct Functor_BatchedSerialGemm { using execution_space = typename DeviceType::execution_space; - AViewType _a; - BViewType _b; - CViewType _c; - ScalarType _alpha, _beta; + AViewType m_a; + BViewType m_b; + CViewType m_c; + ScalarType m_alpha, m_beta; KOKKOS_INLINE_FUNCTION Functor_BatchedSerialGemm(const ScalarType alpha, const AViewType &a, const BViewType &b, const ScalarType beta, const CViewType &c) - : _a(a), _b(b), _c(c), _alpha(alpha), _beta(beta) {} + : m_a(a), m_b(b), m_c(c), m_alpha(alpha), m_beta(beta) {} KOKKOS_INLINE_FUNCTION void operator()(const int k) const { - auto aa = Kokkos::subview(_a, k, Kokkos::ALL(), Kokkos::ALL()); - auto bb = Kokkos::subview(_b, k, Kokkos::ALL(), Kokkos::ALL()); - auto cc = Kokkos::subview(_c, k, Kokkos::ALL(), Kokkos::ALL()); + auto aa = Kokkos::subview(m_a, k, Kokkos::ALL(), Kokkos::ALL()); + auto bb = Kokkos::subview(m_b, k, Kokkos::ALL(), Kokkos::ALL()); + auto cc = Kokkos::subview(m_c, k, Kokkos::ALL(), Kokkos::ALL()); - KokkosBatched::SerialGemm::invoke(_alpha, aa, bb, _beta, cc); + KokkosBatched::SerialGemm::invoke(m_alpha, aa, bb, m_beta, cc); } inline void run() { @@ -89,13 +87,12 @@ struct Functor_BatchedSerialGemm { std::string name_region("KokkosBatched::Test::SerialPbtrf"); const std::string name_value_type = Test::value_type_name(); std::string name = name_region + name_value_type; - Kokkos::RangePolicy policy(0, _a.extent(0)); + Kokkos::RangePolicy policy(0, m_a.extent(0)); Kokkos::parallel_for(name.c_str(), policy, *this); } }; -template -/// \brief Implementation details of batched pbtrf test +/// \brief Implementation details of batched pbtrf analytical test /// Confirm A = U**H * U or L * L**H, where /// For full storage, /// A: [[4, 1], @@ -117,12 +114,13 @@ template void impl_test_batched_pbtrf_analytical(const int N) { using ats = typename Kokkos::ArithTraits; using RealType = typename ats::mag_type; using View3DType = Kokkos::View; - constexpr int BlkSize = 2, k = 1; + const int BlkSize = 2, k = 1; View3DType A("A", N, BlkSize, BlkSize), Ab("Ab", N, k + 1, BlkSize), Ab_ref("Ab_ref", N, k + 1, BlkSize); // Banded matrix @@ -182,12 +180,12 @@ void impl_test_batched_pbtrf_analytical(const int N) { } } -template -/// \brief Implementation details of batched pbtrs test +/// \brief Implementation details of batched pbtrf test /// -/// \param N [in] Batch size of RHS (banded matrix can also be batched matrix) +/// \param N [in] Batch size of RHS /// \param k [in] Number of superdiagonals or subdiagonals of matrix A /// \param BlkSize [in] Block size of matrix A +template void impl_test_batched_pbtrf(const int N, const int k, const int BlkSize) { using View3DType = Kokkos::View; View3DType A("A", N, BlkSize, BlkSize), A_reconst("A_reconst", N, BlkSize, BlkSize), @@ -220,53 +218,20 @@ void impl_test_batched_pbtrf(const int N, const int k, const int BlkSize) { Kokkos::fence(); EXPECT_EQ(info, 0); + // Compute A = U**H * U or A = L * L**H if (std::is_same_v) { // A = U**H * U - View3DType U("U", N, BlkSize, BlkSize), Uc("Uc", N, BlkSize, BlkSize); + View3DType U("U", N, BlkSize, BlkSize); banded_to_full(Ab, U, k); - - // Compute the complex conjugate of U - // U -> conj(U) - auto h_U = Kokkos::create_mirror_view(U); - auto h_Uc = Kokkos::create_mirror_view(Uc); - Kokkos::deep_copy(h_U, U); - Kokkos::deep_copy(h_Uc, Uc); - for (int ib = 0; ib < N; ib++) { - for (int i = 0; i < BlkSize; i++) { - for (int j = 0; j < BlkSize; j++) { - h_Uc(ib, i, j) = Kokkos::ArithTraits::conj(h_U(ib, i, j)); - } - } - } - Kokkos::deep_copy(Uc, h_Uc); - - // Create conjugate of U - Functor_BatchedSerialGemm(1.0, Uc, U, 0.0, A_reconst) + Functor_BatchedSerialGemm(1.0, U, U, 0.0, A_reconst) .run(); } else { // A = L * L**H - View3DType L("L", N, BlkSize, BlkSize), Lc("Lc", N, BlkSize, BlkSize); + View3DType L("L", N, BlkSize, BlkSize); banded_to_full(Ab, L, k); - - // Compute the complex conjugate of L - // L -> conj(L) - auto h_L = Kokkos::create_mirror_view(L); - auto h_Lc = Kokkos::create_mirror_view(Lc); - Kokkos::deep_copy(h_L, L); - Kokkos::deep_copy(h_Lc, Lc); - for (int ib = 0; ib < N; ib++) { - for (int i = 0; i < BlkSize; i++) { - for (int j = 0; j < BlkSize; j++) { - h_Lc(ib, i, j) = Kokkos::ArithTraits::conj(h_L(ib, i, j)); - } - } - } - Kokkos::deep_copy(Lc, h_Lc); - - // Create conjugate of L Functor_BatchedSerialGemm(1.0, L, Lc, 0.0, A_reconst) + Trans::ConjTranspose>(1.0, L, L, 0.0, A_reconst) .run(); } @@ -320,3 +285,63 @@ int test_batched_pbtrf() { return 0; } + +#if defined(KOKKOSKERNELS_INST_FLOAT) +TEST_F(TestCategory, test_batched_pbtrf_l_float) { + using algo_tag_type = typename Algo::Pbtrf::Unblocked; + using param_tag_type = ::Test::Pbtrf::ParamTag; + + test_batched_pbtrf(); +} +TEST_F(TestCategory, test_batched_pbtrf_u_float) { + using algo_tag_type = typename Algo::Pbtrf::Unblocked; + using param_tag_type = ::Test::Pbtrf::ParamTag; + + test_batched_pbtrf(); +} +#endif + +#if defined(KOKKOSKERNELS_INST_DOUBLE) +TEST_F(TestCategory, test_batched_pbtrf_l_double) { + using algo_tag_type = typename Algo::Pbtrf::Unblocked; + using param_tag_type = ::Test::Pbtrf::ParamTag; + + test_batched_pbtrf(); +} +TEST_F(TestCategory, test_batched_pbtrf_u_double) { + using algo_tag_type = typename Algo::Pbtrf::Unblocked; + using param_tag_type = ::Test::Pbtrf::ParamTag; + + test_batched_pbtrf(); +} +#endif + +#if defined(KOKKOSKERNELS_INST_COMPLEX_FLOAT) +TEST_F(TestCategory, test_batched_pbtrf_l_fcomplex) { + using algo_tag_type = typename Algo::Pbtrf::Unblocked; + using param_tag_type = ::Test::Pbtrf::ParamTag; + + test_batched_pbtrf, param_tag_type, algo_tag_type>(); +} +TEST_F(TestCategory, test_batched_pbtrf_u_fcomplex) { + using algo_tag_type = typename Algo::Pbtrf::Unblocked; + using param_tag_type = ::Test::Pbtrf::ParamTag; + + test_batched_pbtrf, param_tag_type, algo_tag_type>(); +} +#endif + +#if defined(KOKKOSKERNELS_INST_COMPLEX_DOUBLE) +TEST_F(TestCategory, test_batched_pbtrf_l_dcomplex) { + using algo_tag_type = typename Algo::Pbtrf::Unblocked; + using param_tag_type = ::Test::Pbtrf::ParamTag; + + test_batched_pbtrf, param_tag_type, algo_tag_type>(); +} +TEST_F(TestCategory, test_batched_pbtrf_u_dcomplex) { + using algo_tag_type = typename Algo::Pbtrf::Unblocked; + using param_tag_type = ::Test::Pbtrf::ParamTag; + + test_batched_pbtrf, param_tag_type, algo_tag_type>(); +} +#endif diff --git a/batched/dense/unit_test/Test_Batched_SerialPbtrf_Complex.hpp b/batched/dense/unit_test/Test_Batched_SerialPbtrf_Complex.hpp deleted file mode 100644 index 3aebb8ffa5..0000000000 --- a/batched/dense/unit_test/Test_Batched_SerialPbtrf_Complex.hpp +++ /dev/null @@ -1,45 +0,0 @@ -//@HEADER -// ************************************************************************ -// -// Kokkos v. 4.0 -// Copyright (2022) National Technology & Engineering -// Solutions of Sandia, LLC (NTESS). -// -// Under the terms of Contract DE-NA0003525 with NTESS, -// the U.S. Government retains certain rights in this software. -// -// Part of Kokkos, under the Apache License v2.0 with LLVM Exceptions. -// See https://kokkos.org/LICENSE for license information. -// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -// -//@HEADER - -#if defined(KOKKOSKERNELS_INST_COMPLEX_FLOAT) -TEST_F(TestCategory, test_batched_pbtrf_l_fcomplex) { - using algo_tag_type = typename Algo::Pbtrf::Unblocked; - using param_tag_type = ::Test::Pbtrf::ParamTag; - - test_batched_pbtrf, param_tag_type, algo_tag_type>(); -} -TEST_F(TestCategory, test_batched_pbtrf_u_fcomplex) { - using algo_tag_type = typename Algo::Pbtrf::Unblocked; - using param_tag_type = ::Test::Pbtrf::ParamTag; - - test_batched_pbtrf, param_tag_type, algo_tag_type>(); -} -#endif - -#if defined(KOKKOSKERNELS_INST_COMPLEX_DOUBLE) -TEST_F(TestCategory, test_batched_pbtrf_l_dcomplex) { - using algo_tag_type = typename Algo::Pbtrf::Unblocked; - using param_tag_type = ::Test::Pbtrf::ParamTag; - - test_batched_pbtrf, param_tag_type, algo_tag_type>(); -} -TEST_F(TestCategory, test_batched_pbtrf_u_dcomplex) { - using algo_tag_type = typename Algo::Pbtrf::Unblocked; - using param_tag_type = ::Test::Pbtrf::ParamTag; - - test_batched_pbtrf, param_tag_type, algo_tag_type>(); -} -#endif diff --git a/batched/dense/unit_test/Test_Batched_SerialPbtrf_Real.hpp b/batched/dense/unit_test/Test_Batched_SerialPbtrf_Real.hpp deleted file mode 100644 index e1b77416f5..0000000000 --- a/batched/dense/unit_test/Test_Batched_SerialPbtrf_Real.hpp +++ /dev/null @@ -1,45 +0,0 @@ -//@HEADER -// ************************************************************************ -// -// Kokkos v. 4.0 -// Copyright (2022) National Technology & Engineering -// Solutions of Sandia, LLC (NTESS). -// -// Under the terms of Contract DE-NA0003525 with NTESS, -// the U.S. Government retains certain rights in this software. -// -// Part of Kokkos, under the Apache License v2.0 with LLVM Exceptions. -// See https://kokkos.org/LICENSE for license information. -// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -// -//@HEADER - -#if defined(KOKKOSKERNELS_INST_FLOAT) -TEST_F(TestCategory, test_batched_pbtrf_l_float) { - using algo_tag_type = typename Algo::Pbtrf::Unblocked; - using param_tag_type = ::Test::Pbtrf::ParamTag; - - test_batched_pbtrf(); -} -TEST_F(TestCategory, test_batched_pbtrf_u_float) { - using algo_tag_type = typename Algo::Pbtrf::Unblocked; - using param_tag_type = ::Test::Pbtrf::ParamTag; - - test_batched_pbtrf(); -} -#endif - -#if defined(KOKKOSKERNELS_INST_DOUBLE) -TEST_F(TestCategory, test_batched_pbtrf_l_double) { - using algo_tag_type = typename Algo::Pbtrf::Unblocked; - using param_tag_type = ::Test::Pbtrf::ParamTag; - - test_batched_pbtrf(); -} -TEST_F(TestCategory, test_batched_pbtrf_u_double) { - using algo_tag_type = typename Algo::Pbtrf::Unblocked; - using param_tag_type = ::Test::Pbtrf::ParamTag; - - test_batched_pbtrf(); -} -#endif