Skip to content

Commit

Permalink
Re #0. Use signed integer for OpenMP for.
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonHeybrock committed Oct 10, 2017
1 parent 5e711d5 commit 5357fe3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion Framework/API/src/MatrixWorkspace.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1973,8 +1973,9 @@ void MatrixWorkspace::rebuildDetectorIDGroupings() {
const auto &detInfo = detectorInfo();
const auto &allDetIDs = detInfo.detectorIDs();
const auto &specDefs = m_indexInfo->spectrumDefinitions();
const auto size = static_cast<int64_t>(m_indexInfo->size());
#pragma omp parallel for
for (size_t i = 0; i < m_indexInfo->size(); ++i) {
for (int64_t i = 0; i < size; ++i) {
auto &spec = getSpectrum(i);
// Prevent setting flags that require spectrum definition updates
spec.setMatrixWorkspace(nullptr, i);
Expand Down
3 changes: 2 additions & 1 deletion Framework/DataHandling/src/LoadEmptyInstrument.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,9 @@ void LoadEmptyInstrument::exec() {
CountStandardDeviations v_monitor_e(1, monitor_value);

const auto &spectrumInfo = ws2D->spectrumInfo();
const auto size = static_cast<int64_t>(spectrumInfo->size());
#pragma omp parallel for
for (size_t i = 0; i < ws2D->getNumberHistograms(); i++) {
for (size_t i = 0; i < size; i++) {
if (spectrumInfo.isMonitor(i)) {
ws2D->setCounts(i, v_monitor_y);
ws2D->setCountStandardDeviations(i, v_monitor_e);
Expand Down

0 comments on commit 5357fe3

Please sign in to comment.