Boost logo

Ublas :

From: Gunter Winkler (guwi17_at_[hidden])
Date: 2007-05-30 05:06:08


On Tuesday 29 May 2007 09:46, Langeland, Stian (GE Healthcare) wrote:
> Hi,
>
> I have been trying to create a vector of 3 elements (a point) without
> the size element stored in the object. The reason for this is that I
> need to be able to have all the elements consecutive in memory when
> gathering several points in a std::vector. In this way all points in the
> std::vector can be uploaded to a graphics card using a single memcopy.
> Can this be acheived using ublas? I have not been able to find a way.

Did you already have a look at Example3? There is a "point.h" header that
exactly implements such a type.
http://freenet-homepage.de/guwi17/ublas/examples/
This type behaves nearly a an ublas vector. Alternatively you should take a
look at tvmet http://tvmet.sourceforge.net/ which might be much faster than
ublas (for small vectors and matrices)

mfg
Gunter