Merge pull request #804 from AWoloszyn/fix-gpu-src-assert

Fix for assert in GetGpuSourceLocationZonesCntReal
This commit is contained in:
Bartosz Taudul 2024-05-30 20:56:27 +02:00 committed by GitHub
commit 026a34a0fc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -3425,7 +3425,10 @@ uint64_t* Worker::GetSourceLocationZonesCntReal( uint16_t srcloc )
uint64_t* Worker::GetGpuSourceLocationZonesCntReal( uint16_t srcloc )
{
auto it = m_data.gpuSourceLocationZonesCnt.find( srcloc );
assert( it != m_data.gpuSourceLocationZonesCnt.end() );
if( it == m_data.gpuSourceLocationZonesCnt.end() )
{
it = m_data.gpuSourceLocationZonesCnt.emplace( srcloc, 0 ).first;
}
m_data.gpuCntLast.first = srcloc;
m_data.gpuCntLast.second = &it->second;
return &it->second;