| 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_ADD_RADIAL_IMPL_HPP |
| 17 |
#define KOKKOSBATCHED_ADD_RADIAL_IMPL_HPP |
| 18 |
|
| 19 |
/// \author Kyungjoo Kim ([email protected]) |
| 20 |
|
| 21 |
#include "KokkosBatched_Util.hpp" |
| 22 |
#include "KokkosBatched_AddRadial_Internal.hpp" |
| 23 |
|
| 24 |
namespace KokkosBatched { |
| 25 |
|
| 26 |
/// |
| 27 |
/// Serial Impl |
| 28 |
/// =========== |
| 29 |
|
| 30 |
template <typename ScalarType, typename AViewType> |
| 31 |
KOKKOS_INLINE_FUNCTION int SerialAddRadial::invoke(const ScalarType tiny, const AViewType &A) { |
| 32 |
return SerialAddRadialInternal::invoke((A.extent(0) < A.extent(1) ? A.extent(0) : A.extent(1)), tiny, A.data(), |
| 33 |
(A.stride_0() + A.stride_1())); |
| 34 |
} |
| 35 |
|
| 36 |
/// |
| 37 |
/// Team Impl |
| 38 |
/// ========= |
| 39 |
|
| 40 |
template <typename MemberType> |
| 41 |
template <typename ScalarType, typename AViewType> |
| 42 |
KOKKOS_INLINE_FUNCTION int TeamAddRadial<MemberType>::invoke(const MemberType &member, const ScalarType tiny, |
| 43 |
const AViewType &A) { |
| 44 |
return TeamAddRadialInternal::invoke(member, (A.extent(0) < A.extent(1) ? A.extent(0) : A.extent(1)), tiny, A.data(), |
| 45 |
(A.stride_0() + A.stride_1())); |
| 46 |
} |
| 47 |
|
| 48 |
} // end namespace KokkosBatched |
| 49 |
|
| 50 |
#endif |