@@ -95,17 +95,16 @@ public:
95
95
INLINE static void for_static_init (int32_t gtid, int32_t schedtype,
96
96
int32_t *plastiter, T *plower, T *pupper,
97
97
ST *pstride, ST chunk,
98
- bool IsSPMDExecutionMode,
99
- bool IsRuntimeUninitialized) {
98
+ bool IsSPMDExecutionMode) {
100
99
// When IsRuntimeUninitialized is true, we assume that the caller is
101
100
// in an L0 parallel region and that all worker threads participate.
102
101
103
102
int tid = GetLogicalThreadIdInBlock (IsSPMDExecutionMode);
104
103
105
104
// Assume we are in teams region or that we use a single block
106
105
// per target region
107
- ST numberOfActiveOMPThreads = GetNumberOfOmpThreads (
108
- tid, IsSPMDExecutionMode, IsRuntimeUninitialized );
106
+ ST numberOfActiveOMPThreads =
107
+ GetNumberOfOmpThreads ( tid, IsSPMDExecutionMode);
109
108
110
109
// All warps that are in excess of the maximum requested, do
111
110
// not execute the loop
@@ -456,9 +455,7 @@ public:
456
455
457
456
// automatically selects thread or warp ID based on selected implementation
458
457
int tid = GetLogicalThreadIdInBlock (checkSPMDMode (loc));
459
- ASSERT0 (LT_FUSSY,
460
- gtid < GetNumberOfOmpThreads (tid, checkSPMDMode (loc),
461
- checkRuntimeUninitialized (loc)),
458
+ ASSERT0 (LT_FUSSY, gtid < GetNumberOfOmpThreads (tid, checkSPMDMode (loc)),
462
459
" current thread is not needed here; error" );
463
460
// retrieve schedule
464
461
kmp_sched_t schedule =
@@ -509,13 +506,12 @@ public:
509
506
*pupper = myUb;
510
507
*pstride = 1 ;
511
508
512
- PRINT (
513
- LD_LOOP,
514
- " Got sched: active %d, total %d: lb %lld, ub %lld, stride = %lld, "
515
- " last %d\n " ,
516
- (int )GetNumberOfOmpThreads (tid, isSPMDMode (), isRuntimeUninitialized ()),
517
- (int )GetNumberOfWorkersInTeam (), (long long )*plower, (long long )*pupper,
518
- (long long )*pstride, (int )*plast);
509
+ PRINT (LD_LOOP,
510
+ " Got sched: active %d, total %d: lb %lld, ub %lld, stride = %lld, "
511
+ " last %d\n " ,
512
+ (int )GetNumberOfOmpThreads (tid, isSPMDMode ()),
513
+ (int )GetNumberOfWorkersInTeam (), (long long )*plower,
514
+ (long long )*pupper, (long long )*pstride, (int )*plast);
519
515
return DISPATCH_NOTFINISHED;
520
516
}
521
517
@@ -629,7 +625,7 @@ EXTERN void __kmpc_for_static_init_4(kmp_Ident *loc, int32_t global_tid,
629
625
PRINT0 (LD_IO, " call kmpc_for_static_init_4\n " );
630
626
omptarget_nvptx_LoopSupport<int32_t , int32_t >::for_static_init (
631
627
global_tid, schedtype, plastiter, plower, pupper, pstride, chunk,
632
- checkSPMDMode (loc), checkRuntimeUninitialized (loc) );
628
+ checkSPMDMode (loc));
633
629
}
634
630
635
631
EXTERN void __kmpc_for_static_init_4u (kmp_Ident *loc, int32_t global_tid,
@@ -640,7 +636,7 @@ EXTERN void __kmpc_for_static_init_4u(kmp_Ident *loc, int32_t global_tid,
640
636
PRINT0 (LD_IO, " call kmpc_for_static_init_4u\n " );
641
637
omptarget_nvptx_LoopSupport<uint32_t , int32_t >::for_static_init (
642
638
global_tid, schedtype, plastiter, plower, pupper, pstride, chunk,
643
- checkSPMDMode (loc), checkRuntimeUninitialized (loc) );
639
+ checkSPMDMode (loc));
644
640
}
645
641
646
642
EXTERN void __kmpc_for_static_init_8 (kmp_Ident *loc, int32_t global_tid,
@@ -651,7 +647,7 @@ EXTERN void __kmpc_for_static_init_8(kmp_Ident *loc, int32_t global_tid,
651
647
PRINT0 (LD_IO, " call kmpc_for_static_init_8\n " );
652
648
omptarget_nvptx_LoopSupport<int64_t , int64_t >::for_static_init (
653
649
global_tid, schedtype, plastiter, plower, pupper, pstride, chunk,
654
- checkSPMDMode (loc), checkRuntimeUninitialized (loc) );
650
+ checkSPMDMode (loc));
655
651
}
656
652
657
653
EXTERN void __kmpc_for_static_init_8u (kmp_Ident *loc, int32_t global_tid,
@@ -662,7 +658,7 @@ EXTERN void __kmpc_for_static_init_8u(kmp_Ident *loc, int32_t global_tid,
662
658
PRINT0 (LD_IO, " call kmpc_for_static_init_8u\n " );
663
659
omptarget_nvptx_LoopSupport<uint64_t , int64_t >::for_static_init (
664
660
global_tid, schedtype, plastiter, plower, pupper, pstride, chunk,
665
- checkSPMDMode (loc), checkRuntimeUninitialized (loc) );
661
+ checkSPMDMode (loc));
666
662
}
667
663
668
664
EXTERN
@@ -674,7 +670,7 @@ void __kmpc_for_static_init_4_simple_spmd(kmp_Ident *loc, int32_t global_tid,
674
670
PRINT0 (LD_IO, " call kmpc_for_static_init_4_simple_spmd\n " );
675
671
omptarget_nvptx_LoopSupport<int32_t , int32_t >::for_static_init (
676
672
global_tid, schedtype, plastiter, plower, pupper, pstride, chunk,
677
- /* IsSPMDExecutionMode=*/ true , /* IsRuntimeUninitialized= */ true );
673
+ /* IsSPMDExecutionMode=*/ true );
678
674
}
679
675
680
676
EXTERN
@@ -686,7 +682,7 @@ void __kmpc_for_static_init_4u_simple_spmd(kmp_Ident *loc, int32_t global_tid,
686
682
PRINT0 (LD_IO, " call kmpc_for_static_init_4u_simple_spmd\n " );
687
683
omptarget_nvptx_LoopSupport<uint32_t , int32_t >::for_static_init (
688
684
global_tid, schedtype, plastiter, plower, pupper, pstride, chunk,
689
- /* IsSPMDExecutionMode=*/ true , /* IsRuntimeUninitialized= */ true );
685
+ /* IsSPMDExecutionMode=*/ true );
690
686
}
691
687
692
688
EXTERN
@@ -698,7 +694,7 @@ void __kmpc_for_static_init_8_simple_spmd(kmp_Ident *loc, int32_t global_tid,
698
694
PRINT0 (LD_IO, " call kmpc_for_static_init_8_simple_spmd\n " );
699
695
omptarget_nvptx_LoopSupport<int64_t , int64_t >::for_static_init (
700
696
global_tid, schedtype, plastiter, plower, pupper, pstride, chunk,
701
- /* IsSPMDExecutionMode=*/ true , /* IsRuntimeUninitialized= */ true );
697
+ /* IsSPMDExecutionMode=*/ true );
702
698
}
703
699
704
700
EXTERN
@@ -710,7 +706,7 @@ void __kmpc_for_static_init_8u_simple_spmd(kmp_Ident *loc, int32_t global_tid,
710
706
PRINT0 (LD_IO, " call kmpc_for_static_init_8u_simple_spmd\n " );
711
707
omptarget_nvptx_LoopSupport<uint64_t , int64_t >::for_static_init (
712
708
global_tid, schedtype, plastiter, plower, pupper, pstride, chunk,
713
- /* IsSPMDExecutionMode=*/ true , /* IsRuntimeUninitialized= */ true );
709
+ /* IsSPMDExecutionMode=*/ true );
714
710
}
715
711
716
712
EXTERN
@@ -721,7 +717,7 @@ void __kmpc_for_static_init_4_simple_generic(
721
717
PRINT0 (LD_IO, " call kmpc_for_static_init_4_simple_generic\n " );
722
718
omptarget_nvptx_LoopSupport<int32_t , int32_t >::for_static_init (
723
719
global_tid, schedtype, plastiter, plower, pupper, pstride, chunk,
724
- /* IsSPMDExecutionMode=*/ false , /* IsRuntimeUninitialized= */ true );
720
+ /* IsSPMDExecutionMode=*/ false );
725
721
}
726
722
727
723
EXTERN
@@ -732,7 +728,7 @@ void __kmpc_for_static_init_4u_simple_generic(
732
728
PRINT0 (LD_IO, " call kmpc_for_static_init_4u_simple_generic\n " );
733
729
omptarget_nvptx_LoopSupport<uint32_t , int32_t >::for_static_init (
734
730
global_tid, schedtype, plastiter, plower, pupper, pstride, chunk,
735
- /* IsSPMDExecutionMode=*/ false , /* IsRuntimeUninitialized= */ true );
731
+ /* IsSPMDExecutionMode=*/ false );
736
732
}
737
733
738
734
EXTERN
@@ -743,7 +739,7 @@ void __kmpc_for_static_init_8_simple_generic(
743
739
PRINT0 (LD_IO, " call kmpc_for_static_init_8_simple_generic\n " );
744
740
omptarget_nvptx_LoopSupport<int64_t , int64_t >::for_static_init (
745
741
global_tid, schedtype, plastiter, plower, pupper, pstride, chunk,
746
- /* IsSPMDExecutionMode=*/ false , /* IsRuntimeUninitialized= */ true );
742
+ /* IsSPMDExecutionMode=*/ false );
747
743
}
748
744
749
745
EXTERN
@@ -754,7 +750,7 @@ void __kmpc_for_static_init_8u_simple_generic(
754
750
PRINT0 (LD_IO, " call kmpc_for_static_init_8u_simple_generic\n " );
755
751
omptarget_nvptx_LoopSupport<uint64_t , int64_t >::for_static_init (
756
752
global_tid, schedtype, plastiter, plower, pupper, pstride, chunk,
757
- /* IsSPMDExecutionMode=*/ false , /* IsRuntimeUninitialized= */ true );
753
+ /* IsSPMDExecutionMode=*/ false );
758
754
}
759
755
760
756
EXTERN void __kmpc_for_static_fini (kmp_Ident *loc, int32_t global_tid) {
@@ -787,8 +783,7 @@ EXTERN void __kmpc_reduce_conditional_lastprivate(kmp_Ident *loc, int32_t gtid,
787
783
788
784
omptarget_nvptx_TeamDescr &teamDescr = getMyTeamDescriptor ();
789
785
int tid = GetLogicalThreadIdInBlock (checkSPMDMode (loc));
790
- uint32_t NumThreads = GetNumberOfOmpThreads (tid, checkSPMDMode (loc),
791
- checkRuntimeUninitialized (loc));
786
+ uint32_t NumThreads = GetNumberOfOmpThreads (tid, checkSPMDMode (loc));
792
787
uint64_t *Buffer = teamDescr.getLastprivateIterBuffer ();
793
788
for (unsigned i = 0 ; i < varNum; i++) {
794
789
// Reset buffer.
0 commit comments