Skip to content

Commit

Permalink
Merge branch 'fix-cuda-issues' into 'master'
Browse files Browse the repository at this point in the history
Fix CUDA issues

See merge request OPAL/Libraries/ippl!168
  • Loading branch information
Arc676 committed May 3, 2023
2 parents 2e49b8f + 580c7b8 commit 42b6182
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 4 additions & 6 deletions src/Interpolation/CIC.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ namespace ippl {
}

template <unsigned long ScatterPoint, unsigned long... Index, typename T, unsigned Dim,
typename IndexType = size_t>
typename IndexType>
KOKKOS_INLINE_FUNCTION constexpr int scatterToPoint(
const std::index_sequence<Index...>&,
const typename detail::ViewType<T, Dim>::view_type& view, const Vector<T, Dim>& wlo,
Expand All @@ -57,8 +57,7 @@ namespace ippl {
return 0;
}

template <unsigned long... ScatterPoint, typename T, unsigned Dim,
typename IndexType = size_t>
template <unsigned long... ScatterPoint, typename T, unsigned Dim, typename IndexType>
KOKKOS_INLINE_FUNCTION constexpr void scatterToField(
const std::index_sequence<ScatterPoint...>&,
const typename detail::ViewType<T, Dim>::view_type& view, const Vector<T, Dim>& wlo,
Expand All @@ -70,7 +69,7 @@ namespace ippl {
}

template <unsigned long GatherPoint, unsigned long... Index, typename T, unsigned Dim,
typename IndexType = size_t>
typename IndexType>
KOKKOS_INLINE_FUNCTION constexpr T gatherFromPoint(
const std::index_sequence<Index...>&,
const typename detail::ViewType<T, Dim>::view_type& view, const Vector<T, Dim>& wlo,
Expand All @@ -79,8 +78,7 @@ namespace ippl {
* view(interpolationIndex<GatherPoint, Index>(args)...);
}

template <unsigned long... GatherPoint, typename T, unsigned Dim,
typename IndexType = size_t>
template <unsigned long... GatherPoint, typename T, unsigned Dim, typename IndexType>
KOKKOS_INLINE_FUNCTION constexpr T gatherFromField(
const std::index_sequence<GatherPoint...>&,
const typename detail::ViewType<T, Dim>::view_type& view, const Vector<T, Dim>& wlo,
Expand Down
2 changes: 2 additions & 0 deletions src/Ippl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,8 @@ T Ippl::getNumericalOption(const char* arg) {
throw std::runtime_error("Expected floating point argument!");
}
}
// Silence nvcc warning: missing return statement at end of non-void function
throw std::runtime_error("Unreachable state");
}

/////////////////////////////////////////////////////////////////////
Expand Down

0 comments on commit 42b6182

Please sign in to comment.