Do not run OpenMP loops when there is no data to

This commit is contained in:
Maciej Suminski 2015-04-30 10:46:06 +02:00
parent f2788a3086
commit d18ed945c9
1 changed files with 2 additions and 1 deletions

View File

@ -1182,9 +1182,10 @@ void RN_DATA::Recalculate( int aNet )
if( netCount > m_nets.size() )
m_nets.resize( netCount );
if( aNet < 0 ) // Recompute everything
if( aNet < 0 && netCount > 1 ) // Recompute everything
{
unsigned int i;
#ifdef USE_OPENMP
#pragma omp parallel shared(netCount) private(i)
{