diff options
| author | danlark <[email protected]> | 2022-02-10 16:46:08 +0300 |
|---|---|---|
| committer | Daniil Cherednik <[email protected]> | 2022-02-10 16:46:08 +0300 |
| commit | 3426a9bc7f169ae9da54cef557ad2a33f6e8eee0 (patch) | |
| tree | 26154e1e9990f1bb4525d3e3fb5b6dac2c2c1da2 /contrib/libs/cxxsupp/openmp/kmp_sched.cpp | |
| parent | cb68f224c46a8ee52ac3fdd2a32534b8bb8dc134 (diff) | |
Restoring authorship annotation for <[email protected]>. Commit 1 of 2.
Diffstat (limited to 'contrib/libs/cxxsupp/openmp/kmp_sched.cpp')
| -rw-r--r-- | contrib/libs/cxxsupp/openmp/kmp_sched.cpp | 52 |
1 files changed, 26 insertions, 26 deletions
diff --git a/contrib/libs/cxxsupp/openmp/kmp_sched.cpp b/contrib/libs/cxxsupp/openmp/kmp_sched.cpp index 80ad960a8d3..8c005ddb0ce 100644 --- a/contrib/libs/cxxsupp/openmp/kmp_sched.cpp +++ b/contrib/libs/cxxsupp/openmp/kmp_sched.cpp @@ -89,12 +89,12 @@ __kmp_for_static_init( typedef typename traits_t< T >::unsigned_t UT; typedef typename traits_t< T >::signed_t ST; /* this all has to be changed back to TID and such.. */ - kmp_int32 gtid = global_tid; - kmp_uint32 tid; - kmp_uint32 nth; - UT trip_count; - kmp_team_t *team; - kmp_info_t *th = __kmp_threads[ gtid ]; + kmp_int32 gtid = global_tid; + kmp_uint32 tid; + kmp_uint32 nth; + UT trip_count; + kmp_team_t *team; + kmp_info_t *th = __kmp_threads[ gtid ]; #if OMPT_SUPPORT && OMPT_TRACE ompt_team_info_t *team_info = NULL; @@ -275,16 +275,16 @@ __kmp_for_static_init( *plastiter = ( tid == trip_count - 1 ); } else { if ( __kmp_static == kmp_sch_static_balanced ) { - UT small_chunk = trip_count / nth; - UT extras = trip_count % nth; + UT small_chunk = trip_count / nth; + UT extras = trip_count % nth; *plower += incr * ( tid * small_chunk + ( tid < extras ? tid : extras ) ); *pupper = *plower + small_chunk * incr - ( tid < extras ? 0 : incr ); if( plastiter != NULL ) *plastiter = ( tid == nth - 1 ); } else { - T big_chunk_inc_count = ( trip_count/nth + + T big_chunk_inc_count = ( trip_count/nth + ( ( trip_count % nth ) ? 1 : 0) ) * incr; - T old_upper = *pupper; + T old_upper = *pupper; KMP_DEBUG_ASSERT( __kmp_static == kmp_sch_static_greedy ); // Unknown static scheduling type. @@ -310,7 +310,7 @@ __kmp_for_static_init( } case kmp_sch_static_chunked: { - ST span; + ST span; if ( chunk < 1 ) { chunk = 1; } @@ -385,12 +385,12 @@ __kmp_dist_for_static_init( KMP_COUNT_BLOCK(OMP_DISTRIBUTE); typedef typename traits_t< T >::unsigned_t UT; typedef typename traits_t< T >::signed_t ST; - kmp_uint32 tid; - kmp_uint32 nth; - kmp_uint32 team_id; - kmp_uint32 nteams; - UT trip_count; - kmp_team_t *team; + kmp_uint32 tid; + kmp_uint32 nth; + kmp_uint32 team_id; + kmp_uint32 nteams; + UT trip_count; + kmp_team_t *team; kmp_info_t * th; KMP_DEBUG_ASSERT( plastiter && plower && pupper && pupperDist && pstride ); @@ -466,16 +466,16 @@ __kmp_dist_for_static_init( } else { // Get the team's chunk first (each team gets at most one chunk) if( __kmp_static == kmp_sch_static_balanced ) { - UT chunkD = trip_count / nteams; - UT extras = trip_count % nteams; + UT chunkD = trip_count / nteams; + UT extras = trip_count % nteams; *plower += incr * ( team_id * chunkD + ( team_id < extras ? team_id : extras ) ); *pupperDist = *plower + chunkD * incr - ( team_id < extras ? 0 : incr ); if( plastiter != NULL ) *plastiter = ( team_id == nteams - 1 ); } else { - T chunk_inc_count = + T chunk_inc_count = ( trip_count / nteams + ( ( trip_count % nteams ) ? 1 : 0) ) * incr; - T upper = *pupper; + T upper = *pupper; KMP_DEBUG_ASSERT( __kmp_static == kmp_sch_static_greedy ); // Unknown static scheduling type. *plower += team_id * chunk_inc_count; @@ -532,17 +532,17 @@ __kmp_dist_for_static_init( *plastiter = 0; } else { if( __kmp_static == kmp_sch_static_balanced ) { - UT chunkL = trip_count / nth; - UT extras = trip_count % nth; + UT chunkL = trip_count / nth; + UT extras = trip_count % nth; *plower += incr * (tid * chunkL + (tid < extras ? tid : extras)); *pupper = *plower + chunkL * incr - (tid < extras ? 0 : incr); if( plastiter != NULL ) if( *plastiter != 0 && !( tid == nth - 1 ) ) *plastiter = 0; } else { - T chunk_inc_count = + T chunk_inc_count = ( trip_count / nth + ( ( trip_count % nth ) ? 1 : 0) ) * incr; - T upper = *pupperDist; + T upper = *pupperDist; KMP_DEBUG_ASSERT( __kmp_static == kmp_sch_static_greedy ); // Unknown static scheduling type. *plower += tid * chunk_inc_count; @@ -570,7 +570,7 @@ __kmp_dist_for_static_init( } case kmp_sch_static_chunked: { - ST span; + ST span; if( chunk < 1 ) chunk = 1; span = chunk * incr; |
