Debian Codegraph @

packages/kokkos-kernels/batched/dense/src/KokkosBatched_SolveUTV_Decl.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_SOLVE_UTV_DECL_HPP
17 #define KOKKOSBATCHED_SOLVE_UTV_DECL_HPP
18
19 /// \author Kyungjoo Kim ([email protected])
20
21 #include "KokkosBatched_Util.hpp"
22
23 namespace KokkosBatched {
24
25 ///
26 /// For given UTV = A P^T, it solves A X = B
27 /// - input:
28 /// - matrix_rank is computed while UTV factorization
29 /// - U is m x m real matrix (m x matrix_rank is only used)
30 /// - T is m x m real matrix (matrix_rank x matrix_rank is only used)
31 /// - V is m x m real matrix (matrix_Rank x m is only used)
32 /// - p is m integer vector including pivot indicies
33 /// - X is a solution matrix (or vector)
34 /// - B is a right hand side matrix (or vector)
35 /// - w is B.span() real vector workspace (contiguous)
36 /// - output:
37 /// - B is overwritten with its solutions
38 ///
39 /// When A is a full rank i.e., matrix_rank == m, UTV computes QR with column
40 /// pivoting only where Q is stored in U and R is stored in T
41 ///
42
43 ///
44 /// TeamVector Solve UTV
45 ///
46
47 template <typename MemberType, typename ArgAlgo>
48 struct TeamVectorSolveUTV {
49 template <typename UViewType, typename TViewType, typename VViewType, typename pViewType, typename XViewType,
50 typename BViewType, typename wViewType>
51 KOKKOS_INLINE_FUNCTION static int invoke(const MemberType &member, const int matrix_rank, const UViewType &U,
52 const TViewType &T, const VViewType &V, const pViewType &p,
53 const XViewType &X, const BViewType &B, const wViewType &w);
54 };
55
56 } // namespace KokkosBatched
57
58 #include "KokkosBatched_SolveUTV_TeamVector_Impl.hpp"
59
60 #endif