Skip to content

Commit

Permalink
Changed KOKKOS_INLINE_FUNCTION into KOKKOS_FUNCTION (for inline template
Browse files Browse the repository at this point in the history
functions)
  • Loading branch information
nliber committed May 23, 2024
1 parent 0655e5f commit aa8ecfb
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions core/src/Kokkos_Array.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -359,25 +359,25 @@ Array(T, Us...)->Array<T, 1 + sizeof...(Us)>;
namespace Impl {

template <typename T, size_t N, size_t... I>
KOKKOS_INLINE_FUNCTION constexpr Array<std::remove_cv_t<T>, N> to_Array_impl(
KOKKOS_FUNCTION constexpr Array<std::remove_cv_t<T>, N> to_Array_impl(
T (&a)[N], std::index_sequence<I...>) {
return {{a[I]...}};
}

template <typename T, size_t N, size_t... I>
KOKKOS_INLINE_FUNCTION constexpr Array<std::remove_cv_t<T>, N> to_Array_impl(
KOKKOS_FUNCTION constexpr Array<std::remove_cv_t<T>, N> to_Array_impl(
T(&&a)[N], std::index_sequence<I...>) {
return {{std::move(a[I])...}};
}

} // namespace Impl

template <class T, size_t N>
template <typename T, size_t N>
KOKKOS_INLINE_FUNCTION constexpr auto to_Array(T (&a)[N]) {
return Impl::to_Array_impl(a, std::make_index_sequence<N>{});
}

template <class T, size_t N>
template <typename T, size_t N>
KOKKOS_INLINE_FUNCTION constexpr auto to_Array(T(&&a)[N]) {
return Impl::to_Array_impl(std::move(a), std::make_index_sequence<N>{});
}
Expand Down

0 comments on commit aa8ecfb

Please sign in to comment.