Commit df5bdb9b authored by Jan Oliver Oelerich's avatar Jan Oliver Oelerich

Removed some unused fields of Simulation class.

parent e82a2f50
......@@ -723,8 +723,6 @@ void Simulation::initBuffers() {
Params &prms = Params::getInstance();
typedef typename memory::buffer::number_buffer<float> buf_type;
auto size_type_size = sizeof(typename vector<float>::size_type);
// The serialization buffer is for sending work packages around. It should be larger than the
// theoretical maximal size of any work package filled with data.
unsigned long number_intensities_per_pixel = _gridman->adfDetectorGrid().size() * _gridman->adfSliceCoords().size();
......@@ -732,12 +730,6 @@ void Simulation::initBuffers() {
_gridman->storedCbedSizeY() *
_gridman->cbedSliceCoords().size()) : 0;
unsigned long max_size_work_package = sizeof(ScanPoint) +
2 * size_type_size +
number_intensities_per_pixel * sizeof(float) +
number_cbed_per_pixel * sizeof(float);
_serialization_buffer.resize(prms.workPackageSize() * max_size_work_package + /*Add 10MB*/10 * 1024 * 1024);
_adf_intensity_buffer = std::make_shared<buf_type>(number_intensities_per_pixel, 2 * prms.workPackageSize());
_cbed_intensity_buffer = std::make_shared<buf_type>(number_cbed_per_pixel, 2 * prms.workPackageSize());
}
......
......@@ -77,15 +77,12 @@ namespace stemsalabim {
/// The propagator can be represented as two 1D functions, one for each
/// spatial direction.
std::vector<std::complex<float>> _propagator_x;
std::vector<std::complex<float>> _propagator_y;
Wave _propagator;
/// these buffers temporarily hold intensity data as continuous storage. This is to prevent
/// memory fragmentation errors.
std::shared_ptr<memory::buffer::number_buffer<float>> _adf_intensity_buffer;
std::shared_ptr<memory::buffer::number_buffer<float>> _cbed_intensity_buffer;
std::vector<char> _serialization_buffer;
/*!
* Carries out a multi-slice simulation for a single probe position
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment