File tree 2 files changed +11
-11
lines changed
openmp/libomptarget/deviceRTLs 2 files changed +11
-11
lines changed Original file line number Diff line number Diff line change @@ -101,8 +101,6 @@ INLINE __kmpc_impl_lanemask_t __kmpc_impl_lanemask_gt() {
101
101
return __lanemask_gt ();
102
102
}
103
103
104
- EXTERN bool __kmpc_impl_is_first_active_thread ();
105
-
106
104
INLINE uint32_t __kmpc_impl_smid () {
107
105
return __smid ();
108
106
}
@@ -126,6 +124,8 @@ INLINE __kmpc_impl_lanemask_t __kmpc_impl_activemask() {
126
124
return __ballot64 (1 );
127
125
}
128
126
127
+ EXTERN bool __kmpc_impl_is_first_active_thread ();
128
+
129
129
EXTERN int32_t __kmpc_impl_shfl_sync (__kmpc_impl_lanemask_t , int32_t Var,
130
130
int32_t SrcLane);
131
131
Original file line number Diff line number Diff line change @@ -94,15 +94,6 @@ INLINE __kmpc_impl_lanemask_t __kmpc_impl_lanemask_gt() {
94
94
return res;
95
95
}
96
96
97
- // Return true if this is the first active thread in the warp.
98
- INLINE bool __kmpc_impl_is_first_active_thread () {
99
- unsigned long long Mask = __kmpc_impl_activemask ();
100
- unsigned long long ShNum = WARPSIZE - (GetThreadIdInBlock () % WARPSIZE);
101
- unsigned long long Sh = Mask << ShNum;
102
- // Truncate Sh to the 32 lower bits
103
- return (unsigned )Sh == 0 ;
104
- }
105
-
106
97
INLINE uint32_t __kmpc_impl_smid () {
107
98
uint32_t id;
108
99
asm (" mov.u32 %0, %%smid;" : " =r" (id));
@@ -142,6 +133,15 @@ INLINE __kmpc_impl_lanemask_t __kmpc_impl_activemask() {
142
133
#endif
143
134
}
144
135
136
+ // Return true if this is the first active thread in the warp.
137
+ INLINE bool __kmpc_impl_is_first_active_thread () {
138
+ unsigned long long Mask = __kmpc_impl_activemask ();
139
+ unsigned long long ShNum = WARPSIZE - (GetThreadIdInBlock () % WARPSIZE);
140
+ unsigned long long Sh = Mask << ShNum;
141
+ // Truncate Sh to the 32 lower bits
142
+ return (unsigned )Sh == 0 ;
143
+ }
144
+
145
145
// In Cuda 9.0, the *_sync() version takes an extra argument 'mask'.
146
146
147
147
INLINE int32_t __kmpc_impl_shfl_sync (__kmpc_impl_lanemask_t Mask, int32_t Var,
You can’t perform that action at this time.
0 commit comments