|
Ublas : |
Subject: Re: [ublas] [bindings] Workspaces
From: Rutger ter Borg (rutger_at_[hidden])
Date: 2008-12-17 05:01:05
Karl Meerbergen wrote:
>
> That is the idea (hope)
>
> Karl
Good stuff.
Would be nice if something along this lines would work:
typedef traits::type_traits< ValueType >::real_type real_type;
typedef ValueType value_type;
( ...
traits::vector_storage( get_array_of< value_type >(work) ),
traits::vector_size( get_array_of< value_type >(work) ),
traits::vector_storage( get_array_of< real_type >(work) ),
traits::vector_storage( get_array_of< int >(work) )
...)
get_array_of would return a reference to the array of that type.
I see the workspace structs only keep references, this would mean that we'll
just pass the temporary arrays through a workspaceN struct to the more
generic member function.
Cheers,
Rutger