|
Ublas : |
From: Gunter Winkler (guwi17_at_[hidden])
Date: 2005-06-16 14:00:37
Am Donnerstag, 16. Juni 2005 13:10 schrieb Toon Knapen:
> IMHO the way to have both is as I have described below: we know that
> in uBLAS different containers are never aliased. Aliasing only occurs
> when one is working with views. So from the moment only containers
> are used in an expression, the expression engine can safely assume
> there is no aliasing.
Do you have an idea how to implement this? I would think of adding a new
typedef to each container/proxy class:
struct data_container { };
struct data_proxy { };
typedef data_container data_category;
or
typedef data_proxy data_category;
and add a new typedef to all matrix/vector expressions
typedef compute_data_category<
E1::data_category,
E2::data_category>::result_type data_category;
and use partial specialization to define compute_data_category<>. But
this is a lot of work. Is there a better way?
mfg
Gunter