|
Boost : |
Subject: Re: [boost] different matrix library?
From: joel (joel.falcou_at_[hidden])
Date: 2009-08-14 13:30:35
> i see no contra in you words
> so i don't get why to drop nice subscript operator[]
>
In fatc I just noticed you had both v_v so moot point here.
> well i always thought that 'vector' is a column vector if not stated
> explicitly otherwise for me it's obvious
> so (matrix*vector) is obviously a vector (column vector)
>
Well, explicit things are better when explicited.
> but i have not started to refine the code yet
> to my flavor it must be something like
>
> matrix<double, some_container_like_type<double> >
> //^^ double?
> or even
>
> matrix<double, some_container_like_template_type>
> //template template parameter is used
>
Well, the policy things is extendable to a lot of thing : shape,
dimension, storage, static size,optional behavior etc...
static/dynamic is just an example. Here is a sample of NT² code where I
create a 3D matrix with compile time size use 5x5 tiling
when evaluated and unrolled by a factor 3 :
matrix<float, settings( _3D::OfSize<50,50>, tiling<5,5>, unroll<3> ) > m;
Now the same matrix but with a static storage
matrix<float, settings( _3D::OfSize<50,50>, static_storage, tiling<5,5>,
unroll<3> ) > n;
> sounds cool but i have no any tasks with >2 order involved so i was
> not even considering i will think about it is it a must have feature in your opinion?
Well, it really makes things like :
m(_i,_j) = m(_i+1,_j+1) * n(_j,_i);
really easy to implement. Other nice things is :
m( (3 < _i < 5) && ( _j % 3) ) = value;
and other boolean based acces. You can also impelemnt matrix-matrix
acces in a pinch. aka
matrix<float> x;
matrix<int> u;
x(u) = ...;
More over it has no side effect on performances so using it or not is
always good.
> which means that if i have not done that i have not understood it
>
OK
I've stopepd fiddlign with ET by hand since proto is out cause it makes
things easier to reason about.
-- ___________________________________________ Joel Falcou - Assistant Professor PARALL Team - LRI - Universite Paris Sud XI Tel : (+33)1 69 15 66 35
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk