Boost logo

Ublas :

Subject: Re: [ublas] heev
From: Thomas Klimpel (thomas.klimpel_at_[hidden])
Date: 2014-01-23 12:05:30


Hi Chris,

your problem is that you don't know how to specify whether upper or lower half of the matrix should be used.

You should decide which one to use, and then define either
> typedef ublas::hermitian_adaptor<cmat, ublas::upper> hermitian_type;
or
> typedef ublas::hermitian_adaptor<cmat, ublas::lower> hermitian_type;
then wrap the matrix eigVec into the adapter via
> hermitian_type eigVec_h(eigVec);
and call heev as
> heev('V',eigVec_h,eigVal);
or
> heev('V',eigVec_h,eigVal,boost::numeric::bindings::lapack::optimal_workspace());
if you prefer to be explicit about the workspace.

I just compared your code with the test from
<https://svn.boost.org/svn/boost/sandbox/numeric_bindings/libs/numeric/bindings/lapack/test/ublas_heev.cpp>
so maybe there are more things that need to get modified. However, this should at least fix your current error message.

Regards,
Thomas Klimpel
 
 

Gesendet: Donnerstag, 23. Januar 2014 um 17:31 Uhr
Von: "Chris Rodgers" <christopher.rodgers_at_[hidden]>
An: ublas_at_[hidden]
Betreff: [ublas] heev
Dear All,

I am trying to update some code from v1 to the latest numeric bindings,
but cannot see how to make heev() work.

I attach a small test program, which I attempted to compile with Visual
Studio 2010 SP1 on Windows XP 32-bit, with boost 1.51 and the last
revision in the boost SVN repository for the numeric bindings.

Compilation fails with the error message below.

Please could someone advise me how to get this running?

Any help would be much appreciated.

Best wishes,

Chris.

> 1>------ Build started: Project: testBoostJan2014, Configuration:
> Debug Win32 ------
> 1>Build started 23/01/2014 16:25:02.
> 1>InitializeBuildStatus:
> 1> Touching "Debug\testBoostJan2014.unsuccessfulbuild".
> 1>ClCompile:
> 1> testBoostJan2014.cpp
> 1>c:\program
> files\boost\numeric_bindings\boost\numeric\bindings\uplo_tag.hpp(56):
> error C2039: 'type' : is not a member of
> 'boost::numeric::bindings::detail::uplo_tag_impl<DataSide,TransTag>'
> 1> with
> 1> [
> 1> DataSide=boost::mpl::void_,
> 1> TransTag=boost::numeric::bindings::tag::no_transpose
> 1> ]
> 1> c:\program
> files\boost\numeric_bindings\boost\numeric\bindings\lapack\driver\heev.hpp(282)
> : see reference to class template instantiation
> 'boost::numeric::bindings::result_of::uplo_tag<T>' being compiled
> 1> with
> 1> [
> 1> T=cmat
> 1> ]
> 1> c:\program
> files\boost\numeric_bindings\boost\numeric\bindings\lapack\driver\heev.hpp(331)
> : see reference to function template instantiation 'ptrdiff_t
> boost::numeric::bindings::lapack::heev_impl<Value>::invoke<MatrixA,VectorW>(const
> char,MatrixA &,VectorW
> &,boost::numeric::bindings::lapack::optimal_workspace)' being compiled
> 1> with
> 1> [
> 1> Value=std::complex<double>,
> 1> MatrixA=cmat,
> 1> VectorW=vec
> 1> ]
> 1>
> c:\midea\n4_vb17a_latest_20090307\n4\pkg\mrservers\mrspecacq\ice\icespectro_wsvd_v4\testboostjan2014\testboostjan2014.cpp(64)
> : see reference to function template instantiation '__w64 int
> boost::numeric::bindings::lapack::heev<cmat,vec,boost::numeric::bindings::lapack::optimal_workspace>(const
> char,MatrixA &,VectorW &,Workspace)' being compiled
> 1> with
> 1> [
> 1> MatrixA=cmat,
> 1> VectorW=vec,
> 1> Workspace=boost::numeric::bindings::lapack::optimal_workspace
> 1> ]
> 1>c:\program
> files\boost\numeric_bindings\boost\numeric\bindings\lapack\driver\heev.hpp(286):
> error C2955: 'boost::type' : use of class template requires template
> argument list
> 1> c:\program files\boost\boost_1_51\boost\type.hpp(14) : see
> declaration of 'boost::type'
> 1>c:\program
> files\boost\numeric_bindings\boost\numeric\bindings\lapack\driver\heev.hpp(289):
> error C2780: 'ptrdiff_t
> boost::numeric::bindings::lapack::detail::heev(const char,const
> UpLo,const fortran_int_t,double *,const fortran_int_t,double *,double
> *,const fortran_int_t)' : expects 8 arguments - 9 provided
> 1> c:\program
> files\boost\numeric_bindings\boost\numeric\bindings\lapack\driver\heev.hpp(74)
> : see declaration of 'boost::numeric::bindings::lapack::detail::heev'
> 1>c:\program
> files\boost\numeric_bindings\boost\numeric\bindings\lapack\driver\heev.hpp(289):
> error C2780: 'ptrdiff_t
> boost::numeric::bindings::lapack::detail::heev(const char,const
> UpLo,const fortran_int_t,float *,const fortran_int_t,float *,float
> *,const fortran_int_t)' : expects 8 arguments - 9 provided
> 1> c:\program
> files\boost\numeric_bindings\boost\numeric\bindings\lapack\driver\heev.hpp(59)
> : see declaration of 'boost::numeric::bindings::lapack::detail::heev'
> 1>
> 1>Build FAILED.
> 1>
> 1>Time Elapsed 00:00:08.50
> ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped
> ==========

_______________________________________________
ublas mailing list
ublas_at_[hidden]
http://lists.boost.org/mailman/listinfo.cgi/ublas
Sent to: thomas.klimpel_at_[hidden]