Subject: Re: [ublas] [bindings] [lapack] geev and the type of the input matrix
From: Marco Guazzone (marco.guazzone_at_[hidden])
Date: 2010-07-06 05:44:43
On Tue, Jul 6, 2010 at 11:34 AM, Thomas Klimpel
> Marco Guazzone wrote:
>> Just another question (sorry for abusing of your patience)
>> I'd like to create an "eigen" function (as a wrapper of lapack::geev)
>> which accepts as input matrix both:
>> * a const& matrix (since it is not modified anymore), and
> What do you mean by "(since it is not modified anymore)"? lapack will definitively overwrite the original matrix during the computation and not restore it at the end.
This refer to the point of view of users of my lib...
but as you have pointed out I've just realized that LAPACK overwrites it
A (input/output) DOUBLE PRECISION array, dimension (LDA,N)
On entry, the N-by-N matrix A.
On exit, A has been overwritten.
So to keep it consistent with the point of view of my lib, I need to
create a temp matrix and pass it to lapack::geev
>> * a matrix_expression (in order to allow the user to call say
>> eigen(trans(A),...) )
> If you want that, you probably have to create a temporary matrix that lapack can modify during the computation.
Thank you so much!!