Skip to content
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

Closed
wants to merge 1 commit into from
Closed

Modified foreach partitioner to use bulk execute #1612

wants to merge 1 commit into from

Conversation

dcbdan
Copy link
Contributor

@dcbdan dcbdan commented Jun 15, 2015

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

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
@hkaiser
Copy link
Member

hkaiser commented Jun 22, 2015

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));
Copy link
Member

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?

Copy link
Member

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.

Copy link
Contributor Author

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 .

Copy link
Member

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.

@hkaiser
Copy link
Member

hkaiser commented Jun 22, 2015

This PR will be superseded by another PR from a branch located inside this repository. This is done to enable testing.

@hkaiser hkaiser closed this Jun 22, 2015
@hkaiser hkaiser mentioned this pull request Jun 22, 2015
hkaiser added a commit that referenced this pull request Jun 22, 2015
- pre-allocate memory for vectors
- avoid copying (moving) items to a different vector
hkaiser added a commit that referenced this pull request Jun 22, 2015
- pre-allocate memory for vectors
- avoid copying (moving) items to a different vector
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants