It seems we're having many implementations of fixed size vector.
Thanks guys.
Let the race begins.... ;-)

On Fri, Jul 23, 2010 at 14:51, Marco Guazzone <marco.guazzone@gmail.com> wrote:
On Fri, Jul 23, 2010 at 2:43 PM, Nasos Iliopoulos <nasos_i@hotmail.com> wrote:
> Marko,
>
> The c_vector indeed works on the stack, but it still has a redundant size
> member function, that when used small fixed containers (i.e. 2 element
> vectors), causes some serious memory overhead.
>
> Furthermore getting rid of the size member variable opens a nice opportunity
> to cast items from and to a fixed_vector (or matrix) for a variety of nice
> interfacing tricks.
>
> For example consider the following:
>
> std::vector<ublas::fixed_vector<float,3> > vertices;
>
> the following statement:
>
>  static_cast<float *>(&vertices[0])
>
> will return a pointer that can go directly to say OpenGL to create a vertex
> buffer, while at the same time retain all the uBlas stuff to operate on your
> vertices! (as long as you don't want to go the shader way and you can afford
> to update the vertices every frame - a common scenario when you morph them).
>

Hi Nasos,

Uhh I did't get this point.
That's very interesting!!!

Thank you very much for the explanation.

Cheers,

-- Marco
_______________________________________________
ublas mailing list
ublas@lists.boost.org
http://lists.boost.org/mailman/listinfo.cgi/ublas
Sent to: david.bellot@gmail.com



--
David Bellot, PhD
david.bellot@gmail.com
http://david.bellot.free.fr