Do not run OpenMP loops when there is no data to
This commit is contained in:
parent
f2788a3086
commit
d18ed945c9
|
@ -1182,9 +1182,10 @@ void RN_DATA::Recalculate( int aNet )
|
||||||
if( netCount > m_nets.size() )
|
if( netCount > m_nets.size() )
|
||||||
m_nets.resize( netCount );
|
m_nets.resize( netCount );
|
||||||
|
|
||||||
if( aNet < 0 ) // Recompute everything
|
if( aNet < 0 && netCount > 1 ) // Recompute everything
|
||||||
{
|
{
|
||||||
unsigned int i;
|
unsigned int i;
|
||||||
|
|
||||||
#ifdef USE_OPENMP
|
#ifdef USE_OPENMP
|
||||||
#pragma omp parallel shared(netCount) private(i)
|
#pragma omp parallel shared(netCount) private(i)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue