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
Modified foreach partitioner to use bulk execute #1612
Conversation
Changed foreach partitioner to make use of bulk async execute. Since each policy has an associated executor, the partitioners should make use of the executors bulk functionality. This starts to solve the bullet point "make use of executor traits' bulk functionality in each of the partitioners" from issue #1544
Please comment here asap, it has been a week since this was proposed. |
policy.executor(), f, shape); | ||
|
||
std::move(inititems.begin(), inititems.end(), | ||
std::back_inserter(workitems)); |
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.
I think this extra copy is unnecessary. why not wait_all on workitems and inititems on line 73?
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.
This has been addressed in #1622.
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.
While having workitems
and inititmes
isn't a problem for the foreach_partition
, what is the best way to handle that when calling f2
for partitioner
? The logic for many of the algorithms requires one vector with all the results from f1
to call f2
.
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.
Sure, there we will need to join the vectors, sadly.
This PR will be superseded by another PR from a branch located inside this repository. This is done to enable testing. |
- pre-allocate memory for vectors - avoid copying (moving) items to a different vector
- pre-allocate memory for vectors - avoid copying (moving) items to a different vector
Changed foreach partitioner to make use of bulk async execute. Since
each policy has an associated executor, the partitioners should make
use of the executors bulk functionality.
This starts to solve the bullet point "make use of executor traits'
bulk functionality in each of the partitioners" from issue #1544