Split AnalysisDataStorageFrame into two.
authorTeemu Murtola <teemu.murtola@gmail.com>
Sun, 2 Jun 2013 12:03:23 +0000 (15:03 +0300)
committerGerrit Code Review <gerrit@gerrit.gromacs.org>
Wed, 3 Jul 2013 17:54:28 +0000 (19:54 +0200)
commit06a0c8a521a77ed9cbb08b2607c9f73c27b12106
treee5240f9e95b84cd834f02a93bf1105d666406b1f
parentba223d53491570a87820027ead0f4f726dfbab6c
Split AnalysisDataStorageFrame into two.

Main changes:
- Move parts of AnalysisDataStorageFrame that are only used internally
  by the data storage into a separate class, which is internal to
  datastorage.cpp.  The remaining public interface now only contains
  methods that are required to construct the in-progress frame/point
  set.
- Make AnalysisDataStorageFrame have a separate vector of column values,
  which then get transfered into the actual storage when necessary.
  This part is required for handling multipoint storage.
- Only keep AnalysisDataStorageFrame objects for in-progress frames.
  Without this part, the memory usage of full storage would double; now
  the memory usage only increases proportional to the number of
  concurrent data frames.
- Recycle the AnalysisDataStorageFrame objects for subsequent frames.
  Avoids memory allocation, as the temporary column values don't need to
  be reallocated for each frame.

These changes clarify the responsibilities in the code, and allow for a
much cleaner implementation of multipoint storage (subsequent commit).

The implementation may not be as clean as possible, but it will see
further changes in subsequent commits.

Refactoring in preparation for #869 and #1010, no functional change.

Change-Id: I40928ff10c5aded3b094604b37349b9fd174d267
src/gromacs/analysisdata/analysisdata.cpp
src/gromacs/analysisdata/datastorage.cpp
src/gromacs/analysisdata/datastorage.h