libstdc++ parallel mode: Who's using it? Is it safe? Any similar projects? [closed]

半世苍凉 提交于 2019-12-03 04:24:56

问题


the GNU implementation of the C++ Library supports a parallel mode, explained here.

  • Any experiences in using it? Good ones? Bad ones? Especially regarding correctness, but also performance.
  • Are there some "more or less serious" projects using it?
  • Do you use it with the global turn-on-parallel switch -D_GLIBCXX_PARALLEL or do you use it carefully with manually turn-on specific parallelization functions like: __gnu_parallel::sort(v.begin(), v.end());?
  • Are there any similar open source projects? Meaning: more easy parallelization than using openMP.

Thanks for your experiences.

Sascha


回答1:


I've used it for some small projects, with a nice speedup for large stl operations. I never encountered any problems (I used the global switch). However I didn't really do much benchmarking, you might want to refer to studies like http://algo2.iti.kit.edu/singler/mcstl/parallelmode_se.pdf and http://ls11-www.cs.uni-dortmund.de/people/gutweng/AD08/VO11_parallel_mode_overview.pdf.




回答2:


Too late answer, but:

I would seriously consider Intel TBB. One thing that I noted missing from C++ standard parallel mode is parallel containers. TBB containers do not follow the interface of C++ standard containers, but they provide justifications for this. Besides, TBB has a number of examples and design patterns.




回答3:


This seems similar though I haven't looked very deeply into it. http://thrust.github.com/



来源:https://stackoverflow.com/questions/4118176/libstdc-parallel-mode-whos-using-it-is-it-safe-any-similar-projects

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!