-
-
Notifications
You must be signed in to change notification settings - Fork 428
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added segmented fill for hpx::vector #2202
Conversation
This is great! Could this be somehow merged with the segmented |
Rewritten so that |
I've not yet been through the code completely, but we discussed (via skype), that the tests should be extended to run distributed as well as locally. This will require some cmake additions that we'll put on another PR once they are done. |
@biddisco What changes to the build/test system do you have in mind? |
Only some extra cmake code in I believe that any partitioned_vector tests should be run with distributed as well as local partitions and I was not able to locate any existing tests of them like this. |
I agree. I'm just not sure what those tests would need in addition to the other distributed tests we already run. |
return; | ||
}, | ||
std::move(r))); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Sanac What is the rationale of separating the synchronous and asynchronous versions here. Wouldn't both be equivalent, letting the underlying parallel::for_each
handle the differences?:
template <typename Algo, typename ExPolicy, typename SegIter, typename T>
static typename util::detail::algorithm_result<ExPolicy, void>::type
fill_(ExPolicy && policy, SegIter first, SegIter last, T const& value)
{
return hpx::parallel::for_each(std::forward<ExPolicy>(policy),
first, last, fill_function<T>(value));
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Sanac: well, it probably should be:
template <typename Algo, typename ExPolicy, typename SegIter, typename T>
static typename util::detail::algorithm_result<ExPolicy, void>::type
fill_(ExPolicy && policy, SegIter first, SegIter last, T const& value)
{
typedef typename util::detail::algorithm_result<ExPolicy, void>::type
result_type;
return hpx::util::void_guard<result_type>(),
hpx::parallel::for_each(std::forward<ExPolicy>(policy),
first, last, fill_function<T>(value));
}
@Sanac thanks for those changes! One last question: what's the rationale of making the implementation functions for the new algorithm non-static? |
@Sanac I take that back, you changed from |
@Sanac once the inspect errors are fixed (see https://circle-artifacts.com/gh/STEllAR-GROUP/hpx/4174/artifacts/0/tmp/circle-artifacts.ACeOWQE/hpx_inspect_report.html) we can go ahead and merge your changes. |
Thanks! |
Adding segmented fill for
hpx::vector
. (refer to #1338)