Jim Cownie | 5e8470a | 2013-09-27 10:38:44 +0000 | [diff] [blame] | 1 | /* |
| 2 | * kmp_ftn_os.h -- KPTS Fortran defines header file. |
Jim Cownie | 5e8470a | 2013-09-27 10:38:44 +0000 | [diff] [blame] | 3 | */ |
| 4 | |
Jim Cownie | 5e8470a | 2013-09-27 10:38:44 +0000 | [diff] [blame] | 5 | //===----------------------------------------------------------------------===// |
| 6 | // |
| 7 | // The LLVM Compiler Infrastructure |
| 8 | // |
| 9 | // This file is dual licensed under the MIT and the University of Illinois Open |
| 10 | // Source Licenses. See LICENSE.txt for details. |
| 11 | // |
| 12 | //===----------------------------------------------------------------------===// |
| 13 | |
Jim Cownie | 5e8470a | 2013-09-27 10:38:44 +0000 | [diff] [blame] | 14 | #ifndef KMP_FTN_OS_H |
| 15 | #define KMP_FTN_OS_H |
| 16 | |
Jonathan Peyton | 3041982 | 2017-05-12 18:01:32 +0000 | [diff] [blame] | 17 | // KMP_FNT_ENTRIES may be one of: KMP_FTN_PLAIN, KMP_FTN_UPPER, KMP_FTN_APPEND, |
| 18 | // KMP_FTN_UAPPEND. |
Jim Cownie | 5e8470a | 2013-09-27 10:38:44 +0000 | [diff] [blame] | 19 | |
| 20 | /* -------------------------- External definitions ------------------------ */ |
| 21 | |
| 22 | #if KMP_FTN_ENTRIES == KMP_FTN_PLAIN |
| 23 | |
Jonathan Peyton | 3041982 | 2017-05-12 18:01:32 +0000 | [diff] [blame] | 24 | #define FTN_SET_STACKSIZE kmp_set_stacksize |
| 25 | #define FTN_SET_STACKSIZE_S kmp_set_stacksize_s |
| 26 | #define FTN_GET_STACKSIZE kmp_get_stacksize |
| 27 | #define FTN_GET_STACKSIZE_S kmp_get_stacksize_s |
| 28 | #define FTN_SET_BLOCKTIME kmp_set_blocktime |
| 29 | #define FTN_GET_BLOCKTIME kmp_get_blocktime |
| 30 | #define FTN_SET_LIBRARY_SERIAL kmp_set_library_serial |
| 31 | #define FTN_SET_LIBRARY_TURNAROUND kmp_set_library_turnaround |
| 32 | #define FTN_SET_LIBRARY_THROUGHPUT kmp_set_library_throughput |
| 33 | #define FTN_SET_LIBRARY kmp_set_library |
| 34 | #define FTN_GET_LIBRARY kmp_get_library |
| 35 | #define FTN_SET_DEFAULTS kmp_set_defaults |
| 36 | #define FTN_SET_DISP_NUM_BUFFERS kmp_set_disp_num_buffers |
| 37 | #define FTN_SET_AFFINITY kmp_set_affinity |
| 38 | #define FTN_GET_AFFINITY kmp_get_affinity |
| 39 | #define FTN_GET_AFFINITY_MAX_PROC kmp_get_affinity_max_proc |
| 40 | #define FTN_CREATE_AFFINITY_MASK kmp_create_affinity_mask |
| 41 | #define FTN_DESTROY_AFFINITY_MASK kmp_destroy_affinity_mask |
| 42 | #define FTN_SET_AFFINITY_MASK_PROC kmp_set_affinity_mask_proc |
| 43 | #define FTN_UNSET_AFFINITY_MASK_PROC kmp_unset_affinity_mask_proc |
| 44 | #define FTN_GET_AFFINITY_MASK_PROC kmp_get_affinity_mask_proc |
Jim Cownie | 5e8470a | 2013-09-27 10:38:44 +0000 | [diff] [blame] | 45 | |
Jonathan Peyton | 3041982 | 2017-05-12 18:01:32 +0000 | [diff] [blame] | 46 | #define FTN_MALLOC kmp_malloc |
| 47 | #define FTN_ALIGNED_MALLOC kmp_aligned_malloc |
| 48 | #define FTN_CALLOC kmp_calloc |
| 49 | #define FTN_REALLOC kmp_realloc |
Jonathan Peyton | 92ca618 | 2018-09-07 18:25:49 +0000 | [diff] [blame] | 50 | #define FTN_KFREE kmp_free |
Jim Cownie | 5e8470a | 2013-09-27 10:38:44 +0000 | [diff] [blame] | 51 | |
Jonathan Peyton | 3041982 | 2017-05-12 18:01:32 +0000 | [diff] [blame] | 52 | #define FTN_GET_NUM_KNOWN_THREADS kmp_get_num_known_threads |
Jim Cownie | 5e8470a | 2013-09-27 10:38:44 +0000 | [diff] [blame] | 53 | |
Jonathan Peyton | 3041982 | 2017-05-12 18:01:32 +0000 | [diff] [blame] | 54 | #define FTN_SET_NUM_THREADS omp_set_num_threads |
| 55 | #define FTN_GET_NUM_THREADS omp_get_num_threads |
| 56 | #define FTN_GET_MAX_THREADS omp_get_max_threads |
| 57 | #define FTN_GET_THREAD_NUM omp_get_thread_num |
| 58 | #define FTN_GET_NUM_PROCS omp_get_num_procs |
| 59 | #define FTN_SET_DYNAMIC omp_set_dynamic |
| 60 | #define FTN_GET_DYNAMIC omp_get_dynamic |
| 61 | #define FTN_SET_NESTED omp_set_nested |
| 62 | #define FTN_GET_NESTED omp_get_nested |
| 63 | #define FTN_IN_PARALLEL omp_in_parallel |
| 64 | #define FTN_GET_THREAD_LIMIT omp_get_thread_limit |
| 65 | #define FTN_SET_SCHEDULE omp_set_schedule |
| 66 | #define FTN_GET_SCHEDULE omp_get_schedule |
| 67 | #define FTN_SET_MAX_ACTIVE_LEVELS omp_set_max_active_levels |
| 68 | #define FTN_GET_MAX_ACTIVE_LEVELS omp_get_max_active_levels |
| 69 | #define FTN_GET_ACTIVE_LEVEL omp_get_active_level |
| 70 | #define FTN_GET_LEVEL omp_get_level |
| 71 | #define FTN_GET_ANCESTOR_THREAD_NUM omp_get_ancestor_thread_num |
| 72 | #define FTN_GET_TEAM_SIZE omp_get_team_size |
| 73 | #define FTN_IN_FINAL omp_in_final |
Jim Cownie | 5e8470a | 2013-09-27 10:38:44 +0000 | [diff] [blame] | 74 | // #define FTN_SET_PROC_BIND omp_set_proc_bind |
Jonathan Peyton | 3041982 | 2017-05-12 18:01:32 +0000 | [diff] [blame] | 75 | #define FTN_GET_PROC_BIND omp_get_proc_bind |
Jim Cownie | 5e8470a | 2013-09-27 10:38:44 +0000 | [diff] [blame] | 76 | // #define FTN_CURR_PROC_BIND omp_curr_proc_bind |
| 77 | #if OMP_40_ENABLED |
Jonathan Peyton | 3041982 | 2017-05-12 18:01:32 +0000 | [diff] [blame] | 78 | #define FTN_GET_NUM_TEAMS omp_get_num_teams |
| 79 | #define FTN_GET_TEAM_NUM omp_get_team_num |
Jim Cownie | 5e8470a | 2013-09-27 10:38:44 +0000 | [diff] [blame] | 80 | #endif |
Jonathan Peyton | 3041982 | 2017-05-12 18:01:32 +0000 | [diff] [blame] | 81 | #define FTN_INIT_LOCK omp_init_lock |
Andrey Churbanov | 5c56fb5 | 2015-02-20 18:05:17 +0000 | [diff] [blame] | 82 | #if KMP_USE_DYNAMIC_LOCK |
Jonathan Peyton | 3041982 | 2017-05-12 18:01:32 +0000 | [diff] [blame] | 83 | #define FTN_INIT_LOCK_WITH_HINT omp_init_lock_with_hint |
| 84 | #define FTN_INIT_NEST_LOCK_WITH_HINT omp_init_nest_lock_with_hint |
Andrey Churbanov | 5c56fb5 | 2015-02-20 18:05:17 +0000 | [diff] [blame] | 85 | #endif |
Jonathan Peyton | 3041982 | 2017-05-12 18:01:32 +0000 | [diff] [blame] | 86 | #define FTN_DESTROY_LOCK omp_destroy_lock |
| 87 | #define FTN_SET_LOCK omp_set_lock |
| 88 | #define FTN_UNSET_LOCK omp_unset_lock |
| 89 | #define FTN_TEST_LOCK omp_test_lock |
| 90 | #define FTN_INIT_NEST_LOCK omp_init_nest_lock |
| 91 | #define FTN_DESTROY_NEST_LOCK omp_destroy_nest_lock |
| 92 | #define FTN_SET_NEST_LOCK omp_set_nest_lock |
| 93 | #define FTN_UNSET_NEST_LOCK omp_unset_nest_lock |
| 94 | #define FTN_TEST_NEST_LOCK omp_test_nest_lock |
Jim Cownie | 5e8470a | 2013-09-27 10:38:44 +0000 | [diff] [blame] | 95 | |
Jonathan Peyton | 3041982 | 2017-05-12 18:01:32 +0000 | [diff] [blame] | 96 | #define FTN_SET_WARNINGS_ON kmp_set_warnings_on |
| 97 | #define FTN_SET_WARNINGS_OFF kmp_set_warnings_off |
Jim Cownie | 5e8470a | 2013-09-27 10:38:44 +0000 | [diff] [blame] | 98 | |
Jonathan Peyton | 3041982 | 2017-05-12 18:01:32 +0000 | [diff] [blame] | 99 | #define FTN_GET_WTIME omp_get_wtime |
| 100 | #define FTN_GET_WTICK omp_get_wtick |
Jim Cownie | 5e8470a | 2013-09-27 10:38:44 +0000 | [diff] [blame] | 101 | |
| 102 | #if OMP_40_ENABLED |
Jonathan Peyton | 50eae7f | 2016-05-27 15:51:14 +0000 | [diff] [blame] | 103 | #if KMP_MIC || KMP_OS_DARWIN || defined(KMP_STUB) |
Jonathan Peyton | 3041982 | 2017-05-12 18:01:32 +0000 | [diff] [blame] | 104 | #define FTN_GET_NUM_DEVICES omp_get_num_devices |
Jim Cownie | 5e8470a | 2013-09-27 10:38:44 +0000 | [diff] [blame] | 105 | #endif |
Jonathan Peyton | 3041982 | 2017-05-12 18:01:32 +0000 | [diff] [blame] | 106 | #define FTN_GET_DEFAULT_DEVICE omp_get_default_device |
| 107 | #define FTN_SET_DEFAULT_DEVICE omp_set_default_device |
| 108 | #define FTN_IS_INITIAL_DEVICE omp_is_initial_device |
Jim Cownie | 5e8470a | 2013-09-27 10:38:44 +0000 | [diff] [blame] | 109 | #endif |
| 110 | |
Jim Cownie | 181b4bb | 2013-12-23 17:28:57 +0000 | [diff] [blame] | 111 | #if OMP_40_ENABLED |
Jonathan Peyton | 3041982 | 2017-05-12 18:01:32 +0000 | [diff] [blame] | 112 | #define FTN_GET_CANCELLATION omp_get_cancellation |
| 113 | #define FTN_GET_CANCELLATION_STATUS kmp_get_cancellation_status |
Jim Cownie | 181b4bb | 2013-12-23 17:28:57 +0000 | [diff] [blame] | 114 | #endif |
| 115 | |
Jonathan Peyton | df6818b | 2016-06-14 17:57:47 +0000 | [diff] [blame] | 116 | #if OMP_45_ENABLED |
Jonathan Peyton | 3041982 | 2017-05-12 18:01:32 +0000 | [diff] [blame] | 117 | #define FTN_GET_MAX_TASK_PRIORITY omp_get_max_task_priority |
| 118 | #define FTN_GET_NUM_PLACES omp_get_num_places |
| 119 | #define FTN_GET_PLACE_NUM_PROCS omp_get_place_num_procs |
| 120 | #define FTN_GET_PLACE_PROC_IDS omp_get_place_proc_ids |
| 121 | #define FTN_GET_PLACE_NUM omp_get_place_num |
| 122 | #define FTN_GET_PARTITION_NUM_PLACES omp_get_partition_num_places |
| 123 | #define FTN_GET_PARTITION_PLACE_NUMS omp_get_partition_place_nums |
| 124 | #ifdef KMP_STUB |
| 125 | #define FTN_GET_INITIAL_DEVICE omp_get_initial_device |
| 126 | #define FTN_TARGET_ALLOC omp_target_alloc |
| 127 | #define FTN_TARGET_FREE omp_target_free |
| 128 | #define FTN_TARGET_IS_PRESENT omp_target_is_present |
| 129 | #define FTN_TARGET_MEMCPY omp_target_memcpy |
| 130 | #define FTN_TARGET_MEMCPY_RECT omp_target_memcpy_rect |
| 131 | #define FTN_TARGET_ASSOCIATE_PTR omp_target_associate_ptr |
| 132 | #define FTN_TARGET_DISASSOCIATE_PTR omp_target_disassociate_ptr |
| 133 | #endif |
Jonathan Peyton | 2851072 | 2016-02-25 18:04:09 +0000 | [diff] [blame] | 134 | #endif |
| 135 | |
Joachim Protze | 82e94a5 | 2017-11-01 10:08:30 +0000 | [diff] [blame] | 136 | #if OMP_50_ENABLED |
| 137 | #define FTN_CONTROL_TOOL omp_control_tool |
Jonathan Peyton | 92ca618 | 2018-09-07 18:25:49 +0000 | [diff] [blame] | 138 | #define FTN_SET_DEFAULT_ALLOCATOR omp_set_default_allocator |
| 139 | #define FTN_GET_DEFAULT_ALLOCATOR omp_get_default_allocator |
| 140 | #define FTN_ALLOC omp_alloc |
| 141 | #define FTN_FREE omp_free |
Joachim Protze | 82e94a5 | 2017-11-01 10:08:30 +0000 | [diff] [blame] | 142 | #endif |
| 143 | |
Jim Cownie | 5e8470a | 2013-09-27 10:38:44 +0000 | [diff] [blame] | 144 | #endif /* KMP_FTN_PLAIN */ |
| 145 | |
| 146 | /* ------------------------------------------------------------------------ */ |
| 147 | |
| 148 | #if KMP_FTN_ENTRIES == KMP_FTN_APPEND |
| 149 | |
Jonathan Peyton | 3041982 | 2017-05-12 18:01:32 +0000 | [diff] [blame] | 150 | #define FTN_SET_STACKSIZE kmp_set_stacksize_ |
| 151 | #define FTN_SET_STACKSIZE_S kmp_set_stacksize_s_ |
| 152 | #define FTN_GET_STACKSIZE kmp_get_stacksize_ |
| 153 | #define FTN_GET_STACKSIZE_S kmp_get_stacksize_s_ |
| 154 | #define FTN_SET_BLOCKTIME kmp_set_blocktime_ |
| 155 | #define FTN_GET_BLOCKTIME kmp_get_blocktime_ |
| 156 | #define FTN_SET_LIBRARY_SERIAL kmp_set_library_serial_ |
| 157 | #define FTN_SET_LIBRARY_TURNAROUND kmp_set_library_turnaround_ |
| 158 | #define FTN_SET_LIBRARY_THROUGHPUT kmp_set_library_throughput_ |
| 159 | #define FTN_SET_LIBRARY kmp_set_library_ |
| 160 | #define FTN_GET_LIBRARY kmp_get_library_ |
| 161 | #define FTN_SET_DEFAULTS kmp_set_defaults_ |
| 162 | #define FTN_SET_DISP_NUM_BUFFERS kmp_set_disp_num_buffers_ |
| 163 | #define FTN_SET_AFFINITY kmp_set_affinity_ |
| 164 | #define FTN_GET_AFFINITY kmp_get_affinity_ |
| 165 | #define FTN_GET_AFFINITY_MAX_PROC kmp_get_affinity_max_proc_ |
| 166 | #define FTN_CREATE_AFFINITY_MASK kmp_create_affinity_mask_ |
| 167 | #define FTN_DESTROY_AFFINITY_MASK kmp_destroy_affinity_mask_ |
| 168 | #define FTN_SET_AFFINITY_MASK_PROC kmp_set_affinity_mask_proc_ |
| 169 | #define FTN_UNSET_AFFINITY_MASK_PROC kmp_unset_affinity_mask_proc_ |
| 170 | #define FTN_GET_AFFINITY_MASK_PROC kmp_get_affinity_mask_proc_ |
Jim Cownie | 5e8470a | 2013-09-27 10:38:44 +0000 | [diff] [blame] | 171 | |
Jonathan Peyton | 3041982 | 2017-05-12 18:01:32 +0000 | [diff] [blame] | 172 | #define FTN_MALLOC kmp_malloc_ |
| 173 | #define FTN_ALIGNED_MALLOC kmp_aligned_malloc_ |
| 174 | #define FTN_CALLOC kmp_calloc_ |
| 175 | #define FTN_REALLOC kmp_realloc_ |
Jonathan Peyton | 92ca618 | 2018-09-07 18:25:49 +0000 | [diff] [blame] | 176 | #define FTN_KFREE kmp_free_ |
Jim Cownie | 5e8470a | 2013-09-27 10:38:44 +0000 | [diff] [blame] | 177 | |
Jonathan Peyton | 3041982 | 2017-05-12 18:01:32 +0000 | [diff] [blame] | 178 | #define FTN_GET_NUM_KNOWN_THREADS kmp_get_num_known_threads_ |
Jim Cownie | 5e8470a | 2013-09-27 10:38:44 +0000 | [diff] [blame] | 179 | |
Jonathan Peyton | 3041982 | 2017-05-12 18:01:32 +0000 | [diff] [blame] | 180 | #define FTN_SET_NUM_THREADS omp_set_num_threads_ |
| 181 | #define FTN_GET_NUM_THREADS omp_get_num_threads_ |
| 182 | #define FTN_GET_MAX_THREADS omp_get_max_threads_ |
| 183 | #define FTN_GET_THREAD_NUM omp_get_thread_num_ |
| 184 | #define FTN_GET_NUM_PROCS omp_get_num_procs_ |
| 185 | #define FTN_SET_DYNAMIC omp_set_dynamic_ |
| 186 | #define FTN_GET_DYNAMIC omp_get_dynamic_ |
| 187 | #define FTN_SET_NESTED omp_set_nested_ |
| 188 | #define FTN_GET_NESTED omp_get_nested_ |
| 189 | #define FTN_IN_PARALLEL omp_in_parallel_ |
| 190 | #define FTN_GET_THREAD_LIMIT omp_get_thread_limit_ |
| 191 | #define FTN_SET_SCHEDULE omp_set_schedule_ |
| 192 | #define FTN_GET_SCHEDULE omp_get_schedule_ |
| 193 | #define FTN_SET_MAX_ACTIVE_LEVELS omp_set_max_active_levels_ |
| 194 | #define FTN_GET_MAX_ACTIVE_LEVELS omp_get_max_active_levels_ |
| 195 | #define FTN_GET_ACTIVE_LEVEL omp_get_active_level_ |
| 196 | #define FTN_GET_LEVEL omp_get_level_ |
| 197 | #define FTN_GET_ANCESTOR_THREAD_NUM omp_get_ancestor_thread_num_ |
| 198 | #define FTN_GET_TEAM_SIZE omp_get_team_size_ |
| 199 | #define FTN_IN_FINAL omp_in_final_ |
Jim Cownie | 5e8470a | 2013-09-27 10:38:44 +0000 | [diff] [blame] | 200 | // #define FTN_SET_PROC_BIND omp_set_proc_bind_ |
Jonathan Peyton | 3041982 | 2017-05-12 18:01:32 +0000 | [diff] [blame] | 201 | #define FTN_GET_PROC_BIND omp_get_proc_bind_ |
Jim Cownie | 5e8470a | 2013-09-27 10:38:44 +0000 | [diff] [blame] | 202 | // #define FTN_CURR_PROC_BIND omp_curr_proc_bind_ |
| 203 | #if OMP_40_ENABLED |
Jonathan Peyton | 3041982 | 2017-05-12 18:01:32 +0000 | [diff] [blame] | 204 | #define FTN_GET_NUM_TEAMS omp_get_num_teams_ |
| 205 | #define FTN_GET_TEAM_NUM omp_get_team_num_ |
Jim Cownie | 5e8470a | 2013-09-27 10:38:44 +0000 | [diff] [blame] | 206 | #endif |
Jonathan Peyton | 3041982 | 2017-05-12 18:01:32 +0000 | [diff] [blame] | 207 | #define FTN_INIT_LOCK omp_init_lock_ |
Andrey Churbanov | 5c56fb5 | 2015-02-20 18:05:17 +0000 | [diff] [blame] | 208 | #if KMP_USE_DYNAMIC_LOCK |
Jonathan Peyton | 3041982 | 2017-05-12 18:01:32 +0000 | [diff] [blame] | 209 | #define FTN_INIT_LOCK_WITH_HINT omp_init_lock_with_hint_ |
| 210 | #define FTN_INIT_NEST_LOCK_WITH_HINT omp_init_nest_lock_with_hint_ |
Andrey Churbanov | 5c56fb5 | 2015-02-20 18:05:17 +0000 | [diff] [blame] | 211 | #endif |
Jonathan Peyton | 3041982 | 2017-05-12 18:01:32 +0000 | [diff] [blame] | 212 | #define FTN_DESTROY_LOCK omp_destroy_lock_ |
| 213 | #define FTN_SET_LOCK omp_set_lock_ |
| 214 | #define FTN_UNSET_LOCK omp_unset_lock_ |
| 215 | #define FTN_TEST_LOCK omp_test_lock_ |
| 216 | #define FTN_INIT_NEST_LOCK omp_init_nest_lock_ |
| 217 | #define FTN_DESTROY_NEST_LOCK omp_destroy_nest_lock_ |
| 218 | #define FTN_SET_NEST_LOCK omp_set_nest_lock_ |
| 219 | #define FTN_UNSET_NEST_LOCK omp_unset_nest_lock_ |
| 220 | #define FTN_TEST_NEST_LOCK omp_test_nest_lock_ |
Jim Cownie | 5e8470a | 2013-09-27 10:38:44 +0000 | [diff] [blame] | 221 | |
Jonathan Peyton | 3041982 | 2017-05-12 18:01:32 +0000 | [diff] [blame] | 222 | #define FTN_SET_WARNINGS_ON kmp_set_warnings_on_ |
| 223 | #define FTN_SET_WARNINGS_OFF kmp_set_warnings_off_ |
Jim Cownie | 5e8470a | 2013-09-27 10:38:44 +0000 | [diff] [blame] | 224 | |
Jonathan Peyton | 3041982 | 2017-05-12 18:01:32 +0000 | [diff] [blame] | 225 | #define FTN_GET_WTIME omp_get_wtime_ |
| 226 | #define FTN_GET_WTICK omp_get_wtick_ |
Jim Cownie | 5e8470a | 2013-09-27 10:38:44 +0000 | [diff] [blame] | 227 | |
| 228 | #if OMP_40_ENABLED |
Jonathan Peyton | 50eae7f | 2016-05-27 15:51:14 +0000 | [diff] [blame] | 229 | #if KMP_MIC || KMP_OS_DARWIN || defined(KMP_STUB) |
Jonathan Peyton | 3041982 | 2017-05-12 18:01:32 +0000 | [diff] [blame] | 230 | #define FTN_GET_NUM_DEVICES omp_get_num_devices_ |
Jim Cownie | 5e8470a | 2013-09-27 10:38:44 +0000 | [diff] [blame] | 231 | #endif |
Jonathan Peyton | 3041982 | 2017-05-12 18:01:32 +0000 | [diff] [blame] | 232 | #define FTN_GET_DEFAULT_DEVICE omp_get_default_device_ |
| 233 | #define FTN_SET_DEFAULT_DEVICE omp_set_default_device_ |
| 234 | #define FTN_IS_INITIAL_DEVICE omp_is_initial_device_ |
Jim Cownie | 5e8470a | 2013-09-27 10:38:44 +0000 | [diff] [blame] | 235 | #endif |
| 236 | |
Jim Cownie | 181b4bb | 2013-12-23 17:28:57 +0000 | [diff] [blame] | 237 | #if OMP_40_ENABLED |
Jonathan Peyton | 3041982 | 2017-05-12 18:01:32 +0000 | [diff] [blame] | 238 | #define FTN_GET_CANCELLATION omp_get_cancellation_ |
| 239 | #define FTN_GET_CANCELLATION_STATUS kmp_get_cancellation_status_ |
Jim Cownie | 181b4bb | 2013-12-23 17:28:57 +0000 | [diff] [blame] | 240 | #endif |
| 241 | |
Jonathan Peyton | df6818b | 2016-06-14 17:57:47 +0000 | [diff] [blame] | 242 | #if OMP_45_ENABLED |
Jonathan Peyton | 3041982 | 2017-05-12 18:01:32 +0000 | [diff] [blame] | 243 | #define FTN_GET_MAX_TASK_PRIORITY omp_get_max_task_priority_ |
| 244 | #define FTN_GET_NUM_PLACES omp_get_num_places_ |
| 245 | #define FTN_GET_PLACE_NUM_PROCS omp_get_place_num_procs_ |
| 246 | #define FTN_GET_PLACE_PROC_IDS omp_get_place_proc_ids_ |
| 247 | #define FTN_GET_PLACE_NUM omp_get_place_num_ |
| 248 | #define FTN_GET_PARTITION_NUM_PLACES omp_get_partition_num_places_ |
| 249 | #define FTN_GET_PARTITION_PLACE_NUMS omp_get_partition_place_nums_ |
| 250 | #ifdef KMP_STUB |
| 251 | #define FTN_GET_INITIAL_DEVICE omp_get_initial_device_ |
| 252 | #define FTN_TARGET_ALLOC omp_target_alloc_ |
| 253 | #define FTN_TARGET_FREE omp_target_free_ |
| 254 | #define FTN_TARGET_IS_PRESENT omp_target_is_present_ |
| 255 | #define FTN_TARGET_MEMCPY omp_target_memcpy_ |
| 256 | #define FTN_TARGET_MEMCPY_RECT omp_target_memcpy_rect_ |
| 257 | #define FTN_TARGET_ASSOCIATE_PTR omp_target_associate_ptr_ |
| 258 | #define FTN_TARGET_DISASSOCIATE_PTR omp_target_disassociate_ptr_ |
| 259 | #endif |
Jonathan Peyton | 2851072 | 2016-02-25 18:04:09 +0000 | [diff] [blame] | 260 | #endif |
| 261 | |
Joachim Protze | 82e94a5 | 2017-11-01 10:08:30 +0000 | [diff] [blame] | 262 | #if OMP_50_ENABLED |
Jonathan Peyton | 92ca618 | 2018-09-07 18:25:49 +0000 | [diff] [blame] | 263 | #define FTN_CONTROL_TOOL omp_control_tool_ |
| 264 | #define FTN_SET_DEFAULT_ALLOCATOR omp_set_default_allocator_ |
| 265 | #define FTN_GET_DEFAULT_ALLOCATOR omp_get_default_allocator_ |
| 266 | #define FTN_ALLOC omp_alloc_ |
| 267 | #define FTN_FREE omp_free_ |
Joachim Protze | 82e94a5 | 2017-11-01 10:08:30 +0000 | [diff] [blame] | 268 | #endif |
| 269 | |
Jim Cownie | 5e8470a | 2013-09-27 10:38:44 +0000 | [diff] [blame] | 270 | #endif /* KMP_FTN_APPEND */ |
| 271 | |
| 272 | /* ------------------------------------------------------------------------ */ |
| 273 | |
| 274 | #if KMP_FTN_ENTRIES == KMP_FTN_UPPER |
| 275 | |
Jonathan Peyton | 3041982 | 2017-05-12 18:01:32 +0000 | [diff] [blame] | 276 | #define FTN_SET_STACKSIZE KMP_SET_STACKSIZE |
| 277 | #define FTN_SET_STACKSIZE_S KMP_SET_STACKSIZE_S |
| 278 | #define FTN_GET_STACKSIZE KMP_GET_STACKSIZE |
| 279 | #define FTN_GET_STACKSIZE_S KMP_GET_STACKSIZE_S |
| 280 | #define FTN_SET_BLOCKTIME KMP_SET_BLOCKTIME |
| 281 | #define FTN_GET_BLOCKTIME KMP_GET_BLOCKTIME |
| 282 | #define FTN_SET_LIBRARY_SERIAL KMP_SET_LIBRARY_SERIAL |
| 283 | #define FTN_SET_LIBRARY_TURNAROUND KMP_SET_LIBRARY_TURNAROUND |
| 284 | #define FTN_SET_LIBRARY_THROUGHPUT KMP_SET_LIBRARY_THROUGHPUT |
| 285 | #define FTN_SET_LIBRARY KMP_SET_LIBRARY |
| 286 | #define FTN_GET_LIBRARY KMP_GET_LIBRARY |
| 287 | #define FTN_SET_DEFAULTS KMP_SET_DEFAULTS |
| 288 | #define FTN_SET_DISP_NUM_BUFFERS KMP_SET_DISP_NUM_BUFFERS |
| 289 | #define FTN_SET_AFFINITY KMP_SET_AFFINITY |
| 290 | #define FTN_GET_AFFINITY KMP_GET_AFFINITY |
| 291 | #define FTN_GET_AFFINITY_MAX_PROC KMP_GET_AFFINITY_MAX_PROC |
| 292 | #define FTN_CREATE_AFFINITY_MASK KMP_CREATE_AFFINITY_MASK |
| 293 | #define FTN_DESTROY_AFFINITY_MASK KMP_DESTROY_AFFINITY_MASK |
| 294 | #define FTN_SET_AFFINITY_MASK_PROC KMP_SET_AFFINITY_MASK_PROC |
| 295 | #define FTN_UNSET_AFFINITY_MASK_PROC KMP_UNSET_AFFINITY_MASK_PROC |
| 296 | #define FTN_GET_AFFINITY_MASK_PROC KMP_GET_AFFINITY_MASK_PROC |
Jim Cownie | 5e8470a | 2013-09-27 10:38:44 +0000 | [diff] [blame] | 297 | |
Jonathan Peyton | 3041982 | 2017-05-12 18:01:32 +0000 | [diff] [blame] | 298 | #define FTN_MALLOC KMP_MALLOC |
| 299 | #define FTN_ALIGNED_MALLOC KMP_ALIGNED_MALLOC |
| 300 | #define FTN_CALLOC KMP_CALLOC |
| 301 | #define FTN_REALLOC KMP_REALLOC |
Jonathan Peyton | 92ca618 | 2018-09-07 18:25:49 +0000 | [diff] [blame] | 302 | #define FTN_KFREE KMP_FREE |
Jim Cownie | 5e8470a | 2013-09-27 10:38:44 +0000 | [diff] [blame] | 303 | |
Jonathan Peyton | 3041982 | 2017-05-12 18:01:32 +0000 | [diff] [blame] | 304 | #define FTN_GET_NUM_KNOWN_THREADS KMP_GET_NUM_KNOWN_THREADS |
Jim Cownie | 5e8470a | 2013-09-27 10:38:44 +0000 | [diff] [blame] | 305 | |
Jonathan Peyton | 3041982 | 2017-05-12 18:01:32 +0000 | [diff] [blame] | 306 | #define FTN_SET_NUM_THREADS OMP_SET_NUM_THREADS |
| 307 | #define FTN_GET_NUM_THREADS OMP_GET_NUM_THREADS |
| 308 | #define FTN_GET_MAX_THREADS OMP_GET_MAX_THREADS |
| 309 | #define FTN_GET_THREAD_NUM OMP_GET_THREAD_NUM |
| 310 | #define FTN_GET_NUM_PROCS OMP_GET_NUM_PROCS |
| 311 | #define FTN_SET_DYNAMIC OMP_SET_DYNAMIC |
| 312 | #define FTN_GET_DYNAMIC OMP_GET_DYNAMIC |
| 313 | #define FTN_SET_NESTED OMP_SET_NESTED |
| 314 | #define FTN_GET_NESTED OMP_GET_NESTED |
| 315 | #define FTN_IN_PARALLEL OMP_IN_PARALLEL |
| 316 | #define FTN_GET_THREAD_LIMIT OMP_GET_THREAD_LIMIT |
| 317 | #define FTN_SET_SCHEDULE OMP_SET_SCHEDULE |
| 318 | #define FTN_GET_SCHEDULE OMP_GET_SCHEDULE |
| 319 | #define FTN_SET_MAX_ACTIVE_LEVELS OMP_SET_MAX_ACTIVE_LEVELS |
| 320 | #define FTN_GET_MAX_ACTIVE_LEVELS OMP_GET_MAX_ACTIVE_LEVELS |
| 321 | #define FTN_GET_ACTIVE_LEVEL OMP_GET_ACTIVE_LEVEL |
| 322 | #define FTN_GET_LEVEL OMP_GET_LEVEL |
| 323 | #define FTN_GET_ANCESTOR_THREAD_NUM OMP_GET_ANCESTOR_THREAD_NUM |
| 324 | #define FTN_GET_TEAM_SIZE OMP_GET_TEAM_SIZE |
| 325 | #define FTN_IN_FINAL OMP_IN_FINAL |
Jim Cownie | 5e8470a | 2013-09-27 10:38:44 +0000 | [diff] [blame] | 326 | // #define FTN_SET_PROC_BIND OMP_SET_PROC_BIND |
Jonathan Peyton | 3041982 | 2017-05-12 18:01:32 +0000 | [diff] [blame] | 327 | #define FTN_GET_PROC_BIND OMP_GET_PROC_BIND |
Jim Cownie | 5e8470a | 2013-09-27 10:38:44 +0000 | [diff] [blame] | 328 | // #define FTN_CURR_PROC_BIND OMP_CURR_PROC_BIND |
| 329 | #if OMP_40_ENABLED |
Jonathan Peyton | 3041982 | 2017-05-12 18:01:32 +0000 | [diff] [blame] | 330 | #define FTN_GET_NUM_TEAMS OMP_GET_NUM_TEAMS |
| 331 | #define FTN_GET_TEAM_NUM OMP_GET_TEAM_NUM |
Jim Cownie | 5e8470a | 2013-09-27 10:38:44 +0000 | [diff] [blame] | 332 | #endif |
Jonathan Peyton | 3041982 | 2017-05-12 18:01:32 +0000 | [diff] [blame] | 333 | #define FTN_INIT_LOCK OMP_INIT_LOCK |
Andrey Churbanov | 5c56fb5 | 2015-02-20 18:05:17 +0000 | [diff] [blame] | 334 | #if KMP_USE_DYNAMIC_LOCK |
Jonathan Peyton | 3041982 | 2017-05-12 18:01:32 +0000 | [diff] [blame] | 335 | #define FTN_INIT_LOCK_WITH_HINT OMP_INIT_LOCK_WITH_HINT |
| 336 | #define FTN_INIT_NEST_LOCK_WITH_HINT OMP_INIT_NEST_LOCK_WITH_HINT |
Andrey Churbanov | 5c56fb5 | 2015-02-20 18:05:17 +0000 | [diff] [blame] | 337 | #endif |
Jonathan Peyton | 3041982 | 2017-05-12 18:01:32 +0000 | [diff] [blame] | 338 | #define FTN_DESTROY_LOCK OMP_DESTROY_LOCK |
| 339 | #define FTN_SET_LOCK OMP_SET_LOCK |
| 340 | #define FTN_UNSET_LOCK OMP_UNSET_LOCK |
| 341 | #define FTN_TEST_LOCK OMP_TEST_LOCK |
| 342 | #define FTN_INIT_NEST_LOCK OMP_INIT_NEST_LOCK |
| 343 | #define FTN_DESTROY_NEST_LOCK OMP_DESTROY_NEST_LOCK |
| 344 | #define FTN_SET_NEST_LOCK OMP_SET_NEST_LOCK |
| 345 | #define FTN_UNSET_NEST_LOCK OMP_UNSET_NEST_LOCK |
| 346 | #define FTN_TEST_NEST_LOCK OMP_TEST_NEST_LOCK |
Jim Cownie | 5e8470a | 2013-09-27 10:38:44 +0000 | [diff] [blame] | 347 | |
Jonathan Peyton | 3041982 | 2017-05-12 18:01:32 +0000 | [diff] [blame] | 348 | #define FTN_SET_WARNINGS_ON KMP_SET_WARNINGS_ON |
| 349 | #define FTN_SET_WARNINGS_OFF KMP_SET_WARNINGS_OFF |
Jim Cownie | 5e8470a | 2013-09-27 10:38:44 +0000 | [diff] [blame] | 350 | |
Jonathan Peyton | 3041982 | 2017-05-12 18:01:32 +0000 | [diff] [blame] | 351 | #define FTN_GET_WTIME OMP_GET_WTIME |
| 352 | #define FTN_GET_WTICK OMP_GET_WTICK |
Jim Cownie | 5e8470a | 2013-09-27 10:38:44 +0000 | [diff] [blame] | 353 | |
| 354 | #if OMP_40_ENABLED |
Jonathan Peyton | 50eae7f | 2016-05-27 15:51:14 +0000 | [diff] [blame] | 355 | #if KMP_MIC || KMP_OS_DARWIN || defined(KMP_STUB) |
Jonathan Peyton | 3041982 | 2017-05-12 18:01:32 +0000 | [diff] [blame] | 356 | #define FTN_GET_NUM_DEVICES OMP_GET_NUM_DEVICES |
Jim Cownie | 5e8470a | 2013-09-27 10:38:44 +0000 | [diff] [blame] | 357 | #endif |
Jonathan Peyton | 3041982 | 2017-05-12 18:01:32 +0000 | [diff] [blame] | 358 | #define FTN_GET_DEFAULT_DEVICE OMP_GET_DEFAULT_DEVICE |
| 359 | #define FTN_SET_DEFAULT_DEVICE OMP_SET_DEFAULT_DEVICE |
| 360 | #define FTN_IS_INITIAL_DEVICE OMP_IS_INITIAL_DEVICE |
Jim Cownie | 5e8470a | 2013-09-27 10:38:44 +0000 | [diff] [blame] | 361 | #endif |
| 362 | |
Jim Cownie | 181b4bb | 2013-12-23 17:28:57 +0000 | [diff] [blame] | 363 | #if OMP_40_ENABLED |
Jonathan Peyton | 3041982 | 2017-05-12 18:01:32 +0000 | [diff] [blame] | 364 | #define FTN_GET_CANCELLATION OMP_GET_CANCELLATION |
| 365 | #define FTN_GET_CANCELLATION_STATUS KMP_GET_CANCELLATION_STATUS |
Jim Cownie | 181b4bb | 2013-12-23 17:28:57 +0000 | [diff] [blame] | 366 | #endif |
| 367 | |
Jonathan Peyton | df6818b | 2016-06-14 17:57:47 +0000 | [diff] [blame] | 368 | #if OMP_45_ENABLED |
Jonathan Peyton | 3041982 | 2017-05-12 18:01:32 +0000 | [diff] [blame] | 369 | #define FTN_GET_MAX_TASK_PRIORITY OMP_GET_MAX_TASK_PRIORITY |
| 370 | #define FTN_GET_NUM_PLACES OMP_GET_NUM_PLACES |
| 371 | #define FTN_GET_PLACE_NUM_PROCS OMP_GET_PLACE_NUM_PROCS |
| 372 | #define FTN_GET_PLACE_PROC_IDS OMP_GET_PLACE_PROC_IDS |
| 373 | #define FTN_GET_PLACE_NUM OMP_GET_PLACE_NUM |
| 374 | #define FTN_GET_PARTITION_NUM_PLACES OMP_GET_PARTITION_NUM_PLACES |
| 375 | #define FTN_GET_PARTITION_PLACE_NUMS OMP_GET_PARTITION_PLACE_NUMS |
| 376 | #ifdef KMP_STUB |
| 377 | #define FTN_GET_INITIAL_DEVICE OMP_GET_INITIAL_DEVICE |
| 378 | #define FTN_TARGET_ALLOC OMP_TARGET_ALLOC |
| 379 | #define FTN_TARGET_FREE OMP_TARGET_FREE |
| 380 | #define FTN_TARGET_IS_PRESENT OMP_TARGET_IS_PRESENT |
| 381 | #define FTN_TARGET_MEMCPY OMP_TARGET_MEMCPY |
| 382 | #define FTN_TARGET_MEMCPY_RECT OMP_TARGET_MEMCPY_RECT |
| 383 | #define FTN_TARGET_ASSOCIATE_PTR OMP_TARGET_ASSOCIATE_PTR |
| 384 | #define FTN_TARGET_DISASSOCIATE_PTR OMP_TARGET_DISASSOCIATE_PTR |
| 385 | #endif |
Jonathan Peyton | 2851072 | 2016-02-25 18:04:09 +0000 | [diff] [blame] | 386 | #endif |
| 387 | |
Joachim Protze | 82e94a5 | 2017-11-01 10:08:30 +0000 | [diff] [blame] | 388 | #if OMP_50_ENABLED |
| 389 | #define FTN_CONTROL_TOOL OMP_CONTROL_TOOL |
Jonathan Peyton | 92ca618 | 2018-09-07 18:25:49 +0000 | [diff] [blame] | 390 | #define FTN_SET_DEFAULT_ALLOCATOR OMP_SET_DEFAULT_ALLOCATOR |
| 391 | #define FTN_GET_DEFAULT_ALLOCATOR OMP_GET_DEFAULT_ALLOCATOR |
| 392 | #define FTN_ALLOC OMP_ALLOC |
| 393 | #define FTN_FREE OMP_FREE |
Joachim Protze | 82e94a5 | 2017-11-01 10:08:30 +0000 | [diff] [blame] | 394 | #endif |
| 395 | |
Jim Cownie | 5e8470a | 2013-09-27 10:38:44 +0000 | [diff] [blame] | 396 | #endif /* KMP_FTN_UPPER */ |
| 397 | |
| 398 | /* ------------------------------------------------------------------------ */ |
| 399 | |
| 400 | #if KMP_FTN_ENTRIES == KMP_FTN_UAPPEND |
| 401 | |
Jonathan Peyton | 3041982 | 2017-05-12 18:01:32 +0000 | [diff] [blame] | 402 | #define FTN_SET_STACKSIZE KMP_SET_STACKSIZE_ |
| 403 | #define FTN_SET_STACKSIZE_S KMP_SET_STACKSIZE_S_ |
| 404 | #define FTN_GET_STACKSIZE KMP_GET_STACKSIZE_ |
| 405 | #define FTN_GET_STACKSIZE_S KMP_GET_STACKSIZE_S_ |
| 406 | #define FTN_SET_BLOCKTIME KMP_SET_BLOCKTIME_ |
| 407 | #define FTN_GET_BLOCKTIME KMP_GET_BLOCKTIME_ |
| 408 | #define FTN_SET_LIBRARY_SERIAL KMP_SET_LIBRARY_SERIAL_ |
| 409 | #define FTN_SET_LIBRARY_TURNAROUND KMP_SET_LIBRARY_TURNAROUND_ |
| 410 | #define FTN_SET_LIBRARY_THROUGHPUT KMP_SET_LIBRARY_THROUGHPUT_ |
| 411 | #define FTN_SET_LIBRARY KMP_SET_LIBRARY_ |
| 412 | #define FTN_GET_LIBRARY KMP_GET_LIBRARY_ |
| 413 | #define FTN_SET_DEFAULTS KMP_SET_DEFAULTS_ |
| 414 | #define FTN_SET_DISP_NUM_BUFFERS KMP_SET_DISP_NUM_BUFFERS_ |
| 415 | #define FTN_SET_AFFINITY KMP_SET_AFFINITY_ |
| 416 | #define FTN_GET_AFFINITY KMP_GET_AFFINITY_ |
| 417 | #define FTN_GET_AFFINITY_MAX_PROC KMP_GET_AFFINITY_MAX_PROC_ |
| 418 | #define FTN_CREATE_AFFINITY_MASK KMP_CREATE_AFFINITY_MASK_ |
| 419 | #define FTN_DESTROY_AFFINITY_MASK KMP_DESTROY_AFFINITY_MASK_ |
| 420 | #define FTN_SET_AFFINITY_MASK_PROC KMP_SET_AFFINITY_MASK_PROC_ |
| 421 | #define FTN_UNSET_AFFINITY_MASK_PROC KMP_UNSET_AFFINITY_MASK_PROC_ |
| 422 | #define FTN_GET_AFFINITY_MASK_PROC KMP_GET_AFFINITY_MASK_PROC_ |
Jim Cownie | 5e8470a | 2013-09-27 10:38:44 +0000 | [diff] [blame] | 423 | |
Jonathan Peyton | 3041982 | 2017-05-12 18:01:32 +0000 | [diff] [blame] | 424 | #define FTN_MALLOC KMP_MALLOC_ |
| 425 | #define FTN_ALIGNED_MALLOC KMP_ALIGNED_MALLOC_ |
| 426 | #define FTN_CALLOC KMP_CALLOC_ |
| 427 | #define FTN_REALLOC KMP_REALLOC_ |
Jonathan Peyton | 92ca618 | 2018-09-07 18:25:49 +0000 | [diff] [blame] | 428 | #define FTN_KFREE KMP_FREE_ |
Jim Cownie | 5e8470a | 2013-09-27 10:38:44 +0000 | [diff] [blame] | 429 | |
Jonathan Peyton | 3041982 | 2017-05-12 18:01:32 +0000 | [diff] [blame] | 430 | #define FTN_GET_NUM_KNOWN_THREADS KMP_GET_NUM_KNOWN_THREADS_ |
Jim Cownie | 5e8470a | 2013-09-27 10:38:44 +0000 | [diff] [blame] | 431 | |
Jonathan Peyton | 3041982 | 2017-05-12 18:01:32 +0000 | [diff] [blame] | 432 | #define FTN_SET_NUM_THREADS OMP_SET_NUM_THREADS_ |
| 433 | #define FTN_GET_NUM_THREADS OMP_GET_NUM_THREADS_ |
| 434 | #define FTN_GET_MAX_THREADS OMP_GET_MAX_THREADS_ |
| 435 | #define FTN_GET_THREAD_NUM OMP_GET_THREAD_NUM_ |
| 436 | #define FTN_GET_NUM_PROCS OMP_GET_NUM_PROCS_ |
| 437 | #define FTN_SET_DYNAMIC OMP_SET_DYNAMIC_ |
| 438 | #define FTN_GET_DYNAMIC OMP_GET_DYNAMIC_ |
| 439 | #define FTN_SET_NESTED OMP_SET_NESTED_ |
| 440 | #define FTN_GET_NESTED OMP_GET_NESTED_ |
| 441 | #define FTN_IN_PARALLEL OMP_IN_PARALLEL_ |
| 442 | #define FTN_GET_THREAD_LIMIT OMP_GET_THREAD_LIMIT_ |
| 443 | #define FTN_SET_SCHEDULE OMP_SET_SCHEDULE_ |
| 444 | #define FTN_GET_SCHEDULE OMP_GET_SCHEDULE_ |
| 445 | #define FTN_SET_MAX_ACTIVE_LEVELS OMP_SET_MAX_ACTIVE_LEVELS_ |
| 446 | #define FTN_GET_MAX_ACTIVE_LEVELS OMP_GET_MAX_ACTIVE_LEVELS_ |
| 447 | #define FTN_GET_ACTIVE_LEVEL OMP_GET_ACTIVE_LEVEL_ |
| 448 | #define FTN_GET_LEVEL OMP_GET_LEVEL_ |
| 449 | #define FTN_GET_ANCESTOR_THREAD_NUM OMP_GET_ANCESTOR_THREAD_NUM_ |
| 450 | #define FTN_GET_TEAM_SIZE OMP_GET_TEAM_SIZE_ |
| 451 | #define FTN_IN_FINAL OMP_IN_FINAL_ |
Jim Cownie | 5e8470a | 2013-09-27 10:38:44 +0000 | [diff] [blame] | 452 | // #define FTN_SET_PROC_BIND OMP_SET_PROC_BIND_ |
Jonathan Peyton | 3041982 | 2017-05-12 18:01:32 +0000 | [diff] [blame] | 453 | #define FTN_GET_PROC_BIND OMP_GET_PROC_BIND_ |
Jim Cownie | 5e8470a | 2013-09-27 10:38:44 +0000 | [diff] [blame] | 454 | // #define FTN_CURR_PROC_BIND OMP_CURR_PROC_BIND_ |
| 455 | #if OMP_40_ENABLED |
Jonathan Peyton | 3041982 | 2017-05-12 18:01:32 +0000 | [diff] [blame] | 456 | #define FTN_GET_NUM_TEAMS OMP_GET_NUM_TEAMS_ |
| 457 | #define FTN_GET_TEAM_NUM OMP_GET_TEAM_NUM_ |
Jim Cownie | 5e8470a | 2013-09-27 10:38:44 +0000 | [diff] [blame] | 458 | #endif |
Jonathan Peyton | 3041982 | 2017-05-12 18:01:32 +0000 | [diff] [blame] | 459 | #define FTN_INIT_LOCK OMP_INIT_LOCK_ |
Andrey Churbanov | 5c56fb5 | 2015-02-20 18:05:17 +0000 | [diff] [blame] | 460 | #if KMP_USE_DYNAMIC_LOCK |
Jonathan Peyton | 3041982 | 2017-05-12 18:01:32 +0000 | [diff] [blame] | 461 | #define FTN_INIT_LOCK_WITH_HINT OMP_INIT_LOCK_WITH_HINT_ |
| 462 | #define FTN_INIT_NEST_LOCK_WITH_HINT OMP_INIT_NEST_LOCK_WITH_HINT_ |
Andrey Churbanov | 5c56fb5 | 2015-02-20 18:05:17 +0000 | [diff] [blame] | 463 | #endif |
Jonathan Peyton | 3041982 | 2017-05-12 18:01:32 +0000 | [diff] [blame] | 464 | #define FTN_DESTROY_LOCK OMP_DESTROY_LOCK_ |
| 465 | #define FTN_SET_LOCK OMP_SET_LOCK_ |
| 466 | #define FTN_UNSET_LOCK OMP_UNSET_LOCK_ |
| 467 | #define FTN_TEST_LOCK OMP_TEST_LOCK_ |
| 468 | #define FTN_INIT_NEST_LOCK OMP_INIT_NEST_LOCK_ |
| 469 | #define FTN_DESTROY_NEST_LOCK OMP_DESTROY_NEST_LOCK_ |
| 470 | #define FTN_SET_NEST_LOCK OMP_SET_NEST_LOCK_ |
| 471 | #define FTN_UNSET_NEST_LOCK OMP_UNSET_NEST_LOCK_ |
| 472 | #define FTN_TEST_NEST_LOCK OMP_TEST_NEST_LOCK_ |
Jim Cownie | 5e8470a | 2013-09-27 10:38:44 +0000 | [diff] [blame] | 473 | |
Jonathan Peyton | 3041982 | 2017-05-12 18:01:32 +0000 | [diff] [blame] | 474 | #define FTN_SET_WARNINGS_ON KMP_SET_WARNINGS_ON_ |
| 475 | #define FTN_SET_WARNINGS_OFF KMP_SET_WARNINGS_OFF_ |
Jim Cownie | 5e8470a | 2013-09-27 10:38:44 +0000 | [diff] [blame] | 476 | |
Jonathan Peyton | 3041982 | 2017-05-12 18:01:32 +0000 | [diff] [blame] | 477 | #define FTN_GET_WTIME OMP_GET_WTIME_ |
| 478 | #define FTN_GET_WTICK OMP_GET_WTICK_ |
Jim Cownie | 5e8470a | 2013-09-27 10:38:44 +0000 | [diff] [blame] | 479 | |
| 480 | #if OMP_40_ENABLED |
Jonathan Peyton | 50eae7f | 2016-05-27 15:51:14 +0000 | [diff] [blame] | 481 | #if KMP_MIC || KMP_OS_DARWIN || defined(KMP_STUB) |
Jonathan Peyton | 3041982 | 2017-05-12 18:01:32 +0000 | [diff] [blame] | 482 | #define FTN_GET_NUM_DEVICES OMP_GET_NUM_DEVICES_ |
Jim Cownie | 5e8470a | 2013-09-27 10:38:44 +0000 | [diff] [blame] | 483 | #endif |
Jonathan Peyton | 3041982 | 2017-05-12 18:01:32 +0000 | [diff] [blame] | 484 | #define FTN_GET_DEFAULT_DEVICE OMP_GET_DEFAULT_DEVICE_ |
| 485 | #define FTN_SET_DEFAULT_DEVICE OMP_SET_DEFAULT_DEVICE_ |
| 486 | #define FTN_IS_INITIAL_DEVICE OMP_IS_INITIAL_DEVICE_ |
Jim Cownie | 5e8470a | 2013-09-27 10:38:44 +0000 | [diff] [blame] | 487 | #endif |
| 488 | |
Jim Cownie | 181b4bb | 2013-12-23 17:28:57 +0000 | [diff] [blame] | 489 | #if OMP_40_ENABLED |
Jonathan Peyton | 3041982 | 2017-05-12 18:01:32 +0000 | [diff] [blame] | 490 | #define FTN_GET_CANCELLATION OMP_GET_CANCELLATION_ |
| 491 | #define FTN_GET_CANCELLATION_STATUS KMP_GET_CANCELLATION_STATUS_ |
Jim Cownie | 181b4bb | 2013-12-23 17:28:57 +0000 | [diff] [blame] | 492 | #endif |
| 493 | |
Jonathan Peyton | df6818b | 2016-06-14 17:57:47 +0000 | [diff] [blame] | 494 | #if OMP_45_ENABLED |
Jonathan Peyton | 3041982 | 2017-05-12 18:01:32 +0000 | [diff] [blame] | 495 | #define FTN_GET_MAX_TASK_PRIORITY OMP_GET_MAX_TASK_PRIORITY_ |
| 496 | #define FTN_GET_NUM_PLACES OMP_GET_NUM_PLACES_ |
| 497 | #define FTN_GET_PLACE_NUM_PROCS OMP_GET_PLACE_NUM_PROCS_ |
| 498 | #define FTN_GET_PLACE_PROC_IDS OMP_GET_PLACE_PROC_IDS_ |
| 499 | #define FTN_GET_PLACE_NUM OMP_GET_PLACE_NUM_ |
| 500 | #define FTN_GET_PARTITION_NUM_PLACES OMP_GET_PARTITION_NUM_PLACES_ |
| 501 | #define FTN_GET_PARTITION_PLACE_NUMS OMP_GET_PARTITION_PLACE_NUMS_ |
| 502 | #ifdef KMP_STUB |
| 503 | #define FTN_GET_INITIAL_DEVICE OMP_GET_INITIAL_DEVICE_ |
| 504 | #define FTN_TARGET_ALLOC OMP_TARGET_ALLOC_ |
| 505 | #define FTN_TARGET_FREE OMP_TARGET_FREE_ |
| 506 | #define FTN_TARGET_IS_PRESENT OMP_TARGET_IS_PRESENT_ |
| 507 | #define FTN_TARGET_MEMCPY OMP_TARGET_MEMCPY_ |
| 508 | #define FTN_TARGET_MEMCPY_RECT OMP_TARGET_MEMCPY_RECT_ |
| 509 | #define FTN_TARGET_ASSOCIATE_PTR OMP_TARGET_ASSOCIATE_PTR_ |
| 510 | #define FTN_TARGET_DISASSOCIATE_PTR OMP_TARGET_DISASSOCIATE_PTR_ |
| 511 | #endif |
Jonathan Peyton | 2851072 | 2016-02-25 18:04:09 +0000 | [diff] [blame] | 512 | #endif |
| 513 | |
Joachim Protze | 82e94a5 | 2017-11-01 10:08:30 +0000 | [diff] [blame] | 514 | #if OMP_50_ENABLED |
| 515 | #define FTN_CONTROL_TOOL OMP_CONTROL_TOOL_ |
Jonathan Peyton | 92ca618 | 2018-09-07 18:25:49 +0000 | [diff] [blame] | 516 | #define FTN_SET_DEFAULT_ALLOCATOR OMP_SET_DEFAULT_ALLOCATOR_ |
| 517 | #define FTN_GET_DEFAULT_ALLOCATOR OMP_GET_DEFAULT_ALLOCATOR_ |
| 518 | #define FTN_ALLOC OMP_ALLOC_ |
| 519 | #define FTN_FREE OMP_FREE_ |
Joachim Protze | 82e94a5 | 2017-11-01 10:08:30 +0000 | [diff] [blame] | 520 | #endif |
| 521 | |
Jim Cownie | 5e8470a | 2013-09-27 10:38:44 +0000 | [diff] [blame] | 522 | #endif /* KMP_FTN_UAPPEND */ |
| 523 | |
Jim Cownie | 181b4bb | 2013-12-23 17:28:57 +0000 | [diff] [blame] | 524 | /* -------------------------- GOMP API NAMES ------------------------ */ |
| 525 | // All GOMP_1.0 symbols |
Jonathan Peyton | 3041982 | 2017-05-12 18:01:32 +0000 | [diff] [blame] | 526 | #define KMP_API_NAME_GOMP_ATOMIC_END GOMP_atomic_end |
| 527 | #define KMP_API_NAME_GOMP_ATOMIC_START GOMP_atomic_start |
| 528 | #define KMP_API_NAME_GOMP_BARRIER GOMP_barrier |
| 529 | #define KMP_API_NAME_GOMP_CRITICAL_END GOMP_critical_end |
| 530 | #define KMP_API_NAME_GOMP_CRITICAL_NAME_END GOMP_critical_name_end |
| 531 | #define KMP_API_NAME_GOMP_CRITICAL_NAME_START GOMP_critical_name_start |
| 532 | #define KMP_API_NAME_GOMP_CRITICAL_START GOMP_critical_start |
| 533 | #define KMP_API_NAME_GOMP_LOOP_DYNAMIC_NEXT GOMP_loop_dynamic_next |
| 534 | #define KMP_API_NAME_GOMP_LOOP_DYNAMIC_START GOMP_loop_dynamic_start |
| 535 | #define KMP_API_NAME_GOMP_LOOP_END GOMP_loop_end |
| 536 | #define KMP_API_NAME_GOMP_LOOP_END_NOWAIT GOMP_loop_end_nowait |
| 537 | #define KMP_API_NAME_GOMP_LOOP_GUIDED_NEXT GOMP_loop_guided_next |
| 538 | #define KMP_API_NAME_GOMP_LOOP_GUIDED_START GOMP_loop_guided_start |
| 539 | #define KMP_API_NAME_GOMP_LOOP_ORDERED_DYNAMIC_NEXT \ |
| 540 | GOMP_loop_ordered_dynamic_next |
| 541 | #define KMP_API_NAME_GOMP_LOOP_ORDERED_DYNAMIC_START \ |
| 542 | GOMP_loop_ordered_dynamic_start |
| 543 | #define KMP_API_NAME_GOMP_LOOP_ORDERED_GUIDED_NEXT GOMP_loop_ordered_guided_next |
| 544 | #define KMP_API_NAME_GOMP_LOOP_ORDERED_GUIDED_START \ |
| 545 | GOMP_loop_ordered_guided_start |
| 546 | #define KMP_API_NAME_GOMP_LOOP_ORDERED_RUNTIME_NEXT \ |
| 547 | GOMP_loop_ordered_runtime_next |
| 548 | #define KMP_API_NAME_GOMP_LOOP_ORDERED_RUNTIME_START \ |
| 549 | GOMP_loop_ordered_runtime_start |
| 550 | #define KMP_API_NAME_GOMP_LOOP_ORDERED_STATIC_NEXT GOMP_loop_ordered_static_next |
| 551 | #define KMP_API_NAME_GOMP_LOOP_ORDERED_STATIC_START \ |
| 552 | GOMP_loop_ordered_static_start |
| 553 | #define KMP_API_NAME_GOMP_LOOP_RUNTIME_NEXT GOMP_loop_runtime_next |
| 554 | #define KMP_API_NAME_GOMP_LOOP_RUNTIME_START GOMP_loop_runtime_start |
| 555 | #define KMP_API_NAME_GOMP_LOOP_STATIC_NEXT GOMP_loop_static_next |
| 556 | #define KMP_API_NAME_GOMP_LOOP_STATIC_START GOMP_loop_static_start |
| 557 | #define KMP_API_NAME_GOMP_ORDERED_END GOMP_ordered_end |
| 558 | #define KMP_API_NAME_GOMP_ORDERED_START GOMP_ordered_start |
| 559 | #define KMP_API_NAME_GOMP_PARALLEL_END GOMP_parallel_end |
| 560 | #define KMP_API_NAME_GOMP_PARALLEL_LOOP_DYNAMIC_START \ |
| 561 | GOMP_parallel_loop_dynamic_start |
| 562 | #define KMP_API_NAME_GOMP_PARALLEL_LOOP_GUIDED_START \ |
| 563 | GOMP_parallel_loop_guided_start |
| 564 | #define KMP_API_NAME_GOMP_PARALLEL_LOOP_RUNTIME_START \ |
| 565 | GOMP_parallel_loop_runtime_start |
| 566 | #define KMP_API_NAME_GOMP_PARALLEL_LOOP_STATIC_START \ |
| 567 | GOMP_parallel_loop_static_start |
| 568 | #define KMP_API_NAME_GOMP_PARALLEL_SECTIONS_START GOMP_parallel_sections_start |
| 569 | #define KMP_API_NAME_GOMP_PARALLEL_START GOMP_parallel_start |
| 570 | #define KMP_API_NAME_GOMP_SECTIONS_END GOMP_sections_end |
| 571 | #define KMP_API_NAME_GOMP_SECTIONS_END_NOWAIT GOMP_sections_end_nowait |
| 572 | #define KMP_API_NAME_GOMP_SECTIONS_NEXT GOMP_sections_next |
| 573 | #define KMP_API_NAME_GOMP_SECTIONS_START GOMP_sections_start |
| 574 | #define KMP_API_NAME_GOMP_SINGLE_COPY_END GOMP_single_copy_end |
| 575 | #define KMP_API_NAME_GOMP_SINGLE_COPY_START GOMP_single_copy_start |
| 576 | #define KMP_API_NAME_GOMP_SINGLE_START GOMP_single_start |
Jim Cownie | 181b4bb | 2013-12-23 17:28:57 +0000 | [diff] [blame] | 577 | |
| 578 | // All GOMP_2.0 symbols |
Jonathan Peyton | 3041982 | 2017-05-12 18:01:32 +0000 | [diff] [blame] | 579 | #define KMP_API_NAME_GOMP_TASK GOMP_task |
| 580 | #define KMP_API_NAME_GOMP_TASKWAIT GOMP_taskwait |
| 581 | #define KMP_API_NAME_GOMP_LOOP_ULL_DYNAMIC_NEXT GOMP_loop_ull_dynamic_next |
| 582 | #define KMP_API_NAME_GOMP_LOOP_ULL_DYNAMIC_START GOMP_loop_ull_dynamic_start |
| 583 | #define KMP_API_NAME_GOMP_LOOP_ULL_GUIDED_NEXT GOMP_loop_ull_guided_next |
| 584 | #define KMP_API_NAME_GOMP_LOOP_ULL_GUIDED_START GOMP_loop_ull_guided_start |
| 585 | #define KMP_API_NAME_GOMP_LOOP_ULL_ORDERED_DYNAMIC_NEXT \ |
| 586 | GOMP_loop_ull_ordered_dynamic_next |
| 587 | #define KMP_API_NAME_GOMP_LOOP_ULL_ORDERED_DYNAMIC_START \ |
| 588 | GOMP_loop_ull_ordered_dynamic_start |
| 589 | #define KMP_API_NAME_GOMP_LOOP_ULL_ORDERED_GUIDED_NEXT \ |
| 590 | GOMP_loop_ull_ordered_guided_next |
| 591 | #define KMP_API_NAME_GOMP_LOOP_ULL_ORDERED_GUIDED_START \ |
| 592 | GOMP_loop_ull_ordered_guided_start |
| 593 | #define KMP_API_NAME_GOMP_LOOP_ULL_ORDERED_RUNTIME_NEXT \ |
| 594 | GOMP_loop_ull_ordered_runtime_next |
| 595 | #define KMP_API_NAME_GOMP_LOOP_ULL_ORDERED_RUNTIME_START \ |
| 596 | GOMP_loop_ull_ordered_runtime_start |
| 597 | #define KMP_API_NAME_GOMP_LOOP_ULL_ORDERED_STATIC_NEXT \ |
| 598 | GOMP_loop_ull_ordered_static_next |
| 599 | #define KMP_API_NAME_GOMP_LOOP_ULL_ORDERED_STATIC_START \ |
| 600 | GOMP_loop_ull_ordered_static_start |
| 601 | #define KMP_API_NAME_GOMP_LOOP_ULL_RUNTIME_NEXT GOMP_loop_ull_runtime_next |
| 602 | #define KMP_API_NAME_GOMP_LOOP_ULL_RUNTIME_START GOMP_loop_ull_runtime_start |
| 603 | #define KMP_API_NAME_GOMP_LOOP_ULL_STATIC_NEXT GOMP_loop_ull_static_next |
| 604 | #define KMP_API_NAME_GOMP_LOOP_ULL_STATIC_START GOMP_loop_ull_static_start |
Jim Cownie | 181b4bb | 2013-12-23 17:28:57 +0000 | [diff] [blame] | 605 | |
| 606 | // All GOMP_3.0 symbols |
Jonathan Peyton | 3041982 | 2017-05-12 18:01:32 +0000 | [diff] [blame] | 607 | #define KMP_API_NAME_GOMP_TASKYIELD GOMP_taskyield |
Jim Cownie | 181b4bb | 2013-12-23 17:28:57 +0000 | [diff] [blame] | 608 | |
Jonathan Peyton | 6111849 | 2016-05-20 19:03:38 +0000 | [diff] [blame] | 609 | // All GOMP_4.0 symbols |
Jonathan Peyton | 3041982 | 2017-05-12 18:01:32 +0000 | [diff] [blame] | 610 | // TODO: As of 2013-10-14, none of the GOMP_4.0 functions are implemented in |
| 611 | // libomp |
| 612 | #define KMP_API_NAME_GOMP_BARRIER_CANCEL GOMP_barrier_cancel |
| 613 | #define KMP_API_NAME_GOMP_CANCEL GOMP_cancel |
| 614 | #define KMP_API_NAME_GOMP_CANCELLATION_POINT GOMP_cancellation_point |
| 615 | #define KMP_API_NAME_GOMP_LOOP_END_CANCEL GOMP_loop_end_cancel |
| 616 | #define KMP_API_NAME_GOMP_PARALLEL_LOOP_DYNAMIC GOMP_parallel_loop_dynamic |
| 617 | #define KMP_API_NAME_GOMP_PARALLEL_LOOP_GUIDED GOMP_parallel_loop_guided |
| 618 | #define KMP_API_NAME_GOMP_PARALLEL_LOOP_RUNTIME GOMP_parallel_loop_runtime |
| 619 | #define KMP_API_NAME_GOMP_PARALLEL_LOOP_STATIC GOMP_parallel_loop_static |
| 620 | #define KMP_API_NAME_GOMP_PARALLEL_SECTIONS GOMP_parallel_sections |
| 621 | #define KMP_API_NAME_GOMP_PARALLEL GOMP_parallel |
| 622 | #define KMP_API_NAME_GOMP_SECTIONS_END_CANCEL GOMP_sections_end_cancel |
| 623 | #define KMP_API_NAME_GOMP_TASKGROUP_START GOMP_taskgroup_start |
| 624 | #define KMP_API_NAME_GOMP_TASKGROUP_END GOMP_taskgroup_end |
Jim Cownie | 181b4bb | 2013-12-23 17:28:57 +0000 | [diff] [blame] | 625 | /* Target functions should be taken care of by liboffload */ |
Jonathan Peyton | 3041982 | 2017-05-12 18:01:32 +0000 | [diff] [blame] | 626 | #define KMP_API_NAME_GOMP_TARGET GOMP_target |
| 627 | #define KMP_API_NAME_GOMP_TARGET_DATA GOMP_target_data |
| 628 | #define KMP_API_NAME_GOMP_TARGET_END_DATA GOMP_target_end_data |
| 629 | #define KMP_API_NAME_GOMP_TARGET_UPDATE GOMP_target_update |
| 630 | #define KMP_API_NAME_GOMP_TEAMS GOMP_teams |
Jim Cownie | 181b4bb | 2013-12-23 17:28:57 +0000 | [diff] [blame] | 631 | |
Jonathan Peyton | 27a677f | 2018-04-18 19:23:54 +0000 | [diff] [blame] | 632 | // All GOMP_4.5 symbols |
| 633 | #define KMP_API_NAME_GOMP_TASKLOOP GOMP_taskloop |
| 634 | #define KMP_API_NAME_GOMP_TASKLOOP_ULL GOMP_taskloop_ull |
Jonathan Peyton | 369d72d | 2018-07-30 17:48:33 +0000 | [diff] [blame] | 635 | #define KMP_API_NAME_GOMP_DOACROSS_POST GOMP_doacross_post |
| 636 | #define KMP_API_NAME_GOMP_DOACROSS_WAIT GOMP_doacross_wait |
| 637 | #define KMP_API_NAME_GOMP_LOOP_DOACROSS_STATIC_START \ |
| 638 | GOMP_loop_doacross_static_start |
| 639 | #define KMP_API_NAME_GOMP_LOOP_DOACROSS_DYNAMIC_START \ |
| 640 | GOMP_loop_doacross_dynamic_start |
| 641 | #define KMP_API_NAME_GOMP_LOOP_DOACROSS_GUIDED_START \ |
| 642 | GOMP_loop_doacross_guided_start |
| 643 | #define KMP_API_NAME_GOMP_LOOP_DOACROSS_RUNTIME_START \ |
| 644 | GOMP_loop_doacross_runtime_start |
| 645 | #define KMP_API_NAME_GOMP_DOACROSS_ULL_POST GOMP_doacross_ull_post |
| 646 | #define KMP_API_NAME_GOMP_DOACROSS_ULL_WAIT GOMP_doacross_ull_wait |
| 647 | #define KMP_API_NAME_GOMP_LOOP_ULL_DOACROSS_STATIC_START \ |
| 648 | GOMP_loop_ull_doacross_static_start |
| 649 | #define KMP_API_NAME_GOMP_LOOP_ULL_DOACROSS_DYNAMIC_START \ |
| 650 | GOMP_loop_ull_doacross_dynamic_start |
| 651 | #define KMP_API_NAME_GOMP_LOOP_ULL_DOACROSS_GUIDED_START \ |
| 652 | GOMP_loop_ull_doacross_guided_start |
| 653 | #define KMP_API_NAME_GOMP_LOOP_ULL_DOACROSS_RUNTIME_START \ |
| 654 | GOMP_loop_ull_doacross_runtime_start |
Jonathan Peyton | 27a677f | 2018-04-18 19:23:54 +0000 | [diff] [blame] | 655 | |
Jim Cownie | 5e8470a | 2013-09-27 10:38:44 +0000 | [diff] [blame] | 656 | #endif /* KMP_FTN_OS_H */ |