Boost logo

Ublas :

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


Dear Rutger,

Thank you very much for your quick response.

Attached (ublas_stegr.cpp) is a simple test program for stegr.
For the real values, the new bindings works fine, but compilation errors
occur
for complex values as follows:

[Mac OXS, g++ 4.0.1 (Apple Inc. build 5490)]
...
../../../../../boost/numeric/bindings/lapack/computational/stegr.hpp:313:
error: ‘invoke’ is not a member of
boost::numeric::bindings::lapack::stegr_impl<std::complex<float>, void>’

When using gcc, fcomplex_t is defined as typedef of _Complex float, so
boost::numeric::bindings::traits::is_complex<std::complex<T> >
is not properly defined. As a result of this,
struct stegr_impl< ValueType, typename boost::enable_if<
traits::is_complex<ValueType> >::type >
isn't evaluated as expected for ValueType = std::complex<T>.

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>.

Best regards,

Hidekazu Ikeno

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

>
> I've improved argument selection for type selection, which causes stegr
> (and
> a dozen other routines) to choose a corrected argument. I've also added
> minimal workspace functions for stegr. It's committed to subversion, please
> let me now if it works for you.
>
> Kind regards,
>
> Rutger ter Borg
>
>
>
> Affected routines:
> boost/numeric/bindings/lapack/computational/bdsqr.hpp
> boost/numeric/bindings/lapack/computational/gebak.hpp
> boost/numeric/bindings/lapack/computational/ggbak.hpp
> boost/numeric/bindings/lapack/computational/hsein.hpp
> boost/numeric/bindings/lapack/computational/pteqr.hpp
> boost/numeric/bindings/lapack/computational/ptrfs.hpp
> boost/numeric/bindings/lapack/computational/pttrs.hpp
> boost/numeric/bindings/lapack/computational/stedc.hpp
> boost/numeric/bindings/lapack/computational/stegr.hpp
> boost/numeric/bindings/lapack/computational/stein.hpp
> boost/numeric/bindings/lapack/computational/steqr.hpp
> boost/numeric/bindings/lapack/computational/tgevc.hpp
> boost/numeric/bindings/lapack/computational/tgsen.hpp
> boost/numeric/bindings/lapack/computational/tgsna.hpp
> boost/numeric/bindings/lapack/computational/trevc.hpp
> boost/numeric/bindings/lapack/computational/trsna.hpp
> boost/numeric/bindings/lapack/driver/lalsd.hpp
> boost/numeric/bindings/lapack/driver/ptsv.hpp
> boost/numeric/bindings/lapack/driver/ptsvx.hpp
>
>
>
>
> Hidekazu Ikeno wrote:
>
> > Hi,
> >
> > I'm trying to use a 'computational/stegr' binding in my program, but I
> > always get
> > STATIC_ASSERTION_FAILUE when the complex values are used.
> > I have read the lapack/computational/stegr.hpp and have found that , in
> > the template
> > function to call stegr, value_type is declared as
> >
> > typedef typename traits::vector_traits< VectorD >::value_type
> > value_type;
> >
> > Because VectorD is a real vector even in the complex version of stegr,
> the
> > template
> > function of stegr always trying to instantiate stegr_impl with real
> types.
> > A proper declaration of value_type should be
> >
> > typedef typename traits::matrix_traits< MatrixZ >::value_type
> > value_type;
> >
> > I think some modifications for lapack_generator.py are required to fix
> > this problem.
> > Is it easy to fix?
> >
> >
> > Hidekazu Ikeno
>
>
>
> _______________________________________________
> ublas mailing list
> ublas_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/ublas
>