Debian Codegraph @

packages/kokkos-kernels/batched/dense/src/KokkosBatched_Pbtrs.hpp

raw
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_PBTRS_HPP_
17 #define KOKKOSBATCHED_PBTRS_HPP_
18
19 #include <KokkosBatched_Util.hpp>
20
21 /// \author Yuuichi Asahi ([email protected])
22
23 namespace KokkosBatched {
24
25 /// \brief Serial Batched Pbtrs:
26 /// Solve Ab_l x_l = b_l for all l = 0, ..., N
27 /// using the Cholesky factorization A = U**H * U or A = L * L**H computed by
28 /// Pbtrf.
29 /// The matrix has the form
30 /// A = U**H * U , if ArgUplo = KokkosBatched::Uplo::Upper, or
31 /// A = L * L**H, if ArgUplo = KokkosBatched::Uplo::Lower,
32 /// where U is an upper triangular matrix, U**H is the transpose of U, and
33 /// L is lower triangular matrix, L**H is the transpose of L.
34 ///
35 /// \tparam ABViewType: Input type for a banded matrix, needs to be a 2D
36 /// view
37 /// \tparam BViewType: Input type for a right-hand side and the solution,
38 /// needs to be a 1D view
39 ///
40 /// \param ab [in]: ab is a ldab by n banded matrix, with ( kd + 1 ) diagonals
41 /// \param b [inout]: right-hand side and the solution, a rank 1 view
42 ///
43 /// No nested parallel_for is used inside of the function.
44 ///
45
46 template <typename ArgUplo, typename ArgAlgo>
47 struct SerialPbtrs {
48 template <typename ABViewType, typename BViewType>
49 KOKKOS_INLINE_FUNCTION static int invoke(const ABViewType &ab, const BViewType &b);
50 };
51
52 } // namespace KokkosBatched
53
54 #include "KokkosBatched_Pbtrs_Serial_Impl.hpp"
55
56 #endif // KOKKOSBATCHED_PBTRS_HPP_