Skip to content

Commit

Permalink
Fix: always resize hit counter
Browse files Browse the repository at this point in the history
  • Loading branch information
tobre1 committed Apr 11, 2024
1 parent e8da29f commit 024a47e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions include/viennaray/rayTraceKernel.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,9 @@ class rayTraceKernel {

// hit counters
std::vector<rayHitCounter<NumericType>> threadLocalHitCounter(numThreads);
hitCounter_.clear();
hitCounter_.resize(geometry_.getNumPoints(), calcFlux_);
if (calcFlux_) {
hitCounter_.clear();
hitCounter_.resize(geometry_.getNumPoints(), calcFlux_);
for (auto &hitC : threadLocalHitCounter) {
hitC = hitCounter_;
}
Expand Down

0 comments on commit 024a47e

Please sign in to comment.