Skip to content

Commit

Permalink
Fix integer index variable for OpenMP Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
tobre1 committed Mar 27, 2024
1 parent c91c071 commit 4afe0e9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions include/viennaray/rayTrace.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ template <class NumericType, int D> class rayTrace {
case rayNormalizationType::MAX: {
auto maxv = *std::max_element(flux.begin(), flux.end());
#pragma omp parallel for
for (size_t idx = 0; idx < flux.size(); ++idx) {
for (int idx = 0; idx < flux.size(); ++idx) {
flux[idx] *= (totalDiskArea / diskArea[idx]) / maxv;
}
break;
Expand All @@ -213,7 +213,7 @@ template <class NumericType, int D> class rayTrace {
: mNumberOfRaysFixed;
NumericType normFactor = sourceArea / numTotalRays;
#pragma omp parallel for
for (size_t idx = 0; idx < flux.size(); ++idx) {
for (int idx = 0; idx < flux.size(); ++idx) {
flux[idx] *= normFactor / diskArea[idx];
}
break;
Expand All @@ -231,7 +231,7 @@ template <class NumericType, int D> class rayTrace {
"Unequal number of points in smoothFlux");
auto oldFlux = flux;
#pragma omp parallel for
for (size_t idx = 0; idx < mGeometry.getNumPoints(); idx++) {
for (int idx = 0; idx < mGeometry.getNumPoints(); idx++) {
auto neighborhood = mGeometry.getNeighborIndicies(idx);
for (auto const &nbi : neighborhood) {
flux[idx] += oldFlux[nbi];
Expand Down

0 comments on commit 4afe0e9

Please sign in to comment.