17
17
#include <stdint.h>
18
18
#include <stddef.h>
19
19
20
+ #include <SourceInfo.h>
21
+
20
22
#define OFFLOAD_SUCCESS (0)
21
23
#define OFFLOAD_FAIL (~0)
22
24
@@ -50,6 +52,8 @@ enum tgt_map_type {
50
52
OMP_TGT_MAPTYPE_CLOSE = 0x400 ,
51
53
// runtime error if not already allocated
52
54
OMP_TGT_MAPTYPE_PRESENT = 0x1000 ,
55
+ // descriptor for non-contiguous target-update
56
+ OMP_TGT_MAPTYPE_NON_CONTIG = 0x100000000000 ,
53
57
// member of struct, member given by [16 MSBs] - 1
54
58
OMP_TGT_MAPTYPE_MEMBER_OF = 0xffff000000000000
55
59
};
@@ -121,6 +125,13 @@ struct __tgt_async_info {
121
125
void * Queue = nullptr;
122
126
};
123
127
128
+ /// This struct is a record of non-contiguous information
129
+ struct __tgt_target_non_contig {
130
+ uint64_t Offset ;
131
+ uint64_t Count ;
132
+ uint64_t Stride ;
133
+ };
134
+
124
135
#ifdef __cplusplus
125
136
extern "C" {
126
137
#endif
@@ -161,13 +172,16 @@ void __tgt_target_data_begin_nowait(int64_t device_id, int32_t arg_num,
161
172
int32_t depNum , void * depList ,
162
173
int32_t noAliasDepNum ,
163
174
void * noAliasDepList );
164
- void __tgt_target_data_begin_mapper (int64_t device_id , int32_t arg_num ,
165
- void * * args_base , void * * args ,
166
- int64_t * arg_sizes , int64_t * arg_types ,
175
+ void __tgt_target_data_begin_mapper (ident_t * loc , int64_t device_id ,
176
+ int32_t arg_num , void * * args_base ,
177
+ void * * args , int64_t * arg_sizes ,
178
+ int64_t * arg_types ,
179
+ map_var_info_t * arg_names ,
167
180
void * * arg_mappers );
168
181
void __tgt_target_data_begin_nowait_mapper (
169
- int64_t device_id , int32_t arg_num , void * * args_base , void * * args ,
170
- int64_t * arg_sizes , int64_t * arg_types , void * * arg_mappers , int32_t depNum ,
182
+ ident_t * loc , int64_t device_id , int32_t arg_num , void * * args_base ,
183
+ void * * args , int64_t * arg_sizes , int64_t * arg_types ,
184
+ map_var_info_t * arg_names , void * * arg_mappers , int32_t depNum ,
171
185
void * depList , int32_t noAliasDepNum , void * noAliasDepList );
172
186
173
187
// passes data from the target, release target memory and destroys the
@@ -180,16 +194,16 @@ void __tgt_target_data_end_nowait(int64_t device_id, int32_t arg_num,
180
194
int64_t * arg_sizes , int64_t * arg_types ,
181
195
int32_t depNum , void * depList ,
182
196
int32_t noAliasDepNum , void * noAliasDepList );
183
- void __tgt_target_data_end_mapper (int64_t device_id , int32_t arg_num ,
184
- void * * args_base , void * * args ,
185
- int64_t * arg_sizes , int64_t * arg_types ,
197
+ void __tgt_target_data_end_mapper (ident_t * loc , int64_t device_id ,
198
+ int32_t arg_num , void * * args_base ,
199
+ void * * args , int64_t * arg_sizes ,
200
+ int64_t * arg_types , map_var_info_t * arg_names ,
186
201
void * * arg_mappers );
187
- void __tgt_target_data_end_nowait_mapper (int64_t device_id , int32_t arg_num ,
188
- void * * args_base , void * * args ,
189
- int64_t * arg_sizes , int64_t * arg_types ,
190
- void * * arg_mappers , int32_t depNum ,
191
- void * depList , int32_t noAliasDepNum ,
192
- void * noAliasDepList );
202
+ void __tgt_target_data_end_nowait_mapper (
203
+ ident_t * loc , int64_t device_id , int32_t arg_num , void * * args_base ,
204
+ void * * args , int64_t * arg_sizes , int64_t * arg_types ,
205
+ map_var_info_t * arg_names , void * * arg_mappers , int32_t depNum ,
206
+ void * depList , int32_t noAliasDepNum , void * noAliasDepList );
193
207
194
208
/// passes data to/from the target
195
209
void __tgt_target_data_update (int64_t device_id , int32_t arg_num ,
@@ -201,13 +215,16 @@ void __tgt_target_data_update_nowait(int64_t device_id, int32_t arg_num,
201
215
int32_t depNum , void * depList ,
202
216
int32_t noAliasDepNum ,
203
217
void * noAliasDepList );
204
- void __tgt_target_data_update_mapper (int64_t device_id , int32_t arg_num ,
205
- void * * args_base , void * * args ,
206
- int64_t * arg_sizes , int64_t * arg_types ,
218
+ void __tgt_target_data_update_mapper (ident_t * loc , int64_t device_id ,
219
+ int32_t arg_num , void * * args_base ,
220
+ void * * args , int64_t * arg_sizes ,
221
+ int64_t * arg_types ,
222
+ map_var_info_t * arg_names ,
207
223
void * * arg_mappers );
208
224
void __tgt_target_data_update_nowait_mapper (
209
- int64_t device_id , int32_t arg_num , void * * args_base , void * * args ,
210
- int64_t * arg_sizes , int64_t * arg_types , void * * arg_mappers , int32_t depNum ,
225
+ ident_t * loc , int64_t device_id , int32_t arg_num , void * * args_base ,
226
+ void * * args , int64_t * arg_sizes , int64_t * arg_types ,
227
+ map_var_info_t * arg_names , void * * arg_mappers , int32_t depNum ,
211
228
void * depList , int32_t noAliasDepNum , void * noAliasDepList );
212
229
213
230
// Performs the same actions as data_begin in case arg_num is non-zero
@@ -223,15 +240,16 @@ int __tgt_target_nowait(int64_t device_id, void *host_ptr, int32_t arg_num,
223
240
void * * args_base , void * * args , int64_t * arg_sizes ,
224
241
int64_t * arg_types , int32_t depNum , void * depList ,
225
242
int32_t noAliasDepNum , void * noAliasDepList );
226
- int __tgt_target_mapper (int64_t device_id , void * host_ptr , int32_t arg_num ,
227
- void * * args_base , void * * args , int64_t * arg_sizes ,
228
- int64_t * arg_types , void * * arg_mappers );
229
- int __tgt_target_nowait_mapper (int64_t device_id , void * host_ptr ,
243
+ int __tgt_target_mapper (ident_t * loc , int64_t device_id , void * host_ptr ,
244
+ int32_t arg_num , void * * args_base , void * * args ,
245
+ int64_t * arg_sizes , int64_t * arg_types ,
246
+ map_var_info_t * arg_names , void * * arg_mappers );
247
+ int __tgt_target_nowait_mapper (ident_t * loc , int64_t device_id , void * host_ptr ,
230
248
int32_t arg_num , void * * args_base , void * * args ,
231
249
int64_t * arg_sizes , int64_t * arg_types ,
232
- void * * arg_mappers , int32_t depNum ,
233
- void * depList , int32_t noAliasDepNum ,
234
- void * noAliasDepList );
250
+ map_var_info_t * arg_names , void * * arg_mappers ,
251
+ int32_t depNum , void * depList ,
252
+ int32_t noAliasDepNum , void * noAliasDepList );
235
253
236
254
int __tgt_target_teams (int64_t device_id , void * host_ptr , int32_t arg_num ,
237
255
void * * args_base , void * * args , int64_t * arg_sizes ,
@@ -243,18 +261,20 @@ int __tgt_target_teams_nowait(int64_t device_id, void *host_ptr,
243
261
int32_t num_teams , int32_t thread_limit ,
244
262
int32_t depNum , void * depList ,
245
263
int32_t noAliasDepNum , void * noAliasDepList );
246
- int __tgt_target_teams_mapper (int64_t device_id , void * host_ptr ,
264
+ int __tgt_target_teams_mapper (ident_t * loc , int64_t device_id , void * host_ptr ,
247
265
int32_t arg_num , void * * args_base , void * * args ,
248
266
int64_t * arg_sizes , int64_t * arg_types ,
249
- void * * arg_mappers , int32_t num_teams ,
250
- int32_t thread_limit );
267
+ map_var_info_t * arg_names , void * * arg_mappers ,
268
+ int32_t num_teams , int32_t thread_limit );
251
269
int __tgt_target_teams_nowait_mapper (
252
- int64_t device_id , void * host_ptr , int32_t arg_num , void * * args_base ,
253
- void * * args , int64_t * arg_sizes , int64_t * arg_types , void * * arg_mappers ,
254
- int32_t num_teams , int32_t thread_limit , int32_t depNum , void * depList ,
255
- int32_t noAliasDepNum , void * noAliasDepList );
270
+ ident_t * loc , int64_t device_id , void * host_ptr , int32_t arg_num ,
271
+ void * * args_base , void * * args , int64_t * arg_sizes , int64_t * arg_types ,
272
+ map_var_info_t * arg_names , void * * arg_mappers , int32_t num_teams ,
273
+ int32_t thread_limit , int32_t depNum , void * depList , int32_t noAliasDepNum ,
274
+ void * noAliasDepList );
256
275
257
- void __kmpc_push_target_tripcount (int64_t device_id , uint64_t loop_tripcount );
276
+ void __kmpc_push_target_tripcount (ident_t * loc , int64_t device_id ,
277
+ uint64_t loop_tripcount );
258
278
259
279
#ifdef __cplusplus
260
280
}
0 commit comments