www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - Parallel implementation of map

reply VlasovRoman <vlasovroman.ru yandex.ru> writes:
Hey, guys!
After many attempts pmap function was realized by me. This is 
analogous to taskPool.amap function, but I do not know how much 
he is good. In simple tests, it showed a corresponding 
acceleration. I would like to ask you to advise me options to 
improve this function. If all this makes sense, I can make a DUB 
package.

https://gist.github.com/VlasovRoman/4c78a123acd44b3da8b96b43637df080
May 11 2016
parent reply Daniel Kozak via Digitalmars-d-learn <digitalmars-d-learn puremagic.com> writes:
Dne středa 11. května 2016 13:25:50 CEST, VlasovRoman via 
Digitalmars-d-learn  napsal(a):

 Hey, guys!
 After many attempts pmap function was realized by me. This is 
 analogous to taskPool.amap function, but I do not know how much 
 he is good. In simple tests, it showed a corresponding 
 acceleration. I would like to ask you to advise me options to 
 improve this function. If all this makes sense, I can make a DUB 
 package.

 https://gist.github.com/VlasovRoman/4c78a123acd44b3da8b96b43637df080
Why just not use: https://dlang.org/phobos/std_parallelism.html#.TaskPool.map
May 11 2016
parent reply VlasovRoman <vlasovroman.ru yandex.ru> writes:
On Wednesday, 11 May 2016 at 12:40:20 UTC, Daniel Kozak wrote:
 Dne středa 11. května 2016 13:25:50 CEST, VlasovRoman via 
 Digitalmars-d-learn  napsal(a):

 Hey, guys!
 After many attempts pmap function was realized by me. This is 
 analogous to taskPool.amap function, but I do not know how 
 much he is good. In simple tests, it showed a corresponding 
 acceleration. I would like to ask you to advise me options to 
 improve this function. If all this makes sense, I can make a 
 DUB package.

 https://gist.github.com/VlasovRoman/4c78a123acd44b3da8b96b43637df080
Why just not use: https://dlang.org/phobos/std_parallelism.html#.TaskPool.map
I was trying it, but this issue was stopping me. https://issues.dlang.org/show_bug.cgi?id=5710
May 11 2016
parent Russel Winder via Digitalmars-d-learn <digitalmars-d-learn puremagic.com> writes:
On Wed, 2016-05-11 at 13:01 +0000, VlasovRoman via Digitalmars-d-learn
wrote:
 On Wednesday, 11 May 2016 at 12:40:20 UTC, Daniel Kozak wrote:
=20
[=E2=80=A6]
 Why just not use:=C2=A0
 https://dlang.org/phobos/std_parallelism.html#.TaskPool.map
=20 I was trying it, but this issue was stopping me. =20 https://issues.dlang.org/show_bug.cgi?id=3D5710
There is a lot of hacking going on in a lot of code because of this problem, but even a bounty has failed to get anyone interested in fixing it. --=20 Russel. =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D Dr Russel Winder t: +44 20 7585 2200 voip: sip:russel.winder ekiga.n= et 41 Buckmaster Road m: +44 7770 465 077 xmpp: russel winder.org.uk London SW11 1EN, UK w: www.russel.org.uk skype: russel_winder
May 11 2016