|
Ublas : |
Subject: Re: [ublas] syev error
From: Rutger ter Borg (rutger_at_[hidden])
Date: 2010-11-15 06:52:26
On 11/15/2010 12:34 PM, Nizar Khalifa Sallem wrote:
> Hi again,
>
> This time I couldn't figure it out, so I attach the error
> corresponding to this snippet:
> A is a ublas::matrix<double, ublas::column_major>, namespace
> lapack = boost::numeric::bindings::lapack and namespace ublas =
> boost::numeric::ublas.
>
> ublas::triangular_adaptor<ublas::matrix<double, ublas::column_major>,
> ublas::upper> A_up (A);
> error = lapack::trtrs(ublas::trans(A_up), X);
>
> In the include part I have:
> #include<boost/numeric/bindings/lapack/computational/trtrs.hpp>
> #include<boost/numeric/bindings/ublas.hpp>
>
I guess the error is due to not having full support for ublas'
expression templates in the ublas binding part. Maybe this will be
improved later.
You could give the following a try (untested):
namespace bindings = boost::numeric::bindings;
error = lapack::trtrs( bindings::trans( bindings::upper(A) ), X );
Cheers,
Rutger