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
相关文章