Boost logo

Ublas :

Subject: Re: [ublas] [bindings][lapack] cmputational/stegr problems
From: Hidekazu Ikeno (hide.ikeno+boost_at_[hidden])
Date: 2009-04-13 14:35:41


Thanks. Now traits::is_complex<std::complex<T> > is evaluated as expected.

I found one more bug in stegr template funstions.
The arguments vl, vu and abstol should be real type, i.e.,

template< typename VectorD, typename VectorE, typename VectorW,
        typename MatrixZ, typename VectorISUPPZ >
inline integer_t stegr( char const jobz, char const range,
        integer_t const n, VectorD& d, VectorE& e,
        typename traits::matrix_traits< MatrixZ >::value_type const vl, //
<--
        typename traits::matrix_traits< MatrixZ >::value_type const vu, //
<--
        integer_t const il, integer_t const iu,
        typename traits::matrix_traits< MatrixZ >::value_type const abstol,
// <--
        integer_t& m, VectorW& w, MatrixZ& z, VectorISUPPZ& isuppz );

should be modified to

template< typename VectorD, typename VectorE, typename VectorW,
        typename MatrixZ, typename VectorISUPPZ >
inline integer_t stegr( char const jobz, char const range,
        integer_t const n, VectorD& d, VectorE& e,
        typename traits::vector_traits< VectorW >::value_type const vl, //
<--
        typename traits::vector_traits< VectorW >::value_type const vu, //
<--
        integer_t const il, integer_t const iu,
        typename traits::vector_traits< VectorW >::value_type const abstol,
// <--
        integer_t& m, VectorW& w, MatrixZ& z, VectorISUPPZ& isuppz );

(it's really complicated...).

At the moment, the binding works fines if we call stegr_impl<T>::invoke()
directly.

Best regards,

Hidekazu Ikeno

2009/4/13 Rutger ter Borg <rutger_at_[hidden]>

>
> Thanks, I've updated traits/is_complex to default to the boost::is_complex
> metafunction in stead of the false type. This will allow users of the
> bindings to override for custom complex types. I've committed it, hopefully
> this solves this issue.
>
> Kind regards,
>
> Rutger ter Borg
>
>
> Hidekazu Ikeno wrote:
> >
> > Do you have idea to aviod this problem?
> > One possible solution is using boost::type_traits::is_complex<ValueType>
> > instead of
> > boost::numeric::bindings::traits::is_complex<ValueType>.
> >
>
>
>
> _______________________________________________
> ublas mailing list
> ublas_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/ublas
>