Reply to topic

eigen blas library with complex scalar types

pjsa
Registered Member
Posts
15
Karma
0
Hi, I have been using the eigen version of the blas library for real scalar types a while now and it is great. However when I tried to use it for complex scalar types my code (which is a sparse direct solver) has been giving the wrong answers. I tracked it down to your implementations of zdotu and zdotc in EIGEN_BLAS_FUNC(dotcw) and EIGEN_BLAS_FUNC(dotuw) respectively in level1_cplx_impl.h. Here you return a zero integer from the c++ function if n<=0. However the return value of the fortran functionwhich is passed as an argument to your c function is not set to zero, it remains uninitialized. In the reference blas implementation the return value of the fortran function is in fact initialized to zero when n <= 0, and I assume the other blas libraries that I have been linking with also do the same since I haven't had the same problem with them. I am using the tip of the development branch.
thanks!
User avatar ggael
Moderator
Posts
2198
Karma
15
OS
Thank you for the precise report. Fixed there:
https://bitbucket.org/eigen/eigen/commits/bb0765adc785/
Changeset: bb0765adc785
User: ggael
Date: 2013-10-01 22:37:10
Summary: Fix dot*w to return 0 for empty vectors (BLAS interface)

 
Reply to topic

Bookmarks



Who is online

Registered users: Andreas Mair, Baidu [Spider], Bing [Bot], capslock, cloose, edmael, Exabot [Bot], Google [Bot], GreatEmerald, HmpfCBR, johngates, koriun, Majestic-12 [Bot], piedro, psbot [Picsearch], sledz, Sogou [Bot], TheraHedwig, tparrott, Yahoo [Bot]