| 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_PTTRF_HPP_ |
| 17 |
#define KOKKOSBATCHED_PTTRF_HPP_ |
| 18 |
|
| 19 |
#include <KokkosBatched_Util.hpp> |
| 20 |
|
| 21 |
/// \author Yuuichi Asahi ([email protected]) |
| 22 |
|
| 23 |
namespace KokkosBatched { |
| 24 |
|
| 25 |
/// \brief Serial Batched Pttrf: |
| 26 |
/// Compute the Cholesky factorization L*D*L**T (or L*D*L**H) of a real |
| 27 |
/// symmetric (or complex Hermitian) positive definite tridiagonal matrix A_l |
| 28 |
/// for all l = 0, ..., N |
| 29 |
/// |
| 30 |
/// \tparam DViewType: Input type for the a diagonal matrix, needs to be a 1D |
| 31 |
/// view |
| 32 |
/// \tparam EViewType: Input type for the a upper/lower diagonal matrix, |
| 33 |
/// needs to be a 1D view |
| 34 |
/// |
| 35 |
/// \param d [inout]: n diagonal elements of the diagonal matrix D |
| 36 |
/// \param e [inout]: n-1 upper/lower diagonal elements of the diagonal matrix E |
| 37 |
/// |
| 38 |
/// No nested parallel_for is used inside of the function. |
| 39 |
/// |
| 40 |
|
| 41 |
template <typename ArgAlgo> |
| 42 |
struct SerialPttrf { |
| 43 |
template <typename DViewType, typename EViewType> |
| 44 |
KOKKOS_INLINE_FUNCTION static int invoke(const DViewType &d, const EViewType &e); |
| 45 |
}; |
| 46 |
|
| 47 |
} // namespace KokkosBatched |
| 48 |
|
| 49 |
#include "KokkosBatched_Pttrf_Serial_Impl.hpp" |
| 50 |
|
| 51 |
#endif // KOKKOSBATCHED_PTTRF_HPP_ |