Thank you both Karl and Thomas, I'll certainly use those suggestions. I won't have much of a chance to look at this again until Wednesday of next week. It's great to have people to help out the new guys.
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@lists.boost.org 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@lists.boost.org
http://lists.boost.org/mailman/listinfo.cgi/ublas
_______________________________________________
ublas mailing list
ublas@lists.boost.org
http://lists.boost.org/mailman/listinfo.cgi/ublas