
Parallel STL - wfunction
https://parallelstl.codeplex.com/
======
askee
GCC already has something alike, the parallel mode [1]. It is based on the
Multi-Core STL (MCSTL) developed at Karlsruhe University. In [2] you can also
find some publications. As far as I know this already works quite well.

[1]
[https://gcc.gnu.org/onlinedocs/libstdc++/manual/parallel_mod...](https://gcc.gnu.org/onlinedocs/libstdc++/manual/parallel_mode.html)
[2]
[http://algo2.iti.kit.edu/singler/mcstl/](http://algo2.iti.kit.edu/singler/mcstl/)

------
chrisseaton
Yet another parallel for-loop.

If you have a finite number of totally independent load balanced operations to
run in parallel, then you don't really have a parallelism problem in the first
place.

We need libraries to help us where the operations are not independent and not
balanced.

~~~
malkia
Spot on. There either needs to be some kind of OS level control (Grand
Central), or tweaks through the environment, like OpenMP - where you set in
advance how much threads are to be used by the process.

I think Microsoft's PPL had something where it would've cooperated with the
OS, but things did not worked out as expected and it wasn't delivered. Or I
could be completely wrong, some links here:

[https://msdn.microsoft.com/en-
us/library/ee207192.aspx](https://msdn.microsoft.com/en-
us/library/ee207192.aspx)

[https://msdn.microsoft.com/en-
us/library/dd984036.aspx](https://msdn.microsoft.com/en-
us/library/dd984036.aspx)

~~~
jfbastien
You're thinking of C++'s "executor", which is currently being discussed for
addition to the standard. The parallel STL will use the executors once they're
added to a technical specification. There's agreement on how integration this
will work, and that it's the right thing to do, but executors don't have a
fully agreed-upon API yet.

We (the C++ standards committee) discussed these things further this week :-)

~~~
malkia
Ah, thanks for correcting me. I've read about it year or more ago, a short
article and I couldn't find it.

~~~
jfbastien
There are _a lot_ of papers to follow, unfortunately. Listed here:
[http://open-std.org/jtc1/sc22/wg21/docs/papers/2014/](http://open-
std.org/jtc1/sc22/wg21/docs/papers/2014/) [http://open-
std.org/jtc1/sc22/wg21/docs/papers/2015/](http://open-
std.org/jtc1/sc22/wg21/docs/papers/2015/)

You'll want to follow mostly Mysen's and Kohlhoff's proposals on executors.

------
twotwotwo
Can't not note--I recently put up a parallel radix sort and quicksort for Go
at [https://github.com/twotwotwo/sorts](https://github.com/twotwotwo/sorts) if
you're into such things.

------
polskibus
How does it differ from Intel's Threading Building Blocks?

~~~
eps
Good question.

You are clearly familiar with Intel's Threading Building Blocks. Why don't you
read up on the submitted implementation and answer your own question here for
eveyone's benefit?

~~~
CyberDildonics
Because someone might already know the answer.

------
alamaison
Isn't this from March 2014?

