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 应用程序中工作?
基础教程推荐
- 在 C++ 中计算滚动/移动平均值 2021-01-01
- 如何通过C程序打开命令提示符Cmd 2022-12-09
- 如何检查GTK+3.0中的小部件类型? 2022-11-30
- 静态库、静态链接动态库和动态链接动态库的 .lib 文件里面是什么? 2021-01-01
- 我有静态或动态 boost 库吗? 2021-01-01
- 常量变量在标题中不起作用 2021-01-01
- 如何将 std::pair 的排序 std::list 转换为 std::map 2022-01-01
- 这个宏可以转换成函数吗? 2022-01-01
- C++结构和函数声明。为什么它不能编译? 2022-11-07
- 如何在 C++ 中初始化静态常量成员? 2022-01-01
