Skip to content
Snippets Groups Projects
Commit fa1e5879 authored by Owen Arnold's avatar Owen Arnold
Browse files

refs #11393. Better reporting.

parent 8a599ea8
No related branches found
No related tags found
No related merge requests found
...@@ -98,9 +98,11 @@ const std::string SmoothMD::summary() const { ...@@ -98,9 +98,11 @@ const std::string SmoothMD::summary() const {
IMDHistoWorkspace_sptr SmoothMD::hatSmooth(IMDHistoWorkspace_const_sptr toSmooth, IMDHistoWorkspace_sptr SmoothMD::hatSmooth(IMDHistoWorkspace_const_sptr toSmooth,
const WidthVector &widthVector) { const WidthVector &widthVector) {
Progress progress(this, 0, 1, size_t( toSmooth->getNPoints() ) ); uint64_t nPoints = toSmooth->getNPoints();
Progress progress(this, 0, 1, size_t( nPoints * 1.1 ) );
// Create the output workspace. // Create the output workspace.
IMDHistoWorkspace_sptr outWS = toSmooth->clone(); IMDHistoWorkspace_sptr outWS = toSmooth->clone();
progress.reportIncrement(size_t(nPoints * 0.1)); // Report ~10% progress
const int nThreads = Mantid::API::FrameworkManager::Instance() const int nThreads = Mantid::API::FrameworkManager::Instance()
.getNumOMPThreads(); // NThreads to Request .getNumOMPThreads(); // NThreads to Request
...@@ -138,10 +140,8 @@ IMDHistoWorkspace_sptr SmoothMD::hatSmooth(IMDHistoWorkspace_const_sptr toSmooth ...@@ -138,10 +140,8 @@ IMDHistoWorkspace_sptr SmoothMD::hatSmooth(IMDHistoWorkspace_const_sptr toSmooth
outWS->setErrorSquaredAt(iterator->getLinearIndex(), outWS->setErrorSquaredAt(iterator->getLinearIndex(),
sumSqError / (nNeighbours + 1)); sumSqError / (nNeighbours + 1));
if(counter % 1000 == 0) {
progress.report(); progress.report();
}
++counter;
} while (iterator->next()); } while (iterator->next());
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment