Debian Codegraph @

packages/kokkos-kernels/batched/dense/src/KokkosBatched_Pttrs.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_PTTRS_HPP_
17 #define KOKKOSBATCHED_PTTRS_HPP_
18
19 #include <KokkosBatched_Util.hpp>
20
21 /// \author Yuuichi Asahi ([email protected])
22
23 namespace KokkosBatched {
24
25 /// \brief Serial Batched Pttrs:
26 /// Solve Ab_l x_l = b_l for all l = 0, ..., N
27 /// using the factorization A = U**H * D * U or A = L * D * L**H computed by
28 /// Pttrf.
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 /// \tparam BViewType: Input type for the right-hand side and the solution,
35 /// needs to be a 1D view
36 ///
37 /// \param d [in]: n diagonal elements of the diagonal matrix D
38 /// \param e [in]: n-1 upper/lower diagonal elements of the diagonal matrix E
39 /// \param b [inout]: right-hand side and the solution, a rank 1 view
40 ///
41 /// No nested parallel_for is used inside of the function.
42 ///
43
44 template <typename ArgUplo, typename ArgAlgo>
45 struct SerialPttrs {
46 template <typename DViewType, typename EViewType, typename BViewType>
47 KOKKOS_INLINE_FUNCTION static int invoke(const DViewType &d, const EViewType &e, const BViewType &b);
48 };
49
50 } // namespace KokkosBatched
51
52 #include "KokkosBatched_Pttrs_Serial_Impl.hpp"
53
54 #endif // KOKKOSBATCHED_PTTRS_HPP_