Debian Codegraph @

packages/kokkos-kernels/batched/dense/impl/KokkosBatched_SolveUTV_TeamVector_Impl.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_TEAMVECTOR_IMPL_HPP
17 #define KOKKOSBATCHED_SOLVE_UTV_TEAMVECTOR_IMPL_HPP
18
19 /// \author Kyungjoo Kim ([email protected])
20
21 #include "KokkosBatched_Util.hpp"
22 #include "KokkosBatched_SolveUTV_TeamVector_Internal.hpp"
23
24 namespace KokkosBatched {
25
26 ///
27 /// TeamVector Impl
28 /// ===============
29 template <typename MemberType>
30 struct TeamVectorSolveUTV<MemberType, Algo::UTV::Unblocked> {
31 template <typename UViewType, typename TViewType, typename VViewType, typename pViewType, typename XViewType,
32 typename BViewType, typename wViewType>
33 KOKKOS_INLINE_FUNCTION static int invoke(const MemberType &member, const int matrix_rank, const UViewType &U,
34 const TViewType &T, const VViewType &V, const pViewType &p,
35 const XViewType &X, const BViewType &B, const wViewType &w) {
36 if (BViewType::rank == 1)
37 TeamVectorSolveUTV_Internal::invoke(member, matrix_rank, T.extent(0), V.extent(0), U.data(), U.stride(0),
38 U.stride(1), T.data(), T.stride(0), T.stride(1), V.data(), V.stride(0),
39 V.stride(1), p.data(), p.stride(0), X.data(), X.stride(0), B.data(),
40 B.stride(0), w.data());
41 else
42 TeamVectorSolveUTV_Internal::invoke(member, matrix_rank, T.extent(0), V.extent(0), B.extent(1), U.data(),
43 U.stride(0), U.stride(1), T.data(), T.stride(0), T.stride(1), V.data(),
44 V.stride(0), V.stride(1), p.data(), p.stride(0), X.data(), X.stride(0),
45 X.stride(1), B.data(), B.stride(0), B.stride(1), w.data());
46 return 0;
47 }
48 };
49
50 } // namespace KokkosBatched
51
52 #endif