Boost logo

Ublas :

Subject: Re: [ublas] [bindings] Routine with 4 workarrays
From: Thomas Klimpel (Thomas.Klimpel_at_[hidden])
Date: 2009-01-18 07:56:43

Thomas Klimpel wrote:
> I added the requested workspace4<> to workspace.hpp. However, you will get into problems with type.h lines 56-60:
> /*
> * Define a fortran LOGICAL as a void (for now).
> */
> typedef void logical_t ;
> I guess logical_t should have the same type as integer_t,
> but I don't have time right now experimenting with it.
> If you run into problems with your compile tests,
> just try out suitable types instead of void till it works...

I just searched through the source code, and found out that there are already some places, where vectors of boolean values are passed to lapack routines. The logical type of fortran is simply translated to the bool type of C/C++. The logical_t typedef is apparently only used for function pointers (gees, trevc).

So there is no need to change the (confusing) typedef right now, but it would probably be a good idea to translate function pointers in a less confusing way to void*. ("const void* select" would be less confusing for me than "logical_t* select" for "SELECT (external procedure) LOGICAL FUNCTION of one COMPLEX argument")