Subject: Re: [ublas] fixed size vector in boost::numeric::ublas?
From: David Bellot (david.bellot_at_[hidden])
Date: 2010-07-23 09:40:47
It seems we're having many implementations of fixed size vector.
Let the race begins.... ;-)
On Fri, Jul 23, 2010 at 14:51, Marco Guazzone <marco.guazzone_at_[hidden]>wrote:
> On Fri, Jul 23, 2010 at 2:43 PM, Nasos Iliopoulos <nasos_i_at_[hidden]>
> > 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
> > to cast items from and to a fixed_vector (or matrix) for a variety of
> > interfacing tricks.
> > For example consider the following:
> > std::vector<ublas::fixed_vector<float,3> > vertices;
> > the following statement:
> > static_cast<float *>(&vertices)
> > will return a pointer that can go directly to say OpenGL to create a
> > buffer, while at the same time retain all the uBlas stuff to operate on
> > vertices! (as long as you don't want to go the shader way and you can
> > to update the vertices every frame - a common scenario when you morph
> Hi Nasos,
> Uhh I did't get this point.
> That's very interesting!!!
> Thank you very much for the explanation.
> -- Marco
> ublas mailing list
> Sent to: david.bellot_at_[hidden]
-- David Bellot, PhD david.bellot_at_[hidden] http://david.bellot.free.fr