1! include/omp_lib.f90.var 2 3! 4!//===----------------------------------------------------------------------===// 5!// 6!// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 7!// See https://llvm.org/LICENSE.txt for license information. 8!// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 9!// 10!//===----------------------------------------------------------------------===// 11! 12 13 module omp_lib_kinds 14 15 use, intrinsic :: iso_c_binding 16 17 integer, parameter :: omp_integer_kind = c_int 18 integer, parameter :: omp_logical_kind = 4 19 integer, parameter :: omp_real_kind = c_float 20 integer, parameter :: kmp_double_kind = c_double 21 integer, parameter :: omp_lock_kind = c_intptr_t 22 integer, parameter :: omp_nest_lock_kind = c_intptr_t 23 integer, parameter :: omp_sched_kind = omp_integer_kind 24 integer, parameter :: omp_proc_bind_kind = omp_integer_kind 25 integer, parameter :: kmp_pointer_kind = c_intptr_t 26 integer, parameter :: kmp_size_t_kind = c_size_t 27 integer, parameter :: kmp_affinity_mask_kind = c_intptr_t 28 integer, parameter :: kmp_cancel_kind = omp_integer_kind 29 integer, parameter :: omp_sync_hint_kind = omp_integer_kind 30 integer, parameter :: omp_lock_hint_kind = omp_sync_hint_kind 31 integer, parameter :: omp_control_tool_kind = omp_integer_kind 32 integer, parameter :: omp_control_tool_result_kind = omp_integer_kind 33 integer, parameter :: omp_allocator_handle_kind = c_intptr_t 34 integer, parameter :: omp_memspace_handle_kind = c_intptr_t 35 integer, parameter :: omp_alloctrait_key_kind = omp_integer_kind 36 integer, parameter :: omp_alloctrait_val_kind = c_intptr_t 37 38 type omp_alloctrait 39 integer(kind=omp_alloctrait_key_kind) key 40 integer(kind=omp_alloctrait_val_kind) value 41 end type omp_alloctrait 42 43 integer, parameter :: omp_pause_resource_kind = omp_integer_kind 44 integer, parameter :: omp_depend_kind = c_intptr_t 45 integer, parameter :: omp_event_handle_kind = c_intptr_t 46 47 end module omp_lib_kinds 48 49 module omp_lib 50 51 use omp_lib_kinds 52 53 integer (kind=omp_integer_kind), parameter :: openmp_version = @LIBOMP_OMP_YEAR_MONTH@ 54 integer (kind=omp_integer_kind), parameter :: kmp_version_major = @LIBOMP_VERSION_MAJOR@ 55 integer (kind=omp_integer_kind), parameter :: kmp_version_minor = @LIBOMP_VERSION_MINOR@ 56 integer (kind=omp_integer_kind), parameter :: kmp_version_build = @LIBOMP_VERSION_BUILD@ 57 character(*) kmp_build_date 58 parameter( kmp_build_date = '@LIBOMP_BUILD_DATE@' ) 59 60 integer(kind=omp_sched_kind), parameter :: omp_sched_static = 1 61 integer(kind=omp_sched_kind), parameter :: omp_sched_dynamic = 2 62 integer(kind=omp_sched_kind), parameter :: omp_sched_guided = 3 63 integer(kind=omp_sched_kind), parameter :: omp_sched_auto = 4 64 integer(kind=omp_sched_kind), parameter :: omp_sched_monotonic = int(Z'80000000', kind=omp_sched_kind) 65 66 integer (kind=omp_proc_bind_kind), parameter :: omp_proc_bind_false = 0 67 integer (kind=omp_proc_bind_kind), parameter :: omp_proc_bind_true = 1 68 integer (kind=omp_proc_bind_kind), parameter :: omp_proc_bind_master = 2 69 integer (kind=omp_proc_bind_kind), parameter :: omp_proc_bind_close = 3 70 integer (kind=omp_proc_bind_kind), parameter :: omp_proc_bind_spread = 4 71 72 integer (kind=kmp_cancel_kind), parameter :: kmp_cancel_parallel = 1 73 integer (kind=kmp_cancel_kind), parameter :: kmp_cancel_loop = 2 74 integer (kind=kmp_cancel_kind), parameter :: kmp_cancel_sections = 3 75 integer (kind=kmp_cancel_kind), parameter :: kmp_cancel_taskgroup = 4 76 77 integer (kind=omp_sync_hint_kind), parameter :: omp_sync_hint_none = 0 78 integer (kind=omp_sync_hint_kind), parameter :: omp_sync_hint_uncontended = 1 79 integer (kind=omp_sync_hint_kind), parameter :: omp_sync_hint_contended = 2 80 integer (kind=omp_sync_hint_kind), parameter :: omp_sync_hint_nonspeculative = 4 81 integer (kind=omp_sync_hint_kind), parameter :: omp_sync_hint_speculative = 8 82 integer (kind=omp_lock_hint_kind), parameter :: omp_lock_hint_none = omp_sync_hint_none 83 integer (kind=omp_lock_hint_kind), parameter :: omp_lock_hint_uncontended = omp_sync_hint_uncontended 84 integer (kind=omp_lock_hint_kind), parameter :: omp_lock_hint_contended = omp_sync_hint_contended 85 integer (kind=omp_lock_hint_kind), parameter :: omp_lock_hint_nonspeculative = omp_sync_hint_nonspeculative 86 integer (kind=omp_lock_hint_kind), parameter :: omp_lock_hint_speculative = omp_sync_hint_speculative 87 integer (kind=omp_lock_hint_kind), parameter :: kmp_lock_hint_hle = 65536 88 integer (kind=omp_lock_hint_kind), parameter :: kmp_lock_hint_rtm = 131072 89 integer (kind=omp_lock_hint_kind), parameter :: kmp_lock_hint_adaptive = 262144 90 91 integer (kind=omp_control_tool_kind), parameter :: omp_control_tool_start = 1 92 integer (kind=omp_control_tool_kind), parameter :: omp_control_tool_pause = 2 93 integer (kind=omp_control_tool_kind), parameter :: omp_control_tool_flush = 3 94 integer (kind=omp_control_tool_kind), parameter :: omp_control_tool_end = 4 95 96 integer (kind=omp_control_tool_result_kind), parameter :: omp_control_tool_notool = -2 97 integer (kind=omp_control_tool_result_kind), parameter :: omp_control_tool_nocallback = -1 98 integer (kind=omp_control_tool_result_kind), parameter :: omp_control_tool_success = 0 99 integer (kind=omp_control_tool_result_kind), parameter :: omp_control_tool_ignored = 1 100 101 integer (kind=omp_alloctrait_key_kind), parameter :: omp_atk_threadmodel = 1 102 integer (kind=omp_alloctrait_key_kind), parameter :: omp_atk_alignment = 2 103 integer (kind=omp_alloctrait_key_kind), parameter :: omp_atk_access = 3 104 integer (kind=omp_alloctrait_key_kind), parameter :: omp_atk_pool_size = 4 105 integer (kind=omp_alloctrait_key_kind), parameter :: omp_atk_fallback = 5 106 integer (kind=omp_alloctrait_key_kind), parameter :: omp_atk_fb_data = 6 107 integer (kind=omp_alloctrait_key_kind), parameter :: omp_atk_pinned = 7 108 integer (kind=omp_alloctrait_key_kind), parameter :: omp_atk_partition = 8 109 110 integer (kind=omp_alloctrait_val_kind), parameter :: omp_atv_false = 0 111 integer (kind=omp_alloctrait_val_kind), parameter :: omp_atv_true = 1 112 integer (kind=omp_alloctrait_val_kind), parameter :: omp_atv_default = 2 113 integer (kind=omp_alloctrait_val_kind), parameter :: omp_atv_contended = 3 114 integer (kind=omp_alloctrait_val_kind), parameter :: omp_atv_uncontended = 4 115 integer (kind=omp_alloctrait_val_kind), parameter :: omp_atv_sequential = 5 116 integer (kind=omp_alloctrait_val_kind), parameter :: omp_atv_private = 6 117 integer (kind=omp_alloctrait_val_kind), parameter :: omp_atv_all = 7 118 integer (kind=omp_alloctrait_val_kind), parameter :: omp_atv_thread = 8 119 integer (kind=omp_alloctrait_val_kind), parameter :: omp_atv_pteam = 9 120 integer (kind=omp_alloctrait_val_kind), parameter :: omp_atv_cgroup = 10 121 integer (kind=omp_alloctrait_val_kind), parameter :: omp_atv_default_mem_fb = 11 122 integer (kind=omp_alloctrait_val_kind), parameter :: omp_atv_null_fb = 12 123 integer (kind=omp_alloctrait_val_kind), parameter :: omp_atv_abort_fb = 13 124 integer (kind=omp_alloctrait_val_kind), parameter :: omp_atv_allocator_fb = 14 125 integer (kind=omp_alloctrait_val_kind), parameter :: omp_atv_environment = 15 126 integer (kind=omp_alloctrait_val_kind), parameter :: omp_atv_nearest = 16 127 integer (kind=omp_alloctrait_val_kind), parameter :: omp_atv_blocked = 17 128 integer (kind=omp_alloctrait_val_kind), parameter :: omp_atv_interleaved = 18 129 130 integer (kind=omp_allocator_handle_kind), parameter :: omp_null_allocator = 0 131 integer (kind=omp_allocator_handle_kind), parameter :: omp_default_mem_alloc = 1 132 integer (kind=omp_allocator_handle_kind), parameter :: omp_large_cap_mem_alloc = 2 133 integer (kind=omp_allocator_handle_kind), parameter :: omp_const_mem_alloc = 3 134 integer (kind=omp_allocator_handle_kind), parameter :: omp_high_bw_mem_alloc = 4 135 integer (kind=omp_allocator_handle_kind), parameter :: omp_low_lat_mem_alloc = 5 136 integer (kind=omp_allocator_handle_kind), parameter :: omp_cgroup_mem_alloc = 6 137 integer (kind=omp_allocator_handle_kind), parameter :: omp_pteam_mem_alloc = 7 138 integer (kind=omp_allocator_handle_kind), parameter :: omp_thread_mem_alloc = 8 139 140 integer (kind=omp_memspace_handle_kind), parameter :: omp_default_mem_space = 0 141 integer (kind=omp_memspace_handle_kind), parameter :: omp_large_cap_mem_space = 1 142 integer (kind=omp_memspace_handle_kind), parameter :: omp_const_mem_space = 2 143 integer (kind=omp_memspace_handle_kind), parameter :: omp_high_bw_mem_space = 3 144 integer (kind=omp_memspace_handle_kind), parameter :: omp_low_lat_mem_space = 4 145 146 integer (kind=omp_pause_resource_kind), parameter :: omp_pause_resume = 0 147 integer (kind=omp_pause_resource_kind), parameter :: omp_pause_soft = 1 148 integer (kind=omp_pause_resource_kind), parameter :: omp_pause_hard = 2 149 150 interface 151 152! *** 153! *** omp_* entry points 154! *** 155 156 subroutine omp_set_num_threads(num_threads) bind(c) 157 use omp_lib_kinds 158 integer (kind=omp_integer_kind), value :: num_threads 159 end subroutine omp_set_num_threads 160 161 subroutine omp_set_dynamic(dynamic_threads) bind(c) 162 use omp_lib_kinds 163 logical (kind=omp_logical_kind), value :: dynamic_threads 164 end subroutine omp_set_dynamic 165 166 subroutine omp_set_nested(nested) bind(c) 167 use omp_lib_kinds 168 logical (kind=omp_logical_kind), value :: nested 169 end subroutine omp_set_nested 170 171 function omp_get_num_threads() bind(c) 172 use omp_lib_kinds 173 integer (kind=omp_integer_kind) omp_get_num_threads 174 end function omp_get_num_threads 175 176 function omp_get_max_threads() bind(c) 177 use omp_lib_kinds 178 integer (kind=omp_integer_kind) omp_get_max_threads 179 end function omp_get_max_threads 180 181 function omp_get_thread_num() bind(c) 182 use omp_lib_kinds 183 integer (kind=omp_integer_kind) omp_get_thread_num 184 end function omp_get_thread_num 185 186 function omp_get_num_procs() bind(c) 187 use omp_lib_kinds 188 integer (kind=omp_integer_kind) omp_get_num_procs 189 end function omp_get_num_procs 190 191 function omp_in_parallel() bind(c) 192 use omp_lib_kinds 193 logical (kind=omp_logical_kind) omp_in_parallel 194 end function omp_in_parallel 195 196 function omp_in_final() bind(c) 197 use omp_lib_kinds 198 logical (kind=omp_logical_kind) omp_in_final 199 end function omp_in_final 200 201 function omp_get_dynamic() bind(c) 202 use omp_lib_kinds 203 logical (kind=omp_logical_kind) omp_get_dynamic 204 end function omp_get_dynamic 205 206 function omp_get_nested() bind(c) 207 use omp_lib_kinds 208 logical (kind=omp_logical_kind) omp_get_nested 209 end function omp_get_nested 210 211 function omp_get_thread_limit() bind(c) 212 use omp_lib_kinds 213 integer (kind=omp_integer_kind) omp_get_thread_limit 214 end function omp_get_thread_limit 215 216 subroutine omp_set_max_active_levels(max_levels) bind(c) 217 use omp_lib_kinds 218 integer (kind=omp_integer_kind), value :: max_levels 219 end subroutine omp_set_max_active_levels 220 221 function omp_get_max_active_levels() bind(c) 222 use omp_lib_kinds 223 integer (kind=omp_integer_kind) omp_get_max_active_levels 224 end function omp_get_max_active_levels 225 226 function omp_get_level() bind(c) 227 use omp_lib_kinds 228 integer (kind=omp_integer_kind) omp_get_level 229 end function omp_get_level 230 231 function omp_get_active_level() bind(c) 232 use omp_lib_kinds 233 integer (kind=omp_integer_kind) omp_get_active_level 234 end function omp_get_active_level 235 236 function omp_get_ancestor_thread_num(level) bind(c) 237 use omp_lib_kinds 238 integer (kind=omp_integer_kind) omp_get_ancestor_thread_num 239 integer (kind=omp_integer_kind), value :: level 240 end function omp_get_ancestor_thread_num 241 242 function omp_get_team_size(level) bind(c) 243 use omp_lib_kinds 244 integer (kind=omp_integer_kind) omp_get_team_size 245 integer (kind=omp_integer_kind), value :: level 246 end function omp_get_team_size 247 248 subroutine omp_set_schedule(kind, chunk_size) bind(c) 249 use omp_lib_kinds 250 integer (kind=omp_sched_kind), value :: kind 251 integer (kind=omp_integer_kind), value :: chunk_size 252 end subroutine omp_set_schedule 253 254 subroutine omp_get_schedule(kind, chunk_size) bind(c) 255 use omp_lib_kinds 256 integer (kind=omp_sched_kind) kind 257 integer (kind=omp_integer_kind) chunk_size 258 end subroutine omp_get_schedule 259 260 function omp_get_proc_bind() bind(c) 261 use omp_lib_kinds 262 integer (kind=omp_proc_bind_kind) omp_get_proc_bind 263 end function omp_get_proc_bind 264 265 function omp_get_num_places() bind(c) 266 use omp_lib_kinds 267 integer (kind=omp_integer_kind) omp_get_num_places 268 end function omp_get_num_places 269 270 function omp_get_place_num_procs(place_num) bind(c) 271 use omp_lib_kinds 272 integer (kind=omp_integer_kind), value :: place_num 273 integer (kind=omp_integer_kind) omp_get_place_num_procs 274 end function omp_get_place_num_procs 275 276 subroutine omp_get_place_proc_ids(place_num, ids) bind(c) 277 use omp_lib_kinds 278 integer (kind=omp_integer_kind), value :: place_num 279 integer (kind=omp_integer_kind) ids(*) 280 end subroutine omp_get_place_proc_ids 281 282 function omp_get_place_num() bind(c) 283 use omp_lib_kinds 284 integer (kind=omp_integer_kind) omp_get_place_num 285 end function omp_get_place_num 286 287 function omp_get_partition_num_places() bind(c) 288 use omp_lib_kinds 289 integer (kind=omp_integer_kind) omp_get_partition_num_places 290 end function omp_get_partition_num_places 291 292 subroutine omp_get_partition_place_nums(place_nums) bind(c) 293 use omp_lib_kinds 294 integer (kind=omp_integer_kind) place_nums(*) 295 end subroutine omp_get_partition_place_nums 296 297 function omp_get_wtime() bind(c) 298 use omp_lib_kinds 299 real (kind=kmp_double_kind) omp_get_wtime 300 end function omp_get_wtime 301 302 function omp_get_wtick() bind(c) 303 use omp_lib_kinds 304 real (kind=kmp_double_kind) omp_get_wtick 305 end function omp_get_wtick 306 307 function omp_get_default_device() bind(c) 308 use omp_lib_kinds 309 integer (kind=omp_integer_kind) omp_get_default_device 310 end function omp_get_default_device 311 312 subroutine omp_set_default_device(device_num) bind(c) 313 use omp_lib_kinds 314 integer (kind=omp_integer_kind), value :: device_num 315 end subroutine omp_set_default_device 316 317 function omp_get_num_devices() bind(c) 318 use omp_lib_kinds 319 integer (kind=omp_integer_kind) omp_get_num_devices 320 end function omp_get_num_devices 321 322 function omp_get_num_teams() bind(c) 323 use omp_lib_kinds 324 integer (kind=omp_integer_kind) omp_get_num_teams 325 end function omp_get_num_teams 326 327 function omp_get_team_num() bind(c) 328 use omp_lib_kinds 329 integer (kind=omp_integer_kind) omp_get_team_num 330 end function omp_get_team_num 331 332 function omp_get_cancellation() bind(c) 333 use omp_lib_kinds 334 integer (kind=omp_integer_kind) omp_get_cancellation 335 end function omp_get_cancellation 336 337 function omp_is_initial_device() bind(c) 338 use omp_lib_kinds 339 logical (kind=omp_logical_kind) omp_is_initial_device 340 end function omp_is_initial_device 341 342 function omp_get_initial_device() bind(c) 343 use omp_lib_kinds 344 integer (kind=omp_integer_kind) omp_get_initial_device 345 end function omp_get_initial_device 346 347 function omp_get_device_num() bind(c) 348 use omp_lib_kinds 349 integer (kind=omp_integer_kind) omp_get_device_num 350 end function omp_get_device_num 351 352 function omp_pause_resource(kind, device_num) bind(c) 353 use omp_lib_kinds 354 integer (kind=omp_pause_resource_kind), value :: kind 355 integer (kind=omp_integer_kind), value :: device_num 356 integer (kind=omp_integer_kind) omp_pause_resource 357 end function omp_pause_resource 358 359 function omp_pause_resource_all(kind) bind(c) 360 use omp_lib_kinds 361 integer (kind=omp_pause_resource_kind), value :: kind 362 integer (kind=omp_integer_kind) omp_pause_resource_all 363 end function omp_pause_resource_all 364 365 function omp_get_supported_active_levels() bind(c) 366 use omp_lib_kinds 367 integer (kind=omp_integer_kind) omp_get_supported_active_levels 368 end function omp_get_supported_active_levels 369 370 subroutine omp_fulfill_event(event) bind(c) 371 use omp_lib_kinds 372 integer (kind=omp_event_handle_kind), value :: event 373 end subroutine omp_fulfill_event 374 375 subroutine omp_init_lock(svar) bind(c) 376!DIR$ IF(__INTEL_COMPILER.GE.1400) 377!DIR$ attributes known_intrinsic :: omp_init_lock 378!DIR$ ENDIF 379 use omp_lib_kinds 380 integer (kind=omp_lock_kind) svar 381 end subroutine omp_init_lock 382 383 subroutine omp_destroy_lock(svar) bind(c) 384!DIR$ IF(__INTEL_COMPILER.GE.1400) 385!DIR$ attributes known_intrinsic :: omp_destroy_lock 386!DIR$ ENDIF 387 use omp_lib_kinds 388 integer (kind=omp_lock_kind) svar 389 end subroutine omp_destroy_lock 390 391 subroutine omp_set_lock(svar) bind(c) 392!DIR$ IF(__INTEL_COMPILER.GE.1400) 393!DIR$ attributes known_intrinsic :: omp_set_lock 394!DIR$ ENDIF 395 use omp_lib_kinds 396 integer (kind=omp_lock_kind) svar 397 end subroutine omp_set_lock 398 399 subroutine omp_unset_lock(svar) bind(c) 400!DIR$ IF(__INTEL_COMPILER.GE.1400) 401!DIR$ attributes known_intrinsic :: omp_unset_lock 402!DIR$ ENDIF 403 use omp_lib_kinds 404 integer (kind=omp_lock_kind) svar 405 end subroutine omp_unset_lock 406 407 function omp_test_lock(svar) bind(c) 408!DIR$ IF(__INTEL_COMPILER.GE.1400) 409!DIR$ attributes known_intrinsic :: omp_test_lock 410!DIR$ ENDIF 411 use omp_lib_kinds 412 logical (kind=omp_logical_kind) omp_test_lock 413 integer (kind=omp_lock_kind) svar 414 end function omp_test_lock 415 416 subroutine omp_init_nest_lock(nvar) bind(c) 417!DIR$ IF(__INTEL_COMPILER.GE.1400) 418!DIR$ attributes known_intrinsic :: omp_init_nest_lock 419!DIR$ ENDIF 420 use omp_lib_kinds 421 integer (kind=omp_nest_lock_kind) nvar 422 end subroutine omp_init_nest_lock 423 424 subroutine omp_destroy_nest_lock(nvar) bind(c) 425!DIR$ IF(__INTEL_COMPILER.GE.1400) 426!DIR$ attributes known_intrinsic :: omp_destroy_nest_lock 427!DIR$ ENDIF 428 use omp_lib_kinds 429 integer (kind=omp_nest_lock_kind) nvar 430 end subroutine omp_destroy_nest_lock 431 432 subroutine omp_set_nest_lock(nvar) bind(c) 433!DIR$ IF(__INTEL_COMPILER.GE.1400) 434!DIR$ attributes known_intrinsic :: omp_set_nest_lock 435!DIR$ ENDIF 436 use omp_lib_kinds 437 integer (kind=omp_nest_lock_kind) nvar 438 end subroutine omp_set_nest_lock 439 440 subroutine omp_unset_nest_lock(nvar) bind(c) 441!DIR$ IF(__INTEL_COMPILER.GE.1400) 442!DIR$ attributes known_intrinsic :: omp_unset_nest_lock 443!DIR$ ENDIF 444 use omp_lib_kinds 445 integer (kind=omp_nest_lock_kind) nvar 446 end subroutine omp_unset_nest_lock 447 448 function omp_test_nest_lock(nvar) bind(c) 449!DIR$ IF(__INTEL_COMPILER.GE.1400) 450!DIR$ attributes known_intrinsic :: omp_test_nest_lock 451!DIR$ ENDIF 452 use omp_lib_kinds 453 integer (kind=omp_integer_kind) omp_test_nest_lock 454 integer (kind=omp_nest_lock_kind) nvar 455 end function omp_test_nest_lock 456 457 function omp_get_max_task_priority() bind(c) 458 use omp_lib_kinds 459 integer (kind=omp_integer_kind) omp_get_max_task_priority 460 end function omp_get_max_task_priority 461 462 function omp_init_allocator(memspace, ntraits, traits) 463 use omp_lib_kinds 464 integer (kind=omp_allocator_handle_kind) omp_init_allocator 465 integer (kind=omp_memspace_handle_kind) :: memspace 466 integer (kind=omp_integer_kind) :: ntraits 467 type(omp_alloctrait), intent(in) :: traits(*) 468 end function omp_init_allocator 469 470 subroutine omp_destroy_allocator(allocator) bind(c) 471 use omp_lib_kinds 472 integer (kind=omp_allocator_handle_kind), value :: allocator 473 end subroutine omp_destroy_allocator 474 475 subroutine omp_set_default_allocator(allocator) bind(c) 476 use omp_lib_kinds 477 integer (kind=omp_allocator_handle_kind), value :: allocator 478 end subroutine omp_set_default_allocator 479 480 function omp_get_default_allocator() bind(c) 481 use omp_lib_kinds 482 integer (kind=omp_allocator_handle_kind) omp_get_default_allocator 483 end function omp_get_default_allocator 484 485 subroutine omp_set_affinity_format(format) 486 character (len=*) :: format 487 end subroutine omp_set_affinity_format 488 489 function omp_get_affinity_format(buffer) 490 use omp_lib_kinds 491 character (len=*) :: buffer 492 integer (kind=kmp_size_t_kind) :: omp_get_affinity_format 493 end function omp_get_affinity_format 494 495 subroutine omp_display_affinity(format) 496 character (len=*) :: format 497 end subroutine omp_display_affinity 498 499 function omp_capture_affinity(buffer, format) 500 use omp_lib_kinds 501 character (len=*) :: format 502 character (len=*) :: buffer 503 integer (kind=kmp_size_t_kind) :: omp_capture_affinity 504 end function omp_capture_affinity 505 506 subroutine omp_display_env(verbose) bind(c) 507 use omp_lib_kinds 508 logical (kind=omp_logical_kind), value :: verbose 509 end subroutine omp_display_env 510 511 512! *** 513! *** kmp_* entry points 514! *** 515 516 subroutine kmp_set_stacksize(size) bind(c) 517 use omp_lib_kinds 518 integer (kind=omp_integer_kind), value :: size 519 end subroutine kmp_set_stacksize 520 521 subroutine kmp_set_stacksize_s(size) bind(c) 522 use omp_lib_kinds 523 integer (kind=kmp_size_t_kind), value :: size 524 end subroutine kmp_set_stacksize_s 525 526 subroutine kmp_set_blocktime(msec) bind(c) 527 use omp_lib_kinds 528 integer (kind=omp_integer_kind), value :: msec 529 end subroutine kmp_set_blocktime 530 531 subroutine kmp_set_library_serial() bind(c) 532 end subroutine kmp_set_library_serial 533 534 subroutine kmp_set_library_turnaround() bind(c) 535 end subroutine kmp_set_library_turnaround 536 537 subroutine kmp_set_library_throughput() bind(c) 538 end subroutine kmp_set_library_throughput 539 540 subroutine kmp_set_library(libnum) bind(c) 541 use omp_lib_kinds 542 integer (kind=omp_integer_kind), value :: libnum 543 end subroutine kmp_set_library 544 545 subroutine kmp_set_defaults(string) bind(c) 546 use, intrinsic :: iso_c_binding 547 character (kind=c_char) :: string(*) 548 end subroutine kmp_set_defaults 549 550 function kmp_get_stacksize() bind(c) 551 use omp_lib_kinds 552 integer (kind=omp_integer_kind) kmp_get_stacksize 553 end function kmp_get_stacksize 554 555 function kmp_get_stacksize_s() bind(c) 556 use omp_lib_kinds 557 integer (kind=kmp_size_t_kind) kmp_get_stacksize_s 558 end function kmp_get_stacksize_s 559 560 function kmp_get_blocktime() bind(c) 561 use omp_lib_kinds 562 integer (kind=omp_integer_kind) kmp_get_blocktime 563 end function kmp_get_blocktime 564 565 function kmp_get_library() bind(c) 566 use omp_lib_kinds 567 integer (kind=omp_integer_kind) kmp_get_library 568 end function kmp_get_library 569 570 subroutine kmp_set_disp_num_buffers(num) bind(c) 571 use omp_lib_kinds 572 integer (kind=omp_integer_kind), value :: num 573 end subroutine kmp_set_disp_num_buffers 574 575 function kmp_set_affinity(mask) bind(c) 576 use omp_lib_kinds 577 integer (kind=omp_integer_kind) kmp_set_affinity 578 integer (kind=kmp_affinity_mask_kind) mask 579 end function kmp_set_affinity 580 581 function kmp_get_affinity(mask) bind(c) 582 use omp_lib_kinds 583 integer (kind=omp_integer_kind) kmp_get_affinity 584 integer (kind=kmp_affinity_mask_kind) mask 585 end function kmp_get_affinity 586 587 function kmp_get_affinity_max_proc() bind(c) 588 use omp_lib_kinds 589 integer (kind=omp_integer_kind) kmp_get_affinity_max_proc 590 end function kmp_get_affinity_max_proc 591 592 subroutine kmp_create_affinity_mask(mask) bind(c) 593 use omp_lib_kinds 594 integer (kind=kmp_affinity_mask_kind) mask 595 end subroutine kmp_create_affinity_mask 596 597 subroutine kmp_destroy_affinity_mask(mask) bind(c) 598 use omp_lib_kinds 599 integer (kind=kmp_affinity_mask_kind) mask 600 end subroutine kmp_destroy_affinity_mask 601 602 function kmp_set_affinity_mask_proc(proc, mask) bind(c) 603 use omp_lib_kinds 604 integer (kind=omp_integer_kind) kmp_set_affinity_mask_proc 605 integer (kind=omp_integer_kind), value :: proc 606 integer (kind=kmp_affinity_mask_kind) mask 607 end function kmp_set_affinity_mask_proc 608 609 function kmp_unset_affinity_mask_proc(proc, mask) bind(c) 610 use omp_lib_kinds 611 integer (kind=omp_integer_kind) kmp_unset_affinity_mask_proc 612 integer (kind=omp_integer_kind), value :: proc 613 integer (kind=kmp_affinity_mask_kind) mask 614 end function kmp_unset_affinity_mask_proc 615 616 function kmp_get_affinity_mask_proc(proc, mask) bind(c) 617 use omp_lib_kinds 618 integer (kind=omp_integer_kind) kmp_get_affinity_mask_proc 619 integer (kind=omp_integer_kind), value :: proc 620 integer (kind=kmp_affinity_mask_kind) mask 621 end function kmp_get_affinity_mask_proc 622 623 function kmp_malloc(size) bind(c) 624 use omp_lib_kinds 625 integer (kind=kmp_pointer_kind) kmp_malloc 626 integer (kind=kmp_size_t_kind), value :: size 627 end function kmp_malloc 628 629 function kmp_aligned_malloc(size, alignment) bind(c) 630 use omp_lib_kinds 631 integer (kind=kmp_pointer_kind) kmp_aligned_malloc 632 integer (kind=kmp_size_t_kind), value :: size 633 integer (kind=kmp_size_t_kind), value :: alignment 634 end function kmp_aligned_malloc 635 636 function kmp_calloc(nelem, elsize) bind(c) 637 use omp_lib_kinds 638 integer (kind=kmp_pointer_kind) kmp_calloc 639 integer (kind=kmp_size_t_kind), value :: nelem 640 integer (kind=kmp_size_t_kind), value :: elsize 641 end function kmp_calloc 642 643 function kmp_realloc(ptr, size) bind(c) 644 use omp_lib_kinds 645 integer (kind=kmp_pointer_kind) kmp_realloc 646 integer (kind=kmp_pointer_kind), value :: ptr 647 integer (kind=kmp_size_t_kind), value :: size 648 end function kmp_realloc 649 650 subroutine kmp_free(ptr) bind(c) 651 use omp_lib_kinds 652 integer (kind=kmp_pointer_kind), value :: ptr 653 end subroutine kmp_free 654 655 subroutine kmp_set_warnings_on() bind(c) 656 end subroutine kmp_set_warnings_on 657 658 subroutine kmp_set_warnings_off() bind(c) 659 end subroutine kmp_set_warnings_off 660 661 function kmp_get_cancellation_status(cancelkind) bind(c) 662 use omp_lib_kinds 663 integer (kind=kmp_cancel_kind), value :: cancelkind 664 logical (kind=omp_logical_kind) kmp_get_cancellation_status 665 end function kmp_get_cancellation_status 666 667 subroutine omp_init_lock_with_hint(svar, hint) bind(c) 668 use omp_lib_kinds 669 integer (kind=omp_lock_kind) svar 670 integer (kind=omp_lock_hint_kind), value :: hint 671 end subroutine omp_init_lock_with_hint 672 673 subroutine omp_init_nest_lock_with_hint(nvar, hint) bind(c) 674 use omp_lib_kinds 675 integer (kind=omp_nest_lock_kind) nvar 676 integer (kind=omp_lock_hint_kind), value :: hint 677 end subroutine omp_init_nest_lock_with_hint 678 679 function omp_control_tool(command, modifier, arg) bind(c) 680 use omp_lib_kinds 681 integer (kind=omp_integer_kind) omp_control_tool 682 integer (kind=omp_control_tool_kind), value :: command 683 integer (kind=omp_control_tool_kind), value :: modifier 684 integer (kind=kmp_pointer_kind), optional :: arg 685 end function omp_control_tool 686 687 end interface 688 689 end module omp_lib 690