本文介绍了STL算法和并发编程的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如果我为我的编译器启用OpenMP,可以并行执行任何STL算法/容器操作,如 std :: fill , std :: transform 我目前正在与MSVC 2008合作。
或者也许有其他方法使它同时发生?
Can any of STL algorithms/container operations like std::fill, std::transform be executed in parallel if I enable OpenMP for my compiler? I am working with MSVC 2008 at the moment. Or maybe there are other ways to make it concurrent?
谢谢。
推荐答案
有许多项目旨在具有并行的STL类型库:
There are a number of projects that aim at having parallel STL type libraries:
- (无耻地借用了AshleysBrain的回答) li>
- OpenMP Multi-Threaded Template Library
- libstdc++ parallel
- HPC++ Parallel Standard Template Library
- Parallel Patterns Library (shamelessly borrowed from AshleysBrain's answer)
这篇关于STL算法和并发编程的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!