aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/libs/cxxsupp/openmp/ompt-event-specific.h
blob: f6c7022c8f66474b168829ef0f51417e9b321f4e (plain) (blame)
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
/******************************************************************************
 * File: ompt-event-specific.h
 *
 * Description:
 *
 *   specify which of the OMPT events are implemented by this runtime system
 *   and the level of their implementation by a runtime system.
 *****************************************************************************/

//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef __OMPT_EVENT_SPECIFIC_H__
#define __OMPT_EVENT_SPECIFIC_H__

#define _ompt_tokenpaste_helper(x, y) x##y
#define _ompt_tokenpaste(x, y) _ompt_tokenpaste_helper(x, y)
#define ompt_event_implementation_status(e) _ompt_tokenpaste(e, _implemented)

/*----------------------------------------------------------------------------
 | Specify whether an event may occur or not, and whether event callbacks
 | never, sometimes, or always occur.
 |
 | The values for these constants are defined in section 6.1.2 of
 | the OMPT TR. They are exposed to tools through ompt_set_callback.
 +--------------------------------------------------------------------------*/

#define ompt_event_UNIMPLEMENTED ompt_set_never
#define ompt_event_MAY_CONVENIENT ompt_set_sometimes
#define ompt_event_MAY_ALWAYS ompt_set_always

#if OMPT_OPTIONAL
#define ompt_event_MAY_ALWAYS_OPTIONAL ompt_event_MAY_ALWAYS
#else
#define ompt_event_MAY_ALWAYS_OPTIONAL ompt_event_UNIMPLEMENTED
#endif

/*----------------------------------------------------------------------------
 | Mandatory Events
 +--------------------------------------------------------------------------*/

#define ompt_callback_thread_begin_implemented ompt_event_MAY_ALWAYS
#define ompt_callback_thread_end_implemented ompt_event_MAY_ALWAYS

#define ompt_callback_parallel_begin_implemented ompt_event_MAY_ALWAYS
#define ompt_callback_parallel_end_implemented ompt_event_MAY_ALWAYS

#define ompt_callback_task_create_implemented ompt_event_MAY_ALWAYS
#define ompt_callback_task_schedule_implemented ompt_event_MAY_ALWAYS

#define ompt_callback_implicit_task_implemented ompt_event_MAY_ALWAYS

#define ompt_callback_target_implemented ompt_event_UNIMPLEMENTED
#define ompt_callback_target_emi_implemented ompt_event_UNIMPLEMENTED
#define ompt_callback_target_data_op_implemented ompt_event_UNIMPLEMENTED
#define ompt_callback_target_data_op_emi_implemented ompt_event_UNIMPLEMENTED
#define ompt_callback_target_submit_implemented ompt_event_UNIMPLEMENTED
#define ompt_callback_target_submit_emi_implemented ompt_event_UNIMPLEMENTED

#define ompt_callback_control_tool_implemented ompt_event_MAY_ALWAYS

#define ompt_callback_device_initialize_implemented ompt_event_UNIMPLEMENTED
#define ompt_callback_device_finalize_implemented ompt_event_UNIMPLEMENTED

#define ompt_callback_device_load_implemented ompt_event_UNIMPLEMENTED
#define ompt_callback_device_unload_implemented ompt_event_UNIMPLEMENTED

/*----------------------------------------------------------------------------
 | Optional Events
 +--------------------------------------------------------------------------*/

#define ompt_callback_sync_region_wait_implemented                             \
  ompt_event_MAY_ALWAYS_OPTIONAL

#define ompt_callback_mutex_released_implemented ompt_event_MAY_ALWAYS_OPTIONAL

#define ompt_callback_dependences_implemented ompt_event_MAY_ALWAYS_OPTIONAL
#define ompt_callback_task_dependence_implemented ompt_event_MAY_ALWAYS_OPTIONAL

#define ompt_callback_work_implemented ompt_event_MAY_ALWAYS_OPTIONAL

#define ompt_callback_masked_implemented ompt_event_MAY_ALWAYS_OPTIONAL

#define ompt_callback_target_map_implemented ompt_event_UNIMPLEMENTED
#define ompt_callback_target_map_emi_implemented ompt_event_UNIMPLEMENTED

#define ompt_callback_sync_region_implemented ompt_event_MAY_ALWAYS_OPTIONAL

#define ompt_callback_lock_init_implemented ompt_event_MAY_ALWAYS_OPTIONAL
#define ompt_callback_lock_destroy_implemented ompt_event_MAY_ALWAYS_OPTIONAL

#define ompt_callback_mutex_acquire_implemented ompt_event_MAY_ALWAYS_OPTIONAL
#define ompt_callback_mutex_acquired_implemented ompt_event_MAY_ALWAYS_OPTIONAL
#define ompt_callback_nest_lock_implemented ompt_event_MAY_ALWAYS_OPTIONAL

#define ompt_callback_flush_implemented ompt_event_MAY_ALWAYS_OPTIONAL

#define ompt_callback_cancel_implemented ompt_event_MAY_ALWAYS_OPTIONAL

#define ompt_callback_reduction_implemented ompt_event_MAY_ALWAYS_OPTIONAL

#define ompt_callback_dispatch_implemented ompt_event_MAY_ALWAYS_OPTIONAL

#define ompt_callback_error_implemented ompt_event_MAY_ALWAYS_OPTIONAL

#endif