Skip to content

Commit

Permalink
removed redundant copy from copy_if
Browse files Browse the repository at this point in the history
Signed-off-by: Dikshant <[email protected]>
  • Loading branch information
pingu-73 committed Aug 20, 2024
1 parent 81cfce7 commit 102982a
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions hpx-sys/include/wrapper.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,10 @@ inline void hpx_copy_n(rust::Slice<const int32_t> src, size_t count, rust::Slice

inline void hpx_copy_if(const rust::Vec<int32_t>& src, rust::Vec<int32_t>& dest,
rust::Fn<bool(int32_t)> pred) {
std::vector<int32_t> cpp_src(src.begin(), src.end());
std::vector<int32_t> cpp_dest(cpp_src.size());
std::vector<int32_t> cpp_dest(src.size());

auto result = hpx::copy_if(hpx::execution::par,
cpp_src.begin(), cpp_src.end(),
src.begin(), src.end(),
cpp_dest.begin(),
[&](int32_t value) { return pred(value); });

Expand Down

0 comments on commit 102982a

Please sign in to comment.