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 应用程序中工作?
基础教程推荐
- 为什么我们不能使用“虚拟继承"?在 COM 中? 2022-01-01
- 如何在 C++ 中正确使用命名空间? 2022-01-01
- 如何部分禁用 cmake C/C++ 自定义编译器检查 2021-01-01
- 将不可复制的闭包对象传递给 std::function 参数 2021-01-01
- 提升 ASIO 流缓冲 2021-01-01
- 如何更改 SysDateTimePick32 或 CDateTimeCtrl 的背景颜色? 2022-01-01
- c++ STL设置差异 2022-01-01
- 与 CAS 的原子交换(使用 gcc 同步内置函数) 2022-01-01
- C++:获取传递给函数的多维数组的行大小 2021-01-01
- 随机插入/删除的综合向量与链表基准 2022-01-01
