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

In case of a "raw thread" is needed per core for implementing parallel algorithm, what is good practice in HPX? #2757

taeguk opened this issue Jul 12, 2017 · 2 comments


2 participants
Copy link

commented Jul 12, 2017

I'm implementing parallel::partition using F&A algorithms illustrated in the paper.(
Existed implementation of F&A algorithms :

What I do for that algorithms is that creating a fixed number of threads and each thread gets the chunk from 'chuck manager' when each thread need more chunks.

In current, there is hpx::parallel::static_partitioner for partitioning the data into several chunks and spawning one chunk of iterations for each available core. (
But, static_partitioner is not adjusted to what I do.

In the algorithm which I'm implementing, the thread have to get more chunks dynamically.
Also, when the thread get a chunk, it should be able to select the position which the chunk is got from between the left end and the right end in the sequence of chunks.

With raw thread, this algorithm can be implemented easily.
But, it seems not the HPX-friendly way.
I want to know what is good way to implement this algorithm in HPX.


This comment has been minimized.

Copy link

commented Jul 12, 2017

I'd suggest to simply use async_execute(policy.executor(), ...) whenever you need to execute work on a chunk and not to worry about having an 'underlying' thread to explicitly schedule things on. HPX will do that for you.


This comment has been minimized.

Copy link

commented Jul 19, 2017

Can we close this now?

@taeguk taeguk closed this Jul 19, 2017

@hkaiser hkaiser added this to Merged to master in Standard Algorithms Jan 21, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.