Re: [eigen] dense matrix multiplication

[ Thread Index | Date Index | More lists.tuxfamily.org/eigen Archives ]


It looks like your build of Eigen is set up to call the function gemv_ an external BLAS library for large matrices, possibly by setting the macro EIGEN_USE_BLAS. See the documentation here: https://eigen.tuxfamily.org/dox/TopicUsingBlasLapack.html


On Thu, Jul 8, 2021 at 2:57 AM 张瑞 <rzhang@xxxxxxxxxxx> wrote:

dear all,


I'm a new user of Eigen, I want to get the multiplication of two matrix, and met a confusing problem, and the code is as bellows(for simplicity, all values are set to 0):


Matrix<double,8, 8>  b;
Matrix<double, 8, 1>  l;
Matrix<double, 8, 1>  x;
b.Zero();
l.Zero();
x = b*l;


Compiled under the windows platform and vs2019 environment, there is a fatal error LNK1120:

" Unresolved external symbol _dgemv,funticon "public: static void __cdecl Eigen::internal::general_matrix_vector_product_gemv<int,double,1,0,double,0>::run(int,int,double const *,int,double const *,int,double *,int,double)" (?run@?$general_matrix_vector_product_gemv@HN$00$0A@N$0A@@internal@Eigen@@SAXHHPBNH0HPANHN@Z) "


But if I Reduce the matrix dimension, it works, like:

Matrix<double,4, 4>  b;
Matrix<double, 4 1>  l;
Matrix<double, 4, 1>  x;
b.Zero();
l.Zero();
x = b*l;

very grateful for your help, thank you!



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/