为什么我不能访问STL并行算法? [英] Why can i not access STL parallel algorithms?
问题描述
for_each有一个用算法头写的并行版本,但是这段代码是通过preproc变量禁用的。为什么?
您好,
对于并行编程,您必须设置特定的编译器选项。看看这个:
http:// gcc.gnu.org/onlinedocs/libstdc++/manual/parallel_mode_using.html#parallel_mode.using.prereq_flags
以下是更多链接:
http://gcc.gnu.org/onlinedocs/libstdc++/manual/parallel_mode.html
http:// www .extreme.indiana.edu / hpc ++ / docs / overview / class-lib / PSTL /
https://msdn.microsoft.com/en-us/library/dd492418(VS.100).aspx
for_each for example has a parallel version written in algorithm header, but that piece of code is disabled through a preproc variable. why?
Hello,
For parallel programming you must set specific compiler options. Have a look at this: http://gcc.gnu.org/onlinedocs/libstdc++/manual/parallel_mode_using.html#parallel_mode.using.prereq_flags
Here are more links for you:
http://gcc.gnu.org/onlinedocs/libstdc++/manual/parallel_mode.html
http://www.extreme.indiana.edu/hpc++/docs/overview/class-lib/PSTL/
https://msdn.microsoft.com/en-us/library/dd492418(VS.100).aspx
这篇关于为什么我不能访问STL并行算法?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!