如何从Eigen调用IMKL函数 [英] how to invoke IMKL functions from Eigen

查看:989
本文介绍了如何从Eigen调用IMKL函数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

#include<iostream>    
#define EIGEN_USE_MKL_ALL    
#include"mkl.h"    
#include<Eigen/Dense>    

using Eigen::MatrixXd;    

int main() 
{    
    MatrixXd m1,m2,m3;    
    m1<<1,2,3,4;    
    m2<<5,6,7,8;    
    m3=m1*m2.Transpose();    
    std::cout<<m3;    
}

我使用IMKL11.2
Eigen 3.2.0
ubuntu 14.04 LTS
英特尔核心处理器
64位os
g ++编译器

i used IMKL11.2 Eigen 3.2.0 ubuntu 14.04 LTS intel core duo processor 64bit os g++ compiler

http://eigen.tuxfamily.org/dox/TopicUsingIntelMKL.html
链接说我们可以使用来自Eigen的IMKL定义宏。但是以下错误在

http://eigen.tuxfamily.org/dox/TopicUsingIntelMKL.html the link says that we can use IMKL from Eigen by defining the macro. But the following error pope up

在来自Eigen / Core的文件中,来自test.cpp
MKL_BLAS在此范围内未被清除

in file included from Eigen/Core from Eigen/Dense from test.cpp MKL_BLAS was not decleared in this scope

推荐答案

此问题已在变更集 0cc8ceeb7dd1 是最新稳定版本的一部分,即 Eigen 3.2.6

This issue has been fixed in changeset 0cc8ceeb7dd1 which is part of the latest stable release, namely Eigen 3.2.6.

这篇关于如何从Eigen调用IMKL函数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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