Skip to content

Commit

Permalink
prevent deletion of statistical data after resetting time
Browse files Browse the repository at this point in the history
  • Loading branch information
chrxh committed Sep 17, 2024
1 parent d4c991a commit 38102c2
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions source/EngineGpuKernels/StatisticsService.cu
Original file line number Diff line number Diff line change
Expand Up @@ -91,10 +91,14 @@ void _StatisticsService::resetTime(StatisticsHistory& history, uint64_t timestep
}
}
data.swap(newData);
_accumulatedDataPoint.reset();
_numDataPoints = 0;
}

void _StatisticsService::rewriteHistory(StatisticsHistory& history, StatisticsHistoryData const& newHistoryData, uint64_t timestep)
{
_accumulatedDataPoint.reset();
_numDataPoints = 0;
_lastRawStatistics.reset();
_lastTimestep.reset();
if (!newHistoryData.empty()) {
Expand Down

0 comments on commit 38102c2

Please sign in to comment.