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\")");
43
43
_Pragma ("omp begin declare target device_type(nohost)" );
44
44
_Pragma ("omp begin declare variant match(device = {kind(gpu)})" );
45
45
46
+ #define __GPU_X_DIM 0
47
+ #define __GPU_Y_DIM 1
48
+ #define __GPU_Z_DIM 2
49
+
46
50
// Returns the number of blocks in the requested dimension.
47
51
_DEFAULT_FN_ATTRS static __inline__ uint32_t __gpu_num_blocks (int __dim ) {
48
52
switch (__dim ) {
@@ -127,15 +131,15 @@ __gpu_read_first_lane_f64(uint64_t __lane_mask, double __x) {
127
131
__builtin_bit_cast (uint64_t , __x )));
128
132
}
129
133
130
- // Gets the first floating point value from the active lanes .
134
+ // Shuffles the the lanes according to the given index .
131
135
_DEFAULT_FN_ATTRS static __inline__ float
132
136
__gpu_shuffle_idx_f32 (uint64_t __lane_mask , uint32_t __idx , float __x ) {
133
137
return __builtin_bit_cast (
134
138
float , __gpu_shuffle_idx_u32 (__lane_mask , __idx ,
135
139
__builtin_bit_cast (uint32_t , __x )));
136
140
}
137
141
138
- // Gets the first floating point value from the active lanes .
142
+ // Shuffles the the lanes according to the given index .
139
143
_DEFAULT_FN_ATTRS static __inline__ double
140
144
__gpu_shuffle_idx_f64 (uint64_t __lane_mask , uint32_t __idx , double __x ) {
141
145
return __builtin_bit_cast (
You can’t perform that action at this time.
0 commit comments