Created
July 30, 2020 20:13
-
-
Save gonidelis/2c838d00533bd9066184961f158d3516 to your computer and use it in GitHub Desktop.
adapted transform loop
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace detail { | |
template <typename Iter> | |
struct transform_loop | |
{ | |
template <typename InIterB, typename InIterE, typename OutIter, typename F> | |
HPX_HOST_DEVICE HPX_FORCEINLINE static util::in_out_result<InIterB, OutIter> | |
call(InIterB first, InIterE last, OutIter dest, F&& f) | |
{ | |
for (/* */; first != last; (void) ++first, ++dest) | |
{ | |
*dest = hpx::util::invoke(std::forward<F>(f), first); | |
} | |
return util::in_out_result<InIterB, OutIter>(std::move(first), std::move(dest)); | |
} | |
}; | |
} // namespace detail |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment