Visual Studio C++ 2015 and openMP
Visual Studio C++ 2015 and openMP
我想知道使用/OpenMP的VC 编译器的行为。我正在使用Cmakefilelist随附的第三方库(OpenMVG)。因此,我生成了Visual Studio解决方案来编译它。Cmake识别编译器的开放能力,并在VS撤离中汇编的编译良好。但是,当涉及执行时,我在每次运行程序中都会获得不同的结果。而且,如果我同时运行了两个程序实例,则结果甚至更糟。因此,我在源代码中看起来有些看,发现OpenMP与List和Map Iterator
一起使用。#pragma omp parallel
for (Views::const_iterator iter = sfm_data.GetViews().begin(); iter != sfm_data.GetViews().end() && bContinue; ++iter)
{
pragma omp single nowait
{
... process ...
}
}
我在网络上搜索,看来Visual Studio仅支持OpenMP 2.0。那么它支持列表迭代器吗?这是问题吗?OpenMP 2.0如何在列表迭代器中表现?
事先感谢任何答案
代码无法做您可能认为的。它创建了一组线程,每个线程执行相同的循环。
请注意,Visual Studio中的OpenMP并不真正支持C ,它将其视为C方言。特别是,/openmp
不支持迭代器,因为这仅是C 。它仅支持(某些)C循环。
还要注意,OpenMP是旧标准,甚至比C 98。由于C 11,C 具有本机螺纹功能。
相关文章:
- OpenMP阵列性能较差
- OpenMP卸载说'fatal error: could not find accel/nvptx-none/mkoffload'
- 使用 GCC 卸载的 OpenMP 卸载失败,并出现"Ptx assembly aborted due to errors"
- C++核心准则 C35 对于接口类"A base class destructor should be either public and virtual, or protected and nonv
- 为什么C++逐位AND运算符在不同大小的操作数中表现为这样
- 为什么 Clang 不允许"and"作为函数名称?
- OpenMP:并行更新数组总是需要减少数组吗
- 位阵列上的快速AND运算
- 是否可以在 C++03 中定义'move-and-swap idiom'等效项
- 如何使用OpenMP并行这两个循环
- 从python调用openMP共享库时,未定义opnMP函数
- Visual Studio C++ 2015 and openMP
- Openmp with ofstream and system command
- OpenMP and sections
- g_hash_table and OpenMp
- htop and OpenMP threads
- OpenMP and NUMA relation?
- OpenMP min reduction and std::min
- OpenMP, QTextEdit and QPlainTextEdit
- OpenMP and #pragma omp atomic