Boost logo

Boost Users :

Subject: Re: [Boost-users] Interprocess : vectors of vectors
From: Oodini (svdbg____at_[hidden])
Date: 2013-05-14 11:05:22


> Isn't that the point of your original question: you do not, in
> fact, know in advance the number of bytes you will need ?

I do know the full size, but I don't know the size of each vector.

The data are organized as :

<nbElements> elt1 elt2 ... <nbElements> elt1 elt2 elt3 ...,

So, if I have 2 inner vectors, I'll have, ie :

5 1.2 3.3 2.5 4.6 0.2 2 0.5 5.6

nbElments are integers, but the other values have a known other type.
Also, I know the number of "nbElements tags". So I know the number of inner vectors I'll need.
I know also the number of values. But I don't know in advance how the values are spread in the vectors. I have to read the file.

> If you have a way to move forward without getting stuck on this
> issue, finish your code, evaluate its performance and then -- if necessary
> run a profiler to figure out what actually needs improving.

Unfortunately, I don't have access to a profiler.
But anyway, these classes seem to consume a lot of RAM compared to a solution based on simple pointers (I havn't compared to the offset_ptr<>, though...).


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net