| 1 |
//@HEADER |
| 2 |
// ************************************************************************ |
| 3 |
// |
| 4 |
// Kokkos v. 4.0 |
| 5 |
// Copyright (2022) National Technology & Engineering |
| 6 |
// Solutions of Sandia, LLC (NTESS). |
| 7 |
// |
| 8 |
// Under the terms of Contract DE-NA0003525 with NTESS, |
| 9 |
// the U.S. Government retains certain rights in this software. |
| 10 |
// |
| 11 |
// Part of Kokkos, under the Apache License v2.0 with LLVM Exceptions. |
| 12 |
// See https://kokkos.org/LICENSE for license information. |
| 13 |
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception |
| 14 |
// |
| 15 |
//@HEADER |
| 16 |
#ifndef KOKKOSBATCHED_PBTRF_HPP_ |
| 17 |
#define KOKKOSBATCHED_PBTRF_HPP_ |
| 18 |
|
| 19 |
#include <KokkosBatched_Util.hpp> |
| 20 |
|
| 21 |
/// \author Yuuichi Asahi ([email protected]) |
| 22 |
|
| 23 |
namespace KokkosBatched { |
| 24 |
|
| 25 |
/// \brief Serial Batched Pbtrf: |
| 26 |
/// Compute the Cholesky factorization U**H * U (or L * L**H) of a real |
| 27 |
/// symmetric (or complex Hermitian) positive definite banded matrix A_l |
| 28 |
/// for all l = 0, ..., |
| 29 |
/// The factorization has the form |
| 30 |
/// A = U**T * U , if ArgUplo = KokkosBatched::Uplo::Upper, or |
| 31 |
/// A = L * L**T, if ArgUplo = KokkosBatched::Uplo::Lower, |
| 32 |
/// where U is an upper triangular matrix, U**T is the transpose of U, and |
| 33 |
/// L is lower triangular. |
| 34 |
/// This is the unblocked version of the algorithm, calling Level 2 BLAS. |
| 35 |
/// |
| 36 |
/// \tparam ABViewType: Input type for a banded matrix, needs to be a 2D |
| 37 |
/// view |
| 38 |
/// |
| 39 |
/// \param ab [inout]: ab is a ldab by n banded matrix, with ( kd + 1 ) diagonals |
| 40 |
/// |
| 41 |
/// No nested parallel_for is used inside of the function. |
| 42 |
/// |
| 43 |
|
| 44 |
template <typename ArgUplo, typename ArgAlgo> |
| 45 |
struct SerialPbtrf { |
| 46 |
template <typename ABViewType> |
| 47 |
KOKKOS_INLINE_FUNCTION static int invoke(const ABViewType &ab); |
| 48 |
}; |
| 49 |
|
| 50 |
} // namespace KokkosBatched |
| 51 |
|
| 52 |
#include "KokkosBatched_Pbtrf_Serial_Impl.hpp" |
| 53 |
|
| 54 |
#endif // KOKKOSBATCHED_PBTRF_HPP_ |