Commit 0e6ad42d authored by Jan Oliver Oelerich's avatar Jan Oliver Oelerich

Small cleanup

parent df5bdb9b
......@@ -270,7 +270,7 @@ void Simulation::run() {
PRINT_DIAGNOSTICS("waiting for slice work to finish work\n");
slice_work.waitUntilFinished();
for(auto & t : threads)
for(auto &t : threads)
t.join();
printLine(st,
......@@ -626,7 +626,7 @@ void Simulation::multisliceMaster(const SimulationState &st) {
}
// join the threads
for(auto & t: threads)
for(auto &t: threads)
t.join();
......@@ -697,7 +697,7 @@ void Simulation::multisliceWorker(const SimulationState &st) {
pixel_index_queue.waitUntilFinished();
for(auto & t: threads)
for(auto &t: threads)
t.join();
threads.clear();
......@@ -725,13 +725,14 @@ void Simulation::initBuffers() {
// 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();
unsigned long number_intensities_per_pixel = prms.adf() ? (_gridman->adfDetectorGrid().size() *
_gridman->adfSliceCoords().size()) : 0;
unsigned long number_cbed_per_pixel = prms.cbed() ? (_gridman->storedCbedSizeX() *
_gridman->storedCbedSizeY() *
_gridman->cbedSliceCoords().size()) : 0;
_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());
_adf_intensity_buffer = std::make_shared<buf_type>(number_intensities_per_pixel, prms.workPackageSize());
_cbed_intensity_buffer = std::make_shared<buf_type>(number_cbed_per_pixel, prms.workPackageSize());
}
......
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