QMAKE_CXXFLAGS+= -fopenmp
QMAKE_LFLAGS += -fopenmp
此處網上有不同的加法,未一一試過。
下面是測試的結果
結果可能受到自己機器硬件的影響,並行後速度提升不是很明顯。貼出測試機器的硬件配置。
3.測試樣例下載(含pthreadgc2.dll)
下載地址
4.參考
http://blog.csdn.net/irelandken/article/details/6864265
http://www.qtcentre.org/threads/36384-OpenMP-problems-with-Qt-Creator
http://cn.dll-files.com/pthreadgc2.dll.html