在为发布模式进行编译时,我没有多线程 [英] I get no multithreading when compiling for release mode

查看:68
本文介绍了在为发布模式进行编译时,我没有多线程的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用VS2010中的Eigen库对矩阵-矩阵乘法进行编程.当我在调试模式下运行时,应用程序将使用我的所有CPU,但是当我在发布模式下运行时,它将仅使用1个线程.是否需要更改设置才能启用多线程?

I am programming a matrix-matrix multiplication using the Eigen library in VS2010. When I run in debug mode the application uses all my CPU, but when I run in release mode it uses only 1 thread. Is there a setting I need to change in order to enable multi-threading?

推荐答案

这是如此愚蠢,但是即使我以为是,我也从未在属性配置中为openMP模式启用openMP.

This is so silly but i never enabled openMP for RELEASE mode in properties configuration even though i thought i did.

这篇关于在为发布模式进行编译时,我没有多线程的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆