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 | 181b4bb | 2013-12-23 17:28:57 +0000 | [diff] [blame^] | 3 | * $Revision: 42745 $ |
| 4 | * $Date: 2013-10-14 17:02:04 -0500 (Mon, 14 Oct 2013) $ |
Jim Cownie | 5e8470a | 2013-09-27 10:38:44 +0000 | [diff] [blame] | 5 | */ |
| 6 | |
| 7 | |
| 8 | //===----------------------------------------------------------------------===// |
| 9 | // |
| 10 | // The LLVM Compiler Infrastructure |
| 11 | // |
| 12 | // This file is dual licensed under the MIT and the University of Illinois Open |
| 13 | // Source Licenses. See LICENSE.txt for details. |
| 14 | // |
| 15 | //===----------------------------------------------------------------------===// |
| 16 | |
| 17 | |
| 18 | #ifndef KMP_FTN_OS_H |
| 19 | #define KMP_FTN_OS_H |
| 20 | |
| 21 | // KMP_FNT_ENTRIES may be one of: KMP_FTN_PLAIN, KMP_FTN_UPPER, KMP_FTN_APPEND, KMP_FTN_UAPPEND. |
| 22 | |
| 23 | |
| 24 | /* -------------------------- External definitions ------------------------ */ |
| 25 | |
| 26 | #if KMP_FTN_ENTRIES == KMP_FTN_PLAIN |
| 27 | |
| 28 | #define FTN_SET_STACKSIZE kmp_set_stacksize |
| 29 | #define FTN_SET_STACKSIZE_S kmp_set_stacksize_s |
| 30 | #define FTN_GET_STACKSIZE kmp_get_stacksize |
| 31 | #define FTN_GET_STACKSIZE_S kmp_get_stacksize_s |
| 32 | #define FTN_SET_BLOCKTIME kmp_set_blocktime |
| 33 | #define FTN_GET_BLOCKTIME kmp_get_blocktime |
| 34 | #define FTN_SET_LIBRARY_SERIAL kmp_set_library_serial |
| 35 | #define FTN_SET_LIBRARY_TURNAROUND kmp_set_library_turnaround |
| 36 | #define FTN_SET_LIBRARY_THROUGHPUT kmp_set_library_throughput |
| 37 | #define FTN_SET_LIBRARY kmp_set_library |
| 38 | #define FTN_GET_LIBRARY kmp_get_library |
| 39 | #define FTN_SET_DEFAULTS kmp_set_defaults |
| 40 | #define FTN_SET_AFFINITY kmp_set_affinity |
| 41 | #define FTN_GET_AFFINITY kmp_get_affinity |
| 42 | #define FTN_GET_AFFINITY_MAX_PROC kmp_get_affinity_max_proc |
| 43 | #define FTN_CREATE_AFFINITY_MASK kmp_create_affinity_mask |
| 44 | #define FTN_DESTROY_AFFINITY_MASK kmp_destroy_affinity_mask |
| 45 | #define FTN_SET_AFFINITY_MASK_PROC kmp_set_affinity_mask_proc |
| 46 | #define FTN_UNSET_AFFINITY_MASK_PROC kmp_unset_affinity_mask_proc |
| 47 | #define FTN_GET_AFFINITY_MASK_PROC kmp_get_affinity_mask_proc |
| 48 | |
| 49 | #define FTN_MALLOC kmp_malloc |
| 50 | #define FTN_CALLOC kmp_calloc |
| 51 | #define FTN_REALLOC kmp_realloc |
| 52 | #define FTN_FREE kmp_free |
| 53 | |
| 54 | #define FTN_GET_NUM_KNOWN_THREADS kmp_get_num_known_threads |
| 55 | |
| 56 | #define FTN_SET_NUM_THREADS omp_set_num_threads |
| 57 | #define FTN_GET_NUM_THREADS omp_get_num_threads |
| 58 | #define FTN_GET_MAX_THREADS omp_get_max_threads |
| 59 | #define FTN_GET_THREAD_NUM omp_get_thread_num |
| 60 | #define FTN_GET_NUM_PROCS omp_get_num_procs |
| 61 | #define FTN_SET_DYNAMIC omp_set_dynamic |
| 62 | #define FTN_GET_DYNAMIC omp_get_dynamic |
| 63 | #define FTN_SET_NESTED omp_set_nested |
| 64 | #define FTN_GET_NESTED omp_get_nested |
| 65 | #define FTN_IN_PARALLEL omp_in_parallel |
| 66 | #define FTN_GET_THREAD_LIMIT omp_get_thread_limit |
| 67 | #define FTN_SET_SCHEDULE omp_set_schedule |
| 68 | #define FTN_GET_SCHEDULE omp_get_schedule |
| 69 | #define FTN_SET_MAX_ACTIVE_LEVELS omp_set_max_active_levels |
| 70 | #define FTN_GET_MAX_ACTIVE_LEVELS omp_get_max_active_levels |
| 71 | #define FTN_GET_ACTIVE_LEVEL omp_get_active_level |
| 72 | #define FTN_GET_LEVEL omp_get_level |
| 73 | #define FTN_GET_ANCESTOR_THREAD_NUM omp_get_ancestor_thread_num |
| 74 | #define FTN_GET_TEAM_SIZE omp_get_team_size |
| 75 | #define FTN_IN_FINAL omp_in_final |
| 76 | // #define FTN_SET_PROC_BIND omp_set_proc_bind |
| 77 | #define FTN_GET_PROC_BIND omp_get_proc_bind |
| 78 | // #define FTN_CURR_PROC_BIND omp_curr_proc_bind |
| 79 | #if OMP_40_ENABLED |
| 80 | #define FTN_GET_NUM_TEAMS omp_get_num_teams |
| 81 | #define FTN_GET_TEAM_NUM omp_get_team_num |
| 82 | #endif |
| 83 | #define FTN_INIT_LOCK omp_init_lock |
| 84 | #define FTN_DESTROY_LOCK omp_destroy_lock |
| 85 | #define FTN_SET_LOCK omp_set_lock |
| 86 | #define FTN_UNSET_LOCK omp_unset_lock |
| 87 | #define FTN_TEST_LOCK omp_test_lock |
| 88 | #define FTN_INIT_NEST_LOCK omp_init_nest_lock |
| 89 | #define FTN_DESTROY_NEST_LOCK omp_destroy_nest_lock |
| 90 | #define FTN_SET_NEST_LOCK omp_set_nest_lock |
| 91 | #define FTN_UNSET_NEST_LOCK omp_unset_nest_lock |
| 92 | #define FTN_TEST_NEST_LOCK omp_test_nest_lock |
| 93 | |
| 94 | #define FTN_SET_WARNINGS_ON kmp_set_warnings_on |
| 95 | #define FTN_SET_WARNINGS_OFF kmp_set_warnings_off |
| 96 | |
| 97 | #define FTN_GET_WTIME omp_get_wtime |
| 98 | #define FTN_GET_WTICK omp_get_wtick |
| 99 | |
| 100 | #if OMP_40_ENABLED |
| 101 | #if KMP_MIC || KMP_OS_DARWIN |
| 102 | #define FTN_GET_DEFAULT_DEVICE omp_get_default_device |
| 103 | #define FTN_SET_DEFAULT_DEVICE omp_set_default_device |
| 104 | #define FTN_GET_NUM_DEVICES omp_get_num_devices |
| 105 | #endif |
| 106 | #endif |
| 107 | |
Jim Cownie | 181b4bb | 2013-12-23 17:28:57 +0000 | [diff] [blame^] | 108 | #if OMP_40_ENABLED |
| 109 | #define FTN_GET_CANCELLATION omp_get_cancellation |
| 110 | #define FTN_GET_CANCELLATION_STATUS kmp_get_cancellation_status |
| 111 | #endif |
| 112 | |
Jim Cownie | 5e8470a | 2013-09-27 10:38:44 +0000 | [diff] [blame] | 113 | #endif /* KMP_FTN_PLAIN */ |
| 114 | |
| 115 | /* ------------------------------------------------------------------------ */ |
| 116 | |
| 117 | #if KMP_FTN_ENTRIES == KMP_FTN_APPEND |
| 118 | |
| 119 | #define FTN_SET_STACKSIZE kmp_set_stacksize_ |
| 120 | #define FTN_SET_STACKSIZE_S kmp_set_stacksize_s_ |
| 121 | #define FTN_GET_STACKSIZE kmp_get_stacksize_ |
| 122 | #define FTN_GET_STACKSIZE_S kmp_get_stacksize_s_ |
| 123 | #define FTN_SET_BLOCKTIME kmp_set_blocktime_ |
| 124 | #define FTN_GET_BLOCKTIME kmp_get_blocktime_ |
| 125 | #define FTN_SET_LIBRARY_SERIAL kmp_set_library_serial_ |
| 126 | #define FTN_SET_LIBRARY_TURNAROUND kmp_set_library_turnaround_ |
| 127 | #define FTN_SET_LIBRARY_THROUGHPUT kmp_set_library_throughput_ |
| 128 | #define FTN_SET_LIBRARY kmp_set_library_ |
| 129 | #define FTN_GET_LIBRARY kmp_get_library_ |
| 130 | #define FTN_SET_DEFAULTS kmp_set_defaults_ |
| 131 | #define FTN_SET_AFFINITY kmp_set_affinity_ |
| 132 | #define FTN_GET_AFFINITY kmp_get_affinity_ |
| 133 | #define FTN_GET_AFFINITY_MAX_PROC kmp_get_affinity_max_proc_ |
| 134 | #define FTN_CREATE_AFFINITY_MASK kmp_create_affinity_mask_ |
| 135 | #define FTN_DESTROY_AFFINITY_MASK kmp_destroy_affinity_mask_ |
| 136 | #define FTN_SET_AFFINITY_MASK_PROC kmp_set_affinity_mask_proc_ |
| 137 | #define FTN_UNSET_AFFINITY_MASK_PROC kmp_unset_affinity_mask_proc_ |
| 138 | #define FTN_GET_AFFINITY_MASK_PROC kmp_get_affinity_mask_proc_ |
| 139 | |
| 140 | #define FTN_MALLOC kmp_malloc_ |
| 141 | #define FTN_CALLOC kmp_calloc_ |
| 142 | #define FTN_REALLOC kmp_realloc_ |
| 143 | #define FTN_FREE kmp_free_ |
| 144 | |
| 145 | #define FTN_GET_NUM_KNOWN_THREADS kmp_get_num_known_threads_ |
| 146 | |
| 147 | #define FTN_SET_NUM_THREADS omp_set_num_threads_ |
| 148 | #define FTN_GET_NUM_THREADS omp_get_num_threads_ |
| 149 | #define FTN_GET_MAX_THREADS omp_get_max_threads_ |
| 150 | #define FTN_GET_THREAD_NUM omp_get_thread_num_ |
| 151 | #define FTN_GET_NUM_PROCS omp_get_num_procs_ |
| 152 | #define FTN_SET_DYNAMIC omp_set_dynamic_ |
| 153 | #define FTN_GET_DYNAMIC omp_get_dynamic_ |
| 154 | #define FTN_SET_NESTED omp_set_nested_ |
| 155 | #define FTN_GET_NESTED omp_get_nested_ |
| 156 | #define FTN_IN_PARALLEL omp_in_parallel_ |
| 157 | #define FTN_GET_THREAD_LIMIT omp_get_thread_limit_ |
| 158 | #define FTN_SET_SCHEDULE omp_set_schedule_ |
| 159 | #define FTN_GET_SCHEDULE omp_get_schedule_ |
| 160 | #define FTN_SET_MAX_ACTIVE_LEVELS omp_set_max_active_levels_ |
| 161 | #define FTN_GET_MAX_ACTIVE_LEVELS omp_get_max_active_levels_ |
| 162 | #define FTN_GET_ACTIVE_LEVEL omp_get_active_level_ |
| 163 | #define FTN_GET_LEVEL omp_get_level_ |
| 164 | #define FTN_GET_ANCESTOR_THREAD_NUM omp_get_ancestor_thread_num_ |
| 165 | #define FTN_GET_TEAM_SIZE omp_get_team_size_ |
| 166 | #define FTN_IN_FINAL omp_in_final_ |
| 167 | // #define FTN_SET_PROC_BIND omp_set_proc_bind_ |
| 168 | #define FTN_GET_PROC_BIND omp_get_proc_bind_ |
| 169 | // #define FTN_CURR_PROC_BIND omp_curr_proc_bind_ |
| 170 | #if OMP_40_ENABLED |
| 171 | #define FTN_GET_NUM_TEAMS omp_get_num_teams_ |
| 172 | #define FTN_GET_TEAM_NUM omp_get_team_num_ |
| 173 | #endif |
| 174 | #define FTN_INIT_LOCK omp_init_lock_ |
| 175 | #define FTN_DESTROY_LOCK omp_destroy_lock_ |
| 176 | #define FTN_SET_LOCK omp_set_lock_ |
| 177 | #define FTN_UNSET_LOCK omp_unset_lock_ |
| 178 | #define FTN_TEST_LOCK omp_test_lock_ |
| 179 | #define FTN_INIT_NEST_LOCK omp_init_nest_lock_ |
| 180 | #define FTN_DESTROY_NEST_LOCK omp_destroy_nest_lock_ |
| 181 | #define FTN_SET_NEST_LOCK omp_set_nest_lock_ |
| 182 | #define FTN_UNSET_NEST_LOCK omp_unset_nest_lock_ |
| 183 | #define FTN_TEST_NEST_LOCK omp_test_nest_lock_ |
| 184 | |
| 185 | #define FTN_SET_WARNINGS_ON kmp_set_warnings_on_ |
| 186 | #define FTN_SET_WARNINGS_OFF kmp_set_warnings_off_ |
| 187 | |
| 188 | #define FTN_GET_WTIME omp_get_wtime_ |
| 189 | #define FTN_GET_WTICK omp_get_wtick_ |
| 190 | |
| 191 | #if OMP_40_ENABLED |
| 192 | #if KMP_MIC || KMP_OS_DARWIN |
| 193 | #define FTN_GET_DEFAULT_DEVICE omp_get_default_device_ |
| 194 | #define FTN_SET_DEFAULT_DEVICE omp_set_default_device_ |
| 195 | #define FTN_GET_NUM_DEVICES omp_get_num_devices_ |
| 196 | #endif |
| 197 | #endif |
| 198 | |
| 199 | |
Jim Cownie | 181b4bb | 2013-12-23 17:28:57 +0000 | [diff] [blame^] | 200 | #if OMP_40_ENABLED |
| 201 | #define FTN_GET_CANCELLATION omp_get_cancellation_ |
| 202 | #define FTN_GET_CANCELLATION_STATUS kmp_get_cancellation_status_ |
| 203 | #endif |
| 204 | |
Jim Cownie | 5e8470a | 2013-09-27 10:38:44 +0000 | [diff] [blame] | 205 | #endif /* KMP_FTN_APPEND */ |
| 206 | |
| 207 | /* ------------------------------------------------------------------------ */ |
| 208 | |
| 209 | #if KMP_FTN_ENTRIES == KMP_FTN_UPPER |
| 210 | |
| 211 | #define FTN_SET_STACKSIZE KMP_SET_STACKSIZE |
| 212 | #define FTN_SET_STACKSIZE_S KMP_SET_STACKSIZE_S |
| 213 | #define FTN_GET_STACKSIZE KMP_GET_STACKSIZE |
| 214 | #define FTN_GET_STACKSIZE_S KMP_GET_STACKSIZE_S |
| 215 | #define FTN_SET_BLOCKTIME KMP_SET_BLOCKTIME |
| 216 | #define FTN_GET_BLOCKTIME KMP_GET_BLOCKTIME |
| 217 | #define FTN_SET_LIBRARY_SERIAL KMP_SET_LIBRARY_SERIAL |
| 218 | #define FTN_SET_LIBRARY_TURNAROUND KMP_SET_LIBRARY_TURNAROUND |
| 219 | #define FTN_SET_LIBRARY_THROUGHPUT KMP_SET_LIBRARY_THROUGHPUT |
| 220 | #define FTN_SET_LIBRARY KMP_SET_LIBRARY |
| 221 | #define FTN_GET_LIBRARY KMP_GET_LIBRARY |
| 222 | #define FTN_SET_DEFAULTS KMP_SET_DEFAULTS |
| 223 | #define FTN_SET_AFFINITY KMP_SET_AFFINITY |
| 224 | #define FTN_GET_AFFINITY KMP_GET_AFFINITY |
| 225 | #define FTN_GET_AFFINITY_MAX_PROC KMP_GET_AFFINITY_MAX_PROC |
| 226 | #define FTN_CREATE_AFFINITY_MASK KMP_CREATE_AFFINITY_MASK |
| 227 | #define FTN_DESTROY_AFFINITY_MASK KMP_DESTROY_AFFINITY_MASK |
| 228 | #define FTN_SET_AFFINITY_MASK_PROC KMP_SET_AFFINITY_MASK_PROC |
| 229 | #define FTN_UNSET_AFFINITY_MASK_PROC KMP_UNSET_AFFINITY_MASK_PROC |
| 230 | #define FTN_GET_AFFINITY_MASK_PROC KMP_GET_AFFINITY_MASK_PROC |
| 231 | |
| 232 | #define FTN_MALLOC KMP_MALLOC |
| 233 | #define FTN_CALLOC KMP_CALLOC |
| 234 | #define FTN_REALLOC KMP_REALLOC |
| 235 | #define FTN_FREE KMP_FREE |
| 236 | |
| 237 | #define FTN_GET_NUM_KNOWN_THREADS KMP_GET_NUM_KNOWN_THREADS |
| 238 | |
| 239 | #define FTN_SET_NUM_THREADS OMP_SET_NUM_THREADS |
| 240 | #define FTN_GET_NUM_THREADS OMP_GET_NUM_THREADS |
| 241 | #define FTN_GET_MAX_THREADS OMP_GET_MAX_THREADS |
| 242 | #define FTN_GET_THREAD_NUM OMP_GET_THREAD_NUM |
| 243 | #define FTN_GET_NUM_PROCS OMP_GET_NUM_PROCS |
| 244 | #define FTN_SET_DYNAMIC OMP_SET_DYNAMIC |
| 245 | #define FTN_GET_DYNAMIC OMP_GET_DYNAMIC |
| 246 | #define FTN_SET_NESTED OMP_SET_NESTED |
| 247 | #define FTN_GET_NESTED OMP_GET_NESTED |
| 248 | #define FTN_IN_PARALLEL OMP_IN_PARALLEL |
| 249 | #define FTN_GET_THREAD_LIMIT OMP_GET_THREAD_LIMIT |
| 250 | #define FTN_SET_SCHEDULE OMP_SET_SCHEDULE |
| 251 | #define FTN_GET_SCHEDULE OMP_GET_SCHEDULE |
| 252 | #define FTN_SET_MAX_ACTIVE_LEVELS OMP_SET_MAX_ACTIVE_LEVELS |
| 253 | #define FTN_GET_MAX_ACTIVE_LEVELS OMP_GET_MAX_ACTIVE_LEVELS |
| 254 | #define FTN_GET_ACTIVE_LEVEL OMP_GET_ACTIVE_LEVEL |
| 255 | #define FTN_GET_LEVEL OMP_GET_LEVEL |
| 256 | #define FTN_GET_ANCESTOR_THREAD_NUM OMP_GET_ANCESTOR_THREAD_NUM |
| 257 | #define FTN_GET_TEAM_SIZE OMP_GET_TEAM_SIZE |
| 258 | #define FTN_IN_FINAL OMP_IN_FINAL |
| 259 | // #define FTN_SET_PROC_BIND OMP_SET_PROC_BIND |
| 260 | #define FTN_GET_PROC_BIND OMP_GET_PROC_BIND |
| 261 | // #define FTN_CURR_PROC_BIND OMP_CURR_PROC_BIND |
| 262 | #if OMP_40_ENABLED |
| 263 | #define FTN_GET_NUM_TEAMS OMP_GET_NUM_TEAMS |
| 264 | #define FTN_GET_TEAM_NUM OMP_GET_TEAM_NUM |
| 265 | #endif |
| 266 | #define FTN_INIT_LOCK OMP_INIT_LOCK |
| 267 | #define FTN_DESTROY_LOCK OMP_DESTROY_LOCK |
| 268 | #define FTN_SET_LOCK OMP_SET_LOCK |
| 269 | #define FTN_UNSET_LOCK OMP_UNSET_LOCK |
| 270 | #define FTN_TEST_LOCK OMP_TEST_LOCK |
| 271 | #define FTN_INIT_NEST_LOCK OMP_INIT_NEST_LOCK |
| 272 | #define FTN_DESTROY_NEST_LOCK OMP_DESTROY_NEST_LOCK |
| 273 | #define FTN_SET_NEST_LOCK OMP_SET_NEST_LOCK |
| 274 | #define FTN_UNSET_NEST_LOCK OMP_UNSET_NEST_LOCK |
| 275 | #define FTN_TEST_NEST_LOCK OMP_TEST_NEST_LOCK |
| 276 | |
| 277 | #define FTN_SET_WARNINGS_ON KMP_SET_WARNINGS_ON |
| 278 | #define FTN_SET_WARNINGS_OFF KMP_SET_WARNINGS_OFF |
| 279 | |
| 280 | #define FTN_GET_WTIME OMP_GET_WTIME |
| 281 | #define FTN_GET_WTICK OMP_GET_WTICK |
| 282 | |
| 283 | #if OMP_40_ENABLED |
| 284 | #if KMP_MIC || KMP_OS_DARWIN |
| 285 | #define FTN_GET_DEFAULT_DEVICE OMP_GET_DEFAULT_DEVICE |
| 286 | #define FTN_SET_DEFAULT_DEVICE OMP_SET_DEFAULT_DEVICE |
| 287 | #define FTN_GET_NUM_DEVICES OMP_GET_NUM_DEVICES |
| 288 | #endif |
| 289 | #endif |
| 290 | |
| 291 | |
Jim Cownie | 181b4bb | 2013-12-23 17:28:57 +0000 | [diff] [blame^] | 292 | #if OMP_40_ENABLED |
| 293 | #define FTN_GET_CANCELLATION OMP_GET_CANCELLATION |
| 294 | #define FTN_GET_CANCELLATION_STATUS KMP_GET_CANCELLATION_STATUS |
| 295 | #endif |
| 296 | |
Jim Cownie | 5e8470a | 2013-09-27 10:38:44 +0000 | [diff] [blame] | 297 | #endif /* KMP_FTN_UPPER */ |
| 298 | |
| 299 | /* ------------------------------------------------------------------------ */ |
| 300 | |
| 301 | #if KMP_FTN_ENTRIES == KMP_FTN_UAPPEND |
| 302 | |
| 303 | #define FTN_SET_STACKSIZE KMP_SET_STACKSIZE_ |
| 304 | #define FTN_SET_STACKSIZE_S KMP_SET_STACKSIZE_S_ |
| 305 | #define FTN_GET_STACKSIZE KMP_GET_STACKSIZE_ |
| 306 | #define FTN_GET_STACKSIZE_S KMP_GET_STACKSIZE_S_ |
| 307 | #define FTN_SET_BLOCKTIME KMP_SET_BLOCKTIME_ |
| 308 | #define FTN_GET_BLOCKTIME KMP_GET_BLOCKTIME_ |
| 309 | #define FTN_SET_LIBRARY_SERIAL KMP_SET_LIBRARY_SERIAL_ |
| 310 | #define FTN_SET_LIBRARY_TURNAROUND KMP_SET_LIBRARY_TURNAROUND_ |
| 311 | #define FTN_SET_LIBRARY_THROUGHPUT KMP_SET_LIBRARY_THROUGHPUT_ |
| 312 | #define FTN_SET_LIBRARY KMP_SET_LIBRARY_ |
| 313 | #define FTN_GET_LIBRARY KMP_GET_LIBRARY_ |
| 314 | #define FTN_SET_DEFAULTS KMP_SET_DEFAULTS_ |
| 315 | #define FTN_SET_AFFINITY KMP_SET_AFFINITY_ |
| 316 | #define FTN_GET_AFFINITY KMP_GET_AFFINITY_ |
| 317 | #define FTN_GET_AFFINITY_MAX_PROC KMP_GET_AFFINITY_MAX_PROC_ |
| 318 | #define FTN_CREATE_AFFINITY_MASK KMP_CREATE_AFFINITY_MASK_ |
| 319 | #define FTN_DESTROY_AFFINITY_MASK KMP_DESTROY_AFFINITY_MASK_ |
| 320 | #define FTN_SET_AFFINITY_MASK_PROC KMP_SET_AFFINITY_MASK_PROC_ |
| 321 | #define FTN_UNSET_AFFINITY_MASK_PROC KMP_UNSET_AFFINITY_MASK_PROC_ |
| 322 | #define FTN_GET_AFFINITY_MASK_PROC KMP_GET_AFFINITY_MASK_PROC_ |
| 323 | |
| 324 | #define FTN_MALLOC KMP_MALLOC_ |
| 325 | #define FTN_CALLOC KMP_CALLOC_ |
| 326 | #define FTN_REALLOC KMP_REALLOC_ |
| 327 | #define FTN_FREE KMP_FREE_ |
| 328 | |
| 329 | #define FTN_GET_NUM_KNOWN_THREADS KMP_GET_NUM_KNOWN_THREADS_ |
| 330 | |
| 331 | #define FTN_SET_NUM_THREADS OMP_SET_NUM_THREADS_ |
| 332 | #define FTN_GET_NUM_THREADS OMP_GET_NUM_THREADS_ |
| 333 | #define FTN_GET_MAX_THREADS OMP_GET_MAX_THREADS_ |
| 334 | #define FTN_GET_THREAD_NUM OMP_GET_THREAD_NUM_ |
| 335 | #define FTN_GET_NUM_PROCS OMP_GET_NUM_PROCS_ |
| 336 | #define FTN_SET_DYNAMIC OMP_SET_DYNAMIC_ |
| 337 | #define FTN_GET_DYNAMIC OMP_GET_DYNAMIC_ |
| 338 | #define FTN_SET_NESTED OMP_SET_NESTED_ |
| 339 | #define FTN_GET_NESTED OMP_GET_NESTED_ |
| 340 | #define FTN_IN_PARALLEL OMP_IN_PARALLEL_ |
| 341 | #define FTN_GET_THREAD_LIMIT OMP_GET_THREAD_LIMIT_ |
| 342 | #define FTN_SET_SCHEDULE OMP_SET_SCHEDULE_ |
| 343 | #define FTN_GET_SCHEDULE OMP_GET_SCHEDULE_ |
| 344 | #define FTN_SET_MAX_ACTIVE_LEVELS OMP_SET_MAX_ACTIVE_LEVELS_ |
| 345 | #define FTN_GET_MAX_ACTIVE_LEVELS OMP_GET_MAX_ACTIVE_LEVELS_ |
| 346 | #define FTN_GET_ACTIVE_LEVEL OMP_GET_ACTIVE_LEVEL_ |
| 347 | #define FTN_GET_LEVEL OMP_GET_LEVEL_ |
| 348 | #define FTN_GET_ANCESTOR_THREAD_NUM OMP_GET_ANCESTOR_THREAD_NUM_ |
| 349 | #define FTN_GET_TEAM_SIZE OMP_GET_TEAM_SIZE_ |
| 350 | #define FTN_IN_FINAL OMP_IN_FINAL_ |
| 351 | // #define FTN_SET_PROC_BIND OMP_SET_PROC_BIND_ |
| 352 | #define FTN_GET_PROC_BIND OMP_GET_PROC_BIND_ |
| 353 | // #define FTN_CURR_PROC_BIND OMP_CURR_PROC_BIND_ |
| 354 | #if OMP_40_ENABLED |
| 355 | #define FTN_GET_NUM_TEAMS OMP_GET_NUM_TEAMS_ |
| 356 | #define FTN_GET_TEAM_NUM OMP_GET_TEAM_NUM_ |
| 357 | #endif |
| 358 | #define FTN_INIT_LOCK OMP_INIT_LOCK_ |
| 359 | #define FTN_DESTROY_LOCK OMP_DESTROY_LOCK_ |
| 360 | #define FTN_SET_LOCK OMP_SET_LOCK_ |
| 361 | #define FTN_UNSET_LOCK OMP_UNSET_LOCK_ |
| 362 | #define FTN_TEST_LOCK OMP_TEST_LOCK_ |
| 363 | #define FTN_INIT_NEST_LOCK OMP_INIT_NEST_LOCK_ |
| 364 | #define FTN_DESTROY_NEST_LOCK OMP_DESTROY_NEST_LOCK_ |
| 365 | #define FTN_SET_NEST_LOCK OMP_SET_NEST_LOCK_ |
| 366 | #define FTN_UNSET_NEST_LOCK OMP_UNSET_NEST_LOCK_ |
| 367 | #define FTN_TEST_NEST_LOCK OMP_TEST_NEST_LOCK_ |
| 368 | |
| 369 | #define FTN_SET_WARNINGS_ON KMP_SET_WARNINGS_ON_ |
| 370 | #define FTN_SET_WARNINGS_OFF KMP_SET_WARNINGS_OFF_ |
| 371 | |
| 372 | #define FTN_GET_WTIME OMP_GET_WTIME_ |
| 373 | #define FTN_GET_WTICK OMP_GET_WTICK_ |
| 374 | |
| 375 | #if OMP_40_ENABLED |
| 376 | #if KMP_MIC || KMP_OS_DARWIN |
| 377 | #define FTN_GET_DEFAULT_DEVICE OMP_GET_DEFAULT_DEVICE_ |
| 378 | #define FTN_SET_DEFAULT_DEVICE OMP_SET_DEFAULT_DEVICE_ |
| 379 | #define FTN_GET_NUM_DEVICES OMP_GET_NUM_DEVICES_ |
| 380 | #endif |
| 381 | #endif |
| 382 | |
| 383 | |
Jim Cownie | 181b4bb | 2013-12-23 17:28:57 +0000 | [diff] [blame^] | 384 | #if OMP_40_ENABLED |
| 385 | #define FTN_GET_CANCELLATION OMP_GET_CANCELLATION_ |
| 386 | #define FTN_GET_CANCELLATION_STATUS KMP_GET_CANCELLATION_STATUS_ |
| 387 | #endif |
| 388 | |
Jim Cownie | 5e8470a | 2013-09-27 10:38:44 +0000 | [diff] [blame] | 389 | #endif /* KMP_FTN_UAPPEND */ |
| 390 | |
Jim Cownie | 181b4bb | 2013-12-23 17:28:57 +0000 | [diff] [blame^] | 391 | /* ------------------------------------------------------------------ */ |
| 392 | /* -------------------------- GOMP API NAMES ------------------------ */ |
| 393 | // All GOMP_1.0 symbols |
| 394 | #define KMP_API_NAME_GOMP_ATOMIC_END GOMP_atomic_end |
| 395 | #define KMP_API_NAME_GOMP_ATOMIC_START GOMP_atomic_start |
| 396 | #define KMP_API_NAME_GOMP_BARRIER GOMP_barrier |
| 397 | #define KMP_API_NAME_GOMP_CRITICAL_END GOMP_critical_end |
| 398 | #define KMP_API_NAME_GOMP_CRITICAL_NAME_END GOMP_critical_name_end |
| 399 | #define KMP_API_NAME_GOMP_CRITICAL_NAME_START GOMP_critical_name_start |
| 400 | #define KMP_API_NAME_GOMP_CRITICAL_START GOMP_critical_start |
| 401 | #define KMP_API_NAME_GOMP_LOOP_DYNAMIC_NEXT GOMP_loop_dynamic_next |
| 402 | #define KMP_API_NAME_GOMP_LOOP_DYNAMIC_START GOMP_loop_dynamic_start |
| 403 | #define KMP_API_NAME_GOMP_LOOP_END GOMP_loop_end |
| 404 | #define KMP_API_NAME_GOMP_LOOP_END_NOWAIT GOMP_loop_end_nowait |
| 405 | #define KMP_API_NAME_GOMP_LOOP_GUIDED_NEXT GOMP_loop_guided_next |
| 406 | #define KMP_API_NAME_GOMP_LOOP_GUIDED_START GOMP_loop_guided_start |
| 407 | #define KMP_API_NAME_GOMP_LOOP_ORDERED_DYNAMIC_NEXT GOMP_loop_ordered_dynamic_next |
| 408 | #define KMP_API_NAME_GOMP_LOOP_ORDERED_DYNAMIC_START GOMP_loop_ordered_dynamic_start |
| 409 | #define KMP_API_NAME_GOMP_LOOP_ORDERED_GUIDED_NEXT GOMP_loop_ordered_guided_next |
| 410 | #define KMP_API_NAME_GOMP_LOOP_ORDERED_GUIDED_START GOMP_loop_ordered_guided_start |
| 411 | #define KMP_API_NAME_GOMP_LOOP_ORDERED_RUNTIME_NEXT GOMP_loop_ordered_runtime_next |
| 412 | #define KMP_API_NAME_GOMP_LOOP_ORDERED_RUNTIME_START GOMP_loop_ordered_runtime_start |
| 413 | #define KMP_API_NAME_GOMP_LOOP_ORDERED_STATIC_NEXT GOMP_loop_ordered_static_next |
| 414 | #define KMP_API_NAME_GOMP_LOOP_ORDERED_STATIC_START GOMP_loop_ordered_static_start |
| 415 | #define KMP_API_NAME_GOMP_LOOP_RUNTIME_NEXT GOMP_loop_runtime_next |
| 416 | #define KMP_API_NAME_GOMP_LOOP_RUNTIME_START GOMP_loop_runtime_start |
| 417 | #define KMP_API_NAME_GOMP_LOOP_STATIC_NEXT GOMP_loop_static_next |
| 418 | #define KMP_API_NAME_GOMP_LOOP_STATIC_START GOMP_loop_static_start |
| 419 | #define KMP_API_NAME_GOMP_ORDERED_END GOMP_ordered_end |
| 420 | #define KMP_API_NAME_GOMP_ORDERED_START GOMP_ordered_start |
| 421 | #define KMP_API_NAME_GOMP_PARALLEL_END GOMP_parallel_end |
| 422 | #define KMP_API_NAME_GOMP_PARALLEL_LOOP_DYNAMIC_START GOMP_parallel_loop_dynamic_start |
| 423 | #define KMP_API_NAME_GOMP_PARALLEL_LOOP_GUIDED_START GOMP_parallel_loop_guided_start |
| 424 | #define KMP_API_NAME_GOMP_PARALLEL_LOOP_RUNTIME_START GOMP_parallel_loop_runtime_start |
| 425 | #define KMP_API_NAME_GOMP_PARALLEL_LOOP_STATIC_START GOMP_parallel_loop_static_start |
| 426 | #define KMP_API_NAME_GOMP_PARALLEL_SECTIONS_START GOMP_parallel_sections_start |
| 427 | #define KMP_API_NAME_GOMP_PARALLEL_START GOMP_parallel_start |
| 428 | #define KMP_API_NAME_GOMP_SECTIONS_END GOMP_sections_end |
| 429 | #define KMP_API_NAME_GOMP_SECTIONS_END_NOWAIT GOMP_sections_end_nowait |
| 430 | #define KMP_API_NAME_GOMP_SECTIONS_NEXT GOMP_sections_next |
| 431 | #define KMP_API_NAME_GOMP_SECTIONS_START GOMP_sections_start |
| 432 | #define KMP_API_NAME_GOMP_SINGLE_COPY_END GOMP_single_copy_end |
| 433 | #define KMP_API_NAME_GOMP_SINGLE_COPY_START GOMP_single_copy_start |
| 434 | #define KMP_API_NAME_GOMP_SINGLE_START GOMP_single_start |
| 435 | |
| 436 | // All GOMP_2.0 symbols |
| 437 | #define KMP_API_NAME_GOMP_TASK GOMP_task |
| 438 | #define KMP_API_NAME_GOMP_TASKWAIT GOMP_taskwait |
| 439 | #define KMP_API_NAME_GOMP_LOOP_ULL_DYNAMIC_NEXT GOMP_loop_ull_dynamic_next |
| 440 | #define KMP_API_NAME_GOMP_LOOP_ULL_DYNAMIC_START GOMP_loop_ull_dynamic_start |
| 441 | #define KMP_API_NAME_GOMP_LOOP_ULL_GUIDED_NEXT GOMP_loop_ull_guided_next |
| 442 | #define KMP_API_NAME_GOMP_LOOP_ULL_GUIDED_START GOMP_loop_ull_guided_start |
| 443 | #define KMP_API_NAME_GOMP_LOOP_ULL_ORDERED_DYNAMIC_NEXT GOMP_loop_ull_ordered_dynamic_next |
| 444 | #define KMP_API_NAME_GOMP_LOOP_ULL_ORDERED_DYNAMIC_START GOMP_loop_ull_ordered_dynamic_start |
| 445 | #define KMP_API_NAME_GOMP_LOOP_ULL_ORDERED_GUIDED_NEXT GOMP_loop_ull_ordered_guided_next |
| 446 | #define KMP_API_NAME_GOMP_LOOP_ULL_ORDERED_GUIDED_START GOMP_loop_ull_ordered_guided_start |
| 447 | #define KMP_API_NAME_GOMP_LOOP_ULL_ORDERED_RUNTIME_NEXT GOMP_loop_ull_ordered_runtime_next |
| 448 | #define KMP_API_NAME_GOMP_LOOP_ULL_ORDERED_RUNTIME_START GOMP_loop_ull_ordered_runtime_start |
| 449 | #define KMP_API_NAME_GOMP_LOOP_ULL_ORDERED_STATIC_NEXT GOMP_loop_ull_ordered_static_next |
| 450 | #define KMP_API_NAME_GOMP_LOOP_ULL_ORDERED_STATIC_START GOMP_loop_ull_ordered_static_start |
| 451 | #define KMP_API_NAME_GOMP_LOOP_ULL_RUNTIME_NEXT GOMP_loop_ull_runtime_next |
| 452 | #define KMP_API_NAME_GOMP_LOOP_ULL_RUNTIME_START GOMP_loop_ull_runtime_start |
| 453 | #define KMP_API_NAME_GOMP_LOOP_ULL_STATIC_NEXT GOMP_loop_ull_static_next |
| 454 | #define KMP_API_NAME_GOMP_LOOP_ULL_STATIC_START GOMP_loop_ull_static_start |
| 455 | |
| 456 | // All GOMP_3.0 symbols |
| 457 | #define KMP_API_NAME_GOMP_TASKYIELD GOMP_taskyield |
| 458 | |
| 459 | // All GOMP_4.0 symbols |
| 460 | // TODO: As of 2013-10-14, none of the GOMP_4.0 functions are implemented in libiomp5 |
| 461 | #define KMP_API_NAME_GOMP_BARRIER_CANCEL GOMP_barrier_cancel |
| 462 | #define KMP_API_NAME_GOMP_CANCEL GOMP_cancel |
| 463 | #define KMP_API_NAME_GOMP_CANCELLATION_POINT GOMP_cancellation_point |
| 464 | #define KMP_API_NAME_GOMP_LOOP_END_CANCEL GOMP_loop_end_cancel |
| 465 | #define KMP_API_NAME_GOMP_PARALLEL_LOOP_DYNAMIC GOMP_parallel_loop_dynamic |
| 466 | #define KMP_API_NAME_GOMP_PARALLEL_LOOP_GUIDED GOMP_parallel_loop_guided |
| 467 | #define KMP_API_NAME_GOMP_PARALLEL_LOOP_RUNTIME GOMP_parallel_loop_runtime |
| 468 | #define KMP_API_NAME_GOMP_PARALLEL_LOOP_STATIC GOMP_parallel_loop_static |
| 469 | #define KMP_API_NAME_GOMP_PARALLEL_SECTIONS GOMP_parallel_sections |
| 470 | #define KMP_API_NAME_GOMP_PARALLEL GOMP_parallel |
| 471 | #define KMP_API_NAME_GOMP_SECTIONS_END_CANCEL GOMP_sections_end_cancel |
| 472 | #define KMP_API_NAME_GOMP_TASKGROUP_START GOMP_taskgroup_start |
| 473 | #define KMP_API_NAME_GOMP_TASKGROUP_END GOMP_taskgroup_end |
| 474 | /* Target functions should be taken care of by liboffload */ |
| 475 | //#define KMP_API_NAME_GOMP_TARGET GOMP_target |
| 476 | //#define KMP_API_NAME_GOMP_TARGET_DATA GOMP_target_data |
| 477 | //#define KMP_API_NAME_GOMP_TARGET_END_DATA GOMP_target_end_data |
| 478 | //#define KMP_API_NAME_GOMP_TARGET_UPDATE GOMP_target_update |
| 479 | #define KMP_API_NAME_GOMP_TEAMS GOMP_teams |
| 480 | |
| 481 | #if KMP_OS_LINUX |
| 482 | #define xstr(x) str(x) |
| 483 | #define str(x) #x |
| 484 | |
| 485 | // If Linux, xexpand prepends __kmp_api_ to the real API name |
| 486 | #define xexpand(api_name) expand(api_name) |
| 487 | #define expand(api_name) __kmp_api_##api_name |
| 488 | |
| 489 | #define xaliasify(api_name,ver) aliasify(api_name,ver) |
| 490 | #define aliasify(api_name,ver) __typeof__(__kmp_api_##api_name) __kmp_api_##api_name##_##ver##_alias __attribute__((alias(xstr(__kmp_api_##api_name)))) |
| 491 | |
| 492 | #define xversionify(api_name, version_num, version_str) versionify(api_name, version_num, version_str, "VERSION") |
| 493 | #define versionify(api_name, version_num, version_str, default_ver) \ |
| 494 | __asm__(".symver " xstr(__kmp_api_##api_name##_##version_num##_alias) "," xstr(api_name) "@" version_str "\n\t"); \ |
| 495 | __asm__(".symver " xstr(__kmp_api_##api_name) "," xstr(api_name) "@@" default_ver "\n\t") |
| 496 | |
| 497 | #else /* KMP_OS_LINUX */ |
| 498 | #define xstr(x) /* Nothing */ |
| 499 | #define str(x) /* Nothing */ |
| 500 | |
| 501 | // if Windows or Mac, xexpand does no name transformation |
| 502 | #define xexpand(api_name) expand(api_name) |
| 503 | #define expand(api_name) api_name |
| 504 | |
| 505 | #define xaliasify(api_name,ver) /* Nothing */ |
| 506 | #define aliasify(api_name,ver) /* Nothing */ |
| 507 | |
| 508 | #define xversionify(api_name, version_num, version_str) /* Nothing */ |
| 509 | #define versionify(api_name, version_num, version_str, default_ver) /* Nothing */ |
| 510 | |
| 511 | #endif /* KMP_OS_LINUX */ |
| 512 | |
Jim Cownie | 5e8470a | 2013-09-27 10:38:44 +0000 | [diff] [blame] | 513 | #endif /* KMP_FTN_OS_H */ |
| 514 | |