Does OpenMP work in a MFC application?

核能气质少年 提交于 2019-12-12 09:16:39

问题


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.

Is it possible to use OpenMP for a MFC application?

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.


回答1:


I can't see any reason why MFC should stop you using openMP.

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.

And read 32 OpenMP Traps For C++ Developers it's very easy to make a small mistake and have OMP not work



来源:https://stackoverflow.com/questions/8557576/does-openmp-work-in-a-mfc-application

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!