| 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 |
|
| 17 |
#ifndef KOKKOSBATCHED_TRTRI_SERIAL_IMPL_HPP |
| 18 |
#define KOKKOSBATCHED_TRTRI_SERIAL_IMPL_HPP |
| 19 |
|
| 20 |
#include "KokkosBatched_Util.hpp" |
| 21 |
#include "KokkosBatched_Trtri_Serial_Internal.hpp" |
| 22 |
|
| 23 |
namespace KokkosBatched { |
| 24 |
template <typename ArgDiag> |
| 25 |
struct SerialTrtri<Uplo::Lower, ArgDiag, Algo::Trtri::Unblocked> { |
| 26 |
template <typename AViewType> |
| 27 |
KOKKOS_INLINE_FUNCTION static int invoke(const AViewType &A) { |
| 28 |
return SerialTrtriInternalLower<Algo::Trtri::Unblocked>::invoke(ArgDiag::use_unit_diag, A.extent(0), A.extent(1), |
| 29 |
A.data(), A.stride_0(), A.stride_1()); |
| 30 |
} |
| 31 |
}; |
| 32 |
template <typename ArgDiag> |
| 33 |
struct SerialTrtri<Uplo::Upper, ArgDiag, Algo::Trtri::Unblocked> { |
| 34 |
template <typename AViewType> |
| 35 |
KOKKOS_INLINE_FUNCTION static int invoke(const AViewType &A) { |
| 36 |
return SerialTrtriInternalUpper<Algo::Trtri::Unblocked>::invoke(ArgDiag::use_unit_diag, A.extent(0), A.extent(1), |
| 37 |
A.data(), A.stride(0), A.stride(1)); |
| 38 |
} |
| 39 |
}; |
| 40 |
} // namespace KokkosBatched |
| 41 |
|
| 42 |
#endif // KOKKOSBATCHED_TRTRI_SERIAL_IMPL_HPP |