| 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_LU_TEAM_IMPL_HPP |
| 17 |
#define KOKKOSBATCHED_LU_TEAM_IMPL_HPP |
| 18 |
|
| 19 |
/// \author Kyungjoo Kim ([email protected]) |
| 20 |
|
| 21 |
#include "KokkosBatched_Util.hpp" |
| 22 |
#include "KokkosBatched_LU_Team_Internal.hpp" |
| 23 |
|
| 24 |
namespace KokkosBatched { |
| 25 |
|
| 26 |
/// |
| 27 |
/// Team Impl |
| 28 |
/// ========= |
| 29 |
|
| 30 |
/// |
| 31 |
/// LU no piv |
| 32 |
/// |
| 33 |
|
| 34 |
template <typename MemberType> |
| 35 |
struct TeamLU<MemberType, Algo::LU::Unblocked> { |
| 36 |
template <typename AViewType> |
| 37 |
KOKKOS_INLINE_FUNCTION static int invoke( |
| 38 |
const MemberType &member, const AViewType &A, |
| 39 |
const typename MagnitudeScalarType<typename AViewType::non_const_value_type>::type tiny = 0) { |
| 40 |
return TeamLU_Internal<Algo::LU::Unblocked>::invoke(member, A.extent(0), A.extent(1), A.data(), A.stride_0(), |
| 41 |
A.stride_1(), tiny); |
| 42 |
} |
| 43 |
}; |
| 44 |
|
| 45 |
template <typename MemberType> |
| 46 |
struct TeamLU<MemberType, Algo::LU::Blocked> { |
| 47 |
template <typename AViewType> |
| 48 |
KOKKOS_INLINE_FUNCTION static int invoke( |
| 49 |
const MemberType &member, const AViewType &A, |
| 50 |
const typename MagnitudeScalarType<typename AViewType::non_const_value_type>::type tiny = 0) { |
| 51 |
return TeamLU_Internal<Algo::LU::Blocked>::invoke(member, A.extent(0), A.extent(1), A.data(), A.stride_0(), |
| 52 |
A.stride_1(), tiny); |
| 53 |
} |
| 54 |
}; |
| 55 |
|
| 56 |
} // namespace KokkosBatched |
| 57 |
|
| 58 |
#endif |