有没有办法OpenMP可以操作Qt跨线程

有没有办法OpenMP可以操作Qt跨线程

本文介绍了有没有办法OpenMP可以操作Qt跨线程?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图并行化应用程序的数字处理部分,以利用在Mac OS 10.5上使用OpenMP和GCC 4.2的四核架构。但是我认为问题是,这个应用程序使用Qt的GUI,我试图在Qt创建的辅助线程上分叉工作线程,导致程序崩溃 - 但我不知道。 p>

由于这是我第一次使用Qt或OpenMP(或C ++),所以我在这里很认真。非常感谢任何类型的指导。

解决方案

目前这不工作。我认为它甚至被报告为Qt和gcc中的错误 - 如果我记得正确。它被报告了几次(例如)。它与一些gcc / Qt组合至少在linux上工作。


I'm trying to parallelize a number-crunching part of an application to make use of a quad-core architecture using OpenMP and GCC 4.2 on Mac OS 10.5. But what I think the problem is that this application uses Qt for the GUI and I'm trying to fork the worker threads on a secondary thread created by Qt which causes the program to crash - but of this I'm not sure.

I'm seriously on the dark here since it's my first time working with either Qt or OpenMP, (or C++ for that matter). Any sort of guidance is greatly appreciated.

解决方案

At the moment this does not work. I think it even was reported as a bug in Qt and gcc - if I remember correctly. It was reported several times (e.g. here). It works with some gcc/Qt combinations at least on linux.

这篇关于有没有办法OpenMP可以操作Qt跨线程?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-01 19:07