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 应用程序中工作?


基础教程推荐
- 从 std::cin 读取密码 2021-01-01
- 管理共享内存应该分配多少内存?(助推) 2022-12-07
- 为 C/C++ 中的项目的 makefile 生成依赖项 2022-01-01
- 如何“在 Finder 中显示"或“在资源管理器中显 2021-01-01
- 为什么语句不能出现在命名空间范围内? 2021-01-01
- 使用从字符串中提取的参数调用函数 2022-01-01
- 在 C++ 中循环遍历所有 Lua 全局变量 2021-01-01
- 如何使图像调整大小以在 Qt 中缩放? 2021-01-01
- 如何在不破坏 vtbl 的情况下做相当于 memset(this, ...) 的操作? 2022-01-01
- Windows Media Foundation 录制音频 2021-01-01