Boost logo

Ublas :

Subject: Re: [ublas] [bindings] Workspaces
From: Thomas Klimpel (Thomas.Klimpel_at_[hidden])
Date: 2008-12-10 18:28:58


Rutger ter Borg wrote:
> I had the impression the workspaces (user interface) where something
along
> the line of
>
> * minimal
> * optimal
> * user-defined

This impression is absolutely correct.

> and looking at workspace.hpp, a user is allowed to pass up to two
arguments
> to the workspace template functions. Doesn't this mean that a user is
not
> able to pass an all workspaces in cases of three different value types
/
> workspaces?

No, the user is able to pass all workspaces in case of three different
workspaces, as the example from heevd shows:

template <typename T, typename R>
void operator() (..., optimal_workspace, ...)

template <typename T, typename R, typename W, typename RW, typename WI>
void operator() (..., std::pair<detail::workspace2<W,RW>,
detail::workspace1<WI> > work, ...)

>>> Perhaps it's safer to select the number of workspaces by the number
of
>>> workspaces defined in the Fortran code :-).
>>
>> Not really.
>
>Please elaborate, (fortran) workspaces are marked explicitly in the
code.
>Are you saying the number of C++ workspaces does not equal the number
of
>fortran workspaces?

I'm saying that "n_workspace_args<value_type>::value" and
"detail::workspace2" don't refer to the number of fortran workspaces.
Perhaps the names are misleading, but it is actually true that
detail::workspace2 holds two workspaces.

This solution was proposed in
http://lists.boost.org/MailArchives/ublas/2008/05/2762.php
Since no objections were raised, I assume that this solution was
accepted. Feel free to raise objections, than we can see whether there
is a better solution.

I will use the same strategy for the 64-bit modification. I proposed a
solution in
http://lists.boost.org/MailArchives/ublas/2008/11/3109.php
and as long as no objection are raised, I assume that the proposed
solution is accepted.

Regards,
Thomas