File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -43,6 +43,10 @@ _Pragma("push_macro(\"bool\")");
4343_Pragma ("omp begin declare target device_type(nohost)" );
4444_Pragma ("omp begin declare variant match(device = {kind(gpu)})" );
4545
46+ #define __GPU_X_DIM 0
47+ #define __GPU_Y_DIM 1
48+ #define __GPU_Z_DIM 2
49+
4650// Returns the number of blocks in the requested dimension.
4751_DEFAULT_FN_ATTRS static __inline__ uint32_t __gpu_num_blocks (int __dim ) {
4852 switch (__dim ) {
@@ -127,15 +131,15 @@ __gpu_read_first_lane_f64(uint64_t __lane_mask, double __x) {
127131 __builtin_bit_cast (uint64_t , __x )));
128132}
129133
130- // Gets the first floating point value from the active lanes .
134+ // Shuffles the the lanes according to the given index .
131135_DEFAULT_FN_ATTRS static __inline__ float
132136__gpu_shuffle_idx_f32 (uint64_t __lane_mask , uint32_t __idx , float __x ) {
133137 return __builtin_bit_cast (
134138 float , __gpu_shuffle_idx_u32 (__lane_mask , __idx ,
135139 __builtin_bit_cast (uint32_t , __x )));
136140}
137141
138- // Gets the first floating point value from the active lanes .
142+ // Shuffles the the lanes according to the given index .
139143_DEFAULT_FN_ATTRS static __inline__ double
140144__gpu_shuffle_idx_f64 (uint64_t __lane_mask , uint32_t __idx , double __x ) {
141145 return __builtin_bit_cast (
You can’t perform that action at this time.
0 commit comments