-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathompt.h
699 lines (577 loc) · 26.3 KB
/
ompt.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
/*
* include/45/ompt.h.var
*/
#ifndef __OMPT__
#define __OMPT__
/*****************************************************************************
* system include files
*****************************************************************************/
#include <stdint.h>
/*****************************************************************************
* iteration macros
*****************************************************************************/
#define FOREACH_OMPT_INQUIRY_FN(macro) \
macro (ompt_enumerate_states) \
\
macro (ompt_set_callback) \
macro (ompt_get_callback) \
\
macro (ompt_get_state) \
\
macro (ompt_get_parallel_info) \
macro (ompt_get_task_info) \
macro (ompt_get_thread_data) \
macro (ompt_get_unique_id)
#define FOREACH_OMPT_PLACEHOLDER_FN(macro) \
macro (ompt_idle) \
macro (ompt_overhead) \
macro (ompt_barrier_wait) \
macro (ompt_task_wait) \
macro (ompt_mutex_wait)
#define FOREACH_OMPT_STATE(macro) \
\
/* first */ \
macro (ompt_state_first, 0x71) /* initial enumeration state */ \
\
/* work states (0..15) */ \
macro (ompt_state_work_serial, 0x00) /* working outside parallel */ \
macro (ompt_state_work_parallel, 0x01) /* working within parallel */ \
macro (ompt_state_work_reduction, 0x02) /* performing a reduction */ \
\
/* idle (16..31) */ \
macro (ompt_state_idle, 0x10) /* waiting for work */ \
\
/* overhead states (32..63) */ \
macro (ompt_state_overhead, 0x20) /* overhead excluding wait states */ \
\
/* barrier wait states (64..79) */ \
macro (ompt_state_wait_barrier, 0x40) /* waiting at a barrier */ \
macro (ompt_state_wait_barrier_implicit, 0x41) /* implicit barrier */ \
macro (ompt_state_wait_barrier_explicit, 0x42) /* explicit barrier */ \
\
/* task wait states (80..95) */ \
macro (ompt_state_wait_taskwait, 0x50) /* waiting at a taskwait */ \
macro (ompt_state_wait_taskgroup, 0x51) /* waiting at a taskgroup */ \
\
/* mutex wait states (96..111) */ \
macro (ompt_state_wait_lock, 0x60) /* waiting for lock */ \
macro (ompt_state_wait_nest_lock, 0x61) /* waiting for nest lock */ \
macro (ompt_state_wait_critical, 0x62) /* waiting for critical */ \
macro (ompt_state_wait_atomic, 0x63) /* waiting for atomic */ \
macro (ompt_state_wait_ordered, 0x64) /* waiting for ordered */ \
macro (ompt_state_wait_single, 0x6F) /* waiting for single region (non-standard!) */ \
\
/* misc (112..127) */ \
macro (ompt_state_undefined, 0x70) /* undefined thread state */
#define FOREACH_OMPT_EVENT(macro) \
\
/*--- Mandatory Events ---*/ \
macro (ompt_callback_thread_begin, ompt_callback_thread_begin_t, 1) /* thread begin */ \
macro (ompt_callback_thread_end, ompt_callback_thread_end_t, 2) /* thread end */ \
\
macro (ompt_callback_parallel_begin, ompt_callback_parallel_begin_t, 3) /* parallel begin */ \
macro (ompt_callback_parallel_end, ompt_callback_parallel_end_t, 4) /* parallel end */ \
\
macro (ompt_callback_task_create, ompt_callback_task_create_t, 5) /* task begin */ \
macro (ompt_callback_task_schedule, ompt_callback_task_schedule_t, 6) /* task schedule */ \
macro (ompt_callback_implicit_task, ompt_callback_implicit_task_t, 7) /* implicit task */ \
\
/*macro (ompt_callback_target, ompt_callback_target_t, 8)*/ /* target */ \
/*macro (ompt_callback_target_data_op ompt_callback_target_data_op_t, 9)*/ /* target data op*/ \
/*macro (ompt_callback_target_submit, ompt_callback_target_submit_t, 10)*/ /* target submit*/ \
\
/*macro (ompt_callback_control_tool, ompt_callback_control_tool_t, 11)*/ /* control tool */ \
\
/*macro (ompt_callback_device_initialize, ompt_callback_device_initialize_t, 12)*/ /* device initialize */ \
\
/*--- Optional Events (blame shifting, ompt_event_unimplemented) ---*/ \
macro (ompt_callback_idle, ompt_callback_idle_t, 13) /* begin or end idle state */\
\
macro (ompt_callback_sync_region_wait, ompt_callback_sync_region_t, 14) /* sync region wait begin or end*/ \
\
macro (ompt_callback_mutex_released, ompt_callback_mutex_t, 15) /* mutex released */ \
\
/*--- Optional Events (synchronous events, ompt_event_unimplemented) --- */ \
\
macro (ompt_callback_task_dependences, ompt_callback_task_dependences_t, 16) /* report task dependences */\
macro (ompt_callback_task_dependence, ompt_callback_task_dependence_t, 17) /* report task dependence */\
\
macro (ompt_callback_work, ompt_callback_work_t, 18) /* task at work begin or end*/\
\
macro (ompt_callback_master, ompt_callback_master_t, 19) /* task at master begin or end */\
\
/*macro (ompt_callback_target_map, ompt_callback_target_map_t, 20)*/ /* target map */ \
\
macro (ompt_callback_sync_region, ompt_callback_sync_region_t, 21) /* sync region begin or end */ \
\
macro (ompt_callback_lock_init, ompt_callback_lock_init_t, 22) /* lock init */ \
macro (ompt_callback_lock_destroy, ompt_callback_lock_destroy_t, 23) /* lock destroy */ \
\
macro (ompt_callback_mutex_acquire, ompt_callback_mutex_acquire_t, 24) /* mutex acquire */ \
macro (ompt_callback_mutex_acquired, ompt_callback_mutex_t, 25) /* mutex acquired */ \
\
macro (ompt_callback_nest_lock, ompt_callback_nest_lock_t, 26) /* nest lock */ \
\
macro (ompt_callback_flush, ompt_callback_flush_t, 27) /* after executing flush */ \
\
macro (ompt_callback_cancel, ompt_callback_cancel_t, 28) /*cancel innermost binding region*/\
\
\
/*--- Old Events --- */ \
macro (ompt_event_control, ompt_control_callback_t, 29) /* support control calls */ \
\
/*--- Custom Events (part of extensions to generate grain graphs ---*/ \
macro (ext_callback_task_create_begin, ext_callback_task_create_begin_t, 80) /* end of task creation */\
macro (ext_callback_loop, ext_callback_loop_t, 81) /* loop construct */ \
macro (ext_callback_chunk, ext_callback_chunk_t, 82) /* chunk is scheduled */ \
/*****************************************************************************
* data types
*****************************************************************************/
/*---------------------
* identifiers
*---------------------*/
typedef uint64_t ompt_id_t;
typedef union ompt_data_u {
ompt_id_t value; /* data initialized by runtime to unique id */
void *ptr; /* pointer under tool control */
} ompt_data_t;
typedef ompt_data_t ompt_thread_data_t;
#define ompt_thread_id_none {.value=0} /* non-standard */
typedef ompt_data_t ompt_task_data_t;
//#define ompt_task_id_none ((ompt_task_data_t) 0) /* non-standard */
#define ompt_task_id_none {.value=0} /* non-standard */
typedef ompt_data_t ompt_parallel_data_t;
//#define ompt_parallel_id_none ((ompt_parallel_data_t) 0) /* non-standard */
#define ompt_parallel_id_none {.value=0} /* non-standard */
typedef uint64_t ompt_wait_id_t;
#define ompt_wait_id_none ((ompt_wait_id_t) 0) /* non-standard */
/*---------------------
* ompt_frame_t
*---------------------*/
typedef struct ompt_frame_s {
void *exit_runtime_frame; /* next frame is user code */
void *reenter_runtime_frame; /* previous frame is user code */
} ompt_frame_t;
/*---------------------
* dependences types
*---------------------*/
typedef enum ompt_task_dependence_flag_e {
// a two bit field for the dependence type
ompt_task_dependence_type_out = 1,
ompt_task_dependence_type_in = 2,
ompt_task_dependence_type_inout = 3,
} ompt_task_dependence_flag_t;
typedef struct ompt_task_dependence_s {
void *variable_addr;
uint32_t dependence_flags;
} ompt_task_dependence_t;
/*****************************************************************************
* enumerations for thread states and runtime events
*****************************************************************************/
/*---------------------
* runtime states
*---------------------*/
typedef enum {
#define ompt_state_macro(state, code) state = code,
FOREACH_OMPT_STATE(ompt_state_macro)
#undef ompt_state_macro
} ompt_state_t;
/*---------------------
* runtime events
*---------------------*/
typedef enum ompt_callbacks_e{
#define ompt_event_macro(event, callback, eventid) event = eventid,
FOREACH_OMPT_EVENT(ompt_event_macro)
#undef ompt_event_macro
} ompt_callbacks_t;
/*---------------------
* set callback results
*---------------------*/
/*typedef enum {
ompt_set_result_registration_error = 0,
ompt_set_result_event_may_occur_no_callback = 1,
ompt_set_result_event_never_occurs = 2,
ompt_set_result_event_may_occur_callback_some = 3,
ompt_set_result_event_may_occur_callback_always = 4,
} ompt_set_result_t; */
typedef enum ompt_set_result_e {
ompt_set_error = 0,
ompt_set_never = 1,
ompt_set_sometimes = 2,
ompt_set_sometimes_paired = 3,
ompt_set_always = 4
} ompt_set_result_t;
/*****************************************************************************
* callback signatures
*****************************************************************************/
/* initialization */
typedef void (*ompt_interface_fn_t)(void);
typedef ompt_interface_fn_t (*ompt_function_lookup_t)(
const char * /* entry point to look up */
);
/* threads */
typedef void (*ompt_thread_callback_t) (
ompt_thread_data_t thread_data /* data of thread */
);
typedef enum {
ompt_thread_initial = 1, // start the enumeration at 1
ompt_thread_worker = 2,
ompt_thread_other = 3
} ompt_thread_type_t;
typedef enum {
ompt_invoker_program = 0, /* program invokes master task */
ompt_invoker_runtime = 1 /* runtime invokes master task */
} ompt_invoker_t;
typedef void (*ompt_callback_thread_begin_t) (
ompt_thread_type_t thread_type, /* type of thread */
ompt_data_t *thread_data /* data of thread */
);
typedef void (*ompt_callback_thread_end_t) (
ompt_data_t *thread_data /* data of thread */
);
typedef void (*ompt_thread_type_callback_t) (
ompt_thread_type_t thread_type, /* type of thread */
ompt_thread_data_t thread_data /* data of thread */
);
typedef void (*ompt_wait_callback_t) (
ompt_wait_id_t wait_id /* wait data */
);
/* parallel and workshares */
typedef void (*ompt_parallel_callback_t) (
ompt_parallel_data_t parallel_data, /* data of parallel region */
ompt_task_data_t task_data /* data of task */
);
typedef enum ompt_scope_endpoint_e {
ompt_scope_begin = 1,
ompt_scope_end = 2
} ompt_scope_endpoint_t;
/* implicit task */
typedef void (*ompt_callback_implicit_task_t) (
ompt_scope_endpoint_t endpoint,
ompt_data_t *parallel_data,
ompt_data_t *task_data,
unsigned int team_size,
unsigned int thread_num
);
typedef void (*ompt_new_workshare_callback_t) (
ompt_parallel_data_t parallel_data, /* data of parallel region */
ompt_task_data_t parent_task_data, /* data of parent task */
void *workshare_function /* pointer to outlined function */
);
typedef void (*ompt_callback_parallel_begin_t) (
ompt_data_t *parent_task_data, /* data of parent task */
const ompt_frame_t *parent_frame, /* frame data of parent task */
ompt_data_t *parallel_data, /* data of parallel region */
unsigned int requested_team_size, /* requested number of threads in team */
// unsigned int actual_team_size, /* actual number of threads in team */
ompt_invoker_t invoker, /* who invokes master task? */
const void *codeptr_ra
);
typedef void (*ompt_callback_parallel_end_t) (
ompt_data_t *parallel_data, /* data of parallel region */
ompt_task_data_t *task_data, /* data of task */
ompt_invoker_t invoker, /* who invokes master task? */
const void *codeptr_ra
);
/* tasks */
typedef enum ompt_task_type_e {
ompt_task_initial = 1,
ompt_task_implicit = 2,
ompt_task_explicit = 3,
ompt_task_target = 4
} ompt_task_type_t;
typedef enum ompt_task_status_e {
ompt_task_complete = 1,
ompt_task_yield = 2,
ompt_task_cancel = 3,
ompt_task_others = 4
} ompt_task_status_t;
typedef void (*ompt_callback_task_schedule_t) (
ompt_task_data_t *first_task_data,
ompt_task_status_t prior_task_status,
ompt_task_data_t *second_task_data
);
typedef void (*ompt_callback_task_create_t) (
ompt_data_t *parent_task_data, /* data of parent task */
const ompt_frame_t *parent_frame, /* frame data for parent task */
ompt_data_t *new_task_data, /* data of created task */
ompt_task_type_t type,
int has_dependences,
const void *codeptr_ra
);
/* PVL: custom type */
typedef void (*ext_callback_task_create_begin_t) (
ompt_data_t *parent_task_data,
const ompt_frame_t *parent_frame,
ompt_task_type_t type
);
/* task dependences */
typedef void (*ompt_callback_task_dependences_t) (
ompt_data_t *task_data,
const ompt_task_dependence_t *deps,
int ndeps
);
typedef void (*ompt_callback_task_dependence_t) (
ompt_data_t *src_task_data,
ompt_data_t *sink_task_data
);
/* program */
typedef void (*ompt_control_callback_t) (
uint64_t command, /* command of control call */
uint64_t modifier /* modifier of control call */
);
typedef void (*ompt_callback_t)(void);
typedef enum ompt_mutex_kind_e {
ompt_mutex = 0x10,
ompt_mutex_lock = 0x11,
ompt_mutex_nest_lock = 0x12,
ompt_mutex_critical = 0x13,
ompt_mutex_atomic = 0x14,
ompt_mutex_ordered = 0x20
} ompt_mutex_kind_t;
typedef void (*ompt_callback_mutex_acquire_t) (
ompt_mutex_kind_t kind,
unsigned int hint,
unsigned int impl,
ompt_wait_id_t wait_id,
const void *codeptr_ra
);
typedef void (*ompt_callback_mutex_t) (
ompt_mutex_kind_t kind,
ompt_wait_id_t wait_id,
const void *codeptr_ra
);
typedef void (*ompt_callback_lock_init_t) (
ompt_mutex_kind_t kind,
unsigned int hint,
unsigned int impl,
ompt_wait_id_t wait_id,
const void *codeptr_ra
);
typedef void (*ompt_callback_lock_destroy_t) (
ompt_mutex_kind_t kind,
ompt_wait_id_t wait_id,
const void *codeptr_ra
);
typedef void (*ompt_callback_nest_lock_t) (
ompt_scope_endpoint_t endpoint,
ompt_wait_id_t wait_id,
const void *codeptr_ra
);
typedef void (*ompt_callback_master_t) (
ompt_scope_endpoint_t endpoint,
ompt_data_t *parallel_data,
ompt_data_t *task_data,
const void *codeptr_ra
);
typedef void (*ompt_callback_idle_t) (
ompt_scope_endpoint_t endpoint
);
typedef enum ompt_work_type_e {
ompt_work_loop = 1,
ompt_work_sections = 2,
ompt_work_single_executor = 3,
ompt_work_single_other = 4,
ompt_work_workshare = 5,
ompt_work_distribute = 6,
ompt_work_taskloop = 7
} ompt_work_type_t;
typedef void (*ompt_callback_work_t) (
ompt_work_type_t wstype,
ompt_scope_endpoint_t endpoint,
ompt_data_t *parallel_data,
ompt_data_t *task_data,
uint64_t count,
const void *codeptr_ra
);
/* PVL: custom type */
typedef enum ext_loop_sched_e {
ext_loop_sched_static = 1,
ext_loop_sched_dynamic = 2,
ext_loop_sched_guided = 3
} ext_loop_sched_t;
/* PVL: custom type */
#ifndef OMPT_STATIC_CHUNKS
typedef void (*ext_callback_loop_t) (
ext_loop_sched_t loop_sched,
ompt_scope_endpoint_t endpoint,
ompt_data_t * parallel_data, // The parallel region
ompt_data_t * task_data, // The implicit task of the worker
int64_t lower, // Lower iteration bound
int64_t upper, // Upper iteration bound
int64_t step, // Increment
uint64_t chunk_size, // Chunk size
int64_t thread_lower, // Lower iter. bound for thread
const void * codeptr_ra
);
#else // OMPT_STATIC_CHUNKS is defined
typedef void (*ext_callback_loop_t) (
ext_loop_sched_t loop_sched,
ompt_scope_endpoint_t endpoint,
ompt_data_t * parallel_data, // The parallel region
ompt_data_t * task_data, // The implicit task of the worker
int64_t step, // Increment
const void * codeptr_ra
);
#endif // OMPT_STATIC_CHUNKS
/* PVL: custom type */
typedef void (*ext_callback_chunk_t) (
ompt_data_t *task_data,
int64_t lower,
int64_t upper,
int last_chunk // Is scheduled chunk last for thread?
);
typedef enum ompt_sync_region_kind_e {
ompt_sync_region_barrier = 1,
ompt_sync_region_taskwait = 2,
ompt_sync_region_taskgroup = 3
} ompt_sync_region_kind_t;
typedef void (*ompt_callback_sync_region_t) (
ompt_sync_region_kind_t kind,
ompt_scope_endpoint_t endpoint,
ompt_data_t *parallel_data,
ompt_data_t *task_data,
const void *codeptr_ra
);
typedef enum ompt_cancel_flag_e {
ompt_cancel_parallel = 0x1,
ompt_cancel_sections = 0x2,
ompt_cancel_do = 0x4,
ompt_cancel_taskgroup = 0x8,
ompt_cancel_activated = 0x10,
ompt_cancel_detected = 0x20,
ompt_cancel_discarded_task = 0x40
} ompt_cancel_flag_t;
typedef void (*ompt_callback_cancel_t) (
ompt_data_t *task_data,
int flags,
const void *codeptr_ra
);
typedef void (*ompt_callback_flush_t) (
ompt_data_t *thread_data,
const void *codeptr_ra
);
/****************************************************************************
* ompt API
***************************************************************************/
#ifdef __cplusplus
extern "C" {
#endif
#define OMPT_API_FNTYPE(fn) fn##_t
#define OMPT_API_FUNCTION(return_type, fn, args) \
typedef return_type (*OMPT_API_FNTYPE(fn)) args
/****************************************************************************
* INQUIRY FUNCTIONS
***************************************************************************/
/* state */
OMPT_API_FUNCTION(ompt_state_t, ompt_get_state, (
ompt_wait_id_t *wait_id
));
/* thread */
OMPT_API_FUNCTION(ompt_thread_data_t*, ompt_get_thread_data, (void));
/* parallel region */
OMPT_API_FUNCTION(int, ompt_get_parallel_info, (
int ancestor_level,
ompt_data_t **parallel_data,
int *team_size
));
/* task */
OMPT_API_FUNCTION(int, ompt_get_task_info, (
int ancestor_level,
ompt_task_type_t *type,
ompt_data_t **task_data,
ompt_frame_t **task_frame,
ompt_data_t **parallel_data,
int *thread_num
));
/****************************************************************************
* PLACEHOLDERS FOR PERFORMANCE REPORTING
***************************************************************************/
/* idle */
OMPT_API_FUNCTION(void, ompt_idle, (
void
));
/* overhead */
OMPT_API_FUNCTION(void, ompt_overhead, (
void
));
/* barrier wait */
OMPT_API_FUNCTION(void, ompt_barrier_wait, (
void
));
/* task wait */
OMPT_API_FUNCTION(void, ompt_task_wait, (
void
));
/* mutex wait */
OMPT_API_FUNCTION(void, ompt_mutex_wait, (
void
));
/****************************************************************************
* INITIALIZATION FUNCTIONS
***************************************************************************/
typedef struct ompt_fns_t ompt_fns_t;
OMPT_API_FUNCTION(int, ompt_initialize, (
ompt_function_lookup_t ompt_fn_lookup,
ompt_fns_t *fns
));
OMPT_API_FUNCTION(void, ompt_finalize, (
ompt_fns_t *fns
));
typedef struct ompt_fns_t {
ompt_initialize_t initialize;
ompt_finalize_t finalize;
} ompt_fns_t;
/* initialization interface to be defined by tool */
ompt_fns_t * ompt_start_tool(
unsigned int omp_version,
const char * runtime_version
);
typedef enum opt_init_mode_e {
ompt_init_mode_never = 0,
ompt_init_mode_false = 1,
ompt_init_mode_true = 2,
ompt_init_mode_always = 3
} ompt_init_mode_t;
OMPT_API_FUNCTION(int, ompt_set_callback, (
ompt_callbacks_t event,
ompt_callback_t callback
));
typedef enum ompt_set_callback_rc_e { /* non-standard */
ompt_set_callback_error = 0,
ompt_has_event_no_callback = 1,
ompt_no_event_no_callback = 2,
ompt_has_event_may_callback = 3,
ompt_has_event_must_callback = 4,
} ompt_set_callback_rc_t;
OMPT_API_FUNCTION(int, ompt_get_callback, (
ompt_callbacks_t event,
ompt_callback_t *callback
));
/****************************************************************************
* MISCELLANEOUS FUNCTIONS
***************************************************************************/
/* control */
// FIXME: remove workaround for clang
#if !defined(__clang__) && defined(_OPENMP) && (_OPENMP >= 201307)
#pragma omp declare target
#endif
void ompt_control(
uint64_t command,
uint64_t modifier
);
#if !defined(__clang__) && defined(_OPENMP) && (_OPENMP >= 201307)
#pragma omp end declare target
#endif
/* state enumeration */
OMPT_API_FUNCTION(int, ompt_enumerate_states, (
int current_state,
int *next_state,
const char **next_state_name
));
/* get_unique_id */
OMPT_API_FUNCTION(uint64_t, ompt_get_unique_id, (void));
#ifdef __cplusplus
};
#endif
#endif