1 /****************************************************************************** 2 * File: ompt-event-specific.h 3 * 4 * Description: 5 * 6 * specify which of the OMPT events are implemented by this runtime system 7 * and the level of their implementation by a runtime system. 8 *****************************************************************************/ 9 10 //===----------------------------------------------------------------------===// 11 // 12 // The LLVM Compiler Infrastructure 13 // 14 // This file is dual licensed under the MIT and the University of Illinois Open 15 // Source Licenses. See LICENSE.txt for details. 16 // 17 //===----------------------------------------------------------------------===// 18 19 #ifndef __OMPT_EVENT_SPECIFIC_H__ 20 #define __OMPT_EVENT_SPECIFIC_H__ 21 22 #define _ompt_tokenpaste_helper(x, y) x##y 23 #define _ompt_tokenpaste(x, y) _ompt_tokenpaste_helper(x, y) 24 #define ompt_event_implementation_status(e) _ompt_tokenpaste(e, _implemented) 25 26 /*---------------------------------------------------------------------------- 27 | Specify whether an event may occur or not, and whether event callbacks 28 | never, sometimes, or always occur. 29 | 30 | The values for these constants are defined in section 6.1.2 of 31 | the OMPT TR. They are exposed to tools through ompt_set_callback. 32 +--------------------------------------------------------------------------*/ 33 34 #define ompt_event_UNIMPLEMENTED ompt_set_never 35 #define ompt_event_MAY_CONVENIENT ompt_set_sometimes 36 #define ompt_event_MAY_ALWAYS ompt_set_always 37 38 #if OMPT_OPTIONAL 39 #define ompt_event_MAY_ALWAYS_OPTIONAL ompt_event_MAY_ALWAYS 40 #else 41 #define ompt_event_MAY_ALWAYS_OPTIONAL ompt_event_UNIMPLEMENTED 42 #endif 43 44 /*---------------------------------------------------------------------------- 45 | Mandatory Events 46 +--------------------------------------------------------------------------*/ 47 48 #define ompt_callback_thread_begin_implemented ompt_event_MAY_ALWAYS 49 #define ompt_callback_thread_end_implemented ompt_event_MAY_ALWAYS 50 51 #define ompt_callback_parallel_begin_implemented ompt_event_MAY_ALWAYS 52 #define ompt_callback_parallel_end_implemented ompt_event_MAY_ALWAYS 53 54 #define ompt_callback_task_create_implemented ompt_event_MAY_ALWAYS 55 #define ompt_callback_task_schedule_implemented ompt_event_MAY_ALWAYS 56 57 #define ompt_callback_implicit_task_implemented ompt_event_MAY_ALWAYS 58 59 #define ompt_callback_target_implemented ompt_event_UNIMPLEMENTED 60 #define ompt_callback_target_data_op_implemented ompt_event_UNIMPLEMENTED 61 #define ompt_callback_target_submit_implemented ompt_event_UNIMPLEMENTED 62 63 #define ompt_callback_control_tool_implemented ompt_event_MAY_ALWAYS 64 65 #define ompt_callback_device_initialize_implemented ompt_event_UNIMPLEMENTED 66 #define ompt_callback_device_finalize_implemented ompt_event_UNIMPLEMENTED 67 68 #define ompt_callback_device_load_implemented ompt_event_UNIMPLEMENTED 69 #define ompt_callback_device_unload_implemented ompt_event_UNIMPLEMENTED 70 71 /*---------------------------------------------------------------------------- 72 | Optional Events 73 +--------------------------------------------------------------------------*/ 74 75 #define ompt_callback_sync_region_wait_implemented \ 76 ompt_event_MAY_ALWAYS_OPTIONAL 77 78 #define ompt_callback_mutex_released_implemented ompt_event_MAY_ALWAYS_OPTIONAL 79 80 #if OMP_40_ENABLED 81 #define ompt_callback_dependences_implemented \ 82 ompt_event_MAY_ALWAYS_OPTIONAL 83 #define ompt_callback_task_dependence_implemented ompt_event_MAY_ALWAYS_OPTIONAL 84 #else 85 #define ompt_callback_dependences_implemented ompt_event_UNIMPLEMENTED 86 #define ompt_callback_task_dependence_implemented ompt_event_UNIMPLEMENTED 87 #endif /* OMP_40_ENABLED */ 88 89 #define ompt_callback_work_implemented ompt_event_MAY_ALWAYS_OPTIONAL 90 91 #define ompt_callback_master_implemented ompt_event_MAY_ALWAYS_OPTIONAL 92 93 #define ompt_callback_target_map_implemented ompt_event_UNIMPLEMENTED 94 95 #define ompt_callback_sync_region_implemented ompt_event_MAY_ALWAYS_OPTIONAL 96 97 #define ompt_callback_lock_init_implemented ompt_event_MAY_ALWAYS_OPTIONAL 98 #define ompt_callback_lock_destroy_implemented ompt_event_MAY_ALWAYS_OPTIONAL 99 100 #define ompt_callback_mutex_acquire_implemented ompt_event_MAY_ALWAYS_OPTIONAL 101 #define ompt_callback_mutex_acquired_implemented ompt_event_MAY_ALWAYS_OPTIONAL 102 #define ompt_callback_nest_lock_implemented ompt_event_MAY_ALWAYS_OPTIONAL 103 104 #define ompt_callback_flush_implemented ompt_event_MAY_ALWAYS_OPTIONAL 105 106 #define ompt_callback_cancel_implemented ompt_event_MAY_ALWAYS_OPTIONAL 107 108 #define ompt_callback_reduction_implemented ompt_event_UNIMPLEMENTED 109 110 #define ompt_callback_dispatch_implemented ompt_event_UNIMPLEMENTED 111 112 #endif 113