Skip to content

Commit

Permalink
Fixing HIP builder
Browse files Browse the repository at this point in the history
  • Loading branch information
hkaiser committed Aug 19, 2023
1 parent 82fc488 commit c90f93e
Showing 1 changed file with 18 additions and 17 deletions.
35 changes: 18 additions & 17 deletions libs/core/algorithms/include/hpx/parallel/util/loop.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ namespace hpx::parallel::util {
inline constexpr loop_t loop = loop_t{};
#else
template <typename ExPolicy, typename Begin, typename End, typename F>
HPX_HOST_DEVICE HPX_FORCEINLINE constexpr Begin loop(
HPX_HOST_DEVICE HPX_FORCEINLINE constexpr decltype(auto) loop(
ExPolicy&& policy, Begin begin, End end, F&& f)
{
return hpx::parallel::util::loop_t{}(
Expand All @@ -139,7 +139,7 @@ namespace hpx::parallel::util {

template <typename ExPolicy, typename Begin, typename End,
typename CancelToken, typename F>
HPX_HOST_DEVICE HPX_FORCEINLINE constexpr Begin loop(
HPX_HOST_DEVICE HPX_FORCEINLINE constexpr decltype(auto) loop(
ExPolicy&& policy, Begin begin, End end, CancelToken& tok, F&& f)
{
return hpx::parallel::util::loop_t{}(
Expand Down Expand Up @@ -190,7 +190,7 @@ namespace hpx::parallel::util {
inline constexpr loop_pred_t<ExPolicy> loop_pred = loop_pred_t<ExPolicy>{};
#else
template <typename ExPolicy, typename Begin, typename End, typename Pred>
HPX_HOST_DEVICE HPX_FORCEINLINE constexpr Begin loop_pred(
HPX_HOST_DEVICE HPX_FORCEINLINE constexpr decltype(auto) loop_pred(
Begin begin, End end, Pred&& pred)
{
return hpx::parallel::util::loop_pred_t<ExPolicy>{}(
Expand Down Expand Up @@ -262,7 +262,7 @@ namespace hpx::parallel::util {
inline constexpr loop_ind_t<ExPolicy> loop_ind = loop_ind_t<ExPolicy>{};
#else
template <typename ExPolicy, typename Begin, typename End, typename F>
HPX_HOST_DEVICE HPX_FORCEINLINE constexpr Begin loop_ind(
HPX_HOST_DEVICE HPX_FORCEINLINE constexpr decltype(auto) loop_ind(
Begin begin, End end, F&& f)
{
return hpx::parallel::util::loop_ind_t<ExPolicy>{}(
Expand Down Expand Up @@ -326,7 +326,7 @@ namespace hpx::parallel::util {
#else
template <typename ExPolicy, typename Begin1, typename End1,
typename Begin2, typename F>
HPX_HOST_DEVICE HPX_FORCEINLINE constexpr std::pair<Begin1, Begin2> loop2(
HPX_HOST_DEVICE HPX_FORCEINLINE constexpr decltype(auto) loop2(
Begin1 begin1, End1 end1, Begin2 begin2, F&& f)
{
return hpx::parallel::util::loop2_t<ExPolicy>{}(
Expand Down Expand Up @@ -454,7 +454,7 @@ namespace hpx::parallel::util {
inline constexpr loop_n_t<ExPolicy> loop_n = loop_n_t<ExPolicy>{};
#else
template <typename ExPolicy, typename Iter, typename F>
HPX_HOST_DEVICE HPX_FORCEINLINE constexpr Iter loop_n(
HPX_HOST_DEVICE HPX_FORCEINLINE constexpr decltype(auto) loop_n(
Iter it, std::size_t count, F&& f)
{
return hpx::parallel::util::loop_n_t<ExPolicy>{}(
Expand All @@ -463,7 +463,7 @@ namespace hpx::parallel::util {

template <typename ExPolicy, typename Iter, typename CancelToken,
typename F>
HPX_HOST_DEVICE HPX_FORCEINLINE constexpr Iter loop_n(
HPX_HOST_DEVICE HPX_FORCEINLINE constexpr decltype(auto) loop_n(
Iter it, std::size_t count, CancelToken& tok, F&& f)
{
return hpx::parallel::util::loop_n_t<ExPolicy>{}(
Expand Down Expand Up @@ -593,7 +593,7 @@ namespace hpx::parallel::util {
loop_n_ind_t<ExPolicy>{};
#else
template <typename ExPolicy, typename Iter, typename F>
HPX_HOST_DEVICE HPX_FORCEINLINE constexpr Iter loop_n_ind(
HPX_HOST_DEVICE HPX_FORCEINLINE constexpr decltype(auto) loop_n_ind(
Iter it, std::size_t count, F&& f)
{
return hpx::parallel::util::loop_n_ind_t<ExPolicy>{}(
Expand All @@ -602,7 +602,7 @@ namespace hpx::parallel::util {

template <typename ExPolicy, typename Iter, typename CancelToken,
typename F>
HPX_HOST_DEVICE HPX_FORCEINLINE constexpr Iter loop_n_ind(
HPX_HOST_DEVICE HPX_FORCEINLINE constexpr decltype(auto) loop_n_ind(
Iter it, std::size_t count, CancelToken& tok, F&& f)
{
return hpx::parallel::util::loop_n_ind_t<ExPolicy>{}(
Expand Down Expand Up @@ -745,7 +745,7 @@ namespace hpx::parallel::util {
#else
template <typename ExPolicy, typename Begin, typename Sent, typename F,
typename Cleanup>
HPX_HOST_DEVICE HPX_FORCEINLINE constexpr Begin loop_with_cleanup(
HPX_HOST_DEVICE HPX_FORCEINLINE constexpr decltype(auto) loop_with_cleanup(
ExPolicy&& policy, Begin begin, Sent end, F&& f, Cleanup&& cleanup)
{
return hpx::parallel::util::detail::loop_with_cleanup{}(
Expand All @@ -755,7 +755,7 @@ namespace hpx::parallel::util {

template <typename ExPolicy, typename Begin, typename Sent, typename Begin2,
typename F, typename Cleanup>
HPX_HOST_DEVICE HPX_FORCEINLINE constexpr Begin loop_with_cleanup(
HPX_HOST_DEVICE HPX_FORCEINLINE constexpr decltype(auto) loop_with_cleanup(
ExPolicy&& policy, Begin begin, Sent end, Begin2 dest, F&& f,
Cleanup&& cleanup)
{
Expand Down Expand Up @@ -1010,7 +1010,8 @@ namespace hpx::parallel::util {
detail::loop_with_cleanup_n{};
#else
template <typename ExPolicy, typename Begin, typename F, typename Cleanup>
HPX_HOST_DEVICE HPX_FORCEINLINE constexpr Begin loop_with_cleanup_n(
HPX_HOST_DEVICE HPX_FORCEINLINE constexpr decltype(auto)
loop_with_cleanup_n(
ExPolicy&& policy, Begin begin, std::size_t n, F&& f, Cleanup&& cleanup)
{
return hpx::parallel::util::detail::loop_with_cleanup_n{}(
Expand All @@ -1020,9 +1021,9 @@ namespace hpx::parallel::util {

template <typename ExPolicy, typename Begin, typename Begin2, typename F,
typename Cleanup>
HPX_HOST_DEVICE HPX_FORCEINLINE constexpr Begin loop_with_cleanup_n(
ExPolicy&& policy, Begin begin, std::size_t n, Begin2 dest, F&& f,
Cleanup&& cleanup)
HPX_HOST_DEVICE HPX_FORCEINLINE constexpr decltype(auto)
loop_with_cleanup_n(ExPolicy&& policy, Begin begin, std::size_t n,
Begin2 dest, F&& f, Cleanup&& cleanup)
{
return hpx::parallel::util::detail::loop_with_cleanup_n{}(
HPX_FORWARD(ExPolicy, policy), begin, n, dest, HPX_FORWARD(F, f),
Expand Down Expand Up @@ -1254,7 +1255,7 @@ namespace hpx::parallel::util {
loop_idx_n_t<ExPolicy>{};
#else
template <typename ExPolicy, typename Iter, typename F>
HPX_HOST_DEVICE HPX_FORCEINLINE constexpr Iter loop_idx_n(
HPX_HOST_DEVICE HPX_FORCEINLINE constexpr decltype(auto) loop_idx_n(
std::size_t base_idx, Iter it, std::size_t count, F&& f)
{
return hpx::parallel::util::loop_idx_n_t<ExPolicy>{}(
Expand All @@ -1263,7 +1264,7 @@ namespace hpx::parallel::util {

template <typename ExPolicy, typename Iter, typename CancelToken,
typename F>
HPX_HOST_DEVICE HPX_FORCEINLINE constexpr Iter loop_idx_n(
HPX_HOST_DEVICE HPX_FORCEINLINE constexpr decltype(auto) loop_idx_n(
std::size_t base_idx, Iter it, std::size_t count, CancelToken& tok,
F&& f)
{
Expand Down

0 comments on commit c90f93e

Please sign in to comment.