Boost logo

Ublas :

From: Karl Meerbergen (karl.meerbergen_at_[hidden])
Date: 2008-05-31 13:17:03


Hi Jeremy,

There is a lapack bindings auxiliary, called workspace1 and workspace2,
together with optimal_workspace and minimal_workspace. Often lapack
subprograms have a minimum size of the workspace and an optimal size
that allows for use of blas3 calls.

See ormqr, steqr, sytrd, syev, heev, ... as examples.

Good luck,

Karl

Thomas Klimpel wrote:
> Hello Jeremy,
>
>
>> Can someone look at my attempt and either tell me to give up or how to proceed?
>>
>
> Have a look at hbev.hpp (and/or hees.hpp). The following construction is typically used to differentiate between the different types (e.g. double vs. complex<double>), because real versions just have one workspace argument, while complex versions have two workspace arguments.
>
> namespace detail {
> template <int N>
> struct Hbev{};
>
>
> /// Handling of workspace in the case of one workarray.
> template <>
> struct Hbev< 1 > {
> ...
> };
> /// Handling of workspace in the case of two workarrays.
> template <>
> struct Hbev< 2 > {
> ...
> };
>
> template <typename AB, typename Z, typename W, typename Work>
> int hbev( char const jobz, AB& ab, W& w, Z& z, Work work ) {
> ...
> int info ;
> detail::Hbev< n_workspace_args<value_type>::value >() (jobz,
> ...);
> return info ;
> } // hbev()
>
>
>
> I have two other comments:
>
> - please add a copyright line like
> * Copyright Jeremy Conlin 2008
>
> - don't use "unsigned int" in lapack.h
>
> Regards,
> Thomas
>
>
> -----Ursprüngliche Nachricht-----
> Von: ublas-bounces_at_[hidden] im Auftrag von Jeremy Conlin
> Gesendet: Fr 30.05.2008 21:48
> An: ublas mailing list
> Betreff: [ublas] LAPACK Bindings HSEQR addition
>
> I have made a start with creating the bindings for the HSEQR functions for
> LAPACK. They are not complete; I was hoping someone could provide some
> feedback and advice. Currently I have implemented only one (double) of the
> four (float, double, complex<float>, complex<double>) versions. I have
> tried to follow the example in the geev.hpp file for much of my work.
> My current problem is trying to differentiate between the different types
> (e.g. double vs. complex<double>). I know this can be handled with
> templates, but I'm not exactly sure how this should be taken care of. Can
> someone look at my attempt and either tell me to give up or how to proceed?
>
> I have attached a diff file from my version to the current svn version as
> well as my added hseqr.hpp file and a simple test main.
>
> Thanks,
> Jeremy Conlin
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> ublas mailing list
> ublas_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/ublas
>