ATLAS binding: error when multiplying a complex matrix by a real matrix

Florent Teichteil <[email protected]>
Newsgroups gmane.comp.lib.boost.ublas
Message-ID <[email protected]>
Hi all,

I am trying to multiply a complex matrix by a real one using gemm:

atlas::gemm(m1, m2, r);

where m2 is defined as: ublas::matrix<double, ublas::column_major>
and m1: ublas::matrix<std::complex<double>, ublas::column_major>

However, I get a compilation error saying that there is no known 
conversion from type
ublas::matrix<double, ublas::column_major>::pointer {aka const double*}
to type const complex_d* {aka const std::complex<double>*}

Looking at the file cblas3_overloads.hpp, it appears that the 
corresponding overload (real matrix by complex matrix) is actually not 
defined, which is an API error in my mind, since the C interface of 
ATLAS allows for it trough the void* types for matrix pointers.

The workaround would consist in copying the real matrix into a complex 
one before calling gemm. But:
1. This operation is expensive for big matrices;
2. It is not easy to manage when matrices m1 and m2 are actually 
template matrices for which we do not know the type.

NOTE: the standard boost ublas function axpy_prod allows for multiplying 
real matrices by complex ones (and vice versa).

All the best,
Florent
_______________________________________________
ublas mailing list
[email protected]
http://lists.boost.org/mailman/listinfo.cgi/ublas
Sent to: [email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.