@@ -96,9 +96,9 @@ nest::ConnectionManager::initialize()
96
96
secondary_recv_buffer_pos_.resize ( num_threads );
97
97
sort_connections_by_source_ = true ;
98
98
99
- have_connections_changed_.resize ( num_threads, true );
100
- check_primary_connections_.resize ( num_threads, false );
101
- check_secondary_connections_.resize ( num_threads, false );
99
+ have_connections_changed_.initialize ( num_threads, true );
100
+ check_primary_connections_.initialize ( num_threads, false );
101
+ check_secondary_connections_.initialize ( num_threads, false );
102
102
103
103
#pragma omp parallel
104
104
{
@@ -606,17 +606,17 @@ nest::ConnectionManager::connect_( Node& s,
606
606
607
607
// We do not check has_primary_connections_ and secondary_connections_exist_
608
608
// directly as this led to worse performance on the supercomputer Piz Daint.
609
- if ( not check_primary_connections_[ tid ] and is_primary )
609
+ if ( check_primary_connections_[ tid ]. is_false () and is_primary )
610
610
{
611
611
#pragma omp atomic write
612
612
has_primary_connections_ = true ;
613
- check_primary_connections_. set ( tid, true );
613
+ check_primary_connections_[ tid ]. set_true ( );
614
614
}
615
- else if ( not check_secondary_connections_[ tid ] and not is_primary )
615
+ else if ( check_secondary_connections_[ tid ]. is_false () and not is_primary )
616
616
{
617
617
#pragma omp atomic write
618
618
secondary_connections_exist_ = true ;
619
- check_secondary_connections_. set ( tid, true );
619
+ check_secondary_connections_[ tid ]. set_true ( );
620
620
}
621
621
}
622
622
@@ -1583,12 +1583,12 @@ nest::ConnectionManager::set_have_connections_changed( const thread tid )
1583
1583
// Need to check if have_connections_changed_ has already been set, because if
1584
1584
// we have a lot of threads and they all try to set the variable at once we get
1585
1585
// performance issues on supercomputers.
1586
- if ( not have_connections_changed_[ tid ] )
1586
+ if ( have_connections_changed_[ tid ]. is_false () )
1587
1587
{
1588
1588
std::string msg =
1589
1589
" New connections created, connection descriptors previously obtained using 'GetConnections' are now invalid." ;
1590
1590
LOG ( M_WARNING, " ConnectionManager" , msg );
1591
- have_connections_changed_. set ( tid, true );
1591
+ have_connections_changed_[ tid ]. set_true ( );
1592
1592
}
1593
1593
}
1594
1594
@@ -1598,8 +1598,8 @@ nest::ConnectionManager::unset_have_connections_changed( const thread tid )
1598
1598
// Need to check if have_connections_changed_ has already been set, because if
1599
1599
// we have a lot of threads and they all try to set the variable at once we get
1600
1600
// performance issues on supercomputers.
1601
- if ( have_connections_changed_[ tid ] )
1601
+ if ( have_connections_changed_[ tid ]. is_true () )
1602
1602
{
1603
- have_connections_changed_. set ( tid, false );
1603
+ have_connections_changed_[ tid ]. set_false ( );
1604
1604
}
1605
1605
}
0 commit comments