This forum has been archived. All content is frozen. Please use KDE Discuss instead.

eigen blas library with complex scalar types

Tags: None
(comma "," separated)
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
3447
Karma
19
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)


Bookmarks



Who is online

Registered users: Bing [Bot], Google [Bot], Yahoo [Bot]