Does OpenMP work in a MFC application?(OpenMP 是否可以在 MFC 应用程序中工作?)
问题描述
我想通过并行处理提高 MFC 应用程序的性能.当然,我在互联网上搜索过 OpenMP 和 MFC.大多数帖子都是关于如何将 OpenMP 集成到 MFC 应用程序中.这导致了这个问题.
I would like to improve performance of our MFC application with parallel processing. Of course, I've searched OpenMP and MFC over internet. Most of posts are about struggling with integrating OpenMP into MFC app. That led this question.
是否可以将 OpenMP 用于 MFC 应用程序?
Is it possible to use OpenMP for a MFC application?
更新:似乎 Currency Runtime 可以做 OpenMP 所做的事情用于 MFC.但我还是想确定一下上面的问题.
UPDATE: It seems that Currency Runtime can do what OpenMP does for MFC. But I would like to still make sure about the question above.
推荐答案
我看不出 MFC 有什么理由阻止你使用 openMP.
I can't see any reason why MFC should stop you using openMP.
尽管 OMP 通常最适合在循环中执行一些操作的小型优化例程.您可能不应该在并行循环中分配和销毁 MFC 对象,您还需要小心任何非线程安全的 MFC 操作.
Although OMP generally works best for small optomised routines performing a few operations in a loop. You probably shouldn't be allocating and destroying MFC objects in a paralleled loop, you also need to be careful of any non-thread safe MFC operations.
并阅读 32 C++ 开发人员的 OpenMP 陷阱 很容易错误并让 OMP 不起作用
And read 32 OpenMP Traps For C++ Developers it's very easy to make a small mistake and have OMP not work
这篇关于OpenMP 是否可以在 MFC 应用程序中工作?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:OpenMP 是否可以在 MFC 应用程序中工作?


- 与 int by int 相比,为什么执行 float by float 矩阵乘法更快? 2021-01-01
- 从python回调到c++的选项 2022-11-16
- 如何对自定义类的向量使用std::find()? 2022-11-07
- Stroustrup 的 Simple_window.h 2022-01-01
- 一起使用 MPI 和 OpenCV 时出现分段错误 2022-01-01
- 静态初始化顺序失败 2022-01-01
- STL 中有 dereference_iterator 吗? 2022-01-01
- 使用/clr 时出现 LNK2022 错误 2022-01-01
- C++ 协变模板 2021-01-01
- 近似搜索的工作原理 2021-01-01