Boost logo

Ublas :

Subject: Re: [ublas] Getting bit by ormqr.hpp
From: Jeremy Conlin (jeremit0_at_[hidden])
Date: 2008-10-16 14:01:33

On Thu, Oct 16, 2008 at 10:37 AM, Karl Meerbergen <
Karl.Meerbergen_at_[hidden]> wrote:

> Well, following the naming convention that we have adopted earlier we
> would have to introduce two different functions:
> ormqr for real matrices and unmqr for complex matrices where unmqr can
> also be used in the real case, but then it is a synonym for ormqr.
> In this situation, there is a clear separation between real and complex
> and we do not have to provide a templated function (I think).
> Best,
> Karl

I don't think I explained myself very well. I don't think there needs to
be any new functions defined. If I understand correctly, I just call the
function 'ormqr' in C++ and the binding will figure out, based upon whether
the matrices are double or complex, whether the LAPACK call should be DORMQR
or ZUNMQR. Is this correct?

In my code, I have a templated function and so I won't necessarily know if I
have a complex matrix or a double matrix and I just call ormqr and let the
compiler work everything out. I am unable to know a priori what transpose
flag should be passed. I could do a template specialization to determine
this, but that complicates things.

The answer, of course, is if this isn't taken care of in the bindings I'll
have to take care of it in my code. I just pose the idea to see if it works
with the whole package.