Dear all,
I think my question seems stupid, but I dont have a plave to start.
In my simulation, I have a huge storage which is an std::vector<std::vector<std::vector<float> > > _Storage
Unfortunatly, this storage gets very large, such that it might far above a GB. So, I would like to export it to a file on the hard disk. I am aware of the fact, that this will cost me a lost of computation time.
I have to operations: read and write.
During a process, I read only from _Storage[0], but write (potentially) verywhere (except 0). Then, I do a cyclic shift [1]-->[0] .... [0]-->[end-1] and start again to read [0] etc.
Therefore, I think it is resonable to read [0] in the RAM, do my processing and store the results [1..end-1] dirctly to disc. But how do I do that?
Lets assume an example:
|
{[(0 1 2) (3 4 5) (6 7 8)] [(9 10 11) (12 13 14) (15 16 17)] [(18 19 20) (21 22 23) (24 25 26)]
|
- With which method do I write them one after another into a file, such that .....
- ... I can read and write, e.g. element (2,2,2) without having to read / write the others?
- It should be very fast (within the restriction to read/write to disk)
Sry for so much text, but I tried to make the problem clear.
regards,
curator