|
Ublas : |
Subject: Re: [ublas] [bindings] Redundant parameters in lapack::orm* functions
From: Rutger ter Borg (rutger_at_[hidden])
Date: 2010-08-23 03:29:31
Marco Guazzone wrote:
> Thank you, Rutger!
>
> Unfortunately, this time I have problem to specify parameter when I
> want to use the transpose variant of the product (i.e., when in
> LAPACK::?ORMQL functions parameter TRANS == 'T').
>
> I've tried to use bindings::trans but with no success.
>
> I attach a sample file.
> If you try to compile it, you'll get a lot of errors, which disappear
> if you comment the "transpose" cases (lines 62 and 84)
>
> My compiler is GCC 4.4.4 and my compiler options are:
> -Wall -ansi -pedantic -lm -llapack
>
> Can you help me to fix this problem?
>
> Thank you very much!!
>
> Cheers,
>
The LAPACK documentation seems to be wrong for ormql,
A (input) DOUBLE PRECISION array, dimension (LDA,K)
The i-th column must contain the vector which defines the
elementary reflector H(i), for i = 1,2,...,k, as returned by
DGEQLF in the last k columns of its array argument A.
A is modified by the routine but restored on exit
the bindings assumed A to be const in this case (due to "(input)"), but the
last sentence clearly says it needs read/write access. So it may be
considered (input/workspace), and in other cases (gejsv) we've modified the
argument to an LValue.
I've added an override for this in the generator, and committed the results
to svn.
Could you please try your code with adjusted constness for A?
Cheers,
Rutger