forked from OSchip/llvm-project
[OpenMP] Remove OMP spec versioning
Remove all older OMP spec versioning from the runtime and build system. Patch by Terry Wilmarth Differential Revision: https://reviews.llvm.org/D64534 llvm-svn: 365963
This commit is contained in:
parent
603580216f
commit
e4b4f994d2
|
@ -141,10 +141,6 @@ Options for ``libomp``
|
|||
Intel(R) Many Integrated Core Architecture (Intel(R) MIC Architecture) to
|
||||
build for. This value is ignored if **LIBOMP_ARCH** does not equal ``mic``.
|
||||
|
||||
**LIBOMP_OMP_VERSION** = ``50|45|40|30``
|
||||
OpenMP version to build for. Older versions will disable certain
|
||||
functionality and entry points.
|
||||
|
||||
**LIBOMP_LIB_TYPE** = ``normal|profile|stubs``
|
||||
Library type can be ``normal``, ``profile``, or ``stubs``.
|
||||
|
||||
|
@ -192,8 +188,8 @@ Optional Features
|
|||
multi-node systems where a small ``CACHE_LINE`` setting leads to false sharing.
|
||||
|
||||
**LIBOMP_OMPT_SUPPORT** = ``ON|OFF``
|
||||
Include support for the OpenMP Tools Interface (OMPT).
|
||||
This option is supported and ``ON`` by default for x86, x86_64, AArch64, and
|
||||
Include support for the OpenMP Tools Interface (OMPT).
|
||||
This option is supported and ``ON`` by default for x86, x86_64, AArch64, and
|
||||
PPC64 on Linux* and macOS*.
|
||||
This option is ``OFF`` if this feature is not supported for the platform.
|
||||
|
||||
|
|
|
@ -69,21 +69,8 @@ libomp_check_variable(LIBOMP_ARCH 32e x86_64 32 i386 arm ppc64 ppc64le aarch64 m
|
|||
set(LIBOMP_LIB_TYPE normal CACHE STRING
|
||||
"Performance,Profiling,Stubs library (normal/profile/stubs)")
|
||||
libomp_check_variable(LIBOMP_LIB_TYPE normal profile stubs)
|
||||
set(LIBOMP_OMP_VERSION 50 CACHE STRING
|
||||
"The OpenMP version (50/45/40/30)")
|
||||
libomp_check_variable(LIBOMP_OMP_VERSION 50 45 40 30)
|
||||
# Set the OpenMP Year and Month assiociated with version
|
||||
if(${LIBOMP_OMP_VERSION} GREATER 50 OR ${LIBOMP_OMP_VERSION} EQUAL 50)
|
||||
set(LIBOMP_OMP_YEAR_MONTH 201611)
|
||||
elseif(${LIBOMP_OMP_VERSION} GREATER 45 OR ${LIBOMP_OMP_VERSION} EQUAL 45)
|
||||
set(LIBOMP_OMP_YEAR_MONTH 201511)
|
||||
elseif(${LIBOMP_OMP_VERSION} GREATER 40 OR ${LIBOMP_OMP_VERSION} EQUAL 40)
|
||||
set(LIBOMP_OMP_YEAR_MONTH 201307)
|
||||
elseif(${LIBOMP_OMP_VERSION} GREATER 30 OR ${LIBOMP_OMP_VERSION} EQUAL 30)
|
||||
set(LIBOMP_OMP_YEAR_MONTH 201107)
|
||||
else()
|
||||
set(LIBOMP_OMP_YEAR_MONTH 200505)
|
||||
endif()
|
||||
set(LIBOMP_OMP_YEAR_MONTH 201611)
|
||||
set(LIBOMP_MIC_ARCH knc CACHE STRING
|
||||
"Intel(R) Many Integrated Core Architecture (Intel(R) MIC Architecture) (knf/knc). Ignored if not Intel(R) MIC Architecture build.")
|
||||
if("${LIBOMP_ARCH}" STREQUAL "mic")
|
||||
|
@ -213,7 +200,7 @@ endif()
|
|||
set(LIBOMP_BASE_DIR ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
set(LIBOMP_SRC_DIR ${LIBOMP_BASE_DIR}/src)
|
||||
set(LIBOMP_TOOLS_DIR ${LIBOMP_BASE_DIR}/tools)
|
||||
set(LIBOMP_INC_DIR ${LIBOMP_SRC_DIR}/include/${LIBOMP_OMP_VERSION})
|
||||
set(LIBOMP_INC_DIR ${LIBOMP_SRC_DIR}/include)
|
||||
set(LIBOMP_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR})
|
||||
|
||||
# Enabling Fortran if it is needed
|
||||
|
@ -301,7 +288,7 @@ endif()
|
|||
# OMPT-support defaults to ON for OpenMP 5.0+ and if the requirements in
|
||||
# cmake/config-ix.cmake are fulfilled.
|
||||
set(OMPT_DEFAULT FALSE)
|
||||
if ((${LIBOMP_OMP_VERSION} GREATER 49) AND (LIBOMP_HAVE_OMPT_SUPPORT) AND (NOT WIN32))
|
||||
if ((LIBOMP_HAVE_OMPT_SUPPORT) AND (NOT WIN32))
|
||||
set(OMPT_DEFAULT TRUE)
|
||||
endif()
|
||||
set(LIBOMP_OMPT_SUPPORT ${OMPT_DEFAULT} CACHE BOOL
|
||||
|
@ -314,9 +301,6 @@ set(LIBOMP_OMPT_OPTIONAL TRUE CACHE BOOL
|
|||
if(LIBOMP_OMPT_SUPPORT AND (NOT LIBOMP_HAVE_OMPT_SUPPORT))
|
||||
libomp_error_say("OpenMP Tools Interface requested but not available in this implementation")
|
||||
endif()
|
||||
if(LIBOMP_OMPT_SUPPORT AND (${LIBOMP_OMP_VERSION} LESS 50))
|
||||
libomp_error_say("OpenMP Tools Interface only available with OpenMP 5.0, LIBOMP_OMP_VERSION is ${LIBOMP_OMP_VERSION}")
|
||||
endif()
|
||||
|
||||
# TSAN-support
|
||||
set(LIBOMP_TSAN_SUPPORT FALSE CACHE BOOL
|
||||
|
@ -368,7 +352,6 @@ if(${OPENMP_STANDALONE_BUILD})
|
|||
libomp_say("Intel(R) MIC Architecture -- ${LIBOMP_MIC_ARCH}")
|
||||
endif()
|
||||
libomp_say("Build Type -- ${CMAKE_BUILD_TYPE}")
|
||||
libomp_say("OpenMP Version -- ${LIBOMP_OMP_VERSION}")
|
||||
libomp_say("Library Kind -- ${LIBOMP_LIBRARY_KIND}")
|
||||
libomp_say("Library Type -- ${LIBOMP_LIB_TYPE}")
|
||||
libomp_say("Fortran Modules -- ${LIBOMP_FORTRAN_MODULES}")
|
||||
|
|
|
@ -28,4 +28,3 @@ function(libomp_get_definitions_flags cppflags)
|
|||
# CMake doesn't include CPPFLAGS from environment, but we will.
|
||||
set(${cppflags} ${cppflags_local} ${LIBOMP_CPPFLAGS} $ENV{CPPFLAGS} PARENT_SCOPE)
|
||||
endfunction()
|
||||
|
||||
|
|
|
@ -13,16 +13,13 @@
|
|||
|
||||
# Create the suffix for the export directory
|
||||
# - Only add to suffix when not a default value
|
||||
# - Example suffix: .deb.30.s1
|
||||
# final export directory: exports/lin_32e.deb.30.s1/lib
|
||||
# - These suffixes imply the build is a Debug, OpenMP 3.0, Stats-Gathering version of the library
|
||||
# - Example suffix: .deb.s1
|
||||
# final export directory: exports/lin_32e.deb.s1/lib
|
||||
# - These suffixes imply the build is a Debug, Stats-Gathering version of the library
|
||||
set(libomp_suffix)
|
||||
libomp_append(libomp_suffix .deb DEBUG_BUILD)
|
||||
libomp_append(libomp_suffix .dia RELWITHDEBINFO_BUILD)
|
||||
libomp_append(libomp_suffix .min MINSIZEREL_BUILD)
|
||||
if(NOT "${LIBOMP_OMP_VERSION}" STREQUAL "45")
|
||||
libomp_append(libomp_suffix .${LIBOMP_OMP_VERSION})
|
||||
endif()
|
||||
libomp_append(libomp_suffix .s1 LIBOMP_STATS)
|
||||
libomp_append(libomp_suffix .ompt LIBOMP_OMPT_SUPPORT)
|
||||
if(${LIBOMP_OMPT_SUPPORT})
|
||||
|
@ -95,4 +92,3 @@ if(WIN32)
|
|||
COMMAND ${CMAKE_COMMAND} -E copy ${LIBOMPIMP_OUTPUT_DIRECTORY}/${LIBOMP_IMP_LIB_FILE} ${LIBOMP_EXPORTS_LIB_DIR}
|
||||
)
|
||||
endif()
|
||||
|
||||
|
|
|
@ -198,18 +198,6 @@ function(libomp_get_gdflags gdflags)
|
|||
libomp_append(gdflags_local "-D stub" STUBS_LIBRARY)
|
||||
libomp_append(gdflags_local "-D HAVE_QUAD" LIBOMP_USE_QUAD_PRECISION)
|
||||
libomp_append(gdflags_local "-D USE_DEBUGGER" LIBOMP_USE_DEBUGGER)
|
||||
if(${LIBOMP_OMP_VERSION} GREATER 50 OR ${LIBOMP_OMP_VERSION} EQUAL 50)
|
||||
libomp_append(gdflags_local "-D OMP_50")
|
||||
endif()
|
||||
if(${LIBOMP_OMP_VERSION} GREATER 45 OR ${LIBOMP_OMP_VERSION} EQUAL 45)
|
||||
libomp_append(gdflags_local "-D OMP_45")
|
||||
endif()
|
||||
if(${LIBOMP_OMP_VERSION} GREATER 40 OR ${LIBOMP_OMP_VERSION} EQUAL 40)
|
||||
libomp_append(gdflags_local "-D OMP_40")
|
||||
endif()
|
||||
if(${LIBOMP_OMP_VERSION} GREATER 30 OR ${LIBOMP_OMP_VERSION} EQUAL 30)
|
||||
libomp_append(gdflags_local "-D OMP_30")
|
||||
endif()
|
||||
if(${DEBUG_BUILD} OR ${RELWITHDEBINFO_BUILD})
|
||||
libomp_append(gdflags_local "-D KMP_DEBUG")
|
||||
endif()
|
||||
|
|
|
@ -97,10 +97,8 @@ else()
|
|||
libomp_append(LIBOMP_CXXFILES kmp_debugger.cpp LIBOMP_USE_DEBUGGER)
|
||||
libomp_append(LIBOMP_CXXFILES kmp_stats.cpp LIBOMP_STATS)
|
||||
libomp_append(LIBOMP_CXXFILES kmp_stats_timing.cpp LIBOMP_STATS)
|
||||
if(${LIBOMP_OMP_VERSION} GREATER 40 OR ${LIBOMP_OMP_VERSION} EQUAL 40)
|
||||
libomp_append(LIBOMP_CXXFILES kmp_taskdeps.cpp)
|
||||
libomp_append(LIBOMP_CXXFILES kmp_cancel.cpp)
|
||||
endif()
|
||||
libomp_append(LIBOMP_CXXFILES kmp_taskdeps.cpp)
|
||||
libomp_append(LIBOMP_CXXFILES kmp_cancel.cpp)
|
||||
endif()
|
||||
# Files common to stubs and normal library
|
||||
libomp_append(LIBOMP_CXXFILES kmp_ftn_cdecl.cpp)
|
||||
|
|
|
@ -279,16 +279,12 @@
|
|||
__kmpc_reduce 189
|
||||
__kmpc_end_reduce 190
|
||||
|
||||
# OpenMP 3.0
|
||||
|
||||
%ifdef OMP_30
|
||||
__kmpc_omp_task_alloc 191
|
||||
__kmpc_omp_task 192
|
||||
__kmpc_omp_taskwait 193
|
||||
__kmpc_omp_task_begin_if0 196
|
||||
__kmpc_omp_task_complete_if0 197
|
||||
__kmpc_omp_task_parts 198
|
||||
%endif # OMP_30
|
||||
|
||||
# __omp_collector_api 199
|
||||
|
||||
|
@ -320,9 +316,7 @@ kmpc_set_stacksize_s 222
|
|||
# kmpc_set_stats 217
|
||||
kmpc_set_defaults 224
|
||||
|
||||
# OMP 3.0 entry points for unsigned loop iteration variables
|
||||
%ifndef stub
|
||||
%ifdef OMP_30
|
||||
__kmpc_for_static_init_8u 225
|
||||
__kmpc_dispatch_init_8u 226
|
||||
__kmpc_dispatch_next_8u 227
|
||||
|
@ -331,7 +325,6 @@ kmpc_set_defaults 224
|
|||
__kmpc_dispatch_init_4u 230
|
||||
__kmpc_dispatch_next_4u 231
|
||||
__kmpc_dispatch_fini_4u 232
|
||||
%endif # OMP_30
|
||||
%endif
|
||||
|
||||
%ifndef stub
|
||||
|
@ -339,17 +332,12 @@ kmpc_set_defaults 224
|
|||
__kmpc_get_parent_taskid 234
|
||||
%endif
|
||||
|
||||
# OpenMP 3.1 entry points
|
||||
%ifndef stub
|
||||
%ifdef OMP_30
|
||||
__kmpc_omp_taskyield 235
|
||||
%endif # OMP_30
|
||||
# __kmpc_place_threads 236
|
||||
%endif
|
||||
|
||||
# OpenMP 4.0 entry points
|
||||
%ifndef stub
|
||||
%ifdef OMP_40
|
||||
__kmpc_push_proc_bind 237
|
||||
__kmpc_taskgroup 238
|
||||
__kmpc_end_taskgroup 239
|
||||
|
@ -372,12 +360,9 @@ kmpc_set_defaults 224
|
|||
__kmpc_team_static_init_4u 256
|
||||
__kmpc_team_static_init_8 257
|
||||
__kmpc_team_static_init_8u 258
|
||||
%endif # OMP_40
|
||||
%endif
|
||||
|
||||
# OpenMP 4.5 entry points
|
||||
%ifndef stub
|
||||
%ifdef OMP_45
|
||||
__kmpc_proxy_task_completed 259
|
||||
__kmpc_proxy_task_completed_ooo 260
|
||||
__kmpc_doacross_init 261
|
||||
|
@ -386,17 +371,14 @@ kmpc_set_defaults 224
|
|||
__kmpc_doacross_fini 264
|
||||
__kmpc_taskloop 266
|
||||
__kmpc_critical_with_hint 270
|
||||
%endif
|
||||
%endif
|
||||
kmpc_aligned_malloc 265
|
||||
kmpc_set_disp_num_buffers 267
|
||||
|
||||
# OpenMP 5.0 entry points
|
||||
%ifndef stub
|
||||
%ifdef OMP_50
|
||||
__kmpc_task_reduction_init 268
|
||||
__kmpc_task_reduction_get_th_data 269
|
||||
# USED FOR 4.5 __kmpc_critical_with_hint 270
|
||||
# USED ABOVE __kmpc_critical_with_hint 270
|
||||
__kmpc_get_target_offload 271
|
||||
__kmpc_omp_reg_task_with_affinity 272
|
||||
__kmpc_pause_resource 273
|
||||
|
@ -405,7 +387,6 @@ kmpc_set_disp_num_buffers 267
|
|||
__kmpc_task_allow_completion_event 276
|
||||
__kmpc_taskred_init 277
|
||||
__kmpc_taskred_modifier_init 278
|
||||
%endif
|
||||
%endif
|
||||
|
||||
# User API entry points that have both lower- and upper- case versions for Fortran.
|
||||
|
@ -463,7 +444,6 @@ kmp_aligned_malloc 747
|
|||
kmp_set_warnings_on 779
|
||||
kmp_set_warnings_off 780
|
||||
|
||||
%ifdef OMP_30
|
||||
omp_get_active_level 789
|
||||
omp_get_level 790
|
||||
omp_get_ancestor_thread_num 791
|
||||
|
@ -488,17 +468,9 @@ kmp_set_warnings_off 780
|
|||
kmpc_unset_affinity_mask_proc 858
|
||||
kmp_get_affinity_mask_proc 859
|
||||
kmpc_get_affinity_mask_proc 860
|
||||
%endif # OMP_30
|
||||
|
||||
# OpenMP 3.1
|
||||
|
||||
%ifdef OMP_30
|
||||
omp_in_final 861
|
||||
%endif # OMP_30
|
||||
|
||||
# OpenMP 40
|
||||
|
||||
%ifdef OMP_40
|
||||
omp_get_proc_bind 862
|
||||
#omp_set_proc_bind 863
|
||||
#omp_curr_proc_bind 864
|
||||
|
@ -510,11 +482,7 @@ kmp_set_warnings_off 780
|
|||
omp_set_default_device 879
|
||||
omp_get_default_device 880
|
||||
omp_get_num_devices 881
|
||||
%endif # OMP_40
|
||||
|
||||
# OpenMP 45
|
||||
|
||||
%ifdef OMP_45
|
||||
omp_init_lock_with_hint 870
|
||||
omp_init_nest_lock_with_hint 871
|
||||
omp_get_max_task_priority 872
|
||||
|
@ -534,11 +502,9 @@ kmp_set_warnings_off 780
|
|||
omp_target_associate_ptr 888
|
||||
omp_target_disassociate_ptr 889
|
||||
%endif
|
||||
%endif # OMP_45
|
||||
|
||||
kmp_set_disp_num_buffers 890
|
||||
|
||||
%ifdef OMP_50
|
||||
omp_control_tool 891
|
||||
omp_set_default_allocator 892
|
||||
omp_get_default_allocator 893
|
||||
|
@ -583,7 +549,6 @@ kmp_set_disp_num_buffers 890
|
|||
omp_const_mem_space DATA
|
||||
omp_high_bw_mem_space DATA
|
||||
omp_low_lat_mem_space DATA
|
||||
%endif # OMP_50
|
||||
|
||||
%ifndef stub
|
||||
# Ordinals between 900 and 999 are reserved
|
||||
|
@ -1033,8 +998,6 @@ kmp_set_disp_num_buffers 890
|
|||
__kmpc_atomic_float10_div_cpt_fp
|
||||
%endif
|
||||
|
||||
%ifdef OMP_40
|
||||
|
||||
# ATOMIC extensions for OpenMP 4.0 spec (x86 and x64 only)
|
||||
|
||||
__kmpc_atomic_fixed1_swp 2412
|
||||
|
@ -1209,8 +1172,6 @@ kmp_set_disp_num_buffers 890
|
|||
__kmpc_atomic_float10_sub_cpt_rev_fp
|
||||
__kmpc_atomic_float10_div_cpt_rev_fp
|
||||
%endif
|
||||
%endif # OMP_40
|
||||
|
||||
|
||||
%endif # arch_64
|
||||
|
||||
|
|
|
@ -1,164 +0,0 @@
|
|||
/*
|
||||
* include/30/omp.h.var
|
||||
*/
|
||||
|
||||
|
||||
//===----------------------------------------------------------------------===//
|
||||
//
|
||||
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
||||
// See https://llvm.org/LICENSE.txt for license information.
|
||||
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
|
||||
#ifndef __OMP_H
|
||||
# define __OMP_H
|
||||
|
||||
# define KMP_VERSION_MAJOR @LIBOMP_VERSION_MAJOR@
|
||||
# define KMP_VERSION_MINOR @LIBOMP_VERSION_MINOR@
|
||||
# define KMP_VERSION_BUILD @LIBOMP_VERSION_BUILD@
|
||||
# define KMP_BUILD_DATE "@LIBOMP_BUILD_DATE@"
|
||||
|
||||
# ifdef __cplusplus
|
||||
extern "C" {
|
||||
# endif
|
||||
|
||||
# define omp_set_num_threads ompc_set_num_threads
|
||||
# define omp_set_dynamic ompc_set_dynamic
|
||||
# define omp_set_nested ompc_set_nested
|
||||
# define omp_set_max_active_levels ompc_set_max_active_levels
|
||||
# define omp_set_schedule ompc_set_schedule
|
||||
# define omp_get_ancestor_thread_num ompc_get_ancestor_thread_num
|
||||
# define omp_get_team_size ompc_get_team_size
|
||||
|
||||
|
||||
# define kmp_set_stacksize kmpc_set_stacksize
|
||||
# define kmp_set_stacksize_s kmpc_set_stacksize_s
|
||||
# define kmp_set_blocktime kmpc_set_blocktime
|
||||
# define kmp_set_library kmpc_set_library
|
||||
# define kmp_set_defaults kmpc_set_defaults
|
||||
# define kmp_set_affinity_mask_proc kmpc_set_affinity_mask_proc
|
||||
# define kmp_unset_affinity_mask_proc kmpc_unset_affinity_mask_proc
|
||||
# define kmp_get_affinity_mask_proc kmpc_get_affinity_mask_proc
|
||||
|
||||
# define kmp_malloc kmpc_malloc
|
||||
# define kmp_calloc kmpc_calloc
|
||||
# define kmp_realloc kmpc_realloc
|
||||
# define kmp_free kmpc_free
|
||||
|
||||
|
||||
# if defined(_WIN32)
|
||||
# define __KAI_KMPC_CONVENTION __cdecl
|
||||
# else
|
||||
# define __KAI_KMPC_CONVENTION
|
||||
# endif
|
||||
|
||||
/* schedule kind constants */
|
||||
typedef enum omp_sched_t {
|
||||
omp_sched_static = 1,
|
||||
omp_sched_dynamic = 2,
|
||||
omp_sched_guided = 3,
|
||||
omp_sched_auto = 4
|
||||
} omp_sched_t;
|
||||
|
||||
/* set API functions */
|
||||
extern void __KAI_KMPC_CONVENTION omp_set_num_threads (int);
|
||||
extern void __KAI_KMPC_CONVENTION omp_set_dynamic (int);
|
||||
extern void __KAI_KMPC_CONVENTION omp_set_nested (int);
|
||||
extern void __KAI_KMPC_CONVENTION omp_set_max_active_levels (int);
|
||||
extern void __KAI_KMPC_CONVENTION omp_set_schedule (omp_sched_t, int);
|
||||
|
||||
/* query API functions */
|
||||
extern int __KAI_KMPC_CONVENTION omp_get_num_threads (void);
|
||||
extern int __KAI_KMPC_CONVENTION omp_get_dynamic (void);
|
||||
extern int __KAI_KMPC_CONVENTION omp_get_nested (void);
|
||||
extern int __KAI_KMPC_CONVENTION omp_get_max_threads (void);
|
||||
extern int __KAI_KMPC_CONVENTION omp_get_thread_num (void);
|
||||
extern int __KAI_KMPC_CONVENTION omp_get_num_procs (void);
|
||||
extern int __KAI_KMPC_CONVENTION omp_in_parallel (void);
|
||||
extern int __KAI_KMPC_CONVENTION omp_in_final (void);
|
||||
extern int __KAI_KMPC_CONVENTION omp_get_active_level (void);
|
||||
extern int __KAI_KMPC_CONVENTION omp_get_level (void);
|
||||
extern int __KAI_KMPC_CONVENTION omp_get_ancestor_thread_num (int);
|
||||
extern int __KAI_KMPC_CONVENTION omp_get_team_size (int);
|
||||
extern int __KAI_KMPC_CONVENTION omp_get_thread_limit (void);
|
||||
extern int __KAI_KMPC_CONVENTION omp_get_max_active_levels (void);
|
||||
extern void __KAI_KMPC_CONVENTION omp_get_schedule (omp_sched_t *, int *);
|
||||
|
||||
/* lock API functions */
|
||||
typedef struct omp_lock_t {
|
||||
void * _lk;
|
||||
} omp_lock_t;
|
||||
|
||||
extern void __KAI_KMPC_CONVENTION omp_init_lock (omp_lock_t *);
|
||||
extern void __KAI_KMPC_CONVENTION omp_set_lock (omp_lock_t *);
|
||||
extern void __KAI_KMPC_CONVENTION omp_unset_lock (omp_lock_t *);
|
||||
extern void __KAI_KMPC_CONVENTION omp_destroy_lock (omp_lock_t *);
|
||||
extern int __KAI_KMPC_CONVENTION omp_test_lock (omp_lock_t *);
|
||||
|
||||
/* nested lock API functions */
|
||||
typedef struct omp_nest_lock_t {
|
||||
void * _lk;
|
||||
} omp_nest_lock_t;
|
||||
|
||||
extern void __KAI_KMPC_CONVENTION omp_init_nest_lock (omp_nest_lock_t *);
|
||||
extern void __KAI_KMPC_CONVENTION omp_set_nest_lock (omp_nest_lock_t *);
|
||||
extern void __KAI_KMPC_CONVENTION omp_unset_nest_lock (omp_nest_lock_t *);
|
||||
extern void __KAI_KMPC_CONVENTION omp_destroy_nest_lock (omp_nest_lock_t *);
|
||||
extern int __KAI_KMPC_CONVENTION omp_test_nest_lock (omp_nest_lock_t *);
|
||||
|
||||
/* time API functions */
|
||||
extern double __KAI_KMPC_CONVENTION omp_get_wtime (void);
|
||||
extern double __KAI_KMPC_CONVENTION omp_get_wtick (void);
|
||||
|
||||
# include <stdlib.h>
|
||||
/* kmp API functions */
|
||||
extern int __KAI_KMPC_CONVENTION kmp_get_stacksize (void);
|
||||
extern void __KAI_KMPC_CONVENTION kmp_set_stacksize (int);
|
||||
extern size_t __KAI_KMPC_CONVENTION kmp_get_stacksize_s (void);
|
||||
extern void __KAI_KMPC_CONVENTION kmp_set_stacksize_s (size_t);
|
||||
extern int __KAI_KMPC_CONVENTION kmp_get_blocktime (void);
|
||||
extern int __KAI_KMPC_CONVENTION kmp_get_library (void);
|
||||
extern void __KAI_KMPC_CONVENTION kmp_set_blocktime (int);
|
||||
extern void __KAI_KMPC_CONVENTION kmp_set_library (int);
|
||||
extern void __KAI_KMPC_CONVENTION kmp_set_library_serial (void);
|
||||
extern void __KAI_KMPC_CONVENTION kmp_set_library_turnaround (void);
|
||||
extern void __KAI_KMPC_CONVENTION kmp_set_library_throughput (void);
|
||||
extern void __KAI_KMPC_CONVENTION kmp_set_defaults (char const *);
|
||||
|
||||
/* affinity API functions */
|
||||
typedef void * kmp_affinity_mask_t;
|
||||
|
||||
extern int __KAI_KMPC_CONVENTION kmp_set_affinity (kmp_affinity_mask_t *);
|
||||
extern int __KAI_KMPC_CONVENTION kmp_get_affinity (kmp_affinity_mask_t *);
|
||||
extern int __KAI_KMPC_CONVENTION kmp_get_affinity_max_proc (void);
|
||||
extern void __KAI_KMPC_CONVENTION kmp_create_affinity_mask (kmp_affinity_mask_t *);
|
||||
extern void __KAI_KMPC_CONVENTION kmp_destroy_affinity_mask (kmp_affinity_mask_t *);
|
||||
extern int __KAI_KMPC_CONVENTION kmp_set_affinity_mask_proc (int, kmp_affinity_mask_t *);
|
||||
extern int __KAI_KMPC_CONVENTION kmp_unset_affinity_mask_proc (int, kmp_affinity_mask_t *);
|
||||
extern int __KAI_KMPC_CONVENTION kmp_get_affinity_mask_proc (int, kmp_affinity_mask_t *);
|
||||
|
||||
extern void * __KAI_KMPC_CONVENTION kmp_malloc (size_t);
|
||||
extern void * __KAI_KMPC_CONVENTION kmp_aligned_malloc (size_t, size_t);
|
||||
extern void * __KAI_KMPC_CONVENTION kmp_calloc (size_t, size_t);
|
||||
extern void * __KAI_KMPC_CONVENTION kmp_realloc (void *, size_t);
|
||||
extern void __KAI_KMPC_CONVENTION kmp_free (void *);
|
||||
|
||||
extern void __KAI_KMPC_CONVENTION kmp_set_warnings_on(void);
|
||||
extern void __KAI_KMPC_CONVENTION kmp_set_warnings_off(void);
|
||||
|
||||
# undef __KAI_KMPC_CONVENTION
|
||||
|
||||
/* Warning:
|
||||
The following typedefs are not standard, deprecated and will be removed in a future release.
|
||||
*/
|
||||
typedef int omp_int_t;
|
||||
typedef double omp_wtime_t;
|
||||
|
||||
# ifdef __cplusplus
|
||||
}
|
||||
# endif
|
||||
|
||||
#endif /* __OMP_H */
|
||||
|
|
@ -1,643 +0,0 @@
|
|||
! include/30/omp_lib.f.var
|
||||
|
||||
!
|
||||
!//===----------------------------------------------------------------------===//
|
||||
!//
|
||||
!// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
||||
!// See https://llvm.org/LICENSE.txt for license information.
|
||||
!// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||
!//
|
||||
!//===----------------------------------------------------------------------===//
|
||||
!
|
||||
|
||||
!***
|
||||
!*** Some of the directives for the following routine extend past column 72,
|
||||
!*** so process this file in 132-column mode.
|
||||
!***
|
||||
|
||||
!dec$ fixedformlinesize:132
|
||||
|
||||
module omp_lib_kinds
|
||||
|
||||
integer, parameter :: omp_integer_kind = 4
|
||||
integer, parameter :: omp_logical_kind = 4
|
||||
integer, parameter :: omp_real_kind = 4
|
||||
integer, parameter :: omp_lock_kind = int_ptr_kind()
|
||||
integer, parameter :: omp_nest_lock_kind = int_ptr_kind()
|
||||
integer, parameter :: omp_sched_kind = omp_integer_kind
|
||||
integer, parameter :: kmp_pointer_kind = int_ptr_kind()
|
||||
integer, parameter :: kmp_size_t_kind = int_ptr_kind()
|
||||
integer, parameter :: kmp_affinity_mask_kind = int_ptr_kind()
|
||||
|
||||
end module omp_lib_kinds
|
||||
|
||||
module omp_lib
|
||||
|
||||
use omp_lib_kinds
|
||||
|
||||
integer (kind=omp_integer_kind), parameter :: kmp_version_major = @LIBOMP_VERSION_MAJOR@
|
||||
integer (kind=omp_integer_kind), parameter :: kmp_version_minor = @LIBOMP_VERSION_MINOR@
|
||||
integer (kind=omp_integer_kind), parameter :: kmp_version_build = @LIBOMP_VERSION_BUILD@
|
||||
character(*), parameter :: kmp_build_date = '@LIBOMP_BUILD_DATE@'
|
||||
integer (kind=omp_integer_kind), parameter :: openmp_version = @LIBOMP_OMP_YEAR_MONTH@
|
||||
|
||||
integer(kind=omp_sched_kind), parameter :: omp_sched_static = 1
|
||||
integer(kind=omp_sched_kind), parameter :: omp_sched_dynamic = 2
|
||||
integer(kind=omp_sched_kind), parameter :: omp_sched_guided = 3
|
||||
integer(kind=omp_sched_kind), parameter :: omp_sched_auto = 4
|
||||
|
||||
interface
|
||||
|
||||
! ***
|
||||
! *** omp_* entry points
|
||||
! ***
|
||||
|
||||
subroutine omp_set_num_threads(nthreads)
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_integer_kind) nthreads
|
||||
end subroutine omp_set_num_threads
|
||||
|
||||
subroutine omp_set_dynamic(enable)
|
||||
use omp_lib_kinds
|
||||
logical (kind=omp_logical_kind) enable
|
||||
end subroutine omp_set_dynamic
|
||||
|
||||
subroutine omp_set_nested(enable)
|
||||
use omp_lib_kinds
|
||||
logical (kind=omp_logical_kind) enable
|
||||
end subroutine omp_set_nested
|
||||
|
||||
function omp_get_num_threads()
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_integer_kind) omp_get_num_threads
|
||||
end function omp_get_num_threads
|
||||
|
||||
function omp_get_max_threads()
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_integer_kind) omp_get_max_threads
|
||||
end function omp_get_max_threads
|
||||
|
||||
function omp_get_thread_num()
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_integer_kind) omp_get_thread_num
|
||||
end function omp_get_thread_num
|
||||
|
||||
function omp_get_num_procs()
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_integer_kind) omp_get_num_procs
|
||||
end function omp_get_num_procs
|
||||
|
||||
function omp_in_parallel()
|
||||
use omp_lib_kinds
|
||||
logical (kind=omp_logical_kind) omp_in_parallel
|
||||
end function omp_in_parallel
|
||||
|
||||
function omp_get_dynamic()
|
||||
use omp_lib_kinds
|
||||
logical (kind=omp_logical_kind) omp_get_dynamic
|
||||
end function omp_get_dynamic
|
||||
|
||||
function omp_get_nested()
|
||||
use omp_lib_kinds
|
||||
logical (kind=omp_logical_kind) omp_get_nested
|
||||
end function omp_get_nested
|
||||
|
||||
function omp_get_thread_limit()
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_integer_kind) omp_get_thread_limit
|
||||
end function omp_get_thread_limit
|
||||
|
||||
subroutine omp_set_max_active_levels(max_levels)
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_integer_kind) max_levels
|
||||
end subroutine omp_set_max_active_levels
|
||||
|
||||
function omp_get_max_active_levels()
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_integer_kind) omp_get_max_active_levels
|
||||
end function omp_get_max_active_levels
|
||||
|
||||
function omp_get_level()
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_integer_kind) omp_get_level
|
||||
end function omp_get_level
|
||||
|
||||
function omp_get_active_level()
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_integer_kind) omp_get_active_level
|
||||
end function omp_get_active_level
|
||||
|
||||
function omp_get_ancestor_thread_num(level)
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_integer_kind) level
|
||||
integer (kind=omp_integer_kind) omp_get_ancestor_thread_num
|
||||
end function omp_get_ancestor_thread_num
|
||||
|
||||
function omp_get_team_size(level)
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_integer_kind) level
|
||||
integer (kind=omp_integer_kind) omp_get_team_size
|
||||
end function omp_get_team_size
|
||||
|
||||
subroutine omp_set_schedule(kind, modifier)
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_sched_kind) kind
|
||||
integer (kind=omp_integer_kind) modifier
|
||||
end subroutine omp_set_schedule
|
||||
|
||||
subroutine omp_get_schedule(kind, modifier)
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_sched_kind) kind
|
||||
integer (kind=omp_integer_kind) modifier
|
||||
end subroutine omp_get_schedule
|
||||
|
||||
function omp_get_wtime()
|
||||
double precision omp_get_wtime
|
||||
end function omp_get_wtime
|
||||
|
||||
function omp_get_wtick ()
|
||||
double precision omp_get_wtick
|
||||
end function omp_get_wtick
|
||||
|
||||
subroutine omp_init_lock(lockvar)
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_lock_kind) lockvar
|
||||
end subroutine omp_init_lock
|
||||
|
||||
subroutine omp_destroy_lock(lockvar)
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_lock_kind) lockvar
|
||||
end subroutine omp_destroy_lock
|
||||
|
||||
subroutine omp_set_lock(lockvar)
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_lock_kind) lockvar
|
||||
end subroutine omp_set_lock
|
||||
|
||||
subroutine omp_unset_lock(lockvar)
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_lock_kind) lockvar
|
||||
end subroutine omp_unset_lock
|
||||
|
||||
function omp_test_lock(lockvar)
|
||||
use omp_lib_kinds
|
||||
logical (kind=omp_logical_kind) omp_test_lock
|
||||
integer (kind=omp_lock_kind) lockvar
|
||||
end function omp_test_lock
|
||||
|
||||
subroutine omp_init_nest_lock(lockvar)
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_nest_lock_kind) lockvar
|
||||
end subroutine omp_init_nest_lock
|
||||
|
||||
subroutine omp_destroy_nest_lock(lockvar)
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_nest_lock_kind) lockvar
|
||||
end subroutine omp_destroy_nest_lock
|
||||
|
||||
subroutine omp_set_nest_lock(lockvar)
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_nest_lock_kind) lockvar
|
||||
end subroutine omp_set_nest_lock
|
||||
|
||||
subroutine omp_unset_nest_lock(lockvar)
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_nest_lock_kind) lockvar
|
||||
end subroutine omp_unset_nest_lock
|
||||
|
||||
function omp_test_nest_lock(lockvar)
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_integer_kind) omp_test_nest_lock
|
||||
integer (kind=omp_nest_lock_kind) lockvar
|
||||
end function omp_test_nest_lock
|
||||
|
||||
! ***
|
||||
! *** kmp_* entry points
|
||||
! ***
|
||||
|
||||
subroutine kmp_set_stacksize(size)
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_integer_kind) size
|
||||
end subroutine kmp_set_stacksize
|
||||
|
||||
subroutine kmp_set_stacksize_s(size)
|
||||
use omp_lib_kinds
|
||||
integer (kind=kmp_size_t_kind) size
|
||||
end subroutine kmp_set_stacksize_s
|
||||
|
||||
subroutine kmp_set_blocktime(msec)
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_integer_kind) msec
|
||||
end subroutine kmp_set_blocktime
|
||||
|
||||
subroutine kmp_set_library_serial()
|
||||
end subroutine kmp_set_library_serial
|
||||
|
||||
subroutine kmp_set_library_turnaround()
|
||||
end subroutine kmp_set_library_turnaround
|
||||
|
||||
subroutine kmp_set_library_throughput()
|
||||
end subroutine kmp_set_library_throughput
|
||||
|
||||
subroutine kmp_set_library(libnum)
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_integer_kind) libnum
|
||||
end subroutine kmp_set_library
|
||||
|
||||
subroutine kmp_set_defaults(string)
|
||||
character*(*) string
|
||||
end subroutine kmp_set_defaults
|
||||
|
||||
function kmp_get_stacksize()
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_integer_kind) kmp_get_stacksize
|
||||
end function kmp_get_stacksize
|
||||
|
||||
function kmp_get_stacksize_s()
|
||||
use omp_lib_kinds
|
||||
integer (kind=kmp_size_t_kind) kmp_get_stacksize_s
|
||||
end function kmp_get_stacksize_s
|
||||
|
||||
function kmp_get_blocktime()
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_integer_kind) kmp_get_blocktime
|
||||
end function kmp_get_blocktime
|
||||
|
||||
function kmp_get_library()
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_integer_kind) kmp_get_library
|
||||
end function kmp_get_library
|
||||
|
||||
function kmp_set_affinity(mask)
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_integer_kind) kmp_set_affinity
|
||||
integer (kind=kmp_affinity_mask_kind) mask
|
||||
end function kmp_set_affinity
|
||||
|
||||
function kmp_get_affinity(mask)
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_integer_kind) kmp_get_affinity
|
||||
integer (kind=kmp_affinity_mask_kind) mask
|
||||
end function kmp_get_affinity
|
||||
|
||||
function kmp_get_affinity_max_proc()
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_integer_kind) kmp_get_affinity_max_proc
|
||||
end function kmp_get_affinity_max_proc
|
||||
|
||||
subroutine kmp_create_affinity_mask(mask)
|
||||
use omp_lib_kinds
|
||||
integer (kind=kmp_affinity_mask_kind) mask
|
||||
end subroutine kmp_create_affinity_mask
|
||||
|
||||
subroutine kmp_destroy_affinity_mask(mask)
|
||||
use omp_lib_kinds
|
||||
integer (kind=kmp_affinity_mask_kind) mask
|
||||
end subroutine kmp_destroy_affinity_mask
|
||||
|
||||
function kmp_set_affinity_mask_proc(proc, mask)
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_integer_kind) kmp_set_affinity_mask_proc
|
||||
integer (kind=omp_integer_kind) proc
|
||||
integer (kind=kmp_affinity_mask_kind) mask
|
||||
end function kmp_set_affinity_mask_proc
|
||||
|
||||
function kmp_unset_affinity_mask_proc(proc, mask)
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_integer_kind) kmp_unset_affinity_mask_proc
|
||||
integer (kind=omp_integer_kind) proc
|
||||
integer (kind=kmp_affinity_mask_kind) mask
|
||||
end function kmp_unset_affinity_mask_proc
|
||||
|
||||
function kmp_get_affinity_mask_proc(proc, mask)
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_integer_kind) kmp_get_affinity_mask_proc
|
||||
integer (kind=omp_integer_kind) proc
|
||||
integer (kind=kmp_affinity_mask_kind) mask
|
||||
end function kmp_get_affinity_mask_proc
|
||||
|
||||
function kmp_malloc(size)
|
||||
use omp_lib_kinds
|
||||
integer (kind=kmp_pointer_kind) kmp_malloc
|
||||
integer (kind=kmp_size_t_kind) size
|
||||
end function kmp_malloc
|
||||
|
||||
function kmp_aligned_malloc(size, alignment)
|
||||
use omp_lib_kinds
|
||||
integer (kind=kmp_pointer_kind) kmp_aligned_malloc
|
||||
integer (kind=kmp_size_t_kind) size
|
||||
integer (kind=kmp_size_t_kind) alignment
|
||||
end function kmp_aligned_malloc
|
||||
|
||||
function kmp_calloc(nelem, elsize)
|
||||
use omp_lib_kinds
|
||||
integer (kind=kmp_pointer_kind) kmp_calloc
|
||||
integer (kind=kmp_size_t_kind) nelem
|
||||
integer (kind=kmp_size_t_kind) elsize
|
||||
end function kmp_calloc
|
||||
|
||||
function kmp_realloc(ptr, size)
|
||||
use omp_lib_kinds
|
||||
integer (kind=kmp_pointer_kind) kmp_realloc
|
||||
integer (kind=kmp_pointer_kind) ptr
|
||||
integer (kind=kmp_size_t_kind) size
|
||||
end function kmp_realloc
|
||||
|
||||
subroutine kmp_free(ptr)
|
||||
use omp_lib_kinds
|
||||
integer (kind=kmp_pointer_kind) ptr
|
||||
end subroutine kmp_free
|
||||
|
||||
subroutine kmp_set_warnings_on()
|
||||
end subroutine kmp_set_warnings_on
|
||||
|
||||
subroutine kmp_set_warnings_off()
|
||||
end subroutine kmp_set_warnings_off
|
||||
|
||||
end interface
|
||||
|
||||
!dec$ if defined(_WIN32)
|
||||
!dec$ if defined(_WIN64) .or. defined(_M_AMD64)
|
||||
|
||||
!***
|
||||
!*** The Fortran entry points must be in uppercase, even if the /Qlowercase
|
||||
!*** option is specified. The alias attribute ensures that the specified
|
||||
!*** string is used as the entry point.
|
||||
!***
|
||||
!*** On the Windows* OS IA-32 architecture, the Fortran entry points have an
|
||||
!*** underscore prepended. On the Windows* OS Intel(R) 64
|
||||
!*** architecture, no underscore is prepended.
|
||||
!***
|
||||
|
||||
!dec$ attributes alias:'OMP_SET_NUM_THREADS' :: omp_set_num_threads
|
||||
!dec$ attributes alias:'OMP_SET_DYNAMIC' :: omp_set_dynamic
|
||||
!dec$ attributes alias:'OMP_SET_NESTED' :: omp_set_nested
|
||||
!dec$ attributes alias:'OMP_GET_NUM_THREADS' :: omp_get_num_threads
|
||||
!dec$ attributes alias:'OMP_GET_MAX_THREADS' :: omp_get_max_threads
|
||||
!dec$ attributes alias:'OMP_GET_THREAD_NUM' :: omp_get_thread_num
|
||||
!dec$ attributes alias:'OMP_GET_NUM_PROCS' :: omp_get_num_procs
|
||||
!dec$ attributes alias:'OMP_IN_PARALLEL' :: omp_in_parallel
|
||||
!dec$ attributes alias:'OMP_GET_DYNAMIC' :: omp_get_dynamic
|
||||
!dec$ attributes alias:'OMP_GET_NESTED' :: omp_get_nested
|
||||
!dec$ attributes alias:'OMP_GET_THREAD_LIMIT' :: omp_get_thread_limit
|
||||
!dec$ attributes alias:'OMP_SET_MAX_ACTIVE_LEVELS' :: omp_set_max_active_levels
|
||||
!dec$ attributes alias:'OMP_GET_MAX_ACTIVE_LEVELS' :: omp_get_max_active_levels
|
||||
!dec$ attributes alias:'OMP_GET_LEVEL' :: omp_get_level
|
||||
!dec$ attributes alias:'OMP_GET_ACTIVE_LEVEL' :: omp_get_active_level
|
||||
!dec$ attributes alias:'OMP_GET_ANCESTOR_THREAD_NUM' :: omp_get_ancestor_thread_num
|
||||
!dec$ attributes alias:'OMP_GET_TEAM_SIZE' :: omp_get_team_size
|
||||
!dec$ attributes alias:'OMP_SET_SCHEDULE' :: omp_set_schedule
|
||||
!dec$ attributes alias:'OMP_GET_SCHEDULE' :: omp_get_schedule
|
||||
!dec$ attributes alias:'OMP_GET_WTIME' :: omp_get_wtime
|
||||
!dec$ attributes alias:'OMP_GET_WTICK' :: omp_get_wtick
|
||||
|
||||
!dec$ attributes alias:'omp_init_lock' :: omp_init_lock
|
||||
!dec$ attributes alias:'omp_destroy_lock' :: omp_destroy_lock
|
||||
!dec$ attributes alias:'omp_set_lock' :: omp_set_lock
|
||||
!dec$ attributes alias:'omp_unset_lock' :: omp_unset_lock
|
||||
!dec$ attributes alias:'omp_test_lock' :: omp_test_lock
|
||||
!dec$ attributes alias:'omp_init_nest_lock' :: omp_init_nest_lock
|
||||
!dec$ attributes alias:'omp_destroy_nest_lock' :: omp_destroy_nest_lock
|
||||
!dec$ attributes alias:'omp_set_nest_lock' :: omp_set_nest_lock
|
||||
!dec$ attributes alias:'omp_unset_nest_lock' :: omp_unset_nest_lock
|
||||
!dec$ attributes alias:'omp_test_nest_lock' :: omp_test_nest_lock
|
||||
|
||||
!dec$ attributes alias:'KMP_SET_STACKSIZE'::kmp_set_stacksize
|
||||
!dec$ attributes alias:'KMP_SET_STACKSIZE_S'::kmp_set_stacksize_s
|
||||
!dec$ attributes alias:'KMP_SET_BLOCKTIME'::kmp_set_blocktime
|
||||
!dec$ attributes alias:'KMP_SET_LIBRARY_SERIAL'::kmp_set_library_serial
|
||||
!dec$ attributes alias:'KMP_SET_LIBRARY_TURNAROUND'::kmp_set_library_turnaround
|
||||
!dec$ attributes alias:'KMP_SET_LIBRARY_THROUGHPUT'::kmp_set_library_throughput
|
||||
!dec$ attributes alias:'KMP_SET_LIBRARY'::kmp_set_library
|
||||
!dec$ attributes alias:'KMP_GET_STACKSIZE'::kmp_get_stacksize
|
||||
!dec$ attributes alias:'KMP_GET_STACKSIZE_S'::kmp_get_stacksize_s
|
||||
!dec$ attributes alias:'KMP_GET_BLOCKTIME'::kmp_get_blocktime
|
||||
!dec$ attributes alias:'KMP_GET_LIBRARY'::kmp_get_library
|
||||
!dec$ attributes alias:'KMP_SET_AFFINITY'::kmp_set_affinity
|
||||
!dec$ attributes alias:'KMP_GET_AFFINITY'::kmp_get_affinity
|
||||
!dec$ attributes alias:'KMP_GET_AFFINITY_MAX_PROC'::kmp_get_affinity_max_proc
|
||||
!dec$ attributes alias:'KMP_CREATE_AFFINITY_MASK'::kmp_create_affinity_mask
|
||||
!dec$ attributes alias:'KMP_DESTROY_AFFINITY_MASK'::kmp_destroy_affinity_mask
|
||||
!dec$ attributes alias:'KMP_SET_AFFINITY_MASK_PROC'::kmp_set_affinity_mask_proc
|
||||
!dec$ attributes alias:'KMP_UNSET_AFFINITY_MASK_PROC'::kmp_unset_affinity_mask_proc
|
||||
!dec$ attributes alias:'KMP_GET_AFFINITY_MASK_PROC'::kmp_get_affinity_mask_proc
|
||||
!dec$ attributes alias:'KMP_MALLOC'::kmp_malloc
|
||||
!dec$ attributes alias:'KMP_ALIGNED_MALLOC'::kmp_aligned_malloc
|
||||
!dec$ attributes alias:'KMP_CALLOC'::kmp_calloc
|
||||
!dec$ attributes alias:'KMP_REALLOC'::kmp_realloc
|
||||
!dec$ attributes alias:'KMP_FREE'::kmp_free
|
||||
|
||||
!dec$ attributes alias:'KMP_SET_WARNINGS_ON'::kmp_set_warnings_on
|
||||
!dec$ attributes alias:'KMP_SET_WARNINGS_OFF'::kmp_set_warnings_off
|
||||
|
||||
!dec$ else
|
||||
|
||||
!***
|
||||
!*** On Windows* OS IA-32 architecture, the Fortran entry points have an underscore prepended.
|
||||
!***
|
||||
|
||||
!dec$ attributes alias:'_OMP_SET_NUM_THREADS' :: omp_set_num_threads
|
||||
!dec$ attributes alias:'_OMP_SET_DYNAMIC' :: omp_set_dynamic
|
||||
!dec$ attributes alias:'_OMP_SET_NESTED' :: omp_set_nested
|
||||
!dec$ attributes alias:'_OMP_GET_NUM_THREADS' :: omp_get_num_threads
|
||||
!dec$ attributes alias:'_OMP_GET_MAX_THREADS' :: omp_get_max_threads
|
||||
!dec$ attributes alias:'_OMP_GET_THREAD_NUM' :: omp_get_thread_num
|
||||
!dec$ attributes alias:'_OMP_GET_NUM_PROCS' :: omp_get_num_procs
|
||||
!dec$ attributes alias:'_OMP_IN_PARALLEL' :: omp_in_parallel
|
||||
!dec$ attributes alias:'_OMP_GET_DYNAMIC' :: omp_get_dynamic
|
||||
!dec$ attributes alias:'_OMP_GET_NESTED' :: omp_get_nested
|
||||
!dec$ attributes alias:'_OMP_GET_THREAD_LIMIT' :: omp_get_thread_limit
|
||||
!dec$ attributes alias:'_OMP_SET_MAX_ACTIVE_LEVELS' :: omp_set_max_active_levels
|
||||
!dec$ attributes alias:'_OMP_GET_MAX_ACTIVE_LEVELS' :: omp_get_max_active_levels
|
||||
!dec$ attributes alias:'_OMP_GET_LEVEL' :: omp_get_level
|
||||
!dec$ attributes alias:'_OMP_GET_ACTIVE_LEVEL' :: omp_get_active_level
|
||||
!dec$ attributes alias:'_OMP_GET_ANCESTOR_THREAD_NUM' :: omp_get_ancestor_thread_num
|
||||
!dec$ attributes alias:'_OMP_GET_TEAM_SIZE' :: omp_get_team_size
|
||||
!dec$ attributes alias:'_OMP_SET_SCHEDULE' :: omp_set_schedule
|
||||
!dec$ attributes alias:'_OMP_GET_SCHEDULE' :: omp_get_schedule
|
||||
!dec$ attributes alias:'_OMP_GET_WTIME' :: omp_get_wtime
|
||||
!dec$ attributes alias:'_OMP_GET_WTICK' :: omp_get_wtick
|
||||
|
||||
!dec$ attributes alias:'_omp_init_lock' :: omp_init_lock
|
||||
!dec$ attributes alias:'_omp_destroy_lock' :: omp_destroy_lock
|
||||
!dec$ attributes alias:'_omp_set_lock' :: omp_set_lock
|
||||
!dec$ attributes alias:'_omp_unset_lock' :: omp_unset_lock
|
||||
!dec$ attributes alias:'_omp_test_lock' :: omp_test_lock
|
||||
!dec$ attributes alias:'_omp_init_nest_lock' :: omp_init_nest_lock
|
||||
!dec$ attributes alias:'_omp_destroy_nest_lock' :: omp_destroy_nest_lock
|
||||
!dec$ attributes alias:'_omp_set_nest_lock' :: omp_set_nest_lock
|
||||
!dec$ attributes alias:'_omp_unset_nest_lock' :: omp_unset_nest_lock
|
||||
!dec$ attributes alias:'_omp_test_nest_lock' :: omp_test_nest_lock
|
||||
|
||||
!dec$ attributes alias:'_KMP_SET_STACKSIZE'::kmp_set_stacksize
|
||||
!dec$ attributes alias:'_KMP_SET_STACKSIZE_S'::kmp_set_stacksize_s
|
||||
!dec$ attributes alias:'_KMP_SET_BLOCKTIME'::kmp_set_blocktime
|
||||
!dec$ attributes alias:'_KMP_SET_LIBRARY_SERIAL'::kmp_set_library_serial
|
||||
!dec$ attributes alias:'_KMP_SET_LIBRARY_TURNAROUND'::kmp_set_library_turnaround
|
||||
!dec$ attributes alias:'_KMP_SET_LIBRARY_THROUGHPUT'::kmp_set_library_throughput
|
||||
!dec$ attributes alias:'_KMP_SET_LIBRARY'::kmp_set_library
|
||||
!dec$ attributes alias:'_KMP_GET_STACKSIZE'::kmp_get_stacksize
|
||||
!dec$ attributes alias:'_KMP_GET_STACKSIZE_S'::kmp_get_stacksize_s
|
||||
!dec$ attributes alias:'_KMP_GET_BLOCKTIME'::kmp_get_blocktime
|
||||
!dec$ attributes alias:'_KMP_GET_LIBRARY'::kmp_get_library
|
||||
!dec$ attributes alias:'_KMP_SET_AFFINITY'::kmp_set_affinity
|
||||
!dec$ attributes alias:'_KMP_GET_AFFINITY'::kmp_get_affinity
|
||||
!dec$ attributes alias:'_KMP_GET_AFFINITY_MAX_PROC'::kmp_get_affinity_max_proc
|
||||
!dec$ attributes alias:'_KMP_CREATE_AFFINITY_MASK'::kmp_create_affinity_mask
|
||||
!dec$ attributes alias:'_KMP_DESTROY_AFFINITY_MASK'::kmp_destroy_affinity_mask
|
||||
!dec$ attributes alias:'_KMP_SET_AFFINITY_MASK_PROC'::kmp_set_affinity_mask_proc
|
||||
!dec$ attributes alias:'_KMP_UNSET_AFFINITY_MASK_PROC'::kmp_unset_affinity_mask_proc
|
||||
!dec$ attributes alias:'_KMP_GET_AFFINITY_MASK_PROC'::kmp_get_affinity_mask_proc
|
||||
!dec$ attributes alias:'_KMP_MALLOC'::kmp_malloc
|
||||
!dec$ attributes alias:'_KMP_ALIGNED_MALLOC'::kmp_aligned_malloc
|
||||
!dec$ attributes alias:'_KMP_CALLOC'::kmp_calloc
|
||||
!dec$ attributes alias:'_KMP_REALLOC'::kmp_realloc
|
||||
!dec$ attributes alias:'_KMP_FREE'::kmp_free
|
||||
|
||||
!dec$ attributes alias:'_KMP_SET_WARNINGS_ON'::kmp_set_warnings_on
|
||||
!dec$ attributes alias:'_KMP_SET_WARNINGS_OFF'::kmp_set_warnings_off
|
||||
|
||||
!dec$ endif
|
||||
!dec$ endif
|
||||
|
||||
!dec$ if defined(__linux)
|
||||
|
||||
!***
|
||||
!*** The Linux* OS entry points are in lowercase, with an underscore appended.
|
||||
!***
|
||||
|
||||
!dec$ attributes alias:'omp_set_num_threads_'::omp_set_num_threads
|
||||
!dec$ attributes alias:'omp_set_dynamic_'::omp_set_dynamic
|
||||
!dec$ attributes alias:'omp_set_nested_'::omp_set_nested
|
||||
!dec$ attributes alias:'omp_get_num_threads_'::omp_get_num_threads
|
||||
!dec$ attributes alias:'omp_get_max_threads_'::omp_get_max_threads
|
||||
!dec$ attributes alias:'omp_get_thread_num_'::omp_get_thread_num
|
||||
!dec$ attributes alias:'omp_get_num_procs_'::omp_get_num_procs
|
||||
!dec$ attributes alias:'omp_in_parallel_'::omp_in_parallel
|
||||
!dec$ attributes alias:'omp_get_dynamic_'::omp_get_dynamic
|
||||
!dec$ attributes alias:'omp_get_nested_'::omp_get_nested
|
||||
!dec$ attributes alias:'omp_get_thread_limit_'::omp_get_thread_limit
|
||||
!dec$ attributes alias:'omp_set_max_active_levels_'::omp_set_max_active_levels
|
||||
!dec$ attributes alias:'omp_get_max_active_levels_'::omp_get_max_active_levels
|
||||
!dec$ attributes alias:'omp_get_level_'::omp_get_level
|
||||
!dec$ attributes alias:'omp_get_active_level_'::omp_get_active_level
|
||||
!dec$ attributes alias:'omp_get_ancestor_thread_num_'::omp_get_ancestor_thread_num
|
||||
!dec$ attributes alias:'omp_get_team_size_'::omp_get_team_size
|
||||
!dec$ attributes alias:'omp_set_schedule_'::omp_set_schedule
|
||||
!dec$ attributes alias:'omp_get_schedule_'::omp_get_schedule
|
||||
!dec$ attributes alias:'omp_get_wtime_'::omp_get_wtime
|
||||
!dec$ attributes alias:'omp_get_wtick_'::omp_get_wtick
|
||||
|
||||
!dec$ attributes alias:'omp_init_lock_'::omp_init_lock
|
||||
!dec$ attributes alias:'omp_destroy_lock_'::omp_destroy_lock
|
||||
!dec$ attributes alias:'omp_set_lock_'::omp_set_lock
|
||||
!dec$ attributes alias:'omp_unset_lock_'::omp_unset_lock
|
||||
!dec$ attributes alias:'omp_test_lock_'::omp_test_lock
|
||||
!dec$ attributes alias:'omp_init_nest_lock_'::omp_init_nest_lock
|
||||
!dec$ attributes alias:'omp_destroy_nest_lock_'::omp_destroy_nest_lock
|
||||
!dec$ attributes alias:'omp_set_nest_lock_'::omp_set_nest_lock
|
||||
!dec$ attributes alias:'omp_unset_nest_lock_'::omp_unset_nest_lock
|
||||
!dec$ attributes alias:'omp_test_nest_lock_'::omp_test_nest_lock
|
||||
|
||||
!dec$ attributes alias:'kmp_set_stacksize_'::kmp_set_stacksize
|
||||
!dec$ attributes alias:'kmp_set_stacksize_s_'::kmp_set_stacksize_s
|
||||
!dec$ attributes alias:'kmp_set_blocktime_'::kmp_set_blocktime
|
||||
!dec$ attributes alias:'kmp_set_library_serial_'::kmp_set_library_serial
|
||||
!dec$ attributes alias:'kmp_set_library_turnaround_'::kmp_set_library_turnaround
|
||||
!dec$ attributes alias:'kmp_set_library_throughput_'::kmp_set_library_throughput
|
||||
!dec$ attributes alias:'kmp_set_library_'::kmp_set_library
|
||||
!dec$ attributes alias:'kmp_get_stacksize_'::kmp_get_stacksize
|
||||
!dec$ attributes alias:'kmp_get_stacksize_s_'::kmp_get_stacksize_s
|
||||
!dec$ attributes alias:'kmp_get_blocktime_'::kmp_get_blocktime
|
||||
!dec$ attributes alias:'kmp_get_library_'::kmp_get_library
|
||||
!dec$ attributes alias:'kmp_set_affinity_'::kmp_set_affinity
|
||||
!dec$ attributes alias:'kmp_get_affinity_'::kmp_get_affinity
|
||||
!dec$ attributes alias:'kmp_get_affinity_max_proc_'::kmp_get_affinity_max_proc
|
||||
!dec$ attributes alias:'kmp_create_affinity_mask_'::kmp_create_affinity_mask
|
||||
!dec$ attributes alias:'kmp_destroy_affinity_mask_'::kmp_destroy_affinity_mask
|
||||
!dec$ attributes alias:'kmp_set_affinity_mask_proc_'::kmp_set_affinity_mask_proc
|
||||
!dec$ attributes alias:'kmp_unset_affinity_mask_proc_'::kmp_unset_affinity_mask_proc
|
||||
!dec$ attributes alias:'kmp_get_affinity_mask_proc_'::kmp_get_affinity_mask_proc
|
||||
!dec$ attributes alias:'kmp_malloc_'::kmp_malloc
|
||||
!dec$ attributes alias:'kmp_aligned_malloc_'::kmp_aligned_malloc
|
||||
!dec$ attributes alias:'kmp_calloc_'::kmp_calloc
|
||||
!dec$ attributes alias:'kmp_realloc_'::kmp_realloc
|
||||
!dec$ attributes alias:'kmp_free_'::kmp_free
|
||||
|
||||
!dec$ attributes alias:'kmp_set_warnings_on_'::kmp_set_warnings_on
|
||||
!dec$ attributes alias:'kmp_set_warnings_off_'::kmp_set_warnings_off
|
||||
|
||||
!dec$ endif
|
||||
|
||||
!dec$ if defined(__APPLE__)
|
||||
|
||||
!***
|
||||
!*** The Mac entry points are in lowercase, with an both an underscore
|
||||
!*** appended and an underscore prepended.
|
||||
!***
|
||||
|
||||
!dec$ attributes alias:'_omp_set_num_threads_'::omp_set_num_threads
|
||||
!dec$ attributes alias:'_omp_set_dynamic_'::omp_set_dynamic
|
||||
!dec$ attributes alias:'_omp_set_nested_'::omp_set_nested
|
||||
!dec$ attributes alias:'_omp_get_num_threads_'::omp_get_num_threads
|
||||
!dec$ attributes alias:'_omp_get_max_threads_'::omp_get_max_threads
|
||||
!dec$ attributes alias:'_omp_get_thread_num_'::omp_get_thread_num
|
||||
!dec$ attributes alias:'_omp_get_num_procs_'::omp_get_num_procs
|
||||
!dec$ attributes alias:'_omp_in_parallel_'::omp_in_parallel
|
||||
!dec$ attributes alias:'_omp_get_dynamic_'::omp_get_dynamic
|
||||
!dec$ attributes alias:'_omp_get_nested_'::omp_get_nested
|
||||
!dec$ attributes alias:'_omp_get_thread_limit_'::omp_get_thread_limit
|
||||
!dec$ attributes alias:'_omp_set_max_active_levels_'::omp_set_max_active_levels
|
||||
!dec$ attributes alias:'_omp_get_max_active_levels_'::omp_get_max_active_levels
|
||||
!dec$ attributes alias:'_omp_get_level_'::omp_get_level
|
||||
!dec$ attributes alias:'_omp_get_active_level_'::omp_get_active_level
|
||||
!dec$ attributes alias:'_omp_get_ancestor_thread_num_'::omp_get_ancestor_thread_num
|
||||
!dec$ attributes alias:'_omp_get_team_size_'::omp_get_team_size
|
||||
!dec$ attributes alias:'_omp_set_schedule_'::omp_set_schedule
|
||||
!dec$ attributes alias:'_omp_get_schedule_'::omp_get_schedule
|
||||
!dec$ attributes alias:'_omp_get_wtime_'::omp_get_wtime
|
||||
!dec$ attributes alias:'_omp_get_wtick_'::omp_get_wtick
|
||||
|
||||
!dec$ attributes alias:'_omp_init_lock_'::omp_init_lock
|
||||
!dec$ attributes alias:'_omp_destroy_lock_'::omp_destroy_lock
|
||||
!dec$ attributes alias:'_omp_set_lock_'::omp_set_lock
|
||||
!dec$ attributes alias:'_omp_unset_lock_'::omp_unset_lock
|
||||
!dec$ attributes alias:'_omp_test_lock_'::omp_test_lock
|
||||
!dec$ attributes alias:'_omp_init_nest_lock_'::omp_init_nest_lock
|
||||
!dec$ attributes alias:'_omp_destroy_nest_lock_'::omp_destroy_nest_lock
|
||||
!dec$ attributes alias:'_omp_set_nest_lock_'::omp_set_nest_lock
|
||||
!dec$ attributes alias:'_omp_unset_nest_lock_'::omp_unset_nest_lock
|
||||
!dec$ attributes alias:'_omp_test_nest_lock_'::omp_test_nest_lock
|
||||
|
||||
!dec$ attributes alias:'_kmp_set_stacksize_'::kmp_set_stacksize
|
||||
!dec$ attributes alias:'_kmp_set_stacksize_s_'::kmp_set_stacksize_s
|
||||
!dec$ attributes alias:'_kmp_set_blocktime_'::kmp_set_blocktime
|
||||
!dec$ attributes alias:'_kmp_set_library_serial_'::kmp_set_library_serial
|
||||
!dec$ attributes alias:'_kmp_set_library_turnaround_'::kmp_set_library_turnaround
|
||||
!dec$ attributes alias:'_kmp_set_library_throughput_'::kmp_set_library_throughput
|
||||
!dec$ attributes alias:'_kmp_set_library_'::kmp_set_library
|
||||
!dec$ attributes alias:'_kmp_get_stacksize_'::kmp_get_stacksize
|
||||
!dec$ attributes alias:'_kmp_get_stacksize_s_'::kmp_get_stacksize_s
|
||||
!dec$ attributes alias:'_kmp_get_blocktime_'::kmp_get_blocktime
|
||||
!dec$ attributes alias:'_kmp_get_library_'::kmp_get_library
|
||||
!dec$ attributes alias:'_kmp_set_affinity_'::kmp_set_affinity
|
||||
!dec$ attributes alias:'_kmp_get_affinity_'::kmp_get_affinity
|
||||
!dec$ attributes alias:'_kmp_get_affinity_max_proc_'::kmp_get_affinity_max_proc
|
||||
!dec$ attributes alias:'_kmp_create_affinity_mask_'::kmp_create_affinity_mask
|
||||
!dec$ attributes alias:'_kmp_destroy_affinity_mask_'::kmp_destroy_affinity_mask
|
||||
!dec$ attributes alias:'_kmp_set_affinity_mask_proc_'::kmp_set_affinity_mask_proc
|
||||
!dec$ attributes alias:'_kmp_unset_affinity_mask_proc_'::kmp_unset_affinity_mask_proc
|
||||
!dec$ attributes alias:'_kmp_get_affinity_mask_proc_'::kmp_get_affinity_mask_proc
|
||||
!dec$ attributes alias:'_kmp_malloc_'::kmp_malloc
|
||||
!dec$ attributes alias:'_kmp_aligned_malloc_'::kmp_aligned_malloc
|
||||
!dec$ attributes alias:'_kmp_calloc_'::kmp_calloc
|
||||
!dec$ attributes alias:'_kmp_realloc_'::kmp_realloc
|
||||
!dec$ attributes alias:'_kmp_free_'::kmp_free
|
||||
|
||||
!dec$ attributes alias:'_kmp_set_warnings_on_'::kmp_set_warnings_on
|
||||
!dec$ attributes alias:'_kmp_set_warnings_off_'::kmp_set_warnings_off
|
||||
|
||||
!dec$ endif
|
||||
|
||||
end module omp_lib
|
||||
|
|
@ -1,364 +0,0 @@
|
|||
! include/30/omp_lib.f90.var
|
||||
|
||||
!
|
||||
!//===----------------------------------------------------------------------===//
|
||||
!//
|
||||
!// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
||||
!// See https://llvm.org/LICENSE.txt for license information.
|
||||
!// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||
!//
|
||||
!//===----------------------------------------------------------------------===//
|
||||
!
|
||||
|
||||
module omp_lib_kinds
|
||||
|
||||
use, intrinsic :: iso_c_binding
|
||||
|
||||
integer, parameter :: omp_integer_kind = c_int
|
||||
integer, parameter :: omp_logical_kind = 4
|
||||
integer, parameter :: omp_real_kind = c_float
|
||||
integer, parameter :: kmp_double_kind = c_double
|
||||
integer, parameter :: omp_lock_kind = c_intptr_t
|
||||
integer, parameter :: omp_nest_lock_kind = c_intptr_t
|
||||
integer, parameter :: omp_sched_kind = omp_integer_kind
|
||||
integer, parameter :: kmp_pointer_kind = c_intptr_t
|
||||
integer, parameter :: kmp_size_t_kind = c_size_t
|
||||
integer, parameter :: kmp_affinity_mask_kind = c_intptr_t
|
||||
|
||||
end module omp_lib_kinds
|
||||
|
||||
module omp_lib
|
||||
|
||||
use omp_lib_kinds
|
||||
|
||||
integer (kind=omp_integer_kind), parameter :: openmp_version = @LIBOMP_OMP_YEAR_MONTH@
|
||||
integer (kind=omp_integer_kind), parameter :: kmp_version_major = @LIBOMP_VERSION_MAJOR@
|
||||
integer (kind=omp_integer_kind), parameter :: kmp_version_minor = @LIBOMP_VERSION_MINOR@
|
||||
integer (kind=omp_integer_kind), parameter :: kmp_version_build = @LIBOMP_VERSION_BUILD@
|
||||
character(*) kmp_build_date
|
||||
parameter( kmp_build_date = '@LIBOMP_BUILD_DATE@' )
|
||||
|
||||
integer(kind=omp_sched_kind), parameter :: omp_sched_static = 1
|
||||
integer(kind=omp_sched_kind), parameter :: omp_sched_dynamic = 2
|
||||
integer(kind=omp_sched_kind), parameter :: omp_sched_guided = 3
|
||||
integer(kind=omp_sched_kind), parameter :: omp_sched_auto = 4
|
||||
|
||||
interface
|
||||
|
||||
! ***
|
||||
! *** omp_* entry points
|
||||
! ***
|
||||
|
||||
subroutine omp_set_num_threads(nthreads) bind(c)
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_integer_kind), value :: nthreads
|
||||
end subroutine omp_set_num_threads
|
||||
|
||||
subroutine omp_set_dynamic(enable) bind(c)
|
||||
use omp_lib_kinds
|
||||
logical (kind=omp_logical_kind), value :: enable
|
||||
end subroutine omp_set_dynamic
|
||||
|
||||
subroutine omp_set_nested(enable) bind(c)
|
||||
use omp_lib_kinds
|
||||
logical (kind=omp_logical_kind), value :: enable
|
||||
end subroutine omp_set_nested
|
||||
|
||||
function omp_get_num_threads() bind(c)
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_integer_kind) omp_get_num_threads
|
||||
end function omp_get_num_threads
|
||||
|
||||
function omp_get_max_threads() bind(c)
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_integer_kind) omp_get_max_threads
|
||||
end function omp_get_max_threads
|
||||
|
||||
function omp_get_thread_num() bind(c)
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_integer_kind) omp_get_thread_num
|
||||
end function omp_get_thread_num
|
||||
|
||||
function omp_get_num_procs() bind(c)
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_integer_kind) omp_get_num_procs
|
||||
end function omp_get_num_procs
|
||||
|
||||
function omp_in_parallel() bind(c)
|
||||
use omp_lib_kinds
|
||||
logical (kind=omp_logical_kind) omp_in_parallel
|
||||
end function omp_in_parallel
|
||||
|
||||
function omp_in_final() bind(c)
|
||||
use omp_lib_kinds
|
||||
logical (kind=omp_logical_kind) omp_in_final
|
||||
end function omp_in_final
|
||||
|
||||
function omp_get_dynamic() bind(c)
|
||||
use omp_lib_kinds
|
||||
logical (kind=omp_logical_kind) omp_get_dynamic
|
||||
end function omp_get_dynamic
|
||||
|
||||
function omp_get_nested() bind(c)
|
||||
use omp_lib_kinds
|
||||
logical (kind=omp_logical_kind) omp_get_nested
|
||||
end function omp_get_nested
|
||||
|
||||
function omp_get_thread_limit() bind(c)
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_integer_kind) omp_get_thread_limit
|
||||
end function omp_get_thread_limit
|
||||
|
||||
subroutine omp_set_max_active_levels(max_levels) bind(c)
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_integer_kind), value :: max_levels
|
||||
end subroutine omp_set_max_active_levels
|
||||
|
||||
function omp_get_max_active_levels() bind(c)
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_integer_kind) omp_get_max_active_levels
|
||||
end function omp_get_max_active_levels
|
||||
|
||||
function omp_get_level() bind(c)
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_integer_kind) :: omp_get_level
|
||||
end function omp_get_level
|
||||
|
||||
function omp_get_active_level() bind(c)
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_integer_kind) :: omp_get_active_level
|
||||
end function omp_get_active_level
|
||||
|
||||
function omp_get_ancestor_thread_num(level) bind(c)
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_integer_kind) omp_get_ancestor_thread_num
|
||||
integer (kind=omp_integer_kind), value :: level
|
||||
end function omp_get_ancestor_thread_num
|
||||
|
||||
function omp_get_team_size(level) bind(c)
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_integer_kind) omp_get_team_size
|
||||
integer (kind=omp_integer_kind), value :: level
|
||||
end function omp_get_team_size
|
||||
|
||||
subroutine omp_set_schedule(kind, modifier) bind(c)
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_sched_kind), value :: kind
|
||||
integer (kind=omp_integer_kind), value :: modifier
|
||||
end subroutine omp_set_schedule
|
||||
|
||||
subroutine omp_get_schedule(kind, modifier) bind(c)
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_sched_kind) :: kind
|
||||
integer (kind=omp_integer_kind) :: modifier
|
||||
end subroutine omp_get_schedule
|
||||
|
||||
function omp_get_wtime() bind(c)
|
||||
use omp_lib_kinds
|
||||
real (kind=kmp_double_kind) omp_get_wtime
|
||||
end function omp_get_wtime
|
||||
|
||||
function omp_get_wtick() bind(c)
|
||||
use omp_lib_kinds
|
||||
real (kind=kmp_double_kind) omp_get_wtick
|
||||
end function omp_get_wtick
|
||||
|
||||
subroutine omp_init_lock(lockvar) bind(c)
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_lock_kind) lockvar
|
||||
end subroutine omp_init_lock
|
||||
|
||||
subroutine omp_destroy_lock(lockvar) bind(c)
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_lock_kind) lockvar
|
||||
end subroutine omp_destroy_lock
|
||||
|
||||
subroutine omp_set_lock(lockvar) bind(c)
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_lock_kind) lockvar
|
||||
end subroutine omp_set_lock
|
||||
|
||||
subroutine omp_unset_lock(lockvar) bind(c)
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_lock_kind) lockvar
|
||||
end subroutine omp_unset_lock
|
||||
|
||||
function omp_test_lock(lockvar) bind(c)
|
||||
use omp_lib_kinds
|
||||
logical (kind=omp_logical_kind) omp_test_lock
|
||||
integer (kind=omp_lock_kind) lockvar
|
||||
end function omp_test_lock
|
||||
|
||||
subroutine omp_init_nest_lock(lockvar) bind(c)
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_nest_lock_kind) lockvar
|
||||
end subroutine omp_init_nest_lock
|
||||
|
||||
subroutine omp_destroy_nest_lock(lockvar) bind(c)
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_nest_lock_kind) lockvar
|
||||
end subroutine omp_destroy_nest_lock
|
||||
|
||||
subroutine omp_set_nest_lock(lockvar) bind(c)
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_nest_lock_kind) lockvar
|
||||
end subroutine omp_set_nest_lock
|
||||
|
||||
subroutine omp_unset_nest_lock(lockvar) bind(c)
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_nest_lock_kind) lockvar
|
||||
end subroutine omp_unset_nest_lock
|
||||
|
||||
function omp_test_nest_lock(lockvar) bind(c)
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_integer_kind) omp_test_nest_lock
|
||||
integer (kind=omp_nest_lock_kind) lockvar
|
||||
end function omp_test_nest_lock
|
||||
|
||||
! ***
|
||||
! *** kmp_* entry points
|
||||
! ***
|
||||
|
||||
subroutine kmp_set_stacksize(size) bind(c)
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_integer_kind), value :: size
|
||||
end subroutine kmp_set_stacksize
|
||||
|
||||
subroutine kmp_set_stacksize_s(size) bind(c)
|
||||
use omp_lib_kinds
|
||||
integer (kind=kmp_size_t_kind), value :: size
|
||||
end subroutine kmp_set_stacksize_s
|
||||
|
||||
subroutine kmp_set_blocktime(msec) bind(c)
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_integer_kind), value :: msec
|
||||
end subroutine kmp_set_blocktime
|
||||
|
||||
subroutine kmp_set_library_serial() bind(c)
|
||||
end subroutine kmp_set_library_serial
|
||||
|
||||
subroutine kmp_set_library_turnaround() bind(c)
|
||||
end subroutine kmp_set_library_turnaround
|
||||
|
||||
subroutine kmp_set_library_throughput() bind(c)
|
||||
end subroutine kmp_set_library_throughput
|
||||
|
||||
subroutine kmp_set_library(libnum) bind(c)
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_integer_kind), value :: libnum
|
||||
end subroutine kmp_set_library
|
||||
|
||||
subroutine kmp_set_defaults(string) bind(c)
|
||||
use, intrinsic :: iso_c_binding
|
||||
character (kind=c_char) :: string(*)
|
||||
end subroutine kmp_set_defaults
|
||||
|
||||
function kmp_get_stacksize() bind(c)
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_integer_kind) kmp_get_stacksize
|
||||
end function kmp_get_stacksize
|
||||
|
||||
function kmp_get_stacksize_s() bind(c)
|
||||
use omp_lib_kinds
|
||||
integer (kind=kmp_size_t_kind) kmp_get_stacksize_s
|
||||
end function kmp_get_stacksize_s
|
||||
|
||||
function kmp_get_blocktime() bind(c)
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_integer_kind) kmp_get_blocktime
|
||||
end function kmp_get_blocktime
|
||||
|
||||
function kmp_get_library() bind(c)
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_integer_kind) kmp_get_library
|
||||
end function kmp_get_library
|
||||
|
||||
function kmp_set_affinity(mask) bind(c)
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_integer_kind) kmp_set_affinity
|
||||
integer (kind=kmp_affinity_mask_kind) mask
|
||||
end function kmp_set_affinity
|
||||
|
||||
function kmp_get_affinity(mask) bind(c)
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_integer_kind) kmp_get_affinity
|
||||
integer (kind=kmp_affinity_mask_kind) mask
|
||||
end function kmp_get_affinity
|
||||
|
||||
function kmp_get_affinity_max_proc() bind(c)
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_integer_kind) kmp_get_affinity_max_proc
|
||||
end function kmp_get_affinity_max_proc
|
||||
|
||||
subroutine kmp_create_affinity_mask(mask) bind(c)
|
||||
use omp_lib_kinds
|
||||
integer (kind=kmp_affinity_mask_kind) mask
|
||||
end subroutine kmp_create_affinity_mask
|
||||
|
||||
subroutine kmp_destroy_affinity_mask(mask) bind(c)
|
||||
use omp_lib_kinds
|
||||
integer (kind=kmp_affinity_mask_kind) mask
|
||||
end subroutine kmp_destroy_affinity_mask
|
||||
|
||||
function kmp_set_affinity_mask_proc(proc, mask) bind(c)
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_integer_kind) kmp_set_affinity_mask_proc
|
||||
integer (kind=omp_integer_kind), value :: proc
|
||||
integer (kind=kmp_affinity_mask_kind) mask
|
||||
end function kmp_set_affinity_mask_proc
|
||||
|
||||
function kmp_unset_affinity_mask_proc(proc, mask) bind(c)
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_integer_kind) kmp_unset_affinity_mask_proc
|
||||
integer (kind=omp_integer_kind), value :: proc
|
||||
integer (kind=kmp_affinity_mask_kind) mask
|
||||
end function kmp_unset_affinity_mask_proc
|
||||
|
||||
function kmp_get_affinity_mask_proc(proc, mask) bind(c)
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_integer_kind) kmp_get_affinity_mask_proc
|
||||
integer (kind=omp_integer_kind), value :: proc
|
||||
integer (kind=kmp_affinity_mask_kind) mask
|
||||
end function kmp_get_affinity_mask_proc
|
||||
|
||||
function kmp_malloc(size) bind(c)
|
||||
use omp_lib_kinds
|
||||
integer (kind=kmp_pointer_kind) kmp_malloc
|
||||
integer (kind=kmp_size_t_kind), value :: size
|
||||
end function kmp_malloc
|
||||
|
||||
function kmp_aligned_malloc(size, alignment) bind(c)
|
||||
use omp_lib_kinds
|
||||
integer (kind=kmp_pointer_kind) kmp_aligned_malloc
|
||||
integer (kind=kmp_size_t_kind), value :: size
|
||||
integer (kind=kmp_size_t_kind), value :: alignment
|
||||
end function kmp_aligned_malloc
|
||||
|
||||
function kmp_calloc(nelem, elsize) bind(c)
|
||||
use omp_lib_kinds
|
||||
integer (kind=kmp_pointer_kind) kmp_calloc
|
||||
integer (kind=kmp_size_t_kind), value :: nelem
|
||||
integer (kind=kmp_size_t_kind), value :: elsize
|
||||
end function kmp_calloc
|
||||
|
||||
function kmp_realloc(ptr, size) bind(c)
|
||||
use omp_lib_kinds
|
||||
integer (kind=kmp_pointer_kind) kmp_realloc
|
||||
integer (kind=kmp_pointer_kind), value :: ptr
|
||||
integer (kind=kmp_size_t_kind), value :: size
|
||||
end function kmp_realloc
|
||||
|
||||
subroutine kmp_free(ptr) bind(c)
|
||||
use omp_lib_kinds
|
||||
integer (kind=kmp_pointer_kind), value :: ptr
|
||||
end subroutine kmp_free
|
||||
|
||||
subroutine kmp_set_warnings_on() bind(c)
|
||||
end subroutine kmp_set_warnings_on
|
||||
|
||||
subroutine kmp_set_warnings_off() bind(c)
|
||||
end subroutine kmp_set_warnings_off
|
||||
|
||||
end interface
|
||||
|
||||
end module omp_lib
|
|
@ -1,648 +0,0 @@
|
|||
! include/30/omp_lib.h.var
|
||||
|
||||
!
|
||||
!//===----------------------------------------------------------------------===//
|
||||
!//
|
||||
!// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
||||
!// See https://llvm.org/LICENSE.txt for license information.
|
||||
!// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||
!//
|
||||
!//===----------------------------------------------------------------------===//
|
||||
!
|
||||
|
||||
!***
|
||||
!*** Some of the directives for the following routine extend past column 72,
|
||||
!*** so process this file in 132-column mode.
|
||||
!***
|
||||
|
||||
!dec$ fixedformlinesize:132
|
||||
|
||||
integer, parameter :: omp_integer_kind = 4
|
||||
integer, parameter :: omp_logical_kind = 4
|
||||
integer, parameter :: omp_real_kind = 4
|
||||
integer, parameter :: omp_lock_kind = int_ptr_kind()
|
||||
integer, parameter :: omp_nest_lock_kind = int_ptr_kind()
|
||||
integer, parameter :: omp_sched_kind = omp_integer_kind
|
||||
integer, parameter :: kmp_pointer_kind = int_ptr_kind()
|
||||
integer, parameter :: kmp_size_t_kind = int_ptr_kind()
|
||||
integer, parameter :: kmp_affinity_mask_kind = int_ptr_kind()
|
||||
|
||||
integer(kind=omp_sched_kind), parameter :: omp_sched_static = 1
|
||||
integer(kind=omp_sched_kind), parameter :: omp_sched_dynamic = 2
|
||||
integer(kind=omp_sched_kind), parameter :: omp_sched_guided = 3
|
||||
integer(kind=omp_sched_kind), parameter :: omp_sched_auto = 4
|
||||
|
||||
integer (kind=omp_integer_kind), parameter :: kmp_version_major = @LIBOMP_VERSION_MAJOR@
|
||||
integer (kind=omp_integer_kind), parameter :: kmp_version_minor = @LIBOMP_VERSION_MINOR@
|
||||
integer (kind=omp_integer_kind), parameter :: kmp_version_build = @LIBOMP_VERSION_BUILD@
|
||||
character(*) kmp_build_date
|
||||
parameter( kmp_build_date = '@LIBOMP_BUILD_DATE@' )
|
||||
integer (kind=omp_integer_kind), parameter :: openmp_version = @LIBOMP_OMP_YEAR_MONTH@
|
||||
|
||||
interface
|
||||
|
||||
! ***
|
||||
! *** omp_* entry points
|
||||
! ***
|
||||
|
||||
subroutine omp_set_num_threads(nthreads)
|
||||
import
|
||||
integer (kind=omp_integer_kind) nthreads
|
||||
end subroutine omp_set_num_threads
|
||||
|
||||
subroutine omp_set_dynamic(enable)
|
||||
import
|
||||
logical (kind=omp_logical_kind) enable
|
||||
end subroutine omp_set_dynamic
|
||||
|
||||
subroutine omp_set_nested(enable)
|
||||
import
|
||||
logical (kind=omp_logical_kind) enable
|
||||
end subroutine omp_set_nested
|
||||
|
||||
function omp_get_num_threads()
|
||||
import
|
||||
integer (kind=omp_integer_kind) omp_get_num_threads
|
||||
end function omp_get_num_threads
|
||||
|
||||
function omp_get_max_threads()
|
||||
import
|
||||
integer (kind=omp_integer_kind) omp_get_max_threads
|
||||
end function omp_get_max_threads
|
||||
|
||||
function omp_get_thread_num()
|
||||
import
|
||||
integer (kind=omp_integer_kind) omp_get_thread_num
|
||||
end function omp_get_thread_num
|
||||
|
||||
function omp_get_num_procs()
|
||||
import
|
||||
integer (kind=omp_integer_kind) omp_get_num_procs
|
||||
end function omp_get_num_procs
|
||||
|
||||
function omp_in_parallel()
|
||||
import
|
||||
logical (kind=omp_logical_kind) omp_in_parallel
|
||||
end function omp_in_parallel
|
||||
|
||||
function omp_in_final()
|
||||
import
|
||||
logical (kind=omp_logical_kind) omp_in_final
|
||||
end function omp_in_final
|
||||
|
||||
function omp_get_dynamic()
|
||||
import
|
||||
logical (kind=omp_logical_kind) omp_get_dynamic
|
||||
end function omp_get_dynamic
|
||||
|
||||
function omp_get_nested()
|
||||
import
|
||||
logical (kind=omp_logical_kind) omp_get_nested
|
||||
end function omp_get_nested
|
||||
|
||||
function omp_get_thread_limit()
|
||||
import
|
||||
integer (kind=omp_integer_kind) omp_get_thread_limit
|
||||
end function omp_get_thread_limit
|
||||
|
||||
subroutine omp_set_max_active_levels(max_levels)
|
||||
import
|
||||
integer (kind=omp_integer_kind) max_levels
|
||||
end subroutine omp_set_max_active_levels
|
||||
|
||||
function omp_get_max_active_levels()
|
||||
import
|
||||
integer (kind=omp_integer_kind) omp_get_max_active_levels
|
||||
end function omp_get_max_active_levels
|
||||
|
||||
function omp_get_level()
|
||||
import
|
||||
integer (kind=omp_integer_kind) omp_get_level
|
||||
end function omp_get_level
|
||||
|
||||
function omp_get_active_level()
|
||||
import
|
||||
integer (kind=omp_integer_kind) omp_get_active_level
|
||||
end function omp_get_active_level
|
||||
|
||||
function omp_get_ancestor_thread_num(level)
|
||||
import
|
||||
integer (kind=omp_integer_kind) level
|
||||
integer (kind=omp_integer_kind) omp_get_ancestor_thread_num
|
||||
end function omp_get_ancestor_thread_num
|
||||
|
||||
function omp_get_team_size(level)
|
||||
import
|
||||
integer (kind=omp_integer_kind) level
|
||||
integer (kind=omp_integer_kind) omp_get_team_size
|
||||
end function omp_get_team_size
|
||||
|
||||
subroutine omp_set_schedule(kind, modifier)
|
||||
import
|
||||
integer (kind=omp_sched_kind) kind
|
||||
integer (kind=omp_integer_kind) modifier
|
||||
end subroutine omp_set_schedule
|
||||
|
||||
subroutine omp_get_schedule(kind, modifier)
|
||||
import
|
||||
integer (kind=omp_sched_kind) kind
|
||||
integer (kind=omp_integer_kind) modifier
|
||||
end subroutine omp_get_schedule
|
||||
|
||||
function omp_get_wtime()
|
||||
double precision omp_get_wtime
|
||||
end function omp_get_wtime
|
||||
|
||||
function omp_get_wtick ()
|
||||
double precision omp_get_wtick
|
||||
end function omp_get_wtick
|
||||
|
||||
subroutine omp_init_lock(lockvar)
|
||||
import
|
||||
integer (kind=omp_lock_kind) lockvar
|
||||
end subroutine omp_init_lock
|
||||
|
||||
subroutine omp_destroy_lock(lockvar)
|
||||
import
|
||||
integer (kind=omp_lock_kind) lockvar
|
||||
end subroutine omp_destroy_lock
|
||||
|
||||
subroutine omp_set_lock(lockvar)
|
||||
import
|
||||
integer (kind=omp_lock_kind) lockvar
|
||||
end subroutine omp_set_lock
|
||||
|
||||
subroutine omp_unset_lock(lockvar)
|
||||
import
|
||||
integer (kind=omp_lock_kind) lockvar
|
||||
end subroutine omp_unset_lock
|
||||
|
||||
function omp_test_lock(lockvar)
|
||||
import
|
||||
logical (kind=omp_logical_kind) omp_test_lock
|
||||
integer (kind=omp_lock_kind) lockvar
|
||||
end function omp_test_lock
|
||||
|
||||
subroutine omp_init_nest_lock(lockvar)
|
||||
import
|
||||
integer (kind=omp_nest_lock_kind) lockvar
|
||||
end subroutine omp_init_nest_lock
|
||||
|
||||
subroutine omp_destroy_nest_lock(lockvar)
|
||||
import
|
||||
integer (kind=omp_nest_lock_kind) lockvar
|
||||
end subroutine omp_destroy_nest_lock
|
||||
|
||||
subroutine omp_set_nest_lock(lockvar)
|
||||
import
|
||||
integer (kind=omp_nest_lock_kind) lockvar
|
||||
end subroutine omp_set_nest_lock
|
||||
|
||||
subroutine omp_unset_nest_lock(lockvar)
|
||||
import
|
||||
integer (kind=omp_nest_lock_kind) lockvar
|
||||
end subroutine omp_unset_nest_lock
|
||||
|
||||
function omp_test_nest_lock(lockvar)
|
||||
import
|
||||
integer (kind=omp_integer_kind) omp_test_nest_lock
|
||||
integer (kind=omp_nest_lock_kind) lockvar
|
||||
end function omp_test_nest_lock
|
||||
|
||||
! ***
|
||||
! *** kmp_* entry points
|
||||
! ***
|
||||
|
||||
subroutine kmp_set_stacksize(size)
|
||||
import
|
||||
integer (kind=omp_integer_kind) size
|
||||
end subroutine kmp_set_stacksize
|
||||
|
||||
subroutine kmp_set_stacksize_s(size)
|
||||
import
|
||||
integer (kind=kmp_size_t_kind) size
|
||||
end subroutine kmp_set_stacksize_s
|
||||
|
||||
subroutine kmp_set_blocktime(msec)
|
||||
import
|
||||
integer (kind=omp_integer_kind) msec
|
||||
end subroutine kmp_set_blocktime
|
||||
|
||||
subroutine kmp_set_library_serial()
|
||||
end subroutine kmp_set_library_serial
|
||||
|
||||
subroutine kmp_set_library_turnaround()
|
||||
end subroutine kmp_set_library_turnaround
|
||||
|
||||
subroutine kmp_set_library_throughput()
|
||||
end subroutine kmp_set_library_throughput
|
||||
|
||||
subroutine kmp_set_library(libnum)
|
||||
import
|
||||
integer (kind=omp_integer_kind) libnum
|
||||
end subroutine kmp_set_library
|
||||
|
||||
subroutine kmp_set_defaults(string)
|
||||
character*(*) string
|
||||
end subroutine kmp_set_defaults
|
||||
|
||||
function kmp_get_stacksize()
|
||||
import
|
||||
integer (kind=omp_integer_kind) kmp_get_stacksize
|
||||
end function kmp_get_stacksize
|
||||
|
||||
function kmp_get_stacksize_s()
|
||||
import
|
||||
integer (kind=kmp_size_t_kind) kmp_get_stacksize_s
|
||||
end function kmp_get_stacksize_s
|
||||
|
||||
function kmp_get_blocktime()
|
||||
import
|
||||
integer (kind=omp_integer_kind) kmp_get_blocktime
|
||||
end function kmp_get_blocktime
|
||||
|
||||
function kmp_get_library()
|
||||
import
|
||||
integer (kind=omp_integer_kind) kmp_get_library
|
||||
end function kmp_get_library
|
||||
|
||||
function kmp_set_affinity(mask)
|
||||
import
|
||||
integer (kind=omp_integer_kind) kmp_set_affinity
|
||||
integer (kind=kmp_affinity_mask_kind) mask
|
||||
end function kmp_set_affinity
|
||||
|
||||
function kmp_get_affinity(mask)
|
||||
import
|
||||
integer (kind=omp_integer_kind) kmp_get_affinity
|
||||
integer (kind=kmp_affinity_mask_kind) mask
|
||||
end function kmp_get_affinity
|
||||
|
||||
function kmp_get_affinity_max_proc()
|
||||
import
|
||||
integer (kind=omp_integer_kind) kmp_get_affinity_max_proc
|
||||
end function kmp_get_affinity_max_proc
|
||||
|
||||
subroutine kmp_create_affinity_mask(mask)
|
||||
import
|
||||
integer (kind=kmp_affinity_mask_kind) mask
|
||||
end subroutine kmp_create_affinity_mask
|
||||
|
||||
subroutine kmp_destroy_affinity_mask(mask)
|
||||
import
|
||||
integer (kind=kmp_affinity_mask_kind) mask
|
||||
end subroutine kmp_destroy_affinity_mask
|
||||
|
||||
function kmp_set_affinity_mask_proc(proc, mask)
|
||||
import
|
||||
integer (kind=omp_integer_kind) kmp_set_affinity_mask_proc
|
||||
integer (kind=omp_integer_kind) proc
|
||||
integer (kind=kmp_affinity_mask_kind) mask
|
||||
end function kmp_set_affinity_mask_proc
|
||||
|
||||
function kmp_unset_affinity_mask_proc(proc, mask)
|
||||
import
|
||||
integer (kind=omp_integer_kind) kmp_unset_affinity_mask_proc
|
||||
integer (kind=omp_integer_kind) proc
|
||||
integer (kind=kmp_affinity_mask_kind) mask
|
||||
end function kmp_unset_affinity_mask_proc
|
||||
|
||||
function kmp_get_affinity_mask_proc(proc, mask)
|
||||
import
|
||||
integer (kind=omp_integer_kind) kmp_get_affinity_mask_proc
|
||||
integer (kind=omp_integer_kind) proc
|
||||
integer (kind=kmp_affinity_mask_kind) mask
|
||||
end function kmp_get_affinity_mask_proc
|
||||
|
||||
function kmp_malloc(size)
|
||||
import
|
||||
integer (kind=kmp_pointer_kind) kmp_malloc
|
||||
integer (kind=kmp_size_t_kind) size
|
||||
end function kmp_malloc
|
||||
|
||||
function kmp_aligned_malloc(size, alignment)
|
||||
import
|
||||
integer (kind=kmp_pointer_kind) kmp_aligned_malloc
|
||||
integer (kind=kmp_size_t_kind) size
|
||||
integer (kind=kmp_size_t_kind) alignment
|
||||
end function kmp_aligned_malloc
|
||||
|
||||
function kmp_calloc(nelem, elsize)
|
||||
import
|
||||
integer (kind=kmp_pointer_kind) kmp_calloc
|
||||
integer (kind=kmp_size_t_kind) nelem
|
||||
integer (kind=kmp_size_t_kind) elsize
|
||||
end function kmp_calloc
|
||||
|
||||
function kmp_realloc(ptr, size)
|
||||
import
|
||||
integer (kind=kmp_pointer_kind) kmp_realloc
|
||||
integer (kind=kmp_pointer_kind) ptr
|
||||
integer (kind=kmp_size_t_kind) size
|
||||
end function kmp_realloc
|
||||
|
||||
subroutine kmp_free(ptr)
|
||||
import
|
||||
integer (kind=kmp_pointer_kind) ptr
|
||||
end subroutine kmp_free
|
||||
|
||||
subroutine kmp_set_warnings_on()
|
||||
end subroutine kmp_set_warnings_on
|
||||
|
||||
subroutine kmp_set_warnings_off()
|
||||
end subroutine kmp_set_warnings_off
|
||||
|
||||
end interface
|
||||
|
||||
!dec$ if defined(_WIN32)
|
||||
!dec$ if defined(_WIN64) .or. defined(_M_AMD64)
|
||||
|
||||
!***
|
||||
!*** The Fortran entry points must be in uppercase, even if the /Qlowercase
|
||||
!*** option is specified. The alias attribute ensures that the specified
|
||||
!*** string is used as the entry point.
|
||||
!***
|
||||
!*** On the Windows* OS IA-32 architecture, the Fortran entry points have an
|
||||
!*** underscore prepended. On the Windows* OS Intel(R) 64
|
||||
!*** architecture, no underscore is prepended.
|
||||
!***
|
||||
|
||||
!dec$ attributes alias:'OMP_SET_NUM_THREADS'::omp_set_num_threads
|
||||
!dec$ attributes alias:'OMP_SET_DYNAMIC'::omp_set_dynamic
|
||||
!dec$ attributes alias:'OMP_SET_NESTED'::omp_set_nested
|
||||
!dec$ attributes alias:'OMP_GET_NUM_THREADS'::omp_get_num_threads
|
||||
!dec$ attributes alias:'OMP_GET_MAX_THREADS'::omp_get_max_threads
|
||||
!dec$ attributes alias:'OMP_GET_THREAD_NUM'::omp_get_thread_num
|
||||
!dec$ attributes alias:'OMP_GET_NUM_PROCS'::omp_get_num_procs
|
||||
!dec$ attributes alias:'OMP_IN_PARALLEL'::omp_in_parallel
|
||||
!dec$ attributes alias:'OMP_IN_FINAL'::omp_in_final
|
||||
!dec$ attributes alias:'OMP_GET_DYNAMIC'::omp_get_dynamic
|
||||
!dec$ attributes alias:'OMP_GET_NESTED'::omp_get_nested
|
||||
!dec$ attributes alias:'OMP_GET_THREAD_LIMIT'::omp_get_thread_limit
|
||||
!dec$ attributes alias:'OMP_SET_MAX_ACTIVE_LEVELS'::omp_set_max_active_levels
|
||||
!dec$ attributes alias:'OMP_GET_MAX_ACTIVE_LEVELS'::omp_get_max_active_levels
|
||||
!dec$ attributes alias:'OMP_GET_LEVEL'::omp_get_level
|
||||
!dec$ attributes alias:'OMP_GET_ACTIVE_LEVEL'::omp_get_active_level
|
||||
!dec$ attributes alias:'OMP_GET_ANCESTOR_THREAD_NUM'::omp_get_ancestor_thread_num
|
||||
!dec$ attributes alias:'OMP_GET_TEAM_SIZE'::omp_get_team_size
|
||||
!dec$ attributes alias:'OMP_SET_SCHEDULE'::omp_set_schedule
|
||||
!dec$ attributes alias:'OMP_GET_SCHEDULE'::omp_get_schedule
|
||||
!dec$ attributes alias:'OMP_GET_WTIME'::omp_get_wtime
|
||||
!dec$ attributes alias:'OMP_GET_WTICK'::omp_get_wtick
|
||||
|
||||
!dec$ attributes alias:'omp_init_lock'::omp_init_lock
|
||||
!dec$ attributes alias:'omp_destroy_lock'::omp_destroy_lock
|
||||
!dec$ attributes alias:'omp_set_lock'::omp_set_lock
|
||||
!dec$ attributes alias:'omp_unset_lock'::omp_unset_lock
|
||||
!dec$ attributes alias:'omp_test_lock'::omp_test_lock
|
||||
!dec$ attributes alias:'omp_init_nest_lock'::omp_init_nest_lock
|
||||
!dec$ attributes alias:'omp_destroy_nest_lock'::omp_destroy_nest_lock
|
||||
!dec$ attributes alias:'omp_set_nest_lock'::omp_set_nest_lock
|
||||
!dec$ attributes alias:'omp_unset_nest_lock'::omp_unset_nest_lock
|
||||
!dec$ attributes alias:'omp_test_nest_lock'::omp_test_nest_lock
|
||||
|
||||
!dec$ attributes alias:'KMP_SET_STACKSIZE'::kmp_set_stacksize
|
||||
!dec$ attributes alias:'KMP_SET_STACKSIZE_S'::kmp_set_stacksize_s
|
||||
!dec$ attributes alias:'KMP_SET_BLOCKTIME'::kmp_set_blocktime
|
||||
!dec$ attributes alias:'KMP_SET_LIBRARY_SERIAL'::kmp_set_library_serial
|
||||
!dec$ attributes alias:'KMP_SET_LIBRARY_TURNAROUND'::kmp_set_library_turnaround
|
||||
!dec$ attributes alias:'KMP_SET_LIBRARY_THROUGHPUT'::kmp_set_library_throughput
|
||||
!dec$ attributes alias:'KMP_SET_LIBRARY'::kmp_set_library
|
||||
!dec$ attributes alias:'KMP_SET_DEFAULTS'::kmp_set_defaults
|
||||
!dec$ attributes alias:'KMP_GET_STACKSIZE'::kmp_get_stacksize
|
||||
!dec$ attributes alias:'KMP_GET_STACKSIZE_S'::kmp_get_stacksize_s
|
||||
!dec$ attributes alias:'KMP_GET_BLOCKTIME'::kmp_get_blocktime
|
||||
!dec$ attributes alias:'KMP_GET_LIBRARY'::kmp_get_library
|
||||
!dec$ attributes alias:'KMP_SET_AFFINITY'::kmp_set_affinity
|
||||
!dec$ attributes alias:'KMP_GET_AFFINITY'::kmp_get_affinity
|
||||
!dec$ attributes alias:'KMP_GET_AFFINITY_MAX_PROC'::kmp_get_affinity_max_proc
|
||||
!dec$ attributes alias:'KMP_CREATE_AFFINITY_MASK'::kmp_create_affinity_mask
|
||||
!dec$ attributes alias:'KMP_DESTROY_AFFINITY_MASK'::kmp_destroy_affinity_mask
|
||||
!dec$ attributes alias:'KMP_SET_AFFINITY_MASK_PROC'::kmp_set_affinity_mask_proc
|
||||
!dec$ attributes alias:'KMP_UNSET_AFFINITY_MASK_PROC'::kmp_unset_affinity_mask_proc
|
||||
!dec$ attributes alias:'KMP_GET_AFFINITY_MASK_PROC'::kmp_get_affinity_mask_proc
|
||||
!dec$ attributes alias:'KMP_MALLOC'::kmp_malloc
|
||||
!dec$ attributes alias:'KMP_ALIGNED_MALLOC'::kmp_aligned_malloc
|
||||
!dec$ attributes alias:'KMP_CALLOC'::kmp_calloc
|
||||
!dec$ attributes alias:'KMP_REALLOC'::kmp_realloc
|
||||
!dec$ attributes alias:'KMP_FREE'::kmp_free
|
||||
|
||||
!dec$ attributes alias:'KMP_SET_WARNINGS_ON'::kmp_set_warnings_on
|
||||
!dec$ attributes alias:'KMP_SET_WARNINGS_OFF'::kmp_set_warnings_off
|
||||
|
||||
!dec$ else
|
||||
|
||||
!***
|
||||
!*** On Windows* OS IA-32 architecture, the Fortran entry points have an underscore prepended.
|
||||
!***
|
||||
|
||||
!dec$ attributes alias:'_OMP_SET_NUM_THREADS'::omp_set_num_threads
|
||||
!dec$ attributes alias:'_OMP_SET_DYNAMIC'::omp_set_dynamic
|
||||
!dec$ attributes alias:'_OMP_SET_NESTED'::omp_set_nested
|
||||
!dec$ attributes alias:'_OMP_GET_NUM_THREADS'::omp_get_num_threads
|
||||
!dec$ attributes alias:'_OMP_GET_MAX_THREADS'::omp_get_max_threads
|
||||
!dec$ attributes alias:'_OMP_GET_THREAD_NUM'::omp_get_thread_num
|
||||
!dec$ attributes alias:'_OMP_GET_NUM_PROCS'::omp_get_num_procs
|
||||
!dec$ attributes alias:'_OMP_IN_PARALLEL'::omp_in_parallel
|
||||
!dec$ attributes alias:'_OMP_IN_FINAL'::omp_in_final
|
||||
!dec$ attributes alias:'_OMP_GET_DYNAMIC'::omp_get_dynamic
|
||||
!dec$ attributes alias:'_OMP_GET_NESTED'::omp_get_nested
|
||||
!dec$ attributes alias:'_OMP_GET_THREAD_LIMIT'::omp_get_thread_limit
|
||||
!dec$ attributes alias:'_OMP_SET_MAX_ACTIVE_LEVELS'::omp_set_max_active_levels
|
||||
!dec$ attributes alias:'_OMP_GET_MAX_ACTIVE_LEVELS'::omp_get_max_active_levels
|
||||
!dec$ attributes alias:'_OMP_GET_LEVEL'::omp_get_level
|
||||
!dec$ attributes alias:'_OMP_GET_ACTIVE_LEVEL'::omp_get_active_level
|
||||
!dec$ attributes alias:'_OMP_GET_ANCESTOR_THREAD_NUM'::omp_get_ancestor_thread_num
|
||||
!dec$ attributes alias:'_OMP_GET_TEAM_SIZE'::omp_get_team_size
|
||||
!dec$ attributes alias:'_OMP_SET_SCHEDULE'::omp_set_schedule
|
||||
!dec$ attributes alias:'_OMP_GET_SCHEDULE'::omp_get_schedule
|
||||
!dec$ attributes alias:'_OMP_GET_WTIME'::omp_get_wtime
|
||||
!dec$ attributes alias:'_OMP_GET_WTICK'::omp_get_wtick
|
||||
|
||||
!dec$ attributes alias:'_omp_init_lock'::omp_init_lock
|
||||
!dec$ attributes alias:'_omp_destroy_lock'::omp_destroy_lock
|
||||
!dec$ attributes alias:'_omp_set_lock'::omp_set_lock
|
||||
!dec$ attributes alias:'_omp_unset_lock'::omp_unset_lock
|
||||
!dec$ attributes alias:'_omp_test_lock'::omp_test_lock
|
||||
!dec$ attributes alias:'_omp_init_nest_lock'::omp_init_nest_lock
|
||||
!dec$ attributes alias:'_omp_destroy_nest_lock'::omp_destroy_nest_lock
|
||||
!dec$ attributes alias:'_omp_set_nest_lock'::omp_set_nest_lock
|
||||
!dec$ attributes alias:'_omp_unset_nest_lock'::omp_unset_nest_lock
|
||||
!dec$ attributes alias:'_omp_test_nest_lock'::omp_test_nest_lock
|
||||
|
||||
!dec$ attributes alias:'_KMP_SET_STACKSIZE'::kmp_set_stacksize
|
||||
!dec$ attributes alias:'_KMP_SET_STACKSIZE_S'::kmp_set_stacksize_s
|
||||
!dec$ attributes alias:'_KMP_SET_BLOCKTIME'::kmp_set_blocktime
|
||||
!dec$ attributes alias:'_KMP_SET_LIBRARY_SERIAL'::kmp_set_library_serial
|
||||
!dec$ attributes alias:'_KMP_SET_LIBRARY_TURNAROUND'::kmp_set_library_turnaround
|
||||
!dec$ attributes alias:'_KMP_SET_LIBRARY_THROUGHPUT'::kmp_set_library_throughput
|
||||
!dec$ attributes alias:'_KMP_SET_LIBRARY'::kmp_set_library
|
||||
!dec$ attributes alias:'_KMP_SET_DEFAULTS'::kmp_set_defaults
|
||||
!dec$ attributes alias:'_KMP_GET_STACKSIZE'::kmp_get_stacksize
|
||||
!dec$ attributes alias:'_KMP_GET_STACKSIZE_S'::kmp_get_stacksize_s
|
||||
!dec$ attributes alias:'_KMP_GET_BLOCKTIME'::kmp_get_blocktime
|
||||
!dec$ attributes alias:'_KMP_GET_LIBRARY'::kmp_get_library
|
||||
!dec$ attributes alias:'_KMP_SET_AFFINITY'::kmp_set_affinity
|
||||
!dec$ attributes alias:'_KMP_GET_AFFINITY'::kmp_get_affinity
|
||||
!dec$ attributes alias:'_KMP_GET_AFFINITY_MAX_PROC'::kmp_get_affinity_max_proc
|
||||
!dec$ attributes alias:'_KMP_CREATE_AFFINITY_MASK'::kmp_create_affinity_mask
|
||||
!dec$ attributes alias:'_KMP_DESTROY_AFFINITY_MASK'::kmp_destroy_affinity_mask
|
||||
!dec$ attributes alias:'_KMP_SET_AFFINITY_MASK_PROC'::kmp_set_affinity_mask_proc
|
||||
!dec$ attributes alias:'_KMP_UNSET_AFFINITY_MASK_PROC'::kmp_unset_affinity_mask_proc
|
||||
!dec$ attributes alias:'_KMP_GET_AFFINITY_MASK_PROC'::kmp_get_affinity_mask_proc
|
||||
!dec$ attributes alias:'_KMP_MALLOC'::kmp_malloc
|
||||
!dec$ attributes alias:'_KMP_ALIGNED_MALLOC'::kmp_aligned_malloc
|
||||
!dec$ attributes alias:'_KMP_CALLOC'::kmp_calloc
|
||||
!dec$ attributes alias:'_KMP_REALLOC'::kmp_realloc
|
||||
!dec$ attributes alias:'_KMP_FREE'::kmp_free
|
||||
|
||||
!dec$ attributes alias:'_KMP_SET_WARNINGS_ON'::kmp_set_warnings_on
|
||||
!dec$ attributes alias:'_KMP_SET_WARNINGS_OFF'::kmp_set_warnings_off
|
||||
|
||||
!dec$ endif
|
||||
!dec$ endif
|
||||
|
||||
!dec$ if defined(__linux)
|
||||
|
||||
!***
|
||||
!*** The Linux* OS entry points are in lowercase, with an underscore appended.
|
||||
!***
|
||||
|
||||
!dec$ attributes alias:'omp_set_num_threads_'::omp_set_num_threads
|
||||
!dec$ attributes alias:'omp_set_dynamic_'::omp_set_dynamic
|
||||
!dec$ attributes alias:'omp_set_nested_'::omp_set_nested
|
||||
!dec$ attributes alias:'omp_get_num_threads_'::omp_get_num_threads
|
||||
!dec$ attributes alias:'omp_get_max_threads_'::omp_get_max_threads
|
||||
!dec$ attributes alias:'omp_get_thread_num_'::omp_get_thread_num
|
||||
!dec$ attributes alias:'omp_get_num_procs_'::omp_get_num_procs
|
||||
!dec$ attributes alias:'omp_in_parallel_'::omp_in_parallel
|
||||
!dec$ attributes alias:'omp_in_final_'::omp_in_final
|
||||
!dec$ attributes alias:'omp_get_dynamic_'::omp_get_dynamic
|
||||
!dec$ attributes alias:'omp_get_nested_'::omp_get_nested
|
||||
!dec$ attributes alias:'omp_get_thread_limit_'::omp_get_thread_limit
|
||||
!dec$ attributes alias:'omp_set_max_active_levels_'::omp_set_max_active_levels
|
||||
!dec$ attributes alias:'omp_get_max_active_levels_'::omp_get_max_active_levels
|
||||
!dec$ attributes alias:'omp_get_level_'::omp_get_level
|
||||
!dec$ attributes alias:'omp_get_active_level_'::omp_get_active_level
|
||||
!dec$ attributes alias:'omp_get_ancestor_thread_num_'::omp_get_ancestor_thread_num
|
||||
!dec$ attributes alias:'omp_get_team_size_'::omp_get_team_size
|
||||
!dec$ attributes alias:'omp_set_schedule_'::omp_set_schedule
|
||||
!dec$ attributes alias:'omp_get_schedule_'::omp_get_schedule
|
||||
!dec$ attributes alias:'omp_get_wtime_'::omp_get_wtime
|
||||
!dec$ attributes alias:'omp_get_wtick_'::omp_get_wtick
|
||||
|
||||
!dec$ attributes alias:'omp_init_lock_'::omp_init_lock
|
||||
!dec$ attributes alias:'omp_destroy_lock_'::omp_destroy_lock
|
||||
!dec$ attributes alias:'omp_set_lock_'::omp_set_lock
|
||||
!dec$ attributes alias:'omp_unset_lock_'::omp_unset_lock
|
||||
!dec$ attributes alias:'omp_test_lock_'::omp_test_lock
|
||||
!dec$ attributes alias:'omp_init_nest_lock_'::omp_init_nest_lock
|
||||
!dec$ attributes alias:'omp_destroy_nest_lock_'::omp_destroy_nest_lock
|
||||
!dec$ attributes alias:'omp_set_nest_lock_'::omp_set_nest_lock
|
||||
!dec$ attributes alias:'omp_unset_nest_lock_'::omp_unset_nest_lock
|
||||
!dec$ attributes alias:'omp_test_nest_lock_'::omp_test_nest_lock
|
||||
|
||||
!dec$ attributes alias:'kmp_set_stacksize_'::kmp_set_stacksize
|
||||
!dec$ attributes alias:'kmp_set_stacksize_s_'::kmp_set_stacksize_s
|
||||
!dec$ attributes alias:'kmp_set_blocktime_'::kmp_set_blocktime
|
||||
!dec$ attributes alias:'kmp_set_library_serial_'::kmp_set_library_serial
|
||||
!dec$ attributes alias:'kmp_set_library_turnaround_'::kmp_set_library_turnaround
|
||||
!dec$ attributes alias:'kmp_set_library_throughput_'::kmp_set_library_throughput
|
||||
!dec$ attributes alias:'kmp_set_library_'::kmp_set_library
|
||||
!dec$ attributes alias:'kmp_set_defaults_'::kmp_set_defaults
|
||||
!dec$ attributes alias:'kmp_get_stacksize_'::kmp_get_stacksize
|
||||
!dec$ attributes alias:'kmp_get_stacksize_s_'::kmp_get_stacksize_s
|
||||
!dec$ attributes alias:'kmp_get_blocktime_'::kmp_get_blocktime
|
||||
!dec$ attributes alias:'kmp_get_library_'::kmp_get_library
|
||||
!dec$ attributes alias:'kmp_set_affinity_'::kmp_set_affinity
|
||||
!dec$ attributes alias:'kmp_get_affinity_'::kmp_get_affinity
|
||||
!dec$ attributes alias:'kmp_get_affinity_max_proc_'::kmp_get_affinity_max_proc
|
||||
!dec$ attributes alias:'kmp_create_affinity_mask_'::kmp_create_affinity_mask
|
||||
!dec$ attributes alias:'kmp_destroy_affinity_mask_'::kmp_destroy_affinity_mask
|
||||
!dec$ attributes alias:'kmp_set_affinity_mask_proc_'::kmp_set_affinity_mask_proc
|
||||
!dec$ attributes alias:'kmp_unset_affinity_mask_proc_'::kmp_unset_affinity_mask_proc
|
||||
!dec$ attributes alias:'kmp_get_affinity_mask_proc_'::kmp_get_affinity_mask_proc
|
||||
!dec$ attributes alias:'kmp_malloc_'::kmp_malloc
|
||||
!dec$ attributes alias:'kmp_aligned_malloc_'::kmp_aligned_malloc
|
||||
!dec$ attributes alias:'kmp_calloc_'::kmp_calloc
|
||||
!dec$ attributes alias:'kmp_realloc_'::kmp_realloc
|
||||
!dec$ attributes alias:'kmp_free_'::kmp_free
|
||||
|
||||
!dec$ attributes alias:'kmp_set_warnings_on_'::kmp_set_warnings_on
|
||||
!dec$ attributes alias:'kmp_set_warnings_off_'::kmp_set_warnings_off
|
||||
|
||||
!dec$ endif
|
||||
|
||||
!dec$ if defined(__APPLE__)
|
||||
|
||||
!***
|
||||
!*** The Mac entry points are in lowercase, with an both an underscore
|
||||
!*** appended and an underscore prepended.
|
||||
!***
|
||||
|
||||
!dec$ attributes alias:'_omp_set_num_threads_'::omp_set_num_threads
|
||||
!dec$ attributes alias:'_omp_set_dynamic_'::omp_set_dynamic
|
||||
!dec$ attributes alias:'_omp_set_nested_'::omp_set_nested
|
||||
!dec$ attributes alias:'_omp_get_num_threads_'::omp_get_num_threads
|
||||
!dec$ attributes alias:'_omp_get_max_threads_'::omp_get_max_threads
|
||||
!dec$ attributes alias:'_omp_get_thread_num_'::omp_get_thread_num
|
||||
!dec$ attributes alias:'_omp_get_num_procs_'::omp_get_num_procs
|
||||
!dec$ attributes alias:'_omp_in_parallel_'::omp_in_parallel
|
||||
!dec$ attributes alias:'_omp_in_final_'::omp_in_final
|
||||
!dec$ attributes alias:'_omp_get_dynamic_'::omp_get_dynamic
|
||||
!dec$ attributes alias:'_omp_get_nested_'::omp_get_nested
|
||||
!dec$ attributes alias:'_omp_get_thread_limit_'::omp_get_thread_limit
|
||||
!dec$ attributes alias:'_omp_set_max_active_levels_'::omp_set_max_active_levels
|
||||
!dec$ attributes alias:'_omp_get_max_active_levels_'::omp_get_max_active_levels
|
||||
!dec$ attributes alias:'_omp_get_level_'::omp_get_level
|
||||
!dec$ attributes alias:'_omp_get_active_level_'::omp_get_active_level
|
||||
!dec$ attributes alias:'_omp_get_ancestor_thread_num_'::omp_get_ancestor_thread_num
|
||||
!dec$ attributes alias:'_omp_get_team_size_'::omp_get_team_size
|
||||
!dec$ attributes alias:'_omp_set_schedule_'::omp_set_schedule
|
||||
!dec$ attributes alias:'_omp_get_schedule_'::omp_get_schedule
|
||||
!dec$ attributes alias:'_omp_get_wtime_'::omp_get_wtime
|
||||
!dec$ attributes alias:'_omp_get_wtick_'::omp_get_wtick
|
||||
|
||||
!dec$ attributes alias:'_omp_init_lock_'::omp_init_lock
|
||||
!dec$ attributes alias:'_omp_destroy_lock_'::omp_destroy_lock
|
||||
!dec$ attributes alias:'_omp_set_lock_'::omp_set_lock
|
||||
!dec$ attributes alias:'_omp_unset_lock_'::omp_unset_lock
|
||||
!dec$ attributes alias:'_omp_test_lock_'::omp_test_lock
|
||||
!dec$ attributes alias:'_omp_init_nest_lock_'::omp_init_nest_lock
|
||||
!dec$ attributes alias:'_omp_destroy_nest_lock_'::omp_destroy_nest_lock
|
||||
!dec$ attributes alias:'_omp_set_nest_lock_'::omp_set_nest_lock
|
||||
!dec$ attributes alias:'_omp_unset_nest_lock_'::omp_unset_nest_lock
|
||||
!dec$ attributes alias:'_omp_test_nest_lock_'::omp_test_nest_lock
|
||||
|
||||
!dec$ attributes alias:'_kmp_set_stacksize_'::kmp_set_stacksize
|
||||
!dec$ attributes alias:'_kmp_set_stacksize_s_'::kmp_set_stacksize_s
|
||||
!dec$ attributes alias:'_kmp_set_blocktime_'::kmp_set_blocktime
|
||||
!dec$ attributes alias:'_kmp_set_library_serial_'::kmp_set_library_serial
|
||||
!dec$ attributes alias:'_kmp_set_library_turnaround_'::kmp_set_library_turnaround
|
||||
!dec$ attributes alias:'_kmp_set_library_throughput_'::kmp_set_library_throughput
|
||||
!dec$ attributes alias:'_kmp_set_library_'::kmp_set_library
|
||||
!dec$ attributes alias:'_kmp_set_defaults_'::kmp_set_defaults
|
||||
!dec$ attributes alias:'_kmp_get_stacksize_'::kmp_get_stacksize
|
||||
!dec$ attributes alias:'_kmp_get_stacksize_s_'::kmp_get_stacksize_s
|
||||
!dec$ attributes alias:'_kmp_get_blocktime_'::kmp_get_blocktime
|
||||
!dec$ attributes alias:'_kmp_get_library_'::kmp_get_library
|
||||
!dec$ attributes alias:'_kmp_set_affinity_'::kmp_set_affinity
|
||||
!dec$ attributes alias:'_kmp_get_affinity_'::kmp_get_affinity
|
||||
!dec$ attributes alias:'_kmp_get_affinity_max_proc_'::kmp_get_affinity_max_proc
|
||||
!dec$ attributes alias:'_kmp_create_affinity_mask_'::kmp_create_affinity_mask
|
||||
!dec$ attributes alias:'_kmp_destroy_affinity_mask_'::kmp_destroy_affinity_mask
|
||||
!dec$ attributes alias:'_kmp_set_affinity_mask_proc_'::kmp_set_affinity_mask_proc
|
||||
!dec$ attributes alias:'_kmp_unset_affinity_mask_proc_'::kmp_unset_affinity_mask_proc
|
||||
!dec$ attributes alias:'_kmp_get_affinity_mask_proc_'::kmp_get_affinity_mask_proc
|
||||
!dec$ attributes alias:'_kmp_malloc_'::kmp_malloc
|
||||
!dec$ attributes alias:'_kmp_aligned_malloc_'::kmp_aligned_malloc
|
||||
!dec$ attributes alias:'_kmp_calloc_'::kmp_calloc
|
||||
!dec$ attributes alias:'_kmp_realloc_'::kmp_realloc
|
||||
!dec$ attributes alias:'_kmp_free_'::kmp_free
|
||||
|
||||
!dec$ attributes alias:'_kmp_set_warnings_on_'::kmp_set_warnings_on
|
||||
!dec$ attributes alias:'_kmp_set_warnings_off_'::kmp_set_warnings_off
|
||||
|
||||
!dec$ endif
|
||||
|
||||
|
|
@ -1,160 +0,0 @@
|
|||
/*
|
||||
* include/40/omp.h.var
|
||||
*/
|
||||
|
||||
|
||||
//===----------------------------------------------------------------------===//
|
||||
//
|
||||
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
||||
// See https://llvm.org/LICENSE.txt for license information.
|
||||
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
|
||||
#ifndef __OMP_H
|
||||
# define __OMP_H
|
||||
|
||||
# define KMP_VERSION_MAJOR @LIBOMP_VERSION_MAJOR@
|
||||
# define KMP_VERSION_MINOR @LIBOMP_VERSION_MINOR@
|
||||
# define KMP_VERSION_BUILD @LIBOMP_VERSION_BUILD@
|
||||
# define KMP_BUILD_DATE "@LIBOMP_BUILD_DATE@"
|
||||
|
||||
# ifdef __cplusplus
|
||||
extern "C" {
|
||||
# endif
|
||||
|
||||
# if defined(_WIN32)
|
||||
# define __KAI_KMPC_CONVENTION __cdecl
|
||||
# else
|
||||
# define __KAI_KMPC_CONVENTION
|
||||
# endif
|
||||
|
||||
/* schedule kind constants */
|
||||
typedef enum omp_sched_t {
|
||||
omp_sched_static = 1,
|
||||
omp_sched_dynamic = 2,
|
||||
omp_sched_guided = 3,
|
||||
omp_sched_auto = 4
|
||||
} omp_sched_t;
|
||||
|
||||
/* set API functions */
|
||||
extern void __KAI_KMPC_CONVENTION omp_set_num_threads (int);
|
||||
extern void __KAI_KMPC_CONVENTION omp_set_dynamic (int);
|
||||
extern void __KAI_KMPC_CONVENTION omp_set_nested (int);
|
||||
extern void __KAI_KMPC_CONVENTION omp_set_max_active_levels (int);
|
||||
extern void __KAI_KMPC_CONVENTION omp_set_schedule (omp_sched_t, int);
|
||||
|
||||
/* query API functions */
|
||||
extern int __KAI_KMPC_CONVENTION omp_get_num_threads (void);
|
||||
extern int __KAI_KMPC_CONVENTION omp_get_dynamic (void);
|
||||
extern int __KAI_KMPC_CONVENTION omp_get_nested (void);
|
||||
extern int __KAI_KMPC_CONVENTION omp_get_max_threads (void);
|
||||
extern int __KAI_KMPC_CONVENTION omp_get_thread_num (void);
|
||||
extern int __KAI_KMPC_CONVENTION omp_get_num_procs (void);
|
||||
extern int __KAI_KMPC_CONVENTION omp_in_parallel (void);
|
||||
extern int __KAI_KMPC_CONVENTION omp_in_final (void);
|
||||
extern int __KAI_KMPC_CONVENTION omp_get_active_level (void);
|
||||
extern int __KAI_KMPC_CONVENTION omp_get_level (void);
|
||||
extern int __KAI_KMPC_CONVENTION omp_get_ancestor_thread_num (int);
|
||||
extern int __KAI_KMPC_CONVENTION omp_get_team_size (int);
|
||||
extern int __KAI_KMPC_CONVENTION omp_get_thread_limit (void);
|
||||
extern int __KAI_KMPC_CONVENTION omp_get_max_active_levels (void);
|
||||
extern void __KAI_KMPC_CONVENTION omp_get_schedule (omp_sched_t *, int *);
|
||||
|
||||
/* lock API functions */
|
||||
typedef struct omp_lock_t {
|
||||
void * _lk;
|
||||
} omp_lock_t;
|
||||
|
||||
extern void __KAI_KMPC_CONVENTION omp_init_lock (omp_lock_t *);
|
||||
extern void __KAI_KMPC_CONVENTION omp_set_lock (omp_lock_t *);
|
||||
extern void __KAI_KMPC_CONVENTION omp_unset_lock (omp_lock_t *);
|
||||
extern void __KAI_KMPC_CONVENTION omp_destroy_lock (omp_lock_t *);
|
||||
extern int __KAI_KMPC_CONVENTION omp_test_lock (omp_lock_t *);
|
||||
|
||||
/* nested lock API functions */
|
||||
typedef struct omp_nest_lock_t {
|
||||
void * _lk;
|
||||
} omp_nest_lock_t;
|
||||
|
||||
extern void __KAI_KMPC_CONVENTION omp_init_nest_lock (omp_nest_lock_t *);
|
||||
extern void __KAI_KMPC_CONVENTION omp_set_nest_lock (omp_nest_lock_t *);
|
||||
extern void __KAI_KMPC_CONVENTION omp_unset_nest_lock (omp_nest_lock_t *);
|
||||
extern void __KAI_KMPC_CONVENTION omp_destroy_nest_lock (omp_nest_lock_t *);
|
||||
extern int __KAI_KMPC_CONVENTION omp_test_nest_lock (omp_nest_lock_t *);
|
||||
|
||||
/* time API functions */
|
||||
extern double __KAI_KMPC_CONVENTION omp_get_wtime (void);
|
||||
extern double __KAI_KMPC_CONVENTION omp_get_wtick (void);
|
||||
|
||||
/* OpenMP 4.0 */
|
||||
extern int __KAI_KMPC_CONVENTION omp_get_default_device (void);
|
||||
extern void __KAI_KMPC_CONVENTION omp_set_default_device (int);
|
||||
extern int __KAI_KMPC_CONVENTION omp_is_initial_device (void);
|
||||
extern int __KAI_KMPC_CONVENTION omp_get_num_devices (void);
|
||||
extern int __KAI_KMPC_CONVENTION omp_get_num_teams (void);
|
||||
extern int __KAI_KMPC_CONVENTION omp_get_team_num (void);
|
||||
extern int __KAI_KMPC_CONVENTION omp_get_cancellation (void);
|
||||
|
||||
# include <stdlib.h>
|
||||
/* kmp API functions */
|
||||
extern int __KAI_KMPC_CONVENTION kmp_get_stacksize (void);
|
||||
extern void __KAI_KMPC_CONVENTION kmp_set_stacksize (int);
|
||||
extern size_t __KAI_KMPC_CONVENTION kmp_get_stacksize_s (void);
|
||||
extern void __KAI_KMPC_CONVENTION kmp_set_stacksize_s (size_t);
|
||||
extern int __KAI_KMPC_CONVENTION kmp_get_blocktime (void);
|
||||
extern int __KAI_KMPC_CONVENTION kmp_get_library (void);
|
||||
extern void __KAI_KMPC_CONVENTION kmp_set_blocktime (int);
|
||||
extern void __KAI_KMPC_CONVENTION kmp_set_library (int);
|
||||
extern void __KAI_KMPC_CONVENTION kmp_set_library_serial (void);
|
||||
extern void __KAI_KMPC_CONVENTION kmp_set_library_turnaround (void);
|
||||
extern void __KAI_KMPC_CONVENTION kmp_set_library_throughput (void);
|
||||
extern void __KAI_KMPC_CONVENTION kmp_set_defaults (char const *);
|
||||
|
||||
/* Intel affinity API */
|
||||
typedef void * kmp_affinity_mask_t;
|
||||
|
||||
extern int __KAI_KMPC_CONVENTION kmp_set_affinity (kmp_affinity_mask_t *);
|
||||
extern int __KAI_KMPC_CONVENTION kmp_get_affinity (kmp_affinity_mask_t *);
|
||||
extern int __KAI_KMPC_CONVENTION kmp_get_affinity_max_proc (void);
|
||||
extern void __KAI_KMPC_CONVENTION kmp_create_affinity_mask (kmp_affinity_mask_t *);
|
||||
extern void __KAI_KMPC_CONVENTION kmp_destroy_affinity_mask (kmp_affinity_mask_t *);
|
||||
extern int __KAI_KMPC_CONVENTION kmp_set_affinity_mask_proc (int, kmp_affinity_mask_t *);
|
||||
extern int __KAI_KMPC_CONVENTION kmp_unset_affinity_mask_proc (int, kmp_affinity_mask_t *);
|
||||
extern int __KAI_KMPC_CONVENTION kmp_get_affinity_mask_proc (int, kmp_affinity_mask_t *);
|
||||
|
||||
/* OpenMP 4.0 affinity API */
|
||||
typedef enum omp_proc_bind_t {
|
||||
omp_proc_bind_false = 0,
|
||||
omp_proc_bind_true = 1,
|
||||
omp_proc_bind_master = 2,
|
||||
omp_proc_bind_close = 3,
|
||||
omp_proc_bind_spread = 4
|
||||
} omp_proc_bind_t;
|
||||
|
||||
extern omp_proc_bind_t __KAI_KMPC_CONVENTION omp_get_proc_bind (void);
|
||||
|
||||
extern void * __KAI_KMPC_CONVENTION kmp_malloc (size_t);
|
||||
extern void * __KAI_KMPC_CONVENTION kmp_aligned_malloc (size_t, size_t);
|
||||
extern void * __KAI_KMPC_CONVENTION kmp_calloc (size_t, size_t);
|
||||
extern void * __KAI_KMPC_CONVENTION kmp_realloc (void *, size_t);
|
||||
extern void __KAI_KMPC_CONVENTION kmp_free (void *);
|
||||
|
||||
extern void __KAI_KMPC_CONVENTION kmp_set_warnings_on(void);
|
||||
extern void __KAI_KMPC_CONVENTION kmp_set_warnings_off(void);
|
||||
|
||||
# undef __KAI_KMPC_CONVENTION
|
||||
|
||||
/* Warning:
|
||||
The following typedefs are not standard, deprecated and will be removed in a future release.
|
||||
*/
|
||||
typedef int omp_int_t;
|
||||
typedef double omp_wtime_t;
|
||||
|
||||
# ifdef __cplusplus
|
||||
}
|
||||
# endif
|
||||
|
||||
#endif /* __OMP_H */
|
||||
|
|
@ -1,773 +0,0 @@
|
|||
! include/40/omp_lib.f.var
|
||||
|
||||
!
|
||||
!//===----------------------------------------------------------------------===//
|
||||
!//
|
||||
!// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
||||
!// See https://llvm.org/LICENSE.txt for license information.
|
||||
!// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||
!//
|
||||
!//===----------------------------------------------------------------------===//
|
||||
!
|
||||
|
||||
!***
|
||||
!*** Some of the directives for the following routine extend past column 72,
|
||||
!*** so process this file in 132-column mode.
|
||||
!***
|
||||
|
||||
!dec$ fixedformlinesize:132
|
||||
|
||||
module omp_lib_kinds
|
||||
|
||||
integer, parameter :: omp_integer_kind = 4
|
||||
integer, parameter :: omp_logical_kind = 4
|
||||
integer, parameter :: omp_real_kind = 4
|
||||
integer, parameter :: omp_lock_kind = int_ptr_kind()
|
||||
integer, parameter :: omp_nest_lock_kind = int_ptr_kind()
|
||||
integer, parameter :: omp_sched_kind = omp_integer_kind
|
||||
integer, parameter :: omp_proc_bind_kind = omp_integer_kind
|
||||
integer, parameter :: kmp_pointer_kind = int_ptr_kind()
|
||||
integer, parameter :: kmp_size_t_kind = int_ptr_kind()
|
||||
integer, parameter :: kmp_affinity_mask_kind = int_ptr_kind()
|
||||
integer, parameter :: kmp_cancel_kind = omp_integer_kind
|
||||
|
||||
end module omp_lib_kinds
|
||||
|
||||
module omp_lib
|
||||
|
||||
use omp_lib_kinds
|
||||
|
||||
integer (kind=omp_integer_kind), parameter :: kmp_version_major = @LIBOMP_VERSION_MAJOR@
|
||||
integer (kind=omp_integer_kind), parameter :: kmp_version_minor = @LIBOMP_VERSION_MINOR@
|
||||
integer (kind=omp_integer_kind), parameter :: kmp_version_build = @LIBOMP_VERSION_BUILD@
|
||||
character(*), parameter :: kmp_build_date = '@LIBOMP_BUILD_DATE@'
|
||||
integer (kind=omp_integer_kind), parameter :: openmp_version = @LIBOMP_OMP_YEAR_MONTH@
|
||||
|
||||
integer(kind=omp_sched_kind), parameter :: omp_sched_static = 1
|
||||
integer(kind=omp_sched_kind), parameter :: omp_sched_dynamic = 2
|
||||
integer(kind=omp_sched_kind), parameter :: omp_sched_guided = 3
|
||||
integer(kind=omp_sched_kind), parameter :: omp_sched_auto = 4
|
||||
|
||||
integer (kind=omp_proc_bind_kind), parameter :: omp_proc_bind_false = 0
|
||||
integer (kind=omp_proc_bind_kind), parameter :: omp_proc_bind_true = 1
|
||||
integer (kind=omp_proc_bind_kind), parameter :: omp_proc_bind_master = 2
|
||||
integer (kind=omp_proc_bind_kind), parameter :: omp_proc_bind_close = 3
|
||||
integer (kind=omp_proc_bind_kind), parameter :: omp_proc_bind_spread = 4
|
||||
|
||||
integer (kind=kmp_cancel_kind), parameter :: kmp_cancel_parallel = 1
|
||||
integer (kind=kmp_cancel_kind), parameter :: kmp_cancel_loop = 2
|
||||
integer (kind=kmp_cancel_kind), parameter :: kmp_cancel_sections = 3
|
||||
integer (kind=kmp_cancel_kind), parameter :: kmp_cancel_taskgroup = 4
|
||||
|
||||
interface
|
||||
|
||||
! ***
|
||||
! *** omp_* entry points
|
||||
! ***
|
||||
|
||||
subroutine omp_set_num_threads(num_threads)
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_integer_kind) num_threads
|
||||
end subroutine omp_set_num_threads
|
||||
|
||||
subroutine omp_set_dynamic(dynamic_threads)
|
||||
use omp_lib_kinds
|
||||
logical (kind=omp_logical_kind) dynamic_threads
|
||||
end subroutine omp_set_dynamic
|
||||
|
||||
subroutine omp_set_nested(nested)
|
||||
use omp_lib_kinds
|
||||
logical (kind=omp_logical_kind) nested
|
||||
end subroutine omp_set_nested
|
||||
|
||||
function omp_get_num_threads()
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_integer_kind) omp_get_num_threads
|
||||
end function omp_get_num_threads
|
||||
|
||||
function omp_get_max_threads()
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_integer_kind) omp_get_max_threads
|
||||
end function omp_get_max_threads
|
||||
|
||||
function omp_get_thread_num()
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_integer_kind) omp_get_thread_num
|
||||
end function omp_get_thread_num
|
||||
|
||||
function omp_get_num_procs()
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_integer_kind) omp_get_num_procs
|
||||
end function omp_get_num_procs
|
||||
|
||||
function omp_in_parallel()
|
||||
use omp_lib_kinds
|
||||
logical (kind=omp_logical_kind) omp_in_parallel
|
||||
end function omp_in_parallel
|
||||
|
||||
function omp_in_final()
|
||||
use omp_lib_kinds
|
||||
logical (kind=omp_logical_kind) omp_in_final
|
||||
end function omp_in_final
|
||||
|
||||
function omp_get_dynamic()
|
||||
use omp_lib_kinds
|
||||
logical (kind=omp_logical_kind) omp_get_dynamic
|
||||
end function omp_get_dynamic
|
||||
|
||||
function omp_get_nested()
|
||||
use omp_lib_kinds
|
||||
logical (kind=omp_logical_kind) omp_get_nested
|
||||
end function omp_get_nested
|
||||
|
||||
function omp_get_thread_limit()
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_integer_kind) omp_get_thread_limit
|
||||
end function omp_get_thread_limit
|
||||
|
||||
subroutine omp_set_max_active_levels(max_levels)
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_integer_kind) max_levels
|
||||
end subroutine omp_set_max_active_levels
|
||||
|
||||
function omp_get_max_active_levels()
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_integer_kind) omp_get_max_active_levels
|
||||
end function omp_get_max_active_levels
|
||||
|
||||
function omp_get_level()
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_integer_kind) omp_get_level
|
||||
end function omp_get_level
|
||||
|
||||
function omp_get_active_level()
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_integer_kind) omp_get_active_level
|
||||
end function omp_get_active_level
|
||||
|
||||
function omp_get_ancestor_thread_num(level)
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_integer_kind) level
|
||||
integer (kind=omp_integer_kind) omp_get_ancestor_thread_num
|
||||
end function omp_get_ancestor_thread_num
|
||||
|
||||
function omp_get_team_size(level)
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_integer_kind) level
|
||||
integer (kind=omp_integer_kind) omp_get_team_size
|
||||
end function omp_get_team_size
|
||||
|
||||
subroutine omp_set_schedule(kind, chunk_size)
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_sched_kind) kind
|
||||
integer (kind=omp_integer_kind) chunk_size
|
||||
end subroutine omp_set_schedule
|
||||
|
||||
subroutine omp_get_schedule(kind, chunk_size)
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_sched_kind) kind
|
||||
integer (kind=omp_integer_kind) chunk_size
|
||||
end subroutine omp_get_schedule
|
||||
|
||||
function omp_get_proc_bind()
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_proc_bind_kind) omp_get_proc_bind
|
||||
end function omp_get_proc_bind
|
||||
|
||||
function omp_get_wtime()
|
||||
double precision omp_get_wtime
|
||||
end function omp_get_wtime
|
||||
|
||||
function omp_get_wtick ()
|
||||
double precision omp_get_wtick
|
||||
end function omp_get_wtick
|
||||
|
||||
function omp_get_default_device()
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_integer_kind) omp_get_default_device
|
||||
end function omp_get_default_device
|
||||
|
||||
subroutine omp_set_default_device(device_num)
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_integer_kind) device_num
|
||||
end subroutine omp_set_default_device
|
||||
|
||||
function omp_get_num_devices()
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_integer_kind) omp_get_num_devices
|
||||
end function omp_get_num_devices
|
||||
|
||||
function omp_get_num_teams()
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_integer_kind) omp_get_num_teams
|
||||
end function omp_get_num_teams
|
||||
|
||||
function omp_get_team_num()
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_integer_kind) omp_get_team_num
|
||||
end function omp_get_team_num
|
||||
|
||||
function omp_get_cancellation()
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_integer_kind) omp_get_cancellation
|
||||
end function omp_get_cancellation
|
||||
|
||||
function omp_is_initial_device()
|
||||
use omp_lib_kinds
|
||||
logical (kind=omp_logical_kind) omp_is_initial_device
|
||||
end function omp_is_initial_device
|
||||
|
||||
subroutine omp_init_lock(svar)
|
||||
!DIR$ IF(__INTEL_COMPILER.GE.1400)
|
||||
!DIR$ attributes known_intrinsic :: omp_init_lock
|
||||
!DIR$ ENDIF
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_lock_kind) svar
|
||||
end subroutine omp_init_lock
|
||||
|
||||
subroutine omp_destroy_lock(svar)
|
||||
!DIR$ IF(__INTEL_COMPILER.GE.1400)
|
||||
!DIR$ attributes known_intrinsic :: omp_destroy_lock
|
||||
!DIR$ ENDIF
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_lock_kind) svar
|
||||
end subroutine omp_destroy_lock
|
||||
|
||||
subroutine omp_set_lock(svar)
|
||||
!DIR$ IF(__INTEL_COMPILER.GE.1400)
|
||||
!DIR$ attributes known_intrinsic :: omp_set_lock
|
||||
!DIR$ ENDIF
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_lock_kind) svar
|
||||
end subroutine omp_set_lock
|
||||
|
||||
subroutine omp_unset_lock(svar)
|
||||
!DIR$ IF(__INTEL_COMPILER.GE.1400)
|
||||
!DIR$ attributes known_intrinsic :: omp_unset_lock
|
||||
!DIR$ ENDIF
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_lock_kind) svar
|
||||
end subroutine omp_unset_lock
|
||||
|
||||
function omp_test_lock(svar)
|
||||
!DIR$ IF(__INTEL_COMPILER.GE.1400)
|
||||
!DIR$ attributes known_intrinsic :: omp_test_lock
|
||||
!DIR$ ENDIF
|
||||
use omp_lib_kinds
|
||||
logical (kind=omp_logical_kind) omp_test_lock
|
||||
integer (kind=omp_lock_kind) svar
|
||||
end function omp_test_lock
|
||||
|
||||
subroutine omp_init_nest_lock(nvar)
|
||||
!DIR$ IF(__INTEL_COMPILER.GE.1400)
|
||||
!DIR$ attributes known_intrinsic :: omp_init_nest_lock
|
||||
!DIR$ ENDIF
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_nest_lock_kind) nvar
|
||||
end subroutine omp_init_nest_lock
|
||||
|
||||
subroutine omp_destroy_nest_lock(nvar)
|
||||
!DIR$ IF(__INTEL_COMPILER.GE.1400)
|
||||
!DIR$ attributes known_intrinsic :: omp_destroy_nest_lock
|
||||
!DIR$ ENDIF
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_nest_lock_kind) nvar
|
||||
end subroutine omp_destroy_nest_lock
|
||||
|
||||
subroutine omp_set_nest_lock(nvar)
|
||||
!DIR$ IF(__INTEL_COMPILER.GE.1400)
|
||||
!DIR$ attributes known_intrinsic :: omp_set_nest_lock
|
||||
!DIR$ ENDIF
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_nest_lock_kind) nvar
|
||||
end subroutine omp_set_nest_lock
|
||||
|
||||
subroutine omp_unset_nest_lock(nvar)
|
||||
!DIR$ IF(__INTEL_COMPILER.GE.1400)
|
||||
!DIR$ attributes known_intrinsic :: omp_unset_nest_lock
|
||||
!DIR$ ENDIF
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_nest_lock_kind) nvar
|
||||
end subroutine omp_unset_nest_lock
|
||||
|
||||
function omp_test_nest_lock(nvar)
|
||||
!DIR$ IF(__INTEL_COMPILER.GE.1400)
|
||||
!DIR$ attributes known_intrinsic :: omp_test_nest_lock
|
||||
!DIR$ ENDIF
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_integer_kind) omp_test_nest_lock
|
||||
integer (kind=omp_nest_lock_kind) nvar
|
||||
end function omp_test_nest_lock
|
||||
|
||||
! ***
|
||||
! *** kmp_* entry points
|
||||
! ***
|
||||
|
||||
subroutine kmp_set_stacksize(size)
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_integer_kind) size
|
||||
end subroutine kmp_set_stacksize
|
||||
|
||||
subroutine kmp_set_stacksize_s(size)
|
||||
use omp_lib_kinds
|
||||
integer (kind=kmp_size_t_kind) size
|
||||
end subroutine kmp_set_stacksize_s
|
||||
|
||||
subroutine kmp_set_blocktime(msec)
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_integer_kind) msec
|
||||
end subroutine kmp_set_blocktime
|
||||
|
||||
subroutine kmp_set_library_serial()
|
||||
end subroutine kmp_set_library_serial
|
||||
|
||||
subroutine kmp_set_library_turnaround()
|
||||
end subroutine kmp_set_library_turnaround
|
||||
|
||||
subroutine kmp_set_library_throughput()
|
||||
end subroutine kmp_set_library_throughput
|
||||
|
||||
subroutine kmp_set_library(libnum)
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_integer_kind) libnum
|
||||
end subroutine kmp_set_library
|
||||
|
||||
subroutine kmp_set_defaults(string)
|
||||
character*(*) string
|
||||
end subroutine kmp_set_defaults
|
||||
|
||||
function kmp_get_stacksize()
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_integer_kind) kmp_get_stacksize
|
||||
end function kmp_get_stacksize
|
||||
|
||||
function kmp_get_stacksize_s()
|
||||
use omp_lib_kinds
|
||||
integer (kind=kmp_size_t_kind) kmp_get_stacksize_s
|
||||
end function kmp_get_stacksize_s
|
||||
|
||||
function kmp_get_blocktime()
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_integer_kind) kmp_get_blocktime
|
||||
end function kmp_get_blocktime
|
||||
|
||||
function kmp_get_library()
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_integer_kind) kmp_get_library
|
||||
end function kmp_get_library
|
||||
|
||||
function kmp_set_affinity(mask)
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_integer_kind) kmp_set_affinity
|
||||
integer (kind=kmp_affinity_mask_kind) mask
|
||||
end function kmp_set_affinity
|
||||
|
||||
function kmp_get_affinity(mask)
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_integer_kind) kmp_get_affinity
|
||||
integer (kind=kmp_affinity_mask_kind) mask
|
||||
end function kmp_get_affinity
|
||||
|
||||
function kmp_get_affinity_max_proc()
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_integer_kind) kmp_get_affinity_max_proc
|
||||
end function kmp_get_affinity_max_proc
|
||||
|
||||
subroutine kmp_create_affinity_mask(mask)
|
||||
use omp_lib_kinds
|
||||
integer (kind=kmp_affinity_mask_kind) mask
|
||||
end subroutine kmp_create_affinity_mask
|
||||
|
||||
subroutine kmp_destroy_affinity_mask(mask)
|
||||
use omp_lib_kinds
|
||||
integer (kind=kmp_affinity_mask_kind) mask
|
||||
end subroutine kmp_destroy_affinity_mask
|
||||
|
||||
function kmp_set_affinity_mask_proc(proc, mask)
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_integer_kind) kmp_set_affinity_mask_proc
|
||||
integer (kind=omp_integer_kind) proc
|
||||
integer (kind=kmp_affinity_mask_kind) mask
|
||||
end function kmp_set_affinity_mask_proc
|
||||
|
||||
function kmp_unset_affinity_mask_proc(proc, mask)
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_integer_kind) kmp_unset_affinity_mask_proc
|
||||
integer (kind=omp_integer_kind) proc
|
||||
integer (kind=kmp_affinity_mask_kind) mask
|
||||
end function kmp_unset_affinity_mask_proc
|
||||
|
||||
function kmp_get_affinity_mask_proc(proc, mask)
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_integer_kind) kmp_get_affinity_mask_proc
|
||||
integer (kind=omp_integer_kind) proc
|
||||
integer (kind=kmp_affinity_mask_kind) mask
|
||||
end function kmp_get_affinity_mask_proc
|
||||
|
||||
function kmp_malloc(size)
|
||||
use omp_lib_kinds
|
||||
integer (kind=kmp_pointer_kind) kmp_malloc
|
||||
integer (kind=kmp_size_t_kind) size
|
||||
end function kmp_malloc
|
||||
|
||||
function kmp_aligned_malloc(size, alignment)
|
||||
use omp_lib_kinds
|
||||
integer (kind=kmp_pointer_kind) kmp_aligned_malloc
|
||||
integer (kind=kmp_size_t_kind) size
|
||||
integer (kind=kmp_size_t_kind) alignment
|
||||
end function kmp_aligned_malloc
|
||||
|
||||
function kmp_calloc(nelem, elsize)
|
||||
use omp_lib_kinds
|
||||
integer (kind=kmp_pointer_kind) kmp_calloc
|
||||
integer (kind=kmp_size_t_kind) nelem
|
||||
integer (kind=kmp_size_t_kind) elsize
|
||||
end function kmp_calloc
|
||||
|
||||
function kmp_realloc(ptr, size)
|
||||
use omp_lib_kinds
|
||||
integer (kind=kmp_pointer_kind) kmp_realloc
|
||||
integer (kind=kmp_pointer_kind) ptr
|
||||
integer (kind=kmp_size_t_kind) size
|
||||
end function kmp_realloc
|
||||
|
||||
subroutine kmp_free(ptr)
|
||||
use omp_lib_kinds
|
||||
integer (kind=kmp_pointer_kind) ptr
|
||||
end subroutine kmp_free
|
||||
|
||||
subroutine kmp_set_warnings_on()
|
||||
end subroutine kmp_set_warnings_on
|
||||
|
||||
subroutine kmp_set_warnings_off()
|
||||
end subroutine kmp_set_warnings_off
|
||||
|
||||
function kmp_get_cancellation_status(cancelkind)
|
||||
use omp_lib_kinds
|
||||
integer (kind=kmp_cancel_kind) cancelkind
|
||||
logical (kind=omp_logical_kind) kmp_get_cancellation_status
|
||||
end function kmp_get_cancellation_status
|
||||
|
||||
end interface
|
||||
|
||||
!dec$ if defined(_WIN32)
|
||||
!dec$ if defined(_WIN64) .or. defined(_M_AMD64)
|
||||
|
||||
!***
|
||||
!*** The Fortran entry points must be in uppercase, even if the /Qlowercase
|
||||
!*** option is specified. The alias attribute ensures that the specified
|
||||
!*** string is used as the entry point.
|
||||
!***
|
||||
!*** On the Windows* OS IA-32 architecture, the Fortran entry points have an
|
||||
!*** underscore prepended. On the Windows* OS Intel(R) 64
|
||||
!*** architecture, no underscore is prepended.
|
||||
!***
|
||||
|
||||
!dec$ attributes alias:'OMP_SET_NUM_THREADS' :: omp_set_num_threads
|
||||
!dec$ attributes alias:'OMP_SET_DYNAMIC' :: omp_set_dynamic
|
||||
!dec$ attributes alias:'OMP_SET_NESTED' :: omp_set_nested
|
||||
!dec$ attributes alias:'OMP_GET_NUM_THREADS' :: omp_get_num_threads
|
||||
!dec$ attributes alias:'OMP_GET_MAX_THREADS' :: omp_get_max_threads
|
||||
!dec$ attributes alias:'OMP_GET_THREAD_NUM' :: omp_get_thread_num
|
||||
!dec$ attributes alias:'OMP_GET_NUM_PROCS' :: omp_get_num_procs
|
||||
!dec$ attributes alias:'OMP_IN_PARALLEL' :: omp_in_parallel
|
||||
!dec$ attributes alias:'OMP_GET_DYNAMIC' :: omp_get_dynamic
|
||||
!dec$ attributes alias:'OMP_GET_NESTED' :: omp_get_nested
|
||||
!dec$ attributes alias:'OMP_GET_THREAD_LIMIT' :: omp_get_thread_limit
|
||||
!dec$ attributes alias:'OMP_SET_MAX_ACTIVE_LEVELS' :: omp_set_max_active_levels
|
||||
!dec$ attributes alias:'OMP_GET_MAX_ACTIVE_LEVELS' :: omp_get_max_active_levels
|
||||
!dec$ attributes alias:'OMP_GET_LEVEL' :: omp_get_level
|
||||
!dec$ attributes alias:'OMP_GET_ACTIVE_LEVEL' :: omp_get_active_level
|
||||
!dec$ attributes alias:'OMP_GET_ANCESTOR_THREAD_NUM' :: omp_get_ancestor_thread_num
|
||||
!dec$ attributes alias:'OMP_GET_TEAM_SIZE' :: omp_get_team_size
|
||||
!dec$ attributes alias:'OMP_SET_SCHEDULE' :: omp_set_schedule
|
||||
!dec$ attributes alias:'OMP_GET_SCHEDULE' :: omp_get_schedule
|
||||
!dec$ attributes alias:'OMP_GET_PROC_BIND' :: omp_get_proc_bind
|
||||
!dec$ attributes alias:'OMP_GET_WTIME' :: omp_get_wtime
|
||||
!dec$ attributes alias:'OMP_GET_WTICK' :: omp_get_wtick
|
||||
!dec$ attributes alias:'OMP_GET_DEFAULT_DEVICE' :: omp_get_default_device
|
||||
!dec$ attributes alias:'OMP_SET_DEFAULT_DEVICE' :: omp_set_default_device
|
||||
!dec$ attributes alias:'OMP_GET_NUM_DEVICES' :: omp_get_num_devices
|
||||
!dec$ attributes alias:'OMP_GET_NUM_TEAMS' :: omp_get_num_teams
|
||||
!dec$ attributes alias:'OMP_GET_TEAM_NUM' :: omp_get_team_num
|
||||
!dec$ attributes alias:'OMP_GET_CANCELLATION' :: omp_get_cancellation
|
||||
!dec$ attributes alias:'OMP_IS_INITIAL_DEVICE' :: omp_is_initial_device
|
||||
|
||||
!dec$ attributes alias:'omp_init_lock' :: omp_init_lock
|
||||
!dec$ attributes alias:'omp_destroy_lock' :: omp_destroy_lock
|
||||
!dec$ attributes alias:'omp_set_lock' :: omp_set_lock
|
||||
!dec$ attributes alias:'omp_unset_lock' :: omp_unset_lock
|
||||
!dec$ attributes alias:'omp_test_lock' :: omp_test_lock
|
||||
!dec$ attributes alias:'omp_init_nest_lock' :: omp_init_nest_lock
|
||||
!dec$ attributes alias:'omp_destroy_nest_lock' :: omp_destroy_nest_lock
|
||||
!dec$ attributes alias:'omp_set_nest_lock' :: omp_set_nest_lock
|
||||
!dec$ attributes alias:'omp_unset_nest_lock' :: omp_unset_nest_lock
|
||||
!dec$ attributes alias:'omp_test_nest_lock' :: omp_test_nest_lock
|
||||
|
||||
!dec$ attributes alias:'KMP_SET_STACKSIZE'::kmp_set_stacksize
|
||||
!dec$ attributes alias:'KMP_SET_STACKSIZE_S'::kmp_set_stacksize_s
|
||||
!dec$ attributes alias:'KMP_SET_BLOCKTIME'::kmp_set_blocktime
|
||||
!dec$ attributes alias:'KMP_SET_LIBRARY_SERIAL'::kmp_set_library_serial
|
||||
!dec$ attributes alias:'KMP_SET_LIBRARY_TURNAROUND'::kmp_set_library_turnaround
|
||||
!dec$ attributes alias:'KMP_SET_LIBRARY_THROUGHPUT'::kmp_set_library_throughput
|
||||
!dec$ attributes alias:'KMP_SET_LIBRARY'::kmp_set_library
|
||||
!dec$ attributes alias:'KMP_GET_STACKSIZE'::kmp_get_stacksize
|
||||
!dec$ attributes alias:'KMP_GET_STACKSIZE_S'::kmp_get_stacksize_s
|
||||
!dec$ attributes alias:'KMP_GET_BLOCKTIME'::kmp_get_blocktime
|
||||
!dec$ attributes alias:'KMP_GET_LIBRARY'::kmp_get_library
|
||||
!dec$ attributes alias:'KMP_SET_AFFINITY'::kmp_set_affinity
|
||||
!dec$ attributes alias:'KMP_GET_AFFINITY'::kmp_get_affinity
|
||||
!dec$ attributes alias:'KMP_GET_AFFINITY_MAX_PROC'::kmp_get_affinity_max_proc
|
||||
!dec$ attributes alias:'KMP_CREATE_AFFINITY_MASK'::kmp_create_affinity_mask
|
||||
!dec$ attributes alias:'KMP_DESTROY_AFFINITY_MASK'::kmp_destroy_affinity_mask
|
||||
!dec$ attributes alias:'KMP_SET_AFFINITY_MASK_PROC'::kmp_set_affinity_mask_proc
|
||||
!dec$ attributes alias:'KMP_UNSET_AFFINITY_MASK_PROC'::kmp_unset_affinity_mask_proc
|
||||
!dec$ attributes alias:'KMP_GET_AFFINITY_MASK_PROC'::kmp_get_affinity_mask_proc
|
||||
!dec$ attributes alias:'KMP_MALLOC'::kmp_malloc
|
||||
!dec$ attributes alias:'KMP_ALIGNED_MALLOC'::kmp_aligned_malloc
|
||||
!dec$ attributes alias:'KMP_CALLOC'::kmp_calloc
|
||||
!dec$ attributes alias:'KMP_REALLOC'::kmp_realloc
|
||||
!dec$ attributes alias:'KMP_FREE'::kmp_free
|
||||
|
||||
!dec$ attributes alias:'KMP_SET_WARNINGS_ON'::kmp_set_warnings_on
|
||||
!dec$ attributes alias:'KMP_SET_WARNINGS_OFF'::kmp_set_warnings_off
|
||||
|
||||
!dec$ attributes alias:'KMP_GET_CANCELLATION_STATUS' :: kmp_get_cancellation_status
|
||||
|
||||
!dec$ else
|
||||
|
||||
!***
|
||||
!*** On Windows* OS IA-32 architecture, the Fortran entry points have an underscore prepended.
|
||||
!***
|
||||
|
||||
!dec$ attributes alias:'_OMP_SET_NUM_THREADS' :: omp_set_num_threads
|
||||
!dec$ attributes alias:'_OMP_SET_DYNAMIC' :: omp_set_dynamic
|
||||
!dec$ attributes alias:'_OMP_SET_NESTED' :: omp_set_nested
|
||||
!dec$ attributes alias:'_OMP_GET_NUM_THREADS' :: omp_get_num_threads
|
||||
!dec$ attributes alias:'_OMP_GET_MAX_THREADS' :: omp_get_max_threads
|
||||
!dec$ attributes alias:'_OMP_GET_THREAD_NUM' :: omp_get_thread_num
|
||||
!dec$ attributes alias:'_OMP_GET_NUM_PROCS' :: omp_get_num_procs
|
||||
!dec$ attributes alias:'_OMP_IN_PARALLEL' :: omp_in_parallel
|
||||
!dec$ attributes alias:'_OMP_GET_DYNAMIC' :: omp_get_dynamic
|
||||
!dec$ attributes alias:'_OMP_GET_NESTED' :: omp_get_nested
|
||||
!dec$ attributes alias:'_OMP_GET_THREAD_LIMIT' :: omp_get_thread_limit
|
||||
!dec$ attributes alias:'_OMP_SET_MAX_ACTIVE_LEVELS' :: omp_set_max_active_levels
|
||||
!dec$ attributes alias:'_OMP_GET_MAX_ACTIVE_LEVELS' :: omp_get_max_active_levels
|
||||
!dec$ attributes alias:'_OMP_GET_LEVEL' :: omp_get_level
|
||||
!dec$ attributes alias:'_OMP_GET_ACTIVE_LEVEL' :: omp_get_active_level
|
||||
!dec$ attributes alias:'_OMP_GET_ANCESTOR_THREAD_NUM' :: omp_get_ancestor_thread_num
|
||||
!dec$ attributes alias:'_OMP_GET_TEAM_SIZE' :: omp_get_team_size
|
||||
!dec$ attributes alias:'_OMP_SET_SCHEDULE' :: omp_set_schedule
|
||||
!dec$ attributes alias:'_OMP_GET_SCHEDULE' :: omp_get_schedule
|
||||
!dec$ attributes alias:'_OMP_GET_PROC_BIND' :: omp_get_proc_bind
|
||||
!dec$ attributes alias:'_OMP_GET_WTIME' :: omp_get_wtime
|
||||
!dec$ attributes alias:'_OMP_GET_WTICK' :: omp_get_wtick
|
||||
!dec$ attributes alias:'_OMP_GET_DEFAULT_DEVICE' :: omp_get_default_device
|
||||
!dec$ attributes alias:'_OMP_SET_DEFAULT_DEVICE' :: omp_set_default_device
|
||||
!dec$ attributes alias:'_OMP_GET_NUM_DEVICES' :: omp_get_num_devices
|
||||
!dec$ attributes alias:'_OMP_GET_NUM_TEAMS' :: omp_get_num_teams
|
||||
!dec$ attributes alias:'_OMP_GET_TEAM_NUM' :: omp_get_team_num
|
||||
!dec$ attributes alias:'_OMP_GET_CANCELLATION' :: omp_get_cancellation
|
||||
!dec$ attributes alias:'_OMP_IS_INITIAL_DEVICE' :: omp_is_initial_device
|
||||
|
||||
!dec$ attributes alias:'_omp_init_lock' :: omp_init_lock
|
||||
!dec$ attributes alias:'_omp_destroy_lock' :: omp_destroy_lock
|
||||
!dec$ attributes alias:'_omp_set_lock' :: omp_set_lock
|
||||
!dec$ attributes alias:'_omp_unset_lock' :: omp_unset_lock
|
||||
!dec$ attributes alias:'_omp_test_lock' :: omp_test_lock
|
||||
!dec$ attributes alias:'_omp_init_nest_lock' :: omp_init_nest_lock
|
||||
!dec$ attributes alias:'_omp_destroy_nest_lock' :: omp_destroy_nest_lock
|
||||
!dec$ attributes alias:'_omp_set_nest_lock' :: omp_set_nest_lock
|
||||
!dec$ attributes alias:'_omp_unset_nest_lock' :: omp_unset_nest_lock
|
||||
!dec$ attributes alias:'_omp_test_nest_lock' :: omp_test_nest_lock
|
||||
|
||||
!dec$ attributes alias:'_KMP_SET_STACKSIZE'::kmp_set_stacksize
|
||||
!dec$ attributes alias:'_KMP_SET_STACKSIZE_S'::kmp_set_stacksize_s
|
||||
!dec$ attributes alias:'_KMP_SET_BLOCKTIME'::kmp_set_blocktime
|
||||
!dec$ attributes alias:'_KMP_SET_LIBRARY_SERIAL'::kmp_set_library_serial
|
||||
!dec$ attributes alias:'_KMP_SET_LIBRARY_TURNAROUND'::kmp_set_library_turnaround
|
||||
!dec$ attributes alias:'_KMP_SET_LIBRARY_THROUGHPUT'::kmp_set_library_throughput
|
||||
!dec$ attributes alias:'_KMP_SET_LIBRARY'::kmp_set_library
|
||||
!dec$ attributes alias:'_KMP_GET_STACKSIZE'::kmp_get_stacksize
|
||||
!dec$ attributes alias:'_KMP_GET_STACKSIZE_S'::kmp_get_stacksize_s
|
||||
!dec$ attributes alias:'_KMP_GET_BLOCKTIME'::kmp_get_blocktime
|
||||
!dec$ attributes alias:'_KMP_GET_LIBRARY'::kmp_get_library
|
||||
!dec$ attributes alias:'_KMP_SET_AFFINITY'::kmp_set_affinity
|
||||
!dec$ attributes alias:'_KMP_GET_AFFINITY'::kmp_get_affinity
|
||||
!dec$ attributes alias:'_KMP_GET_AFFINITY_MAX_PROC'::kmp_get_affinity_max_proc
|
||||
!dec$ attributes alias:'_KMP_CREATE_AFFINITY_MASK'::kmp_create_affinity_mask
|
||||
!dec$ attributes alias:'_KMP_DESTROY_AFFINITY_MASK'::kmp_destroy_affinity_mask
|
||||
!dec$ attributes alias:'_KMP_SET_AFFINITY_MASK_PROC'::kmp_set_affinity_mask_proc
|
||||
!dec$ attributes alias:'_KMP_UNSET_AFFINITY_MASK_PROC'::kmp_unset_affinity_mask_proc
|
||||
!dec$ attributes alias:'_KMP_GET_AFFINITY_MASK_PROC'::kmp_get_affinity_mask_proc
|
||||
!dec$ attributes alias:'_KMP_MALLOC'::kmp_malloc
|
||||
!dec$ attributes alias:'_KMP_ALIGNED_MALLOC'::kmp_aligned_malloc
|
||||
!dec$ attributes alias:'_KMP_CALLOC'::kmp_calloc
|
||||
!dec$ attributes alias:'_KMP_REALLOC'::kmp_realloc
|
||||
!dec$ attributes alias:'_KMP_FREE'::kmp_free
|
||||
|
||||
!dec$ attributes alias:'_KMP_SET_WARNINGS_ON'::kmp_set_warnings_on
|
||||
!dec$ attributes alias:'_KMP_SET_WARNINGS_OFF'::kmp_set_warnings_off
|
||||
|
||||
!dec$ attributes alias:'_KMP_GET_CANCELLATION_STATUS' :: kmp_get_cancellation_status
|
||||
|
||||
!dec$ endif
|
||||
!dec$ endif
|
||||
|
||||
!dec$ if defined(__linux)
|
||||
|
||||
!***
|
||||
!*** The Linux* OS entry points are in lowercase, with an underscore appended.
|
||||
!***
|
||||
|
||||
!dec$ attributes alias:'omp_set_num_threads_'::omp_set_num_threads
|
||||
!dec$ attributes alias:'omp_set_dynamic_'::omp_set_dynamic
|
||||
!dec$ attributes alias:'omp_set_nested_'::omp_set_nested
|
||||
!dec$ attributes alias:'omp_get_num_threads_'::omp_get_num_threads
|
||||
!dec$ attributes alias:'omp_get_max_threads_'::omp_get_max_threads
|
||||
!dec$ attributes alias:'omp_get_thread_num_'::omp_get_thread_num
|
||||
!dec$ attributes alias:'omp_get_num_procs_'::omp_get_num_procs
|
||||
!dec$ attributes alias:'omp_in_parallel_'::omp_in_parallel
|
||||
!dec$ attributes alias:'omp_get_dynamic_'::omp_get_dynamic
|
||||
!dec$ attributes alias:'omp_get_nested_'::omp_get_nested
|
||||
!dec$ attributes alias:'omp_get_thread_limit_'::omp_get_thread_limit
|
||||
!dec$ attributes alias:'omp_set_max_active_levels_'::omp_set_max_active_levels
|
||||
!dec$ attributes alias:'omp_get_max_active_levels_'::omp_get_max_active_levels
|
||||
!dec$ attributes alias:'omp_get_level_'::omp_get_level
|
||||
!dec$ attributes alias:'omp_get_active_level_'::omp_get_active_level
|
||||
!dec$ attributes alias:'omp_get_ancestor_thread_num_'::omp_get_ancestor_thread_num
|
||||
!dec$ attributes alias:'omp_get_team_size_'::omp_get_team_size
|
||||
!dec$ attributes alias:'omp_set_schedule_'::omp_set_schedule
|
||||
!dec$ attributes alias:'omp_get_schedule_'::omp_get_schedule
|
||||
!dec$ attributes alias:'omp_get_proc_bind_' :: omp_get_proc_bind
|
||||
!dec$ attributes alias:'omp_get_wtime_'::omp_get_wtime
|
||||
!dec$ attributes alias:'omp_get_wtick_'::omp_get_wtick
|
||||
!dec$ attributes alias:'omp_get_default_device_'::omp_get_default_device
|
||||
!dec$ attributes alias:'omp_set_default_device_'::omp_set_default_device
|
||||
!dec$ attributes alias:'omp_get_num_devices_'::omp_get_num_devices
|
||||
!dec$ attributes alias:'omp_get_num_teams_'::omp_get_num_teams
|
||||
!dec$ attributes alias:'omp_get_team_num_'::omp_get_team_num
|
||||
!dec$ attributes alias:'omp_get_cancellation_'::omp_get_cancellation
|
||||
!dec$ attributes alias:'omp_is_initial_device_'::omp_is_initial_device
|
||||
|
||||
!dec$ attributes alias:'omp_init_lock_'::omp_init_lock
|
||||
!dec$ attributes alias:'omp_destroy_lock_'::omp_destroy_lock
|
||||
!dec$ attributes alias:'omp_set_lock_'::omp_set_lock
|
||||
!dec$ attributes alias:'omp_unset_lock_'::omp_unset_lock
|
||||
!dec$ attributes alias:'omp_test_lock_'::omp_test_lock
|
||||
!dec$ attributes alias:'omp_init_nest_lock_'::omp_init_nest_lock
|
||||
!dec$ attributes alias:'omp_destroy_nest_lock_'::omp_destroy_nest_lock
|
||||
!dec$ attributes alias:'omp_set_nest_lock_'::omp_set_nest_lock
|
||||
!dec$ attributes alias:'omp_unset_nest_lock_'::omp_unset_nest_lock
|
||||
!dec$ attributes alias:'omp_test_nest_lock_'::omp_test_nest_lock
|
||||
|
||||
!dec$ attributes alias:'kmp_set_stacksize_'::kmp_set_stacksize
|
||||
!dec$ attributes alias:'kmp_set_stacksize_s_'::kmp_set_stacksize_s
|
||||
!dec$ attributes alias:'kmp_set_blocktime_'::kmp_set_blocktime
|
||||
!dec$ attributes alias:'kmp_set_library_serial_'::kmp_set_library_serial
|
||||
!dec$ attributes alias:'kmp_set_library_turnaround_'::kmp_set_library_turnaround
|
||||
!dec$ attributes alias:'kmp_set_library_throughput_'::kmp_set_library_throughput
|
||||
!dec$ attributes alias:'kmp_set_library_'::kmp_set_library
|
||||
!dec$ attributes alias:'kmp_get_stacksize_'::kmp_get_stacksize
|
||||
!dec$ attributes alias:'kmp_get_stacksize_s_'::kmp_get_stacksize_s
|
||||
!dec$ attributes alias:'kmp_get_blocktime_'::kmp_get_blocktime
|
||||
!dec$ attributes alias:'kmp_get_library_'::kmp_get_library
|
||||
!dec$ attributes alias:'kmp_set_affinity_'::kmp_set_affinity
|
||||
!dec$ attributes alias:'kmp_get_affinity_'::kmp_get_affinity
|
||||
!dec$ attributes alias:'kmp_get_affinity_max_proc_'::kmp_get_affinity_max_proc
|
||||
!dec$ attributes alias:'kmp_create_affinity_mask_'::kmp_create_affinity_mask
|
||||
!dec$ attributes alias:'kmp_destroy_affinity_mask_'::kmp_destroy_affinity_mask
|
||||
!dec$ attributes alias:'kmp_set_affinity_mask_proc_'::kmp_set_affinity_mask_proc
|
||||
!dec$ attributes alias:'kmp_unset_affinity_mask_proc_'::kmp_unset_affinity_mask_proc
|
||||
!dec$ attributes alias:'kmp_get_affinity_mask_proc_'::kmp_get_affinity_mask_proc
|
||||
!dec$ attributes alias:'kmp_malloc_'::kmp_malloc
|
||||
!dec$ attributes alias:'kmp_aligned_malloc_'::kmp_aligned_malloc
|
||||
!dec$ attributes alias:'kmp_calloc_'::kmp_calloc
|
||||
!dec$ attributes alias:'kmp_realloc_'::kmp_realloc
|
||||
!dec$ attributes alias:'kmp_free_'::kmp_free
|
||||
|
||||
!dec$ attributes alias:'kmp_set_warnings_on_'::kmp_set_warnings_on
|
||||
!dec$ attributes alias:'kmp_set_warnings_off_'::kmp_set_warnings_off
|
||||
!dec$ attributes alias:'kmp_get_cancellation_status_'::kmp_get_cancellation_status
|
||||
|
||||
!dec$ endif
|
||||
|
||||
!dec$ if defined(__APPLE__)
|
||||
|
||||
!***
|
||||
!*** The Mac entry points are in lowercase, with an both an underscore
|
||||
!*** appended and an underscore prepended.
|
||||
!***
|
||||
|
||||
!dec$ attributes alias:'_omp_set_num_threads_'::omp_set_num_threads
|
||||
!dec$ attributes alias:'_omp_set_dynamic_'::omp_set_dynamic
|
||||
!dec$ attributes alias:'_omp_set_nested_'::omp_set_nested
|
||||
!dec$ attributes alias:'_omp_get_num_threads_'::omp_get_num_threads
|
||||
!dec$ attributes alias:'_omp_get_max_threads_'::omp_get_max_threads
|
||||
!dec$ attributes alias:'_omp_get_thread_num_'::omp_get_thread_num
|
||||
!dec$ attributes alias:'_omp_get_num_procs_'::omp_get_num_procs
|
||||
!dec$ attributes alias:'_omp_in_parallel_'::omp_in_parallel
|
||||
!dec$ attributes alias:'_omp_get_dynamic_'::omp_get_dynamic
|
||||
!dec$ attributes alias:'_omp_get_nested_'::omp_get_nested
|
||||
!dec$ attributes alias:'_omp_get_thread_limit_'::omp_get_thread_limit
|
||||
!dec$ attributes alias:'_omp_set_max_active_levels_'::omp_set_max_active_levels
|
||||
!dec$ attributes alias:'_omp_get_max_active_levels_'::omp_get_max_active_levels
|
||||
!dec$ attributes alias:'_omp_get_level_'::omp_get_level
|
||||
!dec$ attributes alias:'_omp_get_active_level_'::omp_get_active_level
|
||||
!dec$ attributes alias:'_omp_get_ancestor_thread_num_'::omp_get_ancestor_thread_num
|
||||
!dec$ attributes alias:'_omp_get_team_size_'::omp_get_team_size
|
||||
!dec$ attributes alias:'_omp_set_schedule_'::omp_set_schedule
|
||||
!dec$ attributes alias:'_omp_get_schedule_'::omp_get_schedule
|
||||
!dec$ attributes alias:'_omp_get_proc_bind_' :: omp_get_proc_bind
|
||||
!dec$ attributes alias:'_omp_get_wtime_'::omp_get_wtime
|
||||
!dec$ attributes alias:'_omp_get_wtick_'::omp_get_wtick
|
||||
!dec$ attributes alias:'_omp_get_num_teams_'::omp_get_num_teams
|
||||
!dec$ attributes alias:'_omp_get_team_num_'::omp_get_team_num
|
||||
!dec$ attributes alias:'_omp_get_cancellation_'::omp_get_cancellation
|
||||
!dec$ attributes alias:'_omp_is_initial_device_'::omp_is_initial_device
|
||||
|
||||
!dec$ attributes alias:'_omp_init_lock_'::omp_init_lock
|
||||
!dec$ attributes alias:'_omp_destroy_lock_'::omp_destroy_lock
|
||||
!dec$ attributes alias:'_omp_set_lock_'::omp_set_lock
|
||||
!dec$ attributes alias:'_omp_unset_lock_'::omp_unset_lock
|
||||
!dec$ attributes alias:'_omp_test_lock_'::omp_test_lock
|
||||
!dec$ attributes alias:'_omp_init_nest_lock_'::omp_init_nest_lock
|
||||
!dec$ attributes alias:'_omp_destroy_nest_lock_'::omp_destroy_nest_lock
|
||||
!dec$ attributes alias:'_omp_set_nest_lock_'::omp_set_nest_lock
|
||||
!dec$ attributes alias:'_omp_unset_nest_lock_'::omp_unset_nest_lock
|
||||
!dec$ attributes alias:'_omp_test_nest_lock_'::omp_test_nest_lock
|
||||
|
||||
!dec$ attributes alias:'_kmp_set_stacksize_'::kmp_set_stacksize
|
||||
!dec$ attributes alias:'_kmp_set_stacksize_s_'::kmp_set_stacksize_s
|
||||
!dec$ attributes alias:'_kmp_set_blocktime_'::kmp_set_blocktime
|
||||
!dec$ attributes alias:'_kmp_set_library_serial_'::kmp_set_library_serial
|
||||
!dec$ attributes alias:'_kmp_set_library_turnaround_'::kmp_set_library_turnaround
|
||||
!dec$ attributes alias:'_kmp_set_library_throughput_'::kmp_set_library_throughput
|
||||
!dec$ attributes alias:'_kmp_set_library_'::kmp_set_library
|
||||
!dec$ attributes alias:'_kmp_get_stacksize_'::kmp_get_stacksize
|
||||
!dec$ attributes alias:'_kmp_get_stacksize_s_'::kmp_get_stacksize_s
|
||||
!dec$ attributes alias:'_kmp_get_blocktime_'::kmp_get_blocktime
|
||||
!dec$ attributes alias:'_kmp_get_library_'::kmp_get_library
|
||||
!dec$ attributes alias:'_kmp_set_affinity_'::kmp_set_affinity
|
||||
!dec$ attributes alias:'_kmp_get_affinity_'::kmp_get_affinity
|
||||
!dec$ attributes alias:'_kmp_get_affinity_max_proc_'::kmp_get_affinity_max_proc
|
||||
!dec$ attributes alias:'_kmp_create_affinity_mask_'::kmp_create_affinity_mask
|
||||
!dec$ attributes alias:'_kmp_destroy_affinity_mask_'::kmp_destroy_affinity_mask
|
||||
!dec$ attributes alias:'_kmp_set_affinity_mask_proc_'::kmp_set_affinity_mask_proc
|
||||
!dec$ attributes alias:'_kmp_unset_affinity_mask_proc_'::kmp_unset_affinity_mask_proc
|
||||
!dec$ attributes alias:'_kmp_get_affinity_mask_proc_'::kmp_get_affinity_mask_proc
|
||||
!dec$ attributes alias:'_kmp_malloc_'::kmp_malloc
|
||||
!dec$ attributes alias:'_kmp_aligned_malloc_'::kmp_aligned_malloc
|
||||
!dec$ attributes alias:'_kmp_calloc_'::kmp_calloc
|
||||
!dec$ attributes alias:'_kmp_realloc_'::kmp_realloc
|
||||
!dec$ attributes alias:'_kmp_free_'::kmp_free
|
||||
|
||||
!dec$ attributes alias:'_kmp_set_warnings_on_'::kmp_set_warnings_on
|
||||
!dec$ attributes alias:'_kmp_set_warnings_off_'::kmp_set_warnings_off
|
||||
|
||||
!dec$ attributes alias:'_kmp_get_cancellation_status_'::kmp_get_cancellation_status
|
||||
|
||||
!dec$ endif
|
||||
|
||||
end module omp_lib
|
||||
|
|
@ -1,454 +0,0 @@
|
|||
! include/40/omp_lib.f90.var
|
||||
|
||||
!
|
||||
!//===----------------------------------------------------------------------===//
|
||||
!//
|
||||
!// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
||||
!// See https://llvm.org/LICENSE.txt for license information.
|
||||
!// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||
!//
|
||||
!//===----------------------------------------------------------------------===//
|
||||
!
|
||||
|
||||
module omp_lib_kinds
|
||||
|
||||
use, intrinsic :: iso_c_binding
|
||||
|
||||
integer, parameter :: omp_integer_kind = c_int
|
||||
integer, parameter :: omp_logical_kind = 4
|
||||
integer, parameter :: omp_real_kind = c_float
|
||||
integer, parameter :: kmp_double_kind = c_double
|
||||
integer, parameter :: omp_lock_kind = c_intptr_t
|
||||
integer, parameter :: omp_nest_lock_kind = c_intptr_t
|
||||
integer, parameter :: omp_sched_kind = omp_integer_kind
|
||||
integer, parameter :: omp_proc_bind_kind = omp_integer_kind
|
||||
integer, parameter :: kmp_pointer_kind = c_intptr_t
|
||||
integer, parameter :: kmp_size_t_kind = c_size_t
|
||||
integer, parameter :: kmp_affinity_mask_kind = c_intptr_t
|
||||
integer, parameter :: kmp_cancel_kind = omp_integer_kind
|
||||
|
||||
end module omp_lib_kinds
|
||||
|
||||
module omp_lib
|
||||
|
||||
use omp_lib_kinds
|
||||
|
||||
integer (kind=omp_integer_kind), parameter :: openmp_version = @LIBOMP_OMP_YEAR_MONTH@
|
||||
integer (kind=omp_integer_kind), parameter :: kmp_version_major = @LIBOMP_VERSION_MAJOR@
|
||||
integer (kind=omp_integer_kind), parameter :: kmp_version_minor = @LIBOMP_VERSION_MINOR@
|
||||
integer (kind=omp_integer_kind), parameter :: kmp_version_build = @LIBOMP_VERSION_BUILD@
|
||||
character(*) kmp_build_date
|
||||
parameter( kmp_build_date = '@LIBOMP_BUILD_DATE@' )
|
||||
|
||||
integer(kind=omp_sched_kind), parameter :: omp_sched_static = 1
|
||||
integer(kind=omp_sched_kind), parameter :: omp_sched_dynamic = 2
|
||||
integer(kind=omp_sched_kind), parameter :: omp_sched_guided = 3
|
||||
integer(kind=omp_sched_kind), parameter :: omp_sched_auto = 4
|
||||
|
||||
|
||||
integer (kind=omp_proc_bind_kind), parameter :: omp_proc_bind_false = 0
|
||||
integer (kind=omp_proc_bind_kind), parameter :: omp_proc_bind_true = 1
|
||||
integer (kind=omp_proc_bind_kind), parameter :: omp_proc_bind_master = 2
|
||||
integer (kind=omp_proc_bind_kind), parameter :: omp_proc_bind_close = 3
|
||||
integer (kind=omp_proc_bind_kind), parameter :: omp_proc_bind_spread = 4
|
||||
|
||||
integer (kind=kmp_cancel_kind), parameter :: kmp_cancel_parallel = 1
|
||||
integer (kind=kmp_cancel_kind), parameter :: kmp_cancel_loop = 2
|
||||
integer (kind=kmp_cancel_kind), parameter :: kmp_cancel_sections = 3
|
||||
integer (kind=kmp_cancel_kind), parameter :: kmp_cancel_taskgroup = 4
|
||||
|
||||
interface
|
||||
|
||||
! ***
|
||||
! *** omp_* entry points
|
||||
! ***
|
||||
|
||||
subroutine omp_set_num_threads(num_threads) bind(c)
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_integer_kind), value :: num_threads
|
||||
end subroutine omp_set_num_threads
|
||||
|
||||
subroutine omp_set_dynamic(dynamic_threads) bind(c)
|
||||
use omp_lib_kinds
|
||||
logical (kind=omp_logical_kind), value :: dynamic_threads
|
||||
end subroutine omp_set_dynamic
|
||||
|
||||
subroutine omp_set_nested(nested) bind(c)
|
||||
use omp_lib_kinds
|
||||
logical (kind=omp_logical_kind), value :: nested
|
||||
end subroutine omp_set_nested
|
||||
|
||||
function omp_get_num_threads() bind(c)
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_integer_kind) omp_get_num_threads
|
||||
end function omp_get_num_threads
|
||||
|
||||
function omp_get_max_threads() bind(c)
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_integer_kind) omp_get_max_threads
|
||||
end function omp_get_max_threads
|
||||
|
||||
function omp_get_thread_num() bind(c)
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_integer_kind) omp_get_thread_num
|
||||
end function omp_get_thread_num
|
||||
|
||||
function omp_get_num_procs() bind(c)
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_integer_kind) omp_get_num_procs
|
||||
end function omp_get_num_procs
|
||||
|
||||
function omp_in_parallel() bind(c)
|
||||
use omp_lib_kinds
|
||||
logical (kind=omp_logical_kind) omp_in_parallel
|
||||
end function omp_in_parallel
|
||||
|
||||
function omp_in_final() bind(c)
|
||||
use omp_lib_kinds
|
||||
logical (kind=omp_logical_kind) omp_in_final
|
||||
end function omp_in_final
|
||||
|
||||
function omp_get_dynamic() bind(c)
|
||||
use omp_lib_kinds
|
||||
logical (kind=omp_logical_kind) omp_get_dynamic
|
||||
end function omp_get_dynamic
|
||||
|
||||
function omp_get_nested() bind(c)
|
||||
use omp_lib_kinds
|
||||
logical (kind=omp_logical_kind) omp_get_nested
|
||||
end function omp_get_nested
|
||||
|
||||
function omp_get_thread_limit() bind(c)
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_integer_kind) omp_get_thread_limit
|
||||
end function omp_get_thread_limit
|
||||
|
||||
subroutine omp_set_max_active_levels(max_levels) bind(c)
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_integer_kind), value :: max_levels
|
||||
end subroutine omp_set_max_active_levels
|
||||
|
||||
function omp_get_max_active_levels() bind(c)
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_integer_kind) omp_get_max_active_levels
|
||||
end function omp_get_max_active_levels
|
||||
|
||||
function omp_get_level() bind(c)
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_integer_kind) omp_get_level
|
||||
end function omp_get_level
|
||||
|
||||
function omp_get_active_level() bind(c)
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_integer_kind) omp_get_active_level
|
||||
end function omp_get_active_level
|
||||
|
||||
function omp_get_ancestor_thread_num(level) bind(c)
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_integer_kind) omp_get_ancestor_thread_num
|
||||
integer (kind=omp_integer_kind), value :: level
|
||||
end function omp_get_ancestor_thread_num
|
||||
|
||||
function omp_get_team_size(level) bind(c)
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_integer_kind) omp_get_team_size
|
||||
integer (kind=omp_integer_kind), value :: level
|
||||
end function omp_get_team_size
|
||||
|
||||
subroutine omp_set_schedule(kind, chunk_size) bind(c)
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_sched_kind), value :: kind
|
||||
integer (kind=omp_integer_kind), value :: chunk_size
|
||||
end subroutine omp_set_schedule
|
||||
|
||||
subroutine omp_get_schedule(kind, chunk_size) bind(c)
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_sched_kind) kind
|
||||
integer (kind=omp_integer_kind) chunk_size
|
||||
end subroutine omp_get_schedule
|
||||
|
||||
function omp_get_proc_bind() bind(c)
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_proc_bind_kind) omp_get_proc_bind
|
||||
end function omp_get_proc_bind
|
||||
|
||||
function omp_get_wtime() bind(c)
|
||||
use omp_lib_kinds
|
||||
real (kind=kmp_double_kind) omp_get_wtime
|
||||
end function omp_get_wtime
|
||||
|
||||
function omp_get_wtick() bind(c)
|
||||
use omp_lib_kinds
|
||||
real (kind=kmp_double_kind) omp_get_wtick
|
||||
end function omp_get_wtick
|
||||
|
||||
function omp_get_default_device() bind(c)
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_integer_kind) omp_get_default_device
|
||||
end function omp_get_default_device
|
||||
|
||||
subroutine omp_set_default_device(device_num) bind(c)
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_integer_kind), value :: device_num
|
||||
end subroutine omp_set_default_device
|
||||
|
||||
function omp_get_num_devices() bind(c)
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_integer_kind) omp_get_num_devices
|
||||
end function omp_get_num_devices
|
||||
|
||||
function omp_get_num_teams() bind(c)
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_integer_kind) omp_get_num_teams
|
||||
end function omp_get_num_teams
|
||||
|
||||
function omp_get_team_num() bind(c)
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_integer_kind) omp_get_team_num
|
||||
end function omp_get_team_num
|
||||
|
||||
function omp_get_cancellation() bind(c)
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_integer_kind) omp_get_cancellation
|
||||
end function omp_get_cancellation
|
||||
|
||||
function omp_is_initial_device() bind(c)
|
||||
use omp_lib_kinds
|
||||
logical (kind=omp_logical_kind) omp_is_initial_device
|
||||
end function omp_is_initial_device
|
||||
|
||||
subroutine omp_init_lock(svar) bind(c)
|
||||
!DIR$ IF(__INTEL_COMPILER.GE.1400)
|
||||
!DIR$ attributes known_intrinsic :: omp_init_lock
|
||||
!DIR$ ENDIF
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_lock_kind) svar
|
||||
end subroutine omp_init_lock
|
||||
|
||||
subroutine omp_destroy_lock(svar) bind(c)
|
||||
!DIR$ IF(__INTEL_COMPILER.GE.1400)
|
||||
!DIR$ attributes known_intrinsic :: omp_destroy_lock
|
||||
!DIR$ ENDIF
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_lock_kind) svar
|
||||
end subroutine omp_destroy_lock
|
||||
|
||||
subroutine omp_set_lock(svar) bind(c)
|
||||
!DIR$ IF(__INTEL_COMPILER.GE.1400)
|
||||
!DIR$ attributes known_intrinsic :: omp_set_lock
|
||||
!DIR$ ENDIF
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_lock_kind) svar
|
||||
end subroutine omp_set_lock
|
||||
|
||||
subroutine omp_unset_lock(svar) bind(c)
|
||||
!DIR$ IF(__INTEL_COMPILER.GE.1400)
|
||||
!DIR$ attributes known_intrinsic :: omp_unset_lock
|
||||
!DIR$ ENDIF
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_lock_kind) svar
|
||||
end subroutine omp_unset_lock
|
||||
|
||||
function omp_test_lock(svar) bind(c)
|
||||
!DIR$ IF(__INTEL_COMPILER.GE.1400)
|
||||
!DIR$ attributes known_intrinsic :: omp_test_lock
|
||||
!DIR$ ENDIF
|
||||
use omp_lib_kinds
|
||||
logical (kind=omp_logical_kind) omp_test_lock
|
||||
integer (kind=omp_lock_kind) svar
|
||||
end function omp_test_lock
|
||||
|
||||
subroutine omp_init_nest_lock(nvar) bind(c)
|
||||
!DIR$ IF(__INTEL_COMPILER.GE.1400)
|
||||
!DIR$ attributes known_intrinsic :: omp_init_nest_lock
|
||||
!DIR$ ENDIF
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_nest_lock_kind) nvar
|
||||
end subroutine omp_init_nest_lock
|
||||
|
||||
subroutine omp_destroy_nest_lock(nvar) bind(c)
|
||||
!DIR$ IF(__INTEL_COMPILER.GE.1400)
|
||||
!DIR$ attributes known_intrinsic :: omp_destroy_nest_lock
|
||||
!DIR$ ENDIF
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_nest_lock_kind) nvar
|
||||
end subroutine omp_destroy_nest_lock
|
||||
|
||||
subroutine omp_set_nest_lock(nvar) bind(c)
|
||||
!DIR$ IF(__INTEL_COMPILER.GE.1400)
|
||||
!DIR$ attributes known_intrinsic :: omp_set_nest_lock
|
||||
!DIR$ ENDIF
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_nest_lock_kind) nvar
|
||||
end subroutine omp_set_nest_lock
|
||||
|
||||
subroutine omp_unset_nest_lock(nvar) bind(c)
|
||||
!DIR$ IF(__INTEL_COMPILER.GE.1400)
|
||||
!DIR$ attributes known_intrinsic :: omp_unset_nest_lock
|
||||
!DIR$ ENDIF
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_nest_lock_kind) nvar
|
||||
end subroutine omp_unset_nest_lock
|
||||
|
||||
function omp_test_nest_lock(nvar) bind(c)
|
||||
!DIR$ IF(__INTEL_COMPILER.GE.1400)
|
||||
!DIR$ attributes known_intrinsic :: omp_test_nest_lock
|
||||
!DIR$ ENDIF
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_integer_kind) omp_test_nest_lock
|
||||
integer (kind=omp_nest_lock_kind) nvar
|
||||
end function omp_test_nest_lock
|
||||
|
||||
! ***
|
||||
! *** kmp_* entry points
|
||||
! ***
|
||||
|
||||
subroutine kmp_set_stacksize(size) bind(c)
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_integer_kind), value :: size
|
||||
end subroutine kmp_set_stacksize
|
||||
|
||||
subroutine kmp_set_stacksize_s(size) bind(c)
|
||||
use omp_lib_kinds
|
||||
integer (kind=kmp_size_t_kind), value :: size
|
||||
end subroutine kmp_set_stacksize_s
|
||||
|
||||
subroutine kmp_set_blocktime(msec) bind(c)
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_integer_kind), value :: msec
|
||||
end subroutine kmp_set_blocktime
|
||||
|
||||
subroutine kmp_set_library_serial() bind(c)
|
||||
end subroutine kmp_set_library_serial
|
||||
|
||||
subroutine kmp_set_library_turnaround() bind(c)
|
||||
end subroutine kmp_set_library_turnaround
|
||||
|
||||
subroutine kmp_set_library_throughput() bind(c)
|
||||
end subroutine kmp_set_library_throughput
|
||||
|
||||
subroutine kmp_set_library(libnum) bind(c)
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_integer_kind), value :: libnum
|
||||
end subroutine kmp_set_library
|
||||
|
||||
subroutine kmp_set_defaults(string) bind(c)
|
||||
use, intrinsic :: iso_c_binding
|
||||
character (kind=c_char) :: string(*)
|
||||
end subroutine kmp_set_defaults
|
||||
|
||||
function kmp_get_stacksize() bind(c)
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_integer_kind) kmp_get_stacksize
|
||||
end function kmp_get_stacksize
|
||||
|
||||
function kmp_get_stacksize_s() bind(c)
|
||||
use omp_lib_kinds
|
||||
integer (kind=kmp_size_t_kind) kmp_get_stacksize_s
|
||||
end function kmp_get_stacksize_s
|
||||
|
||||
function kmp_get_blocktime() bind(c)
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_integer_kind) kmp_get_blocktime
|
||||
end function kmp_get_blocktime
|
||||
|
||||
function kmp_get_library() bind(c)
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_integer_kind) kmp_get_library
|
||||
end function kmp_get_library
|
||||
|
||||
function kmp_set_affinity(mask) bind(c)
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_integer_kind) kmp_set_affinity
|
||||
integer (kind=kmp_affinity_mask_kind) mask
|
||||
end function kmp_set_affinity
|
||||
|
||||
function kmp_get_affinity(mask) bind(c)
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_integer_kind) kmp_get_affinity
|
||||
integer (kind=kmp_affinity_mask_kind) mask
|
||||
end function kmp_get_affinity
|
||||
|
||||
function kmp_get_affinity_max_proc() bind(c)
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_integer_kind) kmp_get_affinity_max_proc
|
||||
end function kmp_get_affinity_max_proc
|
||||
|
||||
subroutine kmp_create_affinity_mask(mask) bind(c)
|
||||
use omp_lib_kinds
|
||||
integer (kind=kmp_affinity_mask_kind) mask
|
||||
end subroutine kmp_create_affinity_mask
|
||||
|
||||
subroutine kmp_destroy_affinity_mask(mask) bind(c)
|
||||
use omp_lib_kinds
|
||||
integer (kind=kmp_affinity_mask_kind) mask
|
||||
end subroutine kmp_destroy_affinity_mask
|
||||
|
||||
function kmp_set_affinity_mask_proc(proc, mask) bind(c)
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_integer_kind) kmp_set_affinity_mask_proc
|
||||
integer (kind=omp_integer_kind), value :: proc
|
||||
integer (kind=kmp_affinity_mask_kind) mask
|
||||
end function kmp_set_affinity_mask_proc
|
||||
|
||||
function kmp_unset_affinity_mask_proc(proc, mask) bind(c)
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_integer_kind) kmp_unset_affinity_mask_proc
|
||||
integer (kind=omp_integer_kind), value :: proc
|
||||
integer (kind=kmp_affinity_mask_kind) mask
|
||||
end function kmp_unset_affinity_mask_proc
|
||||
|
||||
function kmp_get_affinity_mask_proc(proc, mask) bind(c)
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_integer_kind) kmp_get_affinity_mask_proc
|
||||
integer (kind=omp_integer_kind), value :: proc
|
||||
integer (kind=kmp_affinity_mask_kind) mask
|
||||
end function kmp_get_affinity_mask_proc
|
||||
|
||||
function kmp_malloc(size) bind(c)
|
||||
use omp_lib_kinds
|
||||
integer (kind=kmp_pointer_kind) kmp_malloc
|
||||
integer (kind=kmp_size_t_kind), value :: size
|
||||
end function kmp_malloc
|
||||
|
||||
function kmp_aligned_malloc(size, alignment) bind(c)
|
||||
use omp_lib_kinds
|
||||
integer (kind=kmp_pointer_kind) kmp_aligned_malloc
|
||||
integer (kind=kmp_size_t_kind), value :: size
|
||||
integer (kind=kmp_size_t_kind), value :: alignment
|
||||
end function kmp_aligned_malloc
|
||||
|
||||
function kmp_calloc(nelem, elsize) bind(c)
|
||||
use omp_lib_kinds
|
||||
integer (kind=kmp_pointer_kind) kmp_calloc
|
||||
integer (kind=kmp_size_t_kind), value :: nelem
|
||||
integer (kind=kmp_size_t_kind), value :: elsize
|
||||
end function kmp_calloc
|
||||
|
||||
function kmp_realloc(ptr, size) bind(c)
|
||||
use omp_lib_kinds
|
||||
integer (kind=kmp_pointer_kind) kmp_realloc
|
||||
integer (kind=kmp_pointer_kind), value :: ptr
|
||||
integer (kind=kmp_size_t_kind), value :: size
|
||||
end function kmp_realloc
|
||||
|
||||
subroutine kmp_free(ptr) bind(c)
|
||||
use omp_lib_kinds
|
||||
integer (kind=kmp_pointer_kind), value :: ptr
|
||||
end subroutine kmp_free
|
||||
|
||||
subroutine kmp_set_warnings_on() bind(c)
|
||||
end subroutine kmp_set_warnings_on
|
||||
|
||||
subroutine kmp_set_warnings_off() bind(c)
|
||||
end subroutine kmp_set_warnings_off
|
||||
|
||||
function kmp_get_cancellation_status(cancelkind) bind(c)
|
||||
use omp_lib_kinds
|
||||
integer (kind=kmp_cancel_kind), value :: cancelkind
|
||||
logical (kind=omp_logical_kind) kmp_get_cancellation_status
|
||||
end function kmp_get_cancellation_status
|
||||
|
||||
end interface
|
||||
|
||||
end module omp_lib
|
|
@ -1,566 +0,0 @@
|
|||
! include/40/omp_lib.h.var
|
||||
|
||||
!
|
||||
!//===----------------------------------------------------------------------===//
|
||||
!//
|
||||
!// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
||||
!// See https://llvm.org/LICENSE.txt for license information.
|
||||
!// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||
!//
|
||||
!//===----------------------------------------------------------------------===//
|
||||
!
|
||||
|
||||
!***
|
||||
!*** Some of the directives for the following routine extend past column 72,
|
||||
!*** so process this file in 132-column mode.
|
||||
!***
|
||||
|
||||
!DIR$ fixedformlinesize:132
|
||||
|
||||
integer, parameter :: omp_integer_kind = 4
|
||||
integer, parameter :: omp_logical_kind = 4
|
||||
integer, parameter :: omp_real_kind = 4
|
||||
integer, parameter :: omp_lock_kind = int_ptr_kind()
|
||||
integer, parameter :: omp_nest_lock_kind = int_ptr_kind()
|
||||
integer, parameter :: omp_sched_kind = omp_integer_kind
|
||||
integer, parameter :: omp_proc_bind_kind = omp_integer_kind
|
||||
integer, parameter :: kmp_pointer_kind = int_ptr_kind()
|
||||
integer, parameter :: kmp_size_t_kind = int_ptr_kind()
|
||||
integer, parameter :: kmp_affinity_mask_kind = int_ptr_kind()
|
||||
|
||||
integer (kind=omp_integer_kind), parameter :: openmp_version = @LIBOMP_OMP_YEAR_MONTH@
|
||||
integer (kind=omp_integer_kind), parameter :: kmp_version_major = @LIBOMP_VERSION_MAJOR@
|
||||
integer (kind=omp_integer_kind), parameter :: kmp_version_minor = @LIBOMP_VERSION_MINOR@
|
||||
integer (kind=omp_integer_kind), parameter :: kmp_version_build = @LIBOMP_VERSION_BUILD@
|
||||
character(*) kmp_build_date
|
||||
parameter( kmp_build_date = '@LIBOMP_BUILD_DATE@' )
|
||||
|
||||
integer(kind=omp_sched_kind), parameter :: omp_sched_static = 1
|
||||
integer(kind=omp_sched_kind), parameter :: omp_sched_dynamic = 2
|
||||
integer(kind=omp_sched_kind), parameter :: omp_sched_guided = 3
|
||||
integer(kind=omp_sched_kind), parameter :: omp_sched_auto = 4
|
||||
|
||||
integer (kind=omp_proc_bind_kind), parameter :: omp_proc_bind_false = 0
|
||||
integer (kind=omp_proc_bind_kind), parameter :: omp_proc_bind_true = 1
|
||||
integer (kind=omp_proc_bind_kind), parameter :: omp_proc_bind_master = 2
|
||||
integer (kind=omp_proc_bind_kind), parameter :: omp_proc_bind_close = 3
|
||||
integer (kind=omp_proc_bind_kind), parameter :: omp_proc_bind_spread = 4
|
||||
|
||||
interface
|
||||
|
||||
! ***
|
||||
! *** omp_* entry points
|
||||
! ***
|
||||
|
||||
subroutine omp_set_num_threads(num_threads) bind(c)
|
||||
import
|
||||
integer (kind=omp_integer_kind), value :: num_threads
|
||||
end subroutine omp_set_num_threads
|
||||
|
||||
subroutine omp_set_dynamic(dynamic_threads) bind(c)
|
||||
import
|
||||
logical (kind=omp_logical_kind), value :: dynamic_threads
|
||||
end subroutine omp_set_dynamic
|
||||
|
||||
subroutine omp_set_nested(nested) bind(c)
|
||||
import
|
||||
logical (kind=omp_logical_kind), value :: nested
|
||||
end subroutine omp_set_nested
|
||||
|
||||
function omp_get_num_threads() bind(c)
|
||||
import
|
||||
integer (kind=omp_integer_kind) omp_get_num_threads
|
||||
end function omp_get_num_threads
|
||||
|
||||
function omp_get_max_threads() bind(c)
|
||||
import
|
||||
integer (kind=omp_integer_kind) omp_get_max_threads
|
||||
end function omp_get_max_threads
|
||||
|
||||
function omp_get_thread_num() bind(c)
|
||||
import
|
||||
integer (kind=omp_integer_kind) omp_get_thread_num
|
||||
end function omp_get_thread_num
|
||||
|
||||
function omp_get_num_procs() bind(c)
|
||||
import
|
||||
integer (kind=omp_integer_kind) omp_get_num_procs
|
||||
end function omp_get_num_procs
|
||||
|
||||
function omp_in_parallel() bind(c)
|
||||
import
|
||||
logical (kind=omp_logical_kind) omp_in_parallel
|
||||
end function omp_in_parallel
|
||||
|
||||
function omp_in_final() bind(c)
|
||||
import
|
||||
logical (kind=omp_logical_kind) omp_in_final
|
||||
end function omp_in_final
|
||||
|
||||
function omp_get_dynamic() bind(c)
|
||||
import
|
||||
logical (kind=omp_logical_kind) omp_get_dynamic
|
||||
end function omp_get_dynamic
|
||||
|
||||
function omp_get_nested() bind(c)
|
||||
import
|
||||
logical (kind=omp_logical_kind) omp_get_nested
|
||||
end function omp_get_nested
|
||||
|
||||
function omp_get_thread_limit() bind(c)
|
||||
import
|
||||
integer (kind=omp_integer_kind) omp_get_thread_limit
|
||||
end function omp_get_thread_limit
|
||||
|
||||
subroutine omp_set_max_active_levels(max_levels) bind(c)
|
||||
import
|
||||
integer (kind=omp_integer_kind), value :: max_levels
|
||||
end subroutine omp_set_max_active_levels
|
||||
|
||||
function omp_get_max_active_levels() bind(c)
|
||||
import
|
||||
integer (kind=omp_integer_kind) omp_get_max_active_levels
|
||||
end function omp_get_max_active_levels
|
||||
|
||||
function omp_get_level() bind(c)
|
||||
import
|
||||
integer (kind=omp_integer_kind) omp_get_level
|
||||
end function omp_get_level
|
||||
|
||||
function omp_get_active_level() bind(c)
|
||||
import
|
||||
integer (kind=omp_integer_kind) omp_get_active_level
|
||||
end function omp_get_active_level
|
||||
|
||||
function omp_get_ancestor_thread_num(level) bind(c)
|
||||
import
|
||||
integer (kind=omp_integer_kind) omp_get_ancestor_thread_num
|
||||
integer (kind=omp_integer_kind), value :: level
|
||||
end function omp_get_ancestor_thread_num
|
||||
|
||||
function omp_get_team_size(level) bind(c)
|
||||
import
|
||||
integer (kind=omp_integer_kind) omp_get_team_size
|
||||
integer (kind=omp_integer_kind), value :: level
|
||||
end function omp_get_team_size
|
||||
|
||||
subroutine omp_set_schedule(kind, chunk_size) bind(c)
|
||||
import
|
||||
integer (kind=omp_sched_kind), value :: kind
|
||||
integer (kind=omp_integer_kind), value :: chunk_size
|
||||
end subroutine omp_set_schedule
|
||||
|
||||
subroutine omp_get_schedule(kind, chunk_size) bind(c)
|
||||
import
|
||||
integer (kind=omp_sched_kind) kind
|
||||
integer (kind=omp_integer_kind) chunk_size
|
||||
end subroutine omp_get_schedule
|
||||
|
||||
function omp_get_proc_bind() bind(c)
|
||||
import
|
||||
integer (kind=omp_proc_bind_kind) omp_get_proc_bind
|
||||
end function omp_get_proc_bind
|
||||
|
||||
function omp_get_wtime() bind(c)
|
||||
double precision omp_get_wtime
|
||||
end function omp_get_wtime
|
||||
|
||||
function omp_get_wtick() bind(c)
|
||||
double precision omp_get_wtick
|
||||
end function omp_get_wtick
|
||||
|
||||
function omp_get_default_device() bind(c)
|
||||
import
|
||||
integer (kind=omp_integer_kind) omp_get_default_device
|
||||
end function omp_get_default_device
|
||||
|
||||
subroutine omp_set_default_device(device_num) bind(c)
|
||||
import
|
||||
integer (kind=omp_integer_kind), value :: device_num
|
||||
end subroutine omp_set_default_device
|
||||
|
||||
function omp_get_num_devices() bind(c)
|
||||
import
|
||||
integer (kind=omp_integer_kind) omp_get_num_devices
|
||||
end function omp_get_num_devices
|
||||
|
||||
function omp_get_num_teams() bind(c)
|
||||
import
|
||||
integer (kind=omp_integer_kind) omp_get_num_teams
|
||||
end function omp_get_num_teams
|
||||
|
||||
function omp_get_team_num() bind(c)
|
||||
import
|
||||
integer (kind=omp_integer_kind) omp_get_team_num
|
||||
end function omp_get_team_num
|
||||
|
||||
function omp_is_initial_device() bind(c)
|
||||
import
|
||||
logical (kind=omp_logical_kind) omp_is_initial_device
|
||||
end function omp_is_initial_device
|
||||
|
||||
subroutine omp_init_lock(svar) bind(c)
|
||||
!DIR$ IF(__INTEL_COMPILER.GE.1400)
|
||||
!DIR$ attributes known_intrinsic :: omp_init_lock
|
||||
!DIR$ ENDIF
|
||||
import
|
||||
integer (kind=omp_lock_kind) svar
|
||||
end subroutine omp_init_lock
|
||||
|
||||
subroutine omp_destroy_lock(svar) bind(c)
|
||||
!DIR$ IF(__INTEL_COMPILER.GE.1400)
|
||||
!DIR$ attributes known_intrinsic :: omp_destroy_lock
|
||||
!DIR$ ENDIF
|
||||
import
|
||||
integer (kind=omp_lock_kind) svar
|
||||
end subroutine omp_destroy_lock
|
||||
|
||||
subroutine omp_set_lock(svar) bind(c)
|
||||
!DIR$ IF(__INTEL_COMPILER.GE.1400)
|
||||
!DIR$ attributes known_intrinsic :: omp_set_lock
|
||||
!DIR$ ENDIF
|
||||
import
|
||||
integer (kind=omp_lock_kind) svar
|
||||
end subroutine omp_set_lock
|
||||
|
||||
subroutine omp_unset_lock(svar) bind(c)
|
||||
!DIR$ IF(__INTEL_COMPILER.GE.1400)
|
||||
!DIR$ attributes known_intrinsic :: omp_unset_lock
|
||||
!DIR$ ENDIF
|
||||
import
|
||||
integer (kind=omp_lock_kind) svar
|
||||
end subroutine omp_unset_lock
|
||||
|
||||
function omp_test_lock(svar) bind(c)
|
||||
!DIR$ IF(__INTEL_COMPILER.GE.1400)
|
||||
!DIR$ attributes known_intrinsic :: omp_test_lock
|
||||
!DIR$ ENDIF
|
||||
import
|
||||
logical (kind=omp_logical_kind) omp_test_lock
|
||||
integer (kind=omp_lock_kind) svar
|
||||
end function omp_test_lock
|
||||
|
||||
subroutine omp_init_nest_lock(nvar) bind(c)
|
||||
!DIR$ IF(__INTEL_COMPILER.GE.1400)
|
||||
!DIR$ attributes known_intrinsic :: omp_init_nest_lock
|
||||
!DIR$ ENDIF
|
||||
import
|
||||
integer (kind=omp_nest_lock_kind) nvar
|
||||
end subroutine omp_init_nest_lock
|
||||
|
||||
subroutine omp_destroy_nest_lock(nvar) bind(c)
|
||||
!DIR$ IF(__INTEL_COMPILER.GE.1400)
|
||||
!DIR$ attributes known_intrinsic :: omp_destroy_nest_lock
|
||||
!DIR$ ENDIF
|
||||
import
|
||||
integer (kind=omp_nest_lock_kind) nvar
|
||||
end subroutine omp_destroy_nest_lock
|
||||
|
||||
subroutine omp_set_nest_lock(nvar) bind(c)
|
||||
!DIR$ IF(__INTEL_COMPILER.GE.1400)
|
||||
!DIR$ attributes known_intrinsic :: omp_set_nest_lock
|
||||
!DIR$ ENDIF
|
||||
import
|
||||
integer (kind=omp_nest_lock_kind) nvar
|
||||
end subroutine omp_set_nest_lock
|
||||
|
||||
subroutine omp_unset_nest_lock(nvar) bind(c)
|
||||
!DIR$ IF(__INTEL_COMPILER.GE.1400)
|
||||
!DIR$ attributes known_intrinsic :: omp_unset_nest_lock
|
||||
!DIR$ ENDIF
|
||||
import
|
||||
integer (kind=omp_nest_lock_kind) nvar
|
||||
end subroutine omp_unset_nest_lock
|
||||
|
||||
function omp_test_nest_lock(nvar) bind(c)
|
||||
!DIR$ IF(__INTEL_COMPILER.GE.1400)
|
||||
!DIR$ attributes known_intrinsic :: omp_test_nest_lock
|
||||
!DIR$ ENDIF
|
||||
import
|
||||
integer (kind=omp_integer_kind) omp_test_nest_lock
|
||||
integer (kind=omp_nest_lock_kind) nvar
|
||||
end function omp_test_nest_lock
|
||||
|
||||
! ***
|
||||
! *** kmp_* entry points
|
||||
! ***
|
||||
|
||||
subroutine kmp_set_stacksize(size) bind(c)
|
||||
import
|
||||
integer (kind=omp_integer_kind), value :: size
|
||||
end subroutine kmp_set_stacksize
|
||||
|
||||
subroutine kmp_set_stacksize_s(size) bind(c)
|
||||
import
|
||||
integer (kind=kmp_size_t_kind), value :: size
|
||||
end subroutine kmp_set_stacksize_s
|
||||
|
||||
subroutine kmp_set_blocktime(msec) bind(c)
|
||||
import
|
||||
integer (kind=omp_integer_kind), value :: msec
|
||||
end subroutine kmp_set_blocktime
|
||||
|
||||
subroutine kmp_set_library_serial() bind(c)
|
||||
end subroutine kmp_set_library_serial
|
||||
|
||||
subroutine kmp_set_library_turnaround() bind(c)
|
||||
end subroutine kmp_set_library_turnaround
|
||||
|
||||
subroutine kmp_set_library_throughput() bind(c)
|
||||
end subroutine kmp_set_library_throughput
|
||||
|
||||
subroutine kmp_set_library(libnum) bind(c)
|
||||
import
|
||||
integer (kind=omp_integer_kind), value :: libnum
|
||||
end subroutine kmp_set_library
|
||||
|
||||
subroutine kmp_set_defaults(string) bind(c)
|
||||
character string(*)
|
||||
end subroutine kmp_set_defaults
|
||||
|
||||
function kmp_get_stacksize() bind(c)
|
||||
import
|
||||
integer (kind=omp_integer_kind) kmp_get_stacksize
|
||||
end function kmp_get_stacksize
|
||||
|
||||
function kmp_get_stacksize_s() bind(c)
|
||||
import
|
||||
integer (kind=kmp_size_t_kind) kmp_get_stacksize_s
|
||||
end function kmp_get_stacksize_s
|
||||
|
||||
function kmp_get_blocktime() bind(c)
|
||||
import
|
||||
integer (kind=omp_integer_kind) kmp_get_blocktime
|
||||
end function kmp_get_blocktime
|
||||
|
||||
function kmp_get_library() bind(c)
|
||||
import
|
||||
integer (kind=omp_integer_kind) kmp_get_library
|
||||
end function kmp_get_library
|
||||
|
||||
function kmp_set_affinity(mask) bind(c)
|
||||
import
|
||||
integer (kind=omp_integer_kind) kmp_set_affinity
|
||||
integer (kind=kmp_affinity_mask_kind) mask
|
||||
end function kmp_set_affinity
|
||||
|
||||
function kmp_get_affinity(mask) bind(c)
|
||||
import
|
||||
integer (kind=omp_integer_kind) kmp_get_affinity
|
||||
integer (kind=kmp_affinity_mask_kind) mask
|
||||
end function kmp_get_affinity
|
||||
|
||||
function kmp_get_affinity_max_proc() bind(c)
|
||||
import
|
||||
integer (kind=omp_integer_kind) kmp_get_affinity_max_proc
|
||||
end function kmp_get_affinity_max_proc
|
||||
|
||||
subroutine kmp_create_affinity_mask(mask) bind(c)
|
||||
import
|
||||
integer (kind=kmp_affinity_mask_kind) mask
|
||||
end subroutine kmp_create_affinity_mask
|
||||
|
||||
subroutine kmp_destroy_affinity_mask(mask) bind(c)
|
||||
import
|
||||
integer (kind=kmp_affinity_mask_kind) mask
|
||||
end subroutine kmp_destroy_affinity_mask
|
||||
|
||||
function kmp_set_affinity_mask_proc(proc, mask) bind(c)
|
||||
import
|
||||
integer (kind=omp_integer_kind) kmp_set_affinity_mask_proc
|
||||
integer (kind=omp_integer_kind), value :: proc
|
||||
integer (kind=kmp_affinity_mask_kind) mask
|
||||
end function kmp_set_affinity_mask_proc
|
||||
|
||||
function kmp_unset_affinity_mask_proc(proc, mask) bind(c)
|
||||
import
|
||||
integer (kind=omp_integer_kind) kmp_unset_affinity_mask_proc
|
||||
integer (kind=omp_integer_kind), value :: proc
|
||||
integer (kind=kmp_affinity_mask_kind) mask
|
||||
end function kmp_unset_affinity_mask_proc
|
||||
|
||||
function kmp_get_affinity_mask_proc(proc, mask) bind(c)
|
||||
import
|
||||
integer (kind=omp_integer_kind) kmp_get_affinity_mask_proc
|
||||
integer (kind=omp_integer_kind), value :: proc
|
||||
integer (kind=kmp_affinity_mask_kind) mask
|
||||
end function kmp_get_affinity_mask_proc
|
||||
|
||||
function kmp_malloc(size) bind(c)
|
||||
import
|
||||
integer (kind=kmp_pointer_kind) kmp_malloc
|
||||
integer (kind=kmp_size_t_kind), value :: size
|
||||
end function kmp_malloc
|
||||
|
||||
function kmp_aligned_malloc(size, alignment) bind(c)
|
||||
import
|
||||
integer (kind=kmp_pointer_kind) kmp_aligned_malloc
|
||||
integer (kind=kmp_size_t_kind), value :: size
|
||||
integer (kind=kmp_size_t_kind), value :: alignment
|
||||
end function kmp_aligned_malloc
|
||||
|
||||
function kmp_calloc(nelem, elsize) bind(c)
|
||||
import
|
||||
integer (kind=kmp_pointer_kind) kmp_calloc
|
||||
integer (kind=kmp_size_t_kind), value :: nelem
|
||||
integer (kind=kmp_size_t_kind), value :: elsize
|
||||
end function kmp_calloc
|
||||
|
||||
function kmp_realloc(ptr, size) bind(c)
|
||||
import
|
||||
integer (kind=kmp_pointer_kind) kmp_realloc
|
||||
integer (kind=kmp_pointer_kind), value :: ptr
|
||||
integer (kind=kmp_size_t_kind), value :: size
|
||||
end function kmp_realloc
|
||||
|
||||
subroutine kmp_free(ptr) bind(c)
|
||||
import
|
||||
integer (kind=kmp_pointer_kind), value :: ptr
|
||||
end subroutine kmp_free
|
||||
|
||||
subroutine kmp_set_warnings_on() bind(c)
|
||||
end subroutine kmp_set_warnings_on
|
||||
|
||||
subroutine kmp_set_warnings_off() bind(c)
|
||||
end subroutine kmp_set_warnings_off
|
||||
|
||||
end interface
|
||||
|
||||
!DIR$ IF DEFINED (__INTEL_OFFLOAD)
|
||||
!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_set_num_threads
|
||||
!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_set_dynamic
|
||||
!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_set_nested
|
||||
!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_get_num_threads
|
||||
!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_get_max_threads
|
||||
!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_get_thread_num
|
||||
!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_get_num_procs
|
||||
!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_in_parallel
|
||||
!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_in_final
|
||||
!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_get_dynamic
|
||||
!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_get_nested
|
||||
!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_get_thread_limit
|
||||
!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_set_max_active_levels
|
||||
!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_get_max_active_levels
|
||||
!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_get_level
|
||||
!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_get_active_level
|
||||
!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_get_ancestor_thread_num
|
||||
!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_get_team_size
|
||||
!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_set_schedule
|
||||
!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_get_schedule
|
||||
!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_get_proc_bind
|
||||
!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_get_wtime
|
||||
!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_get_wtick
|
||||
!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_get_default_device
|
||||
!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_set_default_device
|
||||
!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_is_initial_device
|
||||
!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_get_num_devices
|
||||
!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_get_num_teams
|
||||
!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_get_team_num
|
||||
!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_init_lock
|
||||
!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_destroy_lock
|
||||
!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_set_lock
|
||||
!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_unset_lock
|
||||
!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_test_lock
|
||||
!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_init_nest_lock
|
||||
!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_destroy_nest_lock
|
||||
!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_set_nest_lock
|
||||
!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_unset_nest_lock
|
||||
!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_test_nest_lock
|
||||
!DIR$ ATTRIBUTES OFFLOAD:MIC :: kmp_set_stacksize
|
||||
!DIR$ ATTRIBUTES OFFLOAD:MIC :: kmp_set_stacksize_s
|
||||
!DIR$ ATTRIBUTES OFFLOAD:MIC :: kmp_set_blocktime
|
||||
!DIR$ ATTRIBUTES OFFLOAD:MIC :: kmp_set_library_serial
|
||||
!DIR$ ATTRIBUTES OFFLOAD:MIC :: kmp_set_library_turnaround
|
||||
!DIR$ ATTRIBUTES OFFLOAD:MIC :: kmp_set_library_throughput
|
||||
!DIR$ ATTRIBUTES OFFLOAD:MIC :: kmp_set_library
|
||||
!DIR$ ATTRIBUTES OFFLOAD:MIC :: kmp_set_defaults
|
||||
!DIR$ ATTRIBUTES OFFLOAD:MIC :: kmp_get_stacksize
|
||||
!DIR$ ATTRIBUTES OFFLOAD:MIC :: kmp_get_stacksize_s
|
||||
!DIR$ ATTRIBUTES OFFLOAD:MIC :: kmp_get_blocktime
|
||||
!DIR$ ATTRIBUTES OFFLOAD:MIC :: kmp_get_library
|
||||
!DIR$ ATTRIBUTES OFFLOAD:MIC :: kmp_set_affinity
|
||||
!DIR$ ATTRIBUTES OFFLOAD:MIC :: kmp_get_affinity
|
||||
!DIR$ ATTRIBUTES OFFLOAD:MIC :: kmp_get_affinity_max_proc
|
||||
!DIR$ ATTRIBUTES OFFLOAD:MIC :: kmp_create_affinity_mask
|
||||
!DIR$ ATTRIBUTES OFFLOAD:MIC :: kmp_destroy_affinity_mask
|
||||
!DIR$ ATTRIBUTES OFFLOAD:MIC :: kmp_set_affinity_mask_proc
|
||||
!DIR$ ATTRIBUTES OFFLOAD:MIC :: kmp_unset_affinity_mask_proc
|
||||
!DIR$ ATTRIBUTES OFFLOAD:MIC :: kmp_get_affinity_mask_proc
|
||||
!DIR$ ATTRIBUTES OFFLOAD:MIC :: kmp_malloc
|
||||
!DIR$ ATTRIBUTES OFFLOAD:MIC :: kmp_aligned_malloc
|
||||
!DIR$ ATTRIBUTES OFFLOAD:MIC :: kmp_calloc
|
||||
!DIR$ ATTRIBUTES OFFLOAD:MIC :: kmp_realloc
|
||||
!DIR$ ATTRIBUTES OFFLOAD:MIC :: kmp_free
|
||||
!DIR$ ATTRIBUTES OFFLOAD:MIC :: kmp_set_warnings_on
|
||||
!DIR$ ATTRIBUTES OFFLOAD:MIC :: kmp_set_warnings_off
|
||||
|
||||
!DIR$ IF(__INTEL_COMPILER.GE.1400)
|
||||
!$omp declare target(omp_set_num_threads )
|
||||
!$omp declare target(omp_set_dynamic )
|
||||
!$omp declare target(omp_set_nested )
|
||||
!$omp declare target(omp_get_num_threads )
|
||||
!$omp declare target(omp_get_max_threads )
|
||||
!$omp declare target(omp_get_thread_num )
|
||||
!$omp declare target(omp_get_num_procs )
|
||||
!$omp declare target(omp_in_parallel )
|
||||
!$omp declare target(omp_in_final )
|
||||
!$omp declare target(omp_get_dynamic )
|
||||
!$omp declare target(omp_get_nested )
|
||||
!$omp declare target(omp_get_thread_limit )
|
||||
!$omp declare target(omp_set_max_active_levels )
|
||||
!$omp declare target(omp_get_max_active_levels )
|
||||
!$omp declare target(omp_get_level )
|
||||
!$omp declare target(omp_get_active_level )
|
||||
!$omp declare target(omp_get_ancestor_thread_num )
|
||||
!$omp declare target(omp_get_team_size )
|
||||
!$omp declare target(omp_set_schedule )
|
||||
!$omp declare target(omp_get_schedule )
|
||||
!$omp declare target(omp_get_proc_bind )
|
||||
!$omp declare target(omp_get_wtime )
|
||||
!$omp declare target(omp_get_wtick )
|
||||
!$omp declare target(omp_get_default_device )
|
||||
!$omp declare target(omp_set_default_device )
|
||||
!$omp declare target(omp_is_initial_device )
|
||||
!$omp declare target(omp_get_num_devices )
|
||||
!$omp declare target(omp_get_num_teams )
|
||||
!$omp declare target(omp_get_team_num )
|
||||
!$omp declare target(omp_init_lock )
|
||||
!$omp declare target(omp_destroy_lock )
|
||||
!$omp declare target(omp_set_lock )
|
||||
!$omp declare target(omp_unset_lock )
|
||||
!$omp declare target(omp_test_lock )
|
||||
!$omp declare target(omp_init_nest_lock )
|
||||
!$omp declare target(omp_destroy_nest_lock )
|
||||
!$omp declare target(omp_set_nest_lock )
|
||||
!$omp declare target(omp_unset_nest_lock )
|
||||
!$omp declare target(omp_test_nest_lock )
|
||||
!$omp declare target(kmp_set_stacksize )
|
||||
!$omp declare target(kmp_set_stacksize_s )
|
||||
!$omp declare target(kmp_set_blocktime )
|
||||
!$omp declare target(kmp_set_library_serial )
|
||||
!$omp declare target(kmp_set_library_turnaround )
|
||||
!$omp declare target(kmp_set_library_throughput )
|
||||
!$omp declare target(kmp_set_library )
|
||||
!$omp declare target(kmp_set_defaults )
|
||||
!$omp declare target(kmp_get_stacksize )
|
||||
!$omp declare target(kmp_get_stacksize_s )
|
||||
!$omp declare target(kmp_get_blocktime )
|
||||
!$omp declare target(kmp_get_library )
|
||||
!$omp declare target(kmp_set_affinity )
|
||||
!$omp declare target(kmp_get_affinity )
|
||||
!$omp declare target(kmp_get_affinity_max_proc )
|
||||
!$omp declare target(kmp_create_affinity_mask )
|
||||
!$omp declare target(kmp_destroy_affinity_mask )
|
||||
!$omp declare target(kmp_set_affinity_mask_proc )
|
||||
!$omp declare target(kmp_unset_affinity_mask_proc )
|
||||
!$omp declare target(kmp_get_affinity_mask_proc )
|
||||
!$omp declare target(kmp_malloc )
|
||||
!$omp declare target(kmp_aligned_malloc )
|
||||
!$omp declare target(kmp_calloc )
|
||||
!$omp declare target(kmp_realloc )
|
||||
!$omp declare target(kmp_free )
|
||||
!$omp declare target(kmp_set_warnings_on )
|
||||
!$omp declare target(kmp_set_warnings_off )
|
||||
!DIR$ ENDIF
|
||||
!DIR$ ENDIF
|
||||
|
|
@ -1,196 +0,0 @@
|
|||
/*
|
||||
* include/45/omp.h.var
|
||||
*/
|
||||
|
||||
|
||||
//===----------------------------------------------------------------------===//
|
||||
//
|
||||
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
||||
// See https://llvm.org/LICENSE.txt for license information.
|
||||
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
|
||||
#ifndef __OMP_H
|
||||
# define __OMP_H
|
||||
|
||||
# define KMP_VERSION_MAJOR @LIBOMP_VERSION_MAJOR@
|
||||
# define KMP_VERSION_MINOR @LIBOMP_VERSION_MINOR@
|
||||
# define KMP_VERSION_BUILD @LIBOMP_VERSION_BUILD@
|
||||
# define KMP_BUILD_DATE "@LIBOMP_BUILD_DATE@"
|
||||
|
||||
# ifdef __cplusplus
|
||||
extern "C" {
|
||||
# endif
|
||||
|
||||
# if defined(_WIN32)
|
||||
# define __KAI_KMPC_CONVENTION __cdecl
|
||||
# else
|
||||
# define __KAI_KMPC_CONVENTION
|
||||
# endif
|
||||
|
||||
/* schedule kind constants */
|
||||
typedef enum omp_sched_t {
|
||||
omp_sched_static = 1,
|
||||
omp_sched_dynamic = 2,
|
||||
omp_sched_guided = 3,
|
||||
omp_sched_auto = 4
|
||||
} omp_sched_t;
|
||||
|
||||
/* set API functions */
|
||||
extern void __KAI_KMPC_CONVENTION omp_set_num_threads (int);
|
||||
extern void __KAI_KMPC_CONVENTION omp_set_dynamic (int);
|
||||
extern void __KAI_KMPC_CONVENTION omp_set_nested (int);
|
||||
extern void __KAI_KMPC_CONVENTION omp_set_max_active_levels (int);
|
||||
extern void __KAI_KMPC_CONVENTION omp_set_schedule (omp_sched_t, int);
|
||||
|
||||
/* query API functions */
|
||||
extern int __KAI_KMPC_CONVENTION omp_get_num_threads (void);
|
||||
extern int __KAI_KMPC_CONVENTION omp_get_dynamic (void);
|
||||
extern int __KAI_KMPC_CONVENTION omp_get_nested (void);
|
||||
extern int __KAI_KMPC_CONVENTION omp_get_max_threads (void);
|
||||
extern int __KAI_KMPC_CONVENTION omp_get_thread_num (void);
|
||||
extern int __KAI_KMPC_CONVENTION omp_get_num_procs (void);
|
||||
extern int __KAI_KMPC_CONVENTION omp_in_parallel (void);
|
||||
extern int __KAI_KMPC_CONVENTION omp_in_final (void);
|
||||
extern int __KAI_KMPC_CONVENTION omp_get_active_level (void);
|
||||
extern int __KAI_KMPC_CONVENTION omp_get_level (void);
|
||||
extern int __KAI_KMPC_CONVENTION omp_get_ancestor_thread_num (int);
|
||||
extern int __KAI_KMPC_CONVENTION omp_get_team_size (int);
|
||||
extern int __KAI_KMPC_CONVENTION omp_get_thread_limit (void);
|
||||
extern int __KAI_KMPC_CONVENTION omp_get_max_active_levels (void);
|
||||
extern void __KAI_KMPC_CONVENTION omp_get_schedule (omp_sched_t *, int *);
|
||||
extern int __KAI_KMPC_CONVENTION omp_get_max_task_priority (void);
|
||||
|
||||
/* lock API functions */
|
||||
typedef struct omp_lock_t {
|
||||
void * _lk;
|
||||
} omp_lock_t;
|
||||
|
||||
extern void __KAI_KMPC_CONVENTION omp_init_lock (omp_lock_t *);
|
||||
extern void __KAI_KMPC_CONVENTION omp_set_lock (omp_lock_t *);
|
||||
extern void __KAI_KMPC_CONVENTION omp_unset_lock (omp_lock_t *);
|
||||
extern void __KAI_KMPC_CONVENTION omp_destroy_lock (omp_lock_t *);
|
||||
extern int __KAI_KMPC_CONVENTION omp_test_lock (omp_lock_t *);
|
||||
|
||||
/* nested lock API functions */
|
||||
typedef struct omp_nest_lock_t {
|
||||
void * _lk;
|
||||
} omp_nest_lock_t;
|
||||
|
||||
extern void __KAI_KMPC_CONVENTION omp_init_nest_lock (omp_nest_lock_t *);
|
||||
extern void __KAI_KMPC_CONVENTION omp_set_nest_lock (omp_nest_lock_t *);
|
||||
extern void __KAI_KMPC_CONVENTION omp_unset_nest_lock (omp_nest_lock_t *);
|
||||
extern void __KAI_KMPC_CONVENTION omp_destroy_nest_lock (omp_nest_lock_t *);
|
||||
extern int __KAI_KMPC_CONVENTION omp_test_nest_lock (omp_nest_lock_t *);
|
||||
|
||||
/* lock hint type for dynamic user lock */
|
||||
typedef enum omp_lock_hint_t {
|
||||
omp_lock_hint_none = 0,
|
||||
omp_lock_hint_uncontended = 1,
|
||||
omp_lock_hint_contended = (1<<1 ),
|
||||
omp_lock_hint_nonspeculative = (1<<2 ),
|
||||
omp_lock_hint_speculative = (1<<3 ),
|
||||
kmp_lock_hint_hle = (1<<16),
|
||||
kmp_lock_hint_rtm = (1<<17),
|
||||
kmp_lock_hint_adaptive = (1<<18)
|
||||
} omp_lock_hint_t;
|
||||
|
||||
/* hinted lock initializers */
|
||||
extern void __KAI_KMPC_CONVENTION omp_init_lock_with_hint(omp_lock_t *, omp_lock_hint_t);
|
||||
extern void __KAI_KMPC_CONVENTION omp_init_nest_lock_with_hint(omp_nest_lock_t *, omp_lock_hint_t);
|
||||
|
||||
/* time API functions */
|
||||
extern double __KAI_KMPC_CONVENTION omp_get_wtime (void);
|
||||
extern double __KAI_KMPC_CONVENTION omp_get_wtick (void);
|
||||
|
||||
/* OpenMP 4.0 */
|
||||
extern int __KAI_KMPC_CONVENTION omp_get_default_device (void);
|
||||
extern void __KAI_KMPC_CONVENTION omp_set_default_device (int);
|
||||
extern int __KAI_KMPC_CONVENTION omp_is_initial_device (void);
|
||||
extern int __KAI_KMPC_CONVENTION omp_get_num_devices (void);
|
||||
extern int __KAI_KMPC_CONVENTION omp_get_num_teams (void);
|
||||
extern int __KAI_KMPC_CONVENTION omp_get_team_num (void);
|
||||
extern int __KAI_KMPC_CONVENTION omp_get_cancellation (void);
|
||||
|
||||
# include <stdlib.h>
|
||||
/* OpenMP 4.5 */
|
||||
extern int __KAI_KMPC_CONVENTION omp_get_initial_device (void);
|
||||
extern void* __KAI_KMPC_CONVENTION omp_target_alloc(size_t, int);
|
||||
extern void __KAI_KMPC_CONVENTION omp_target_free(void *, int);
|
||||
extern int __KAI_KMPC_CONVENTION omp_target_is_present(void *, int);
|
||||
extern int __KAI_KMPC_CONVENTION omp_target_memcpy(void *, void *, size_t, size_t, size_t, int, int);
|
||||
extern int __KAI_KMPC_CONVENTION omp_target_memcpy_rect(void *, void *, size_t, int, const size_t *,
|
||||
const size_t *, const size_t *, const size_t *, const size_t *, int, int);
|
||||
extern int __KAI_KMPC_CONVENTION omp_target_associate_ptr(void *, void *, size_t, size_t, int);
|
||||
extern int __KAI_KMPC_CONVENTION omp_target_disassociate_ptr(void *, int);
|
||||
|
||||
/* kmp API functions */
|
||||
extern int __KAI_KMPC_CONVENTION kmp_get_stacksize (void);
|
||||
extern void __KAI_KMPC_CONVENTION kmp_set_stacksize (int);
|
||||
extern size_t __KAI_KMPC_CONVENTION kmp_get_stacksize_s (void);
|
||||
extern void __KAI_KMPC_CONVENTION kmp_set_stacksize_s (size_t);
|
||||
extern int __KAI_KMPC_CONVENTION kmp_get_blocktime (void);
|
||||
extern int __KAI_KMPC_CONVENTION kmp_get_library (void);
|
||||
extern void __KAI_KMPC_CONVENTION kmp_set_blocktime (int);
|
||||
extern void __KAI_KMPC_CONVENTION kmp_set_library (int);
|
||||
extern void __KAI_KMPC_CONVENTION kmp_set_library_serial (void);
|
||||
extern void __KAI_KMPC_CONVENTION kmp_set_library_turnaround (void);
|
||||
extern void __KAI_KMPC_CONVENTION kmp_set_library_throughput (void);
|
||||
extern void __KAI_KMPC_CONVENTION kmp_set_defaults (char const *);
|
||||
extern void __KAI_KMPC_CONVENTION kmp_set_disp_num_buffers (int);
|
||||
|
||||
/* Intel affinity API */
|
||||
typedef void * kmp_affinity_mask_t;
|
||||
|
||||
extern int __KAI_KMPC_CONVENTION kmp_set_affinity (kmp_affinity_mask_t *);
|
||||
extern int __KAI_KMPC_CONVENTION kmp_get_affinity (kmp_affinity_mask_t *);
|
||||
extern int __KAI_KMPC_CONVENTION kmp_get_affinity_max_proc (void);
|
||||
extern void __KAI_KMPC_CONVENTION kmp_create_affinity_mask (kmp_affinity_mask_t *);
|
||||
extern void __KAI_KMPC_CONVENTION kmp_destroy_affinity_mask (kmp_affinity_mask_t *);
|
||||
extern int __KAI_KMPC_CONVENTION kmp_set_affinity_mask_proc (int, kmp_affinity_mask_t *);
|
||||
extern int __KAI_KMPC_CONVENTION kmp_unset_affinity_mask_proc (int, kmp_affinity_mask_t *);
|
||||
extern int __KAI_KMPC_CONVENTION kmp_get_affinity_mask_proc (int, kmp_affinity_mask_t *);
|
||||
|
||||
/* OpenMP 4.0 affinity API */
|
||||
typedef enum omp_proc_bind_t {
|
||||
omp_proc_bind_false = 0,
|
||||
omp_proc_bind_true = 1,
|
||||
omp_proc_bind_master = 2,
|
||||
omp_proc_bind_close = 3,
|
||||
omp_proc_bind_spread = 4
|
||||
} omp_proc_bind_t;
|
||||
|
||||
extern omp_proc_bind_t __KAI_KMPC_CONVENTION omp_get_proc_bind (void);
|
||||
|
||||
/* OpenMP 4.5 affinity API */
|
||||
extern int __KAI_KMPC_CONVENTION omp_get_num_places (void);
|
||||
extern int __KAI_KMPC_CONVENTION omp_get_place_num_procs (int);
|
||||
extern void __KAI_KMPC_CONVENTION omp_get_place_proc_ids (int, int *);
|
||||
extern int __KAI_KMPC_CONVENTION omp_get_place_num (void);
|
||||
extern int __KAI_KMPC_CONVENTION omp_get_partition_num_places (void);
|
||||
extern void __KAI_KMPC_CONVENTION omp_get_partition_place_nums (int *);
|
||||
|
||||
extern void * __KAI_KMPC_CONVENTION kmp_malloc (size_t);
|
||||
extern void * __KAI_KMPC_CONVENTION kmp_aligned_malloc (size_t, size_t);
|
||||
extern void * __KAI_KMPC_CONVENTION kmp_calloc (size_t, size_t);
|
||||
extern void * __KAI_KMPC_CONVENTION kmp_realloc (void *, size_t);
|
||||
extern void __KAI_KMPC_CONVENTION kmp_free (void *);
|
||||
|
||||
extern void __KAI_KMPC_CONVENTION kmp_set_warnings_on(void);
|
||||
extern void __KAI_KMPC_CONVENTION kmp_set_warnings_off(void);
|
||||
|
||||
# undef __KAI_KMPC_CONVENTION
|
||||
|
||||
/* Warning:
|
||||
The following typedefs are not standard, deprecated and will be removed in a future release.
|
||||
*/
|
||||
typedef int omp_int_t;
|
||||
typedef double omp_wtime_t;
|
||||
|
||||
# ifdef __cplusplus
|
||||
}
|
||||
# endif
|
||||
|
||||
#endif /* __OMP_H */
|
|
@ -1,860 +0,0 @@
|
|||
! include/45/omp_lib.f.var
|
||||
|
||||
!
|
||||
!//===----------------------------------------------------------------------===//
|
||||
!//
|
||||
!// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
||||
!// See https://llvm.org/LICENSE.txt for license information.
|
||||
!// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||
!//
|
||||
!//===----------------------------------------------------------------------===//
|
||||
!
|
||||
|
||||
!***
|
||||
!*** Some of the directives for the following routine extend past column 72,
|
||||
!*** so process this file in 132-column mode.
|
||||
!***
|
||||
|
||||
!dec$ fixedformlinesize:132
|
||||
|
||||
module omp_lib_kinds
|
||||
|
||||
integer, parameter :: omp_integer_kind = 4
|
||||
integer, parameter :: omp_logical_kind = 4
|
||||
integer, parameter :: omp_real_kind = 4
|
||||
integer, parameter :: omp_lock_kind = int_ptr_kind()
|
||||
integer, parameter :: omp_nest_lock_kind = int_ptr_kind()
|
||||
integer, parameter :: omp_sched_kind = omp_integer_kind
|
||||
integer, parameter :: omp_proc_bind_kind = omp_integer_kind
|
||||
integer, parameter :: kmp_pointer_kind = int_ptr_kind()
|
||||
integer, parameter :: kmp_size_t_kind = int_ptr_kind()
|
||||
integer, parameter :: kmp_affinity_mask_kind = int_ptr_kind()
|
||||
integer, parameter :: kmp_cancel_kind = omp_integer_kind
|
||||
integer, parameter :: omp_lock_hint_kind = omp_integer_kind
|
||||
|
||||
end module omp_lib_kinds
|
||||
|
||||
module omp_lib
|
||||
|
||||
use omp_lib_kinds
|
||||
|
||||
integer (kind=omp_integer_kind), parameter :: kmp_version_major = @LIBOMP_VERSION_MAJOR@
|
||||
integer (kind=omp_integer_kind), parameter :: kmp_version_minor = @LIBOMP_VERSION_MINOR@
|
||||
integer (kind=omp_integer_kind), parameter :: kmp_version_build = @LIBOMP_VERSION_BUILD@
|
||||
character(*), parameter :: kmp_build_date = '@LIBOMP_BUILD_DATE@'
|
||||
integer (kind=omp_integer_kind), parameter :: openmp_version = @LIBOMP_OMP_YEAR_MONTH@
|
||||
|
||||
integer(kind=omp_sched_kind), parameter :: omp_sched_static = 1
|
||||
integer(kind=omp_sched_kind), parameter :: omp_sched_dynamic = 2
|
||||
integer(kind=omp_sched_kind), parameter :: omp_sched_guided = 3
|
||||
integer(kind=omp_sched_kind), parameter :: omp_sched_auto = 4
|
||||
|
||||
integer (kind=omp_proc_bind_kind), parameter :: omp_proc_bind_false = 0
|
||||
integer (kind=omp_proc_bind_kind), parameter :: omp_proc_bind_true = 1
|
||||
integer (kind=omp_proc_bind_kind), parameter :: omp_proc_bind_master = 2
|
||||
integer (kind=omp_proc_bind_kind), parameter :: omp_proc_bind_close = 3
|
||||
integer (kind=omp_proc_bind_kind), parameter :: omp_proc_bind_spread = 4
|
||||
|
||||
integer (kind=kmp_cancel_kind), parameter :: kmp_cancel_parallel = 1
|
||||
integer (kind=kmp_cancel_kind), parameter :: kmp_cancel_loop = 2
|
||||
integer (kind=kmp_cancel_kind), parameter :: kmp_cancel_sections = 3
|
||||
integer (kind=kmp_cancel_kind), parameter :: kmp_cancel_taskgroup = 4
|
||||
|
||||
integer (kind=omp_lock_hint_kind), parameter :: omp_lock_hint_none = 0
|
||||
integer (kind=omp_lock_hint_kind), parameter :: omp_lock_hint_uncontended = 1
|
||||
integer (kind=omp_lock_hint_kind), parameter :: omp_lock_hint_contended = 2
|
||||
integer (kind=omp_lock_hint_kind), parameter :: omp_lock_hint_nonspeculative = 4
|
||||
integer (kind=omp_lock_hint_kind), parameter :: omp_lock_hint_speculative = 8
|
||||
integer (kind=omp_lock_hint_kind), parameter :: kmp_lock_hint_hle = 65536
|
||||
integer (kind=omp_lock_hint_kind), parameter :: kmp_lock_hint_rtm = 131072
|
||||
integer (kind=omp_lock_hint_kind), parameter :: kmp_lock_hint_adaptive = 262144
|
||||
|
||||
interface
|
||||
|
||||
! ***
|
||||
! *** omp_* entry points
|
||||
! ***
|
||||
|
||||
subroutine omp_set_num_threads(num_threads)
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_integer_kind) num_threads
|
||||
end subroutine omp_set_num_threads
|
||||
|
||||
subroutine omp_set_dynamic(dynamic_threads)
|
||||
use omp_lib_kinds
|
||||
logical (kind=omp_logical_kind) dynamic_threads
|
||||
end subroutine omp_set_dynamic
|
||||
|
||||
subroutine omp_set_nested(nested)
|
||||
use omp_lib_kinds
|
||||
logical (kind=omp_logical_kind) nested
|
||||
end subroutine omp_set_nested
|
||||
|
||||
function omp_get_num_threads()
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_integer_kind) omp_get_num_threads
|
||||
end function omp_get_num_threads
|
||||
|
||||
function omp_get_max_threads()
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_integer_kind) omp_get_max_threads
|
||||
end function omp_get_max_threads
|
||||
|
||||
function omp_get_thread_num()
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_integer_kind) omp_get_thread_num
|
||||
end function omp_get_thread_num
|
||||
|
||||
function omp_get_num_procs()
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_integer_kind) omp_get_num_procs
|
||||
end function omp_get_num_procs
|
||||
|
||||
function omp_in_parallel()
|
||||
use omp_lib_kinds
|
||||
logical (kind=omp_logical_kind) omp_in_parallel
|
||||
end function omp_in_parallel
|
||||
|
||||
function omp_in_final()
|
||||
use omp_lib_kinds
|
||||
logical (kind=omp_logical_kind) omp_in_final
|
||||
end function omp_in_final
|
||||
|
||||
function omp_get_dynamic()
|
||||
use omp_lib_kinds
|
||||
logical (kind=omp_logical_kind) omp_get_dynamic
|
||||
end function omp_get_dynamic
|
||||
|
||||
function omp_get_nested()
|
||||
use omp_lib_kinds
|
||||
logical (kind=omp_logical_kind) omp_get_nested
|
||||
end function omp_get_nested
|
||||
|
||||
function omp_get_thread_limit()
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_integer_kind) omp_get_thread_limit
|
||||
end function omp_get_thread_limit
|
||||
|
||||
subroutine omp_set_max_active_levels(max_levels)
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_integer_kind) max_levels
|
||||
end subroutine omp_set_max_active_levels
|
||||
|
||||
function omp_get_max_active_levels()
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_integer_kind) omp_get_max_active_levels
|
||||
end function omp_get_max_active_levels
|
||||
|
||||
function omp_get_level()
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_integer_kind) omp_get_level
|
||||
end function omp_get_level
|
||||
|
||||
function omp_get_active_level()
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_integer_kind) omp_get_active_level
|
||||
end function omp_get_active_level
|
||||
|
||||
function omp_get_ancestor_thread_num(level)
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_integer_kind) level
|
||||
integer (kind=omp_integer_kind) omp_get_ancestor_thread_num
|
||||
end function omp_get_ancestor_thread_num
|
||||
|
||||
function omp_get_team_size(level)
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_integer_kind) level
|
||||
integer (kind=omp_integer_kind) omp_get_team_size
|
||||
end function omp_get_team_size
|
||||
|
||||
subroutine omp_set_schedule(kind, chunk_size)
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_sched_kind) kind
|
||||
integer (kind=omp_integer_kind) chunk_size
|
||||
end subroutine omp_set_schedule
|
||||
|
||||
subroutine omp_get_schedule(kind, chunk_size)
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_sched_kind) kind
|
||||
integer (kind=omp_integer_kind) chunk_size
|
||||
end subroutine omp_get_schedule
|
||||
|
||||
function omp_get_proc_bind()
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_proc_bind_kind) omp_get_proc_bind
|
||||
end function omp_get_proc_bind
|
||||
|
||||
function omp_get_num_places()
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_integer_kind) omp_get_num_places
|
||||
end function omp_get_num_places
|
||||
|
||||
function omp_get_place_num_procs(place_num)
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_integer_kind) place_num
|
||||
integer (kind=omp_integer_kind) omp_get_place_num_procs
|
||||
end function omp_get_place_num_procs
|
||||
|
||||
subroutine omp_get_place_proc_ids(place_num, ids)
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_integer_kind) place_num
|
||||
integer (kind=omp_integer_kind) ids(*)
|
||||
end subroutine omp_get_place_proc_ids
|
||||
|
||||
function omp_get_place_num()
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_integer_kind) omp_get_place_num
|
||||
end function omp_get_place_num
|
||||
|
||||
function omp_get_partition_num_places()
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_integer_kind) omp_get_partition_num_places
|
||||
end function omp_get_partition_num_places
|
||||
|
||||
subroutine omp_get_partition_place_nums(place_nums)
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_integer_kind) place_nums(*)
|
||||
end subroutine omp_get_partition_place_nums
|
||||
|
||||
function omp_get_wtime()
|
||||
double precision omp_get_wtime
|
||||
end function omp_get_wtime
|
||||
|
||||
function omp_get_wtick ()
|
||||
double precision omp_get_wtick
|
||||
end function omp_get_wtick
|
||||
|
||||
function omp_get_default_device()
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_integer_kind) omp_get_default_device
|
||||
end function omp_get_default_device
|
||||
|
||||
subroutine omp_set_default_device(device_num)
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_integer_kind) device_num
|
||||
end subroutine omp_set_default_device
|
||||
|
||||
function omp_get_num_devices()
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_integer_kind) omp_get_num_devices
|
||||
end function omp_get_num_devices
|
||||
|
||||
function omp_get_num_teams()
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_integer_kind) omp_get_num_teams
|
||||
end function omp_get_num_teams
|
||||
|
||||
function omp_get_team_num()
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_integer_kind) omp_get_team_num
|
||||
end function omp_get_team_num
|
||||
|
||||
function omp_get_cancellation()
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_integer_kind) omp_get_cancellation
|
||||
end function omp_get_cancellation
|
||||
|
||||
function omp_is_initial_device()
|
||||
use omp_lib_kinds
|
||||
logical (kind=omp_logical_kind) omp_is_initial_device
|
||||
end function omp_is_initial_device
|
||||
|
||||
function omp_get_initial_device()
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_integer_kind) omp_get_initial_device
|
||||
end function omp_get_initial_device
|
||||
|
||||
subroutine omp_init_lock(svar)
|
||||
!DIR$ IF(__INTEL_COMPILER.GE.1400)
|
||||
!DIR$ attributes known_intrinsic :: omp_init_lock
|
||||
!DIR$ ENDIF
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_lock_kind) svar
|
||||
end subroutine omp_init_lock
|
||||
|
||||
subroutine omp_destroy_lock(svar)
|
||||
!DIR$ IF(__INTEL_COMPILER.GE.1400)
|
||||
!DIR$ attributes known_intrinsic :: omp_destroy_lock
|
||||
!DIR$ ENDIF
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_lock_kind) svar
|
||||
end subroutine omp_destroy_lock
|
||||
|
||||
subroutine omp_set_lock(svar)
|
||||
!DIR$ IF(__INTEL_COMPILER.GE.1400)
|
||||
!DIR$ attributes known_intrinsic :: omp_set_lock
|
||||
!DIR$ ENDIF
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_lock_kind) svar
|
||||
end subroutine omp_set_lock
|
||||
|
||||
subroutine omp_unset_lock(svar)
|
||||
!DIR$ IF(__INTEL_COMPILER.GE.1400)
|
||||
!DIR$ attributes known_intrinsic :: omp_unset_lock
|
||||
!DIR$ ENDIF
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_lock_kind) svar
|
||||
end subroutine omp_unset_lock
|
||||
|
||||
function omp_test_lock(svar)
|
||||
!DIR$ IF(__INTEL_COMPILER.GE.1400)
|
||||
!DIR$ attributes known_intrinsic :: omp_test_lock
|
||||
!DIR$ ENDIF
|
||||
use omp_lib_kinds
|
||||
logical (kind=omp_logical_kind) omp_test_lock
|
||||
integer (kind=omp_lock_kind) svar
|
||||
end function omp_test_lock
|
||||
|
||||
subroutine omp_init_nest_lock(nvar)
|
||||
!DIR$ IF(__INTEL_COMPILER.GE.1400)
|
||||
!DIR$ attributes known_intrinsic :: omp_init_nest_lock
|
||||
!DIR$ ENDIF
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_nest_lock_kind) nvar
|
||||
end subroutine omp_init_nest_lock
|
||||
|
||||
subroutine omp_destroy_nest_lock(nvar)
|
||||
!DIR$ IF(__INTEL_COMPILER.GE.1400)
|
||||
!DIR$ attributes known_intrinsic :: omp_destroy_nest_lock
|
||||
!DIR$ ENDIF
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_nest_lock_kind) nvar
|
||||
end subroutine omp_destroy_nest_lock
|
||||
|
||||
subroutine omp_set_nest_lock(nvar)
|
||||
!DIR$ IF(__INTEL_COMPILER.GE.1400)
|
||||
!DIR$ attributes known_intrinsic :: omp_set_nest_lock
|
||||
!DIR$ ENDIF
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_nest_lock_kind) nvar
|
||||
end subroutine omp_set_nest_lock
|
||||
|
||||
subroutine omp_unset_nest_lock(nvar)
|
||||
!DIR$ IF(__INTEL_COMPILER.GE.1400)
|
||||
!DIR$ attributes known_intrinsic :: omp_unset_nest_lock
|
||||
!DIR$ ENDIF
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_nest_lock_kind) nvar
|
||||
end subroutine omp_unset_nest_lock
|
||||
|
||||
function omp_test_nest_lock(nvar)
|
||||
!DIR$ IF(__INTEL_COMPILER.GE.1400)
|
||||
!DIR$ attributes known_intrinsic :: omp_test_nest_lock
|
||||
!DIR$ ENDIF
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_integer_kind) omp_test_nest_lock
|
||||
integer (kind=omp_nest_lock_kind) nvar
|
||||
end function omp_test_nest_lock
|
||||
|
||||
function omp_get_max_task_priority()
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_integer_kind) omp_get_max_task_priority
|
||||
end function omp_get_max_task_priority
|
||||
|
||||
! ***
|
||||
! *** kmp_* entry points
|
||||
! ***
|
||||
|
||||
subroutine kmp_set_stacksize(size)
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_integer_kind) size
|
||||
end subroutine kmp_set_stacksize
|
||||
|
||||
subroutine kmp_set_stacksize_s(size)
|
||||
use omp_lib_kinds
|
||||
integer (kind=kmp_size_t_kind) size
|
||||
end subroutine kmp_set_stacksize_s
|
||||
|
||||
subroutine kmp_set_blocktime(msec)
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_integer_kind) msec
|
||||
end subroutine kmp_set_blocktime
|
||||
|
||||
subroutine kmp_set_library_serial()
|
||||
end subroutine kmp_set_library_serial
|
||||
|
||||
subroutine kmp_set_library_turnaround()
|
||||
end subroutine kmp_set_library_turnaround
|
||||
|
||||
subroutine kmp_set_library_throughput()
|
||||
end subroutine kmp_set_library_throughput
|
||||
|
||||
subroutine kmp_set_library(libnum)
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_integer_kind) libnum
|
||||
end subroutine kmp_set_library
|
||||
|
||||
subroutine kmp_set_defaults(string)
|
||||
character*(*) string
|
||||
end subroutine kmp_set_defaults
|
||||
|
||||
function kmp_get_stacksize()
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_integer_kind) kmp_get_stacksize
|
||||
end function kmp_get_stacksize
|
||||
|
||||
function kmp_get_stacksize_s()
|
||||
use omp_lib_kinds
|
||||
integer (kind=kmp_size_t_kind) kmp_get_stacksize_s
|
||||
end function kmp_get_stacksize_s
|
||||
|
||||
function kmp_get_blocktime()
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_integer_kind) kmp_get_blocktime
|
||||
end function kmp_get_blocktime
|
||||
|
||||
function kmp_get_library()
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_integer_kind) kmp_get_library
|
||||
end function kmp_get_library
|
||||
|
||||
subroutine kmp_set_disp_num_buffers(num)
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_integer_kind) num
|
||||
end subroutine kmp_set_disp_num_buffers
|
||||
|
||||
function kmp_set_affinity(mask)
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_integer_kind) kmp_set_affinity
|
||||
integer (kind=kmp_affinity_mask_kind) mask
|
||||
end function kmp_set_affinity
|
||||
|
||||
function kmp_get_affinity(mask)
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_integer_kind) kmp_get_affinity
|
||||
integer (kind=kmp_affinity_mask_kind) mask
|
||||
end function kmp_get_affinity
|
||||
|
||||
function kmp_get_affinity_max_proc()
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_integer_kind) kmp_get_affinity_max_proc
|
||||
end function kmp_get_affinity_max_proc
|
||||
|
||||
subroutine kmp_create_affinity_mask(mask)
|
||||
use omp_lib_kinds
|
||||
integer (kind=kmp_affinity_mask_kind) mask
|
||||
end subroutine kmp_create_affinity_mask
|
||||
|
||||
subroutine kmp_destroy_affinity_mask(mask)
|
||||
use omp_lib_kinds
|
||||
integer (kind=kmp_affinity_mask_kind) mask
|
||||
end subroutine kmp_destroy_affinity_mask
|
||||
|
||||
function kmp_set_affinity_mask_proc(proc, mask)
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_integer_kind) kmp_set_affinity_mask_proc
|
||||
integer (kind=omp_integer_kind) proc
|
||||
integer (kind=kmp_affinity_mask_kind) mask
|
||||
end function kmp_set_affinity_mask_proc
|
||||
|
||||
function kmp_unset_affinity_mask_proc(proc, mask)
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_integer_kind) kmp_unset_affinity_mask_proc
|
||||
integer (kind=omp_integer_kind) proc
|
||||
integer (kind=kmp_affinity_mask_kind) mask
|
||||
end function kmp_unset_affinity_mask_proc
|
||||
|
||||
function kmp_get_affinity_mask_proc(proc, mask)
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_integer_kind) kmp_get_affinity_mask_proc
|
||||
integer (kind=omp_integer_kind) proc
|
||||
integer (kind=kmp_affinity_mask_kind) mask
|
||||
end function kmp_get_affinity_mask_proc
|
||||
|
||||
function kmp_malloc(size)
|
||||
use omp_lib_kinds
|
||||
integer (kind=kmp_pointer_kind) kmp_malloc
|
||||
integer (kind=kmp_size_t_kind) size
|
||||
end function kmp_malloc
|
||||
|
||||
function kmp_aligned_malloc(size, alignment)
|
||||
use omp_lib_kinds
|
||||
integer (kind=kmp_pointer_kind) kmp_aligned_malloc
|
||||
integer (kind=kmp_size_t_kind) size
|
||||
integer (kind=kmp_size_t_kind) alignment
|
||||
end function kmp_aligned_malloc
|
||||
|
||||
function kmp_calloc(nelem, elsize)
|
||||
use omp_lib_kinds
|
||||
integer (kind=kmp_pointer_kind) kmp_calloc
|
||||
integer (kind=kmp_size_t_kind) nelem
|
||||
integer (kind=kmp_size_t_kind) elsize
|
||||
end function kmp_calloc
|
||||
|
||||
function kmp_realloc(ptr, size)
|
||||
use omp_lib_kinds
|
||||
integer (kind=kmp_pointer_kind) kmp_realloc
|
||||
integer (kind=kmp_pointer_kind) ptr
|
||||
integer (kind=kmp_size_t_kind) size
|
||||
end function kmp_realloc
|
||||
|
||||
subroutine kmp_free(ptr)
|
||||
use omp_lib_kinds
|
||||
integer (kind=kmp_pointer_kind) ptr
|
||||
end subroutine kmp_free
|
||||
|
||||
subroutine kmp_set_warnings_on()
|
||||
end subroutine kmp_set_warnings_on
|
||||
|
||||
subroutine kmp_set_warnings_off()
|
||||
end subroutine kmp_set_warnings_off
|
||||
|
||||
function kmp_get_cancellation_status(cancelkind)
|
||||
use omp_lib_kinds
|
||||
integer (kind=kmp_cancel_kind) cancelkind
|
||||
logical (kind=omp_logical_kind) kmp_get_cancellation_status
|
||||
end function kmp_get_cancellation_status
|
||||
|
||||
subroutine omp_init_lock_with_hint(svar, hint)
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_lock_kind) svar
|
||||
integer (kind=omp_lock_hint_kind) hint
|
||||
end subroutine omp_init_lock_with_hint
|
||||
|
||||
subroutine omp_init_nest_lock_with_hint(nvar, hint)
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_nest_lock_kind) nvar
|
||||
integer (kind=omp_lock_hint_kind) hint
|
||||
end subroutine omp_init_nest_lock_with_hint
|
||||
|
||||
end interface
|
||||
|
||||
!dec$ if defined(_WIN32)
|
||||
!dec$ if defined(_WIN64) .or. defined(_M_AMD64)
|
||||
|
||||
!***
|
||||
!*** The Fortran entry points must be in uppercase, even if the /Qlowercase
|
||||
!*** option is specified. The alias attribute ensures that the specified
|
||||
!*** string is used as the entry point.
|
||||
!***
|
||||
!*** On the Windows* OS IA-32 architecture, the Fortran entry points have an
|
||||
!*** underscore prepended. On the Windows* OS Intel(R) 64
|
||||
!*** architecture, no underscore is prepended.
|
||||
!***
|
||||
|
||||
!dec$ attributes alias:'OMP_SET_NUM_THREADS' :: omp_set_num_threads
|
||||
!dec$ attributes alias:'OMP_SET_DYNAMIC' :: omp_set_dynamic
|
||||
!dec$ attributes alias:'OMP_SET_NESTED' :: omp_set_nested
|
||||
!dec$ attributes alias:'OMP_GET_NUM_THREADS' :: omp_get_num_threads
|
||||
!dec$ attributes alias:'OMP_GET_MAX_THREADS' :: omp_get_max_threads
|
||||
!dec$ attributes alias:'OMP_GET_THREAD_NUM' :: omp_get_thread_num
|
||||
!dec$ attributes alias:'OMP_GET_NUM_PROCS' :: omp_get_num_procs
|
||||
!dec$ attributes alias:'OMP_IN_PARALLEL' :: omp_in_parallel
|
||||
!dec$ attributes alias:'OMP_GET_DYNAMIC' :: omp_get_dynamic
|
||||
!dec$ attributes alias:'OMP_GET_NESTED' :: omp_get_nested
|
||||
!dec$ attributes alias:'OMP_GET_THREAD_LIMIT' :: omp_get_thread_limit
|
||||
!dec$ attributes alias:'OMP_SET_MAX_ACTIVE_LEVELS' :: omp_set_max_active_levels
|
||||
!dec$ attributes alias:'OMP_GET_MAX_ACTIVE_LEVELS' :: omp_get_max_active_levels
|
||||
!dec$ attributes alias:'OMP_GET_LEVEL' :: omp_get_level
|
||||
!dec$ attributes alias:'OMP_GET_ACTIVE_LEVEL' :: omp_get_active_level
|
||||
!dec$ attributes alias:'OMP_GET_ANCESTOR_THREAD_NUM' :: omp_get_ancestor_thread_num
|
||||
!dec$ attributes alias:'OMP_GET_TEAM_SIZE' :: omp_get_team_size
|
||||
!dec$ attributes alias:'OMP_SET_SCHEDULE' :: omp_set_schedule
|
||||
!dec$ attributes alias:'OMP_GET_SCHEDULE' :: omp_get_schedule
|
||||
!dec$ attributes alias:'OMP_GET_PROC_BIND' :: omp_get_proc_bind
|
||||
!dec$ attributes alias:'OMP_GET_WTIME' :: omp_get_wtime
|
||||
!dec$ attributes alias:'OMP_GET_WTICK' :: omp_get_wtick
|
||||
!dec$ attributes alias:'OMP_GET_DEFAULT_DEVICE' :: omp_get_default_device
|
||||
!dec$ attributes alias:'OMP_SET_DEFAULT_DEVICE' :: omp_set_default_device
|
||||
!dec$ attributes alias:'OMP_GET_NUM_DEVICES' :: omp_get_num_devices
|
||||
!dec$ attributes alias:'OMP_GET_NUM_TEAMS' :: omp_get_num_teams
|
||||
!dec$ attributes alias:'OMP_GET_TEAM_NUM' :: omp_get_team_num
|
||||
!dec$ attributes alias:'OMP_GET_CANCELLATION' :: omp_get_cancellation
|
||||
!dec$ attributes alias:'OMP_IS_INITIAL_DEVICE' :: omp_is_initial_device
|
||||
!dec$ attributes alias:'OMP_GET_INITIAL_DEVICE' :: omp_get_initial_device
|
||||
!dec$ attributes alias:'OMP_GET_MAX_TASK_PRIORITY' :: omp_get_max_task_priority
|
||||
|
||||
!dec$ attributes alias:'omp_init_lock' :: omp_init_lock
|
||||
!dec$ attributes alias:'omp_init_lock_with_hint' :: omp_init_lock_with_hint
|
||||
!dec$ attributes alias:'omp_destroy_lock' :: omp_destroy_lock
|
||||
!dec$ attributes alias:'omp_set_lock' :: omp_set_lock
|
||||
!dec$ attributes alias:'omp_unset_lock' :: omp_unset_lock
|
||||
!dec$ attributes alias:'omp_test_lock' :: omp_test_lock
|
||||
!dec$ attributes alias:'omp_init_nest_lock' :: omp_init_nest_lock
|
||||
!dec$ attributes alias:'omp_init_nest_lock_with_hint' :: omp_init_nest_lock_with_hint
|
||||
!dec$ attributes alias:'omp_destroy_nest_lock' :: omp_destroy_nest_lock
|
||||
!dec$ attributes alias:'omp_set_nest_lock' :: omp_set_nest_lock
|
||||
!dec$ attributes alias:'omp_unset_nest_lock' :: omp_unset_nest_lock
|
||||
!dec$ attributes alias:'omp_test_nest_lock' :: omp_test_nest_lock
|
||||
|
||||
!dec$ attributes alias:'KMP_SET_STACKSIZE'::kmp_set_stacksize
|
||||
!dec$ attributes alias:'KMP_SET_STACKSIZE_S'::kmp_set_stacksize_s
|
||||
!dec$ attributes alias:'KMP_SET_BLOCKTIME'::kmp_set_blocktime
|
||||
!dec$ attributes alias:'KMP_SET_LIBRARY_SERIAL'::kmp_set_library_serial
|
||||
!dec$ attributes alias:'KMP_SET_LIBRARY_TURNAROUND'::kmp_set_library_turnaround
|
||||
!dec$ attributes alias:'KMP_SET_LIBRARY_THROUGHPUT'::kmp_set_library_throughput
|
||||
!dec$ attributes alias:'KMP_SET_LIBRARY'::kmp_set_library
|
||||
!dec$ attributes alias:'KMP_GET_STACKSIZE'::kmp_get_stacksize
|
||||
!dec$ attributes alias:'KMP_GET_STACKSIZE_S'::kmp_get_stacksize_s
|
||||
!dec$ attributes alias:'KMP_GET_BLOCKTIME'::kmp_get_blocktime
|
||||
!dec$ attributes alias:'KMP_GET_LIBRARY'::kmp_get_library
|
||||
!dec$ attributes alias:'KMP_SET_AFFINITY'::kmp_set_affinity
|
||||
!dec$ attributes alias:'KMP_GET_AFFINITY'::kmp_get_affinity
|
||||
!dec$ attributes alias:'KMP_GET_AFFINITY_MAX_PROC'::kmp_get_affinity_max_proc
|
||||
!dec$ attributes alias:'KMP_CREATE_AFFINITY_MASK'::kmp_create_affinity_mask
|
||||
!dec$ attributes alias:'KMP_DESTROY_AFFINITY_MASK'::kmp_destroy_affinity_mask
|
||||
!dec$ attributes alias:'KMP_SET_AFFINITY_MASK_PROC'::kmp_set_affinity_mask_proc
|
||||
!dec$ attributes alias:'KMP_UNSET_AFFINITY_MASK_PROC'::kmp_unset_affinity_mask_proc
|
||||
!dec$ attributes alias:'KMP_GET_AFFINITY_MASK_PROC'::kmp_get_affinity_mask_proc
|
||||
!dec$ attributes alias:'KMP_MALLOC'::kmp_malloc
|
||||
!dec$ attributes alias:'KMP_ALIGNED_MALLOC'::kmp_aligned_malloc
|
||||
!dec$ attributes alias:'KMP_CALLOC'::kmp_calloc
|
||||
!dec$ attributes alias:'KMP_REALLOC'::kmp_realloc
|
||||
!dec$ attributes alias:'KMP_FREE'::kmp_free
|
||||
|
||||
!dec$ attributes alias:'KMP_SET_WARNINGS_ON'::kmp_set_warnings_on
|
||||
!dec$ attributes alias:'KMP_SET_WARNINGS_OFF'::kmp_set_warnings_off
|
||||
|
||||
!dec$ attributes alias:'KMP_GET_CANCELLATION_STATUS' :: kmp_get_cancellation_status
|
||||
|
||||
!dec$ else
|
||||
|
||||
!***
|
||||
!*** On Windows* OS IA-32 architecture, the Fortran entry points have an underscore prepended.
|
||||
!***
|
||||
|
||||
!dec$ attributes alias:'_OMP_SET_NUM_THREADS' :: omp_set_num_threads
|
||||
!dec$ attributes alias:'_OMP_SET_DYNAMIC' :: omp_set_dynamic
|
||||
!dec$ attributes alias:'_OMP_SET_NESTED' :: omp_set_nested
|
||||
!dec$ attributes alias:'_OMP_GET_NUM_THREADS' :: omp_get_num_threads
|
||||
!dec$ attributes alias:'_OMP_GET_MAX_THREADS' :: omp_get_max_threads
|
||||
!dec$ attributes alias:'_OMP_GET_THREAD_NUM' :: omp_get_thread_num
|
||||
!dec$ attributes alias:'_OMP_GET_NUM_PROCS' :: omp_get_num_procs
|
||||
!dec$ attributes alias:'_OMP_IN_PARALLEL' :: omp_in_parallel
|
||||
!dec$ attributes alias:'_OMP_GET_DYNAMIC' :: omp_get_dynamic
|
||||
!dec$ attributes alias:'_OMP_GET_NESTED' :: omp_get_nested
|
||||
!dec$ attributes alias:'_OMP_GET_THREAD_LIMIT' :: omp_get_thread_limit
|
||||
!dec$ attributes alias:'_OMP_SET_MAX_ACTIVE_LEVELS' :: omp_set_max_active_levels
|
||||
!dec$ attributes alias:'_OMP_GET_MAX_ACTIVE_LEVELS' :: omp_get_max_active_levels
|
||||
!dec$ attributes alias:'_OMP_GET_LEVEL' :: omp_get_level
|
||||
!dec$ attributes alias:'_OMP_GET_ACTIVE_LEVEL' :: omp_get_active_level
|
||||
!dec$ attributes alias:'_OMP_GET_ANCESTOR_THREAD_NUM' :: omp_get_ancestor_thread_num
|
||||
!dec$ attributes alias:'_OMP_GET_TEAM_SIZE' :: omp_get_team_size
|
||||
!dec$ attributes alias:'_OMP_SET_SCHEDULE' :: omp_set_schedule
|
||||
!dec$ attributes alias:'_OMP_GET_SCHEDULE' :: omp_get_schedule
|
||||
!dec$ attributes alias:'_OMP_GET_PROC_BIND' :: omp_get_proc_bind
|
||||
!dec$ attributes alias:'_OMP_GET_WTIME' :: omp_get_wtime
|
||||
!dec$ attributes alias:'_OMP_GET_WTICK' :: omp_get_wtick
|
||||
!dec$ attributes alias:'_OMP_GET_DEFAULT_DEVICE' :: omp_get_default_device
|
||||
!dec$ attributes alias:'_OMP_SET_DEFAULT_DEVICE' :: omp_set_default_device
|
||||
!dec$ attributes alias:'_OMP_GET_NUM_DEVICES' :: omp_get_num_devices
|
||||
!dec$ attributes alias:'_OMP_GET_NUM_TEAMS' :: omp_get_num_teams
|
||||
!dec$ attributes alias:'_OMP_GET_TEAM_NUM' :: omp_get_team_num
|
||||
!dec$ attributes alias:'_OMP_GET_CANCELLATION' :: omp_get_cancellation
|
||||
!dec$ attributes alias:'_OMP_IS_INITIAL_DEVICE' :: omp_is_initial_device
|
||||
!dec$ attributes alias:'_OMP_GET_INITIAL_DEVICE' :: omp_get_initial_device
|
||||
!dec$ attributes alias:'_OMP_GET_MAX_TASK_PRIORTY' :: omp_get_max_task_priority
|
||||
|
||||
!dec$ attributes alias:'_omp_init_lock' :: omp_init_lock
|
||||
!dec$ attributes alias:'_omp_init_lock_with_hint' :: omp_init_lock_with_hint
|
||||
!dec$ attributes alias:'_omp_destroy_lock' :: omp_destroy_lock
|
||||
!dec$ attributes alias:'_omp_set_lock' :: omp_set_lock
|
||||
!dec$ attributes alias:'_omp_unset_lock' :: omp_unset_lock
|
||||
!dec$ attributes alias:'_omp_test_lock' :: omp_test_lock
|
||||
!dec$ attributes alias:'_omp_init_nest_lock' :: omp_init_nest_lock
|
||||
!dec$ attributes alias:'_omp_init_nest_lock_with_hint' :: omp_init_nest_lock_with_hint
|
||||
!dec$ attributes alias:'_omp_destroy_nest_lock' :: omp_destroy_nest_lock
|
||||
!dec$ attributes alias:'_omp_set_nest_lock' :: omp_set_nest_lock
|
||||
!dec$ attributes alias:'_omp_unset_nest_lock' :: omp_unset_nest_lock
|
||||
!dec$ attributes alias:'_omp_test_nest_lock' :: omp_test_nest_lock
|
||||
|
||||
!dec$ attributes alias:'_KMP_SET_STACKSIZE'::kmp_set_stacksize
|
||||
!dec$ attributes alias:'_KMP_SET_STACKSIZE_S'::kmp_set_stacksize_s
|
||||
!dec$ attributes alias:'_KMP_SET_BLOCKTIME'::kmp_set_blocktime
|
||||
!dec$ attributes alias:'_KMP_SET_LIBRARY_SERIAL'::kmp_set_library_serial
|
||||
!dec$ attributes alias:'_KMP_SET_LIBRARY_TURNAROUND'::kmp_set_library_turnaround
|
||||
!dec$ attributes alias:'_KMP_SET_LIBRARY_THROUGHPUT'::kmp_set_library_throughput
|
||||
!dec$ attributes alias:'_KMP_SET_LIBRARY'::kmp_set_library
|
||||
!dec$ attributes alias:'_KMP_GET_STACKSIZE'::kmp_get_stacksize
|
||||
!dec$ attributes alias:'_KMP_GET_STACKSIZE_S'::kmp_get_stacksize_s
|
||||
!dec$ attributes alias:'_KMP_GET_BLOCKTIME'::kmp_get_blocktime
|
||||
!dec$ attributes alias:'_KMP_GET_LIBRARY'::kmp_get_library
|
||||
!dec$ attributes alias:'_KMP_SET_AFFINITY'::kmp_set_affinity
|
||||
!dec$ attributes alias:'_KMP_GET_AFFINITY'::kmp_get_affinity
|
||||
!dec$ attributes alias:'_KMP_GET_AFFINITY_MAX_PROC'::kmp_get_affinity_max_proc
|
||||
!dec$ attributes alias:'_KMP_CREATE_AFFINITY_MASK'::kmp_create_affinity_mask
|
||||
!dec$ attributes alias:'_KMP_DESTROY_AFFINITY_MASK'::kmp_destroy_affinity_mask
|
||||
!dec$ attributes alias:'_KMP_SET_AFFINITY_MASK_PROC'::kmp_set_affinity_mask_proc
|
||||
!dec$ attributes alias:'_KMP_UNSET_AFFINITY_MASK_PROC'::kmp_unset_affinity_mask_proc
|
||||
!dec$ attributes alias:'_KMP_GET_AFFINITY_MASK_PROC'::kmp_get_affinity_mask_proc
|
||||
!dec$ attributes alias:'_KMP_MALLOC'::kmp_malloc
|
||||
!dec$ attributes alias:'_KMP_ALIGNED_MALLOC'::kmp_aligned_malloc
|
||||
!dec$ attributes alias:'_KMP_CALLOC'::kmp_calloc
|
||||
!dec$ attributes alias:'_KMP_REALLOC'::kmp_realloc
|
||||
!dec$ attributes alias:'_KMP_FREE'::kmp_free
|
||||
|
||||
!dec$ attributes alias:'_KMP_SET_WARNINGS_ON'::kmp_set_warnings_on
|
||||
!dec$ attributes alias:'_KMP_SET_WARNINGS_OFF'::kmp_set_warnings_off
|
||||
|
||||
!dec$ attributes alias:'_KMP_GET_CANCELLATION_STATUS' :: kmp_get_cancellation_status
|
||||
|
||||
!dec$ endif
|
||||
!dec$ endif
|
||||
|
||||
!dec$ if defined(__linux)
|
||||
|
||||
!***
|
||||
!*** The Linux* OS entry points are in lowercase, with an underscore appended.
|
||||
!***
|
||||
|
||||
!dec$ attributes alias:'omp_set_num_threads_'::omp_set_num_threads
|
||||
!dec$ attributes alias:'omp_set_dynamic_'::omp_set_dynamic
|
||||
!dec$ attributes alias:'omp_set_nested_'::omp_set_nested
|
||||
!dec$ attributes alias:'omp_get_num_threads_'::omp_get_num_threads
|
||||
!dec$ attributes alias:'omp_get_max_threads_'::omp_get_max_threads
|
||||
!dec$ attributes alias:'omp_get_thread_num_'::omp_get_thread_num
|
||||
!dec$ attributes alias:'omp_get_num_procs_'::omp_get_num_procs
|
||||
!dec$ attributes alias:'omp_in_parallel_'::omp_in_parallel
|
||||
!dec$ attributes alias:'omp_get_dynamic_'::omp_get_dynamic
|
||||
!dec$ attributes alias:'omp_get_nested_'::omp_get_nested
|
||||
!dec$ attributes alias:'omp_get_thread_limit_'::omp_get_thread_limit
|
||||
!dec$ attributes alias:'omp_set_max_active_levels_'::omp_set_max_active_levels
|
||||
!dec$ attributes alias:'omp_get_max_active_levels_'::omp_get_max_active_levels
|
||||
!dec$ attributes alias:'omp_get_level_'::omp_get_level
|
||||
!dec$ attributes alias:'omp_get_active_level_'::omp_get_active_level
|
||||
!dec$ attributes alias:'omp_get_ancestor_thread_num_'::omp_get_ancestor_thread_num
|
||||
!dec$ attributes alias:'omp_get_team_size_'::omp_get_team_size
|
||||
!dec$ attributes alias:'omp_set_schedule_'::omp_set_schedule
|
||||
!dec$ attributes alias:'omp_get_schedule_'::omp_get_schedule
|
||||
!dec$ attributes alias:'omp_get_proc_bind_' :: omp_get_proc_bind
|
||||
!dec$ attributes alias:'omp_get_wtime_'::omp_get_wtime
|
||||
!dec$ attributes alias:'omp_get_wtick_'::omp_get_wtick
|
||||
!dec$ attributes alias:'omp_get_default_device_'::omp_get_default_device
|
||||
!dec$ attributes alias:'omp_set_default_device_'::omp_set_default_device
|
||||
!dec$ attributes alias:'omp_get_num_devices_'::omp_get_num_devices
|
||||
!dec$ attributes alias:'omp_get_num_teams_'::omp_get_num_teams
|
||||
!dec$ attributes alias:'omp_get_team_num_'::omp_get_team_num
|
||||
!dec$ attributes alias:'omp_get_cancellation_'::omp_get_cancellation
|
||||
!dec$ attributes alias:'omp_is_initial_device_'::omp_is_initial_device
|
||||
!dec$ attributes alias:'omp_get_initial_device_'::omp_get_initial_device
|
||||
!dec$ attributes alias:'omp_get_max_task_priority_'::omp_get_max_task_priority
|
||||
|
||||
!dec$ attributes alias:'omp_init_lock_'::omp_init_lock
|
||||
!dec$ attributes alias:'omp_init_lock_with_hint_'::omp_init_lock_with_hint
|
||||
!dec$ attributes alias:'omp_destroy_lock_'::omp_destroy_lock
|
||||
!dec$ attributes alias:'omp_set_lock_'::omp_set_lock
|
||||
!dec$ attributes alias:'omp_unset_lock_'::omp_unset_lock
|
||||
!dec$ attributes alias:'omp_test_lock_'::omp_test_lock
|
||||
!dec$ attributes alias:'omp_init_nest_lock_'::omp_init_nest_lock
|
||||
!dec$ attributes alias:'omp_init_nest_lock_with_hint_'::omp_init_nest_lock_with_hint
|
||||
!dec$ attributes alias:'omp_destroy_nest_lock_'::omp_destroy_nest_lock
|
||||
!dec$ attributes alias:'omp_set_nest_lock_'::omp_set_nest_lock
|
||||
!dec$ attributes alias:'omp_unset_nest_lock_'::omp_unset_nest_lock
|
||||
!dec$ attributes alias:'omp_test_nest_lock_'::omp_test_nest_lock
|
||||
|
||||
!dec$ attributes alias:'kmp_set_stacksize_'::kmp_set_stacksize
|
||||
!dec$ attributes alias:'kmp_set_stacksize_s_'::kmp_set_stacksize_s
|
||||
!dec$ attributes alias:'kmp_set_blocktime_'::kmp_set_blocktime
|
||||
!dec$ attributes alias:'kmp_set_library_serial_'::kmp_set_library_serial
|
||||
!dec$ attributes alias:'kmp_set_library_turnaround_'::kmp_set_library_turnaround
|
||||
!dec$ attributes alias:'kmp_set_library_throughput_'::kmp_set_library_throughput
|
||||
!dec$ attributes alias:'kmp_set_library_'::kmp_set_library
|
||||
!dec$ attributes alias:'kmp_get_stacksize_'::kmp_get_stacksize
|
||||
!dec$ attributes alias:'kmp_get_stacksize_s_'::kmp_get_stacksize_s
|
||||
!dec$ attributes alias:'kmp_get_blocktime_'::kmp_get_blocktime
|
||||
!dec$ attributes alias:'kmp_get_library_'::kmp_get_library
|
||||
!dec$ attributes alias:'kmp_set_affinity_'::kmp_set_affinity
|
||||
!dec$ attributes alias:'kmp_get_affinity_'::kmp_get_affinity
|
||||
!dec$ attributes alias:'kmp_get_affinity_max_proc_'::kmp_get_affinity_max_proc
|
||||
!dec$ attributes alias:'kmp_create_affinity_mask_'::kmp_create_affinity_mask
|
||||
!dec$ attributes alias:'kmp_destroy_affinity_mask_'::kmp_destroy_affinity_mask
|
||||
!dec$ attributes alias:'kmp_set_affinity_mask_proc_'::kmp_set_affinity_mask_proc
|
||||
!dec$ attributes alias:'kmp_unset_affinity_mask_proc_'::kmp_unset_affinity_mask_proc
|
||||
!dec$ attributes alias:'kmp_get_affinity_mask_proc_'::kmp_get_affinity_mask_proc
|
||||
!dec$ attributes alias:'kmp_malloc_'::kmp_malloc
|
||||
!dec$ attributes alias:'kmp_aligned_malloc_'::kmp_aligned_malloc
|
||||
!dec$ attributes alias:'kmp_calloc_'::kmp_calloc
|
||||
!dec$ attributes alias:'kmp_realloc_'::kmp_realloc
|
||||
!dec$ attributes alias:'kmp_free_'::kmp_free
|
||||
|
||||
!dec$ attributes alias:'kmp_set_warnings_on_'::kmp_set_warnings_on
|
||||
!dec$ attributes alias:'kmp_set_warnings_off_'::kmp_set_warnings_off
|
||||
!dec$ attributes alias:'kmp_get_cancellation_status_'::kmp_get_cancellation_status
|
||||
|
||||
!dec$ endif
|
||||
|
||||
!dec$ if defined(__APPLE__)
|
||||
|
||||
!***
|
||||
!*** The Mac entry points are in lowercase, with an both an underscore
|
||||
!*** appended and an underscore prepended.
|
||||
!***
|
||||
|
||||
!dec$ attributes alias:'_omp_set_num_threads_'::omp_set_num_threads
|
||||
!dec$ attributes alias:'_omp_set_dynamic_'::omp_set_dynamic
|
||||
!dec$ attributes alias:'_omp_set_nested_'::omp_set_nested
|
||||
!dec$ attributes alias:'_omp_get_num_threads_'::omp_get_num_threads
|
||||
!dec$ attributes alias:'_omp_get_max_threads_'::omp_get_max_threads
|
||||
!dec$ attributes alias:'_omp_get_thread_num_'::omp_get_thread_num
|
||||
!dec$ attributes alias:'_omp_get_num_procs_'::omp_get_num_procs
|
||||
!dec$ attributes alias:'_omp_in_parallel_'::omp_in_parallel
|
||||
!dec$ attributes alias:'_omp_get_dynamic_'::omp_get_dynamic
|
||||
!dec$ attributes alias:'_omp_get_nested_'::omp_get_nested
|
||||
!dec$ attributes alias:'_omp_get_thread_limit_'::omp_get_thread_limit
|
||||
!dec$ attributes alias:'_omp_set_max_active_levels_'::omp_set_max_active_levels
|
||||
!dec$ attributes alias:'_omp_get_max_active_levels_'::omp_get_max_active_levels
|
||||
!dec$ attributes alias:'_omp_get_level_'::omp_get_level
|
||||
!dec$ attributes alias:'_omp_get_active_level_'::omp_get_active_level
|
||||
!dec$ attributes alias:'_omp_get_ancestor_thread_num_'::omp_get_ancestor_thread_num
|
||||
!dec$ attributes alias:'_omp_get_team_size_'::omp_get_team_size
|
||||
!dec$ attributes alias:'_omp_set_schedule_'::omp_set_schedule
|
||||
!dec$ attributes alias:'_omp_get_schedule_'::omp_get_schedule
|
||||
!dec$ attributes alias:'_omp_get_proc_bind_' :: omp_get_proc_bind
|
||||
!dec$ attributes alias:'_omp_get_wtime_'::omp_get_wtime
|
||||
!dec$ attributes alias:'_omp_get_wtick_'::omp_get_wtick
|
||||
!dec$ attributes alias:'_omp_get_default_device_'::omp_get_default_device
|
||||
!dec$ attributes alias:'_omp_set_default_device_'::omp_set_default_device
|
||||
!dec$ attributes alias:'_omp_get_num_devices_'::omp_get_num_devices
|
||||
!dec$ attributes alias:'_omp_get_num_teams_'::omp_get_num_teams
|
||||
!dec$ attributes alias:'_omp_get_team_num_'::omp_get_team_num
|
||||
!dec$ attributes alias:'_omp_get_cancellation_'::omp_get_cancellation
|
||||
!dec$ attributes alias:'_omp_is_initial_device_'::omp_is_initial_device
|
||||
!dec$ attributes alias:'_omp_get_initial_device_'::omp_get_initial_device
|
||||
!dec$ attributes alias:'_omp_get_max_task_priorty_'::omp_get_max_task_priority
|
||||
|
||||
!dec$ attributes alias:'_omp_init_lock_'::omp_init_lock
|
||||
!dec$ attributes alias:'_omp_init_lock_with_hint_'::omp_init_lock_with_hint
|
||||
!dec$ attributes alias:'_omp_destroy_lock_'::omp_destroy_lock
|
||||
!dec$ attributes alias:'_omp_set_lock_'::omp_set_lock
|
||||
!dec$ attributes alias:'_omp_unset_lock_'::omp_unset_lock
|
||||
!dec$ attributes alias:'_omp_test_lock_'::omp_test_lock
|
||||
!dec$ attributes alias:'_omp_init_nest_lock_'::omp_init_nest_lock
|
||||
!dec$ attributes alias:'_omp_init_nest_lock_with_hint_'::omp_init_nest_lock_with_hint
|
||||
!dec$ attributes alias:'_omp_destroy_nest_lock_'::omp_destroy_nest_lock
|
||||
!dec$ attributes alias:'_omp_set_nest_lock_'::omp_set_nest_lock
|
||||
!dec$ attributes alias:'_omp_unset_nest_lock_'::omp_unset_nest_lock
|
||||
!dec$ attributes alias:'_omp_test_nest_lock_'::omp_test_nest_lock
|
||||
|
||||
!dec$ attributes alias:'_kmp_set_stacksize_'::kmp_set_stacksize
|
||||
!dec$ attributes alias:'_kmp_set_stacksize_s_'::kmp_set_stacksize_s
|
||||
!dec$ attributes alias:'_kmp_set_blocktime_'::kmp_set_blocktime
|
||||
!dec$ attributes alias:'_kmp_set_library_serial_'::kmp_set_library_serial
|
||||
!dec$ attributes alias:'_kmp_set_library_turnaround_'::kmp_set_library_turnaround
|
||||
!dec$ attributes alias:'_kmp_set_library_throughput_'::kmp_set_library_throughput
|
||||
!dec$ attributes alias:'_kmp_set_library_'::kmp_set_library
|
||||
!dec$ attributes alias:'_kmp_get_stacksize_'::kmp_get_stacksize
|
||||
!dec$ attributes alias:'_kmp_get_stacksize_s_'::kmp_get_stacksize_s
|
||||
!dec$ attributes alias:'_kmp_get_blocktime_'::kmp_get_blocktime
|
||||
!dec$ attributes alias:'_kmp_get_library_'::kmp_get_library
|
||||
!dec$ attributes alias:'_kmp_set_affinity_'::kmp_set_affinity
|
||||
!dec$ attributes alias:'_kmp_get_affinity_'::kmp_get_affinity
|
||||
!dec$ attributes alias:'_kmp_get_affinity_max_proc_'::kmp_get_affinity_max_proc
|
||||
!dec$ attributes alias:'_kmp_create_affinity_mask_'::kmp_create_affinity_mask
|
||||
!dec$ attributes alias:'_kmp_destroy_affinity_mask_'::kmp_destroy_affinity_mask
|
||||
!dec$ attributes alias:'_kmp_set_affinity_mask_proc_'::kmp_set_affinity_mask_proc
|
||||
!dec$ attributes alias:'_kmp_unset_affinity_mask_proc_'::kmp_unset_affinity_mask_proc
|
||||
!dec$ attributes alias:'_kmp_get_affinity_mask_proc_'::kmp_get_affinity_mask_proc
|
||||
!dec$ attributes alias:'_kmp_malloc_'::kmp_malloc
|
||||
!dec$ attributes alias:'_kmp_aligned_malloc_'::kmp_aligned_malloc
|
||||
!dec$ attributes alias:'_kmp_calloc_'::kmp_calloc
|
||||
!dec$ attributes alias:'_kmp_realloc_'::kmp_realloc
|
||||
!dec$ attributes alias:'_kmp_free_'::kmp_free
|
||||
|
||||
!dec$ attributes alias:'_kmp_set_warnings_on_'::kmp_set_warnings_on
|
||||
!dec$ attributes alias:'_kmp_set_warnings_off_'::kmp_set_warnings_off
|
||||
|
||||
!dec$ attributes alias:'_kmp_get_cancellation_status_'::kmp_get_cancellation_status
|
||||
|
||||
!dec$ endif
|
||||
|
||||
end module omp_lib
|
|
@ -1,523 +0,0 @@
|
|||
! include/45/omp_lib.f90.var
|
||||
|
||||
!
|
||||
!//===----------------------------------------------------------------------===//
|
||||
!//
|
||||
!// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
||||
!// See https://llvm.org/LICENSE.txt for license information.
|
||||
!// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||
!//
|
||||
!//===----------------------------------------------------------------------===//
|
||||
!
|
||||
|
||||
module omp_lib_kinds
|
||||
|
||||
use, intrinsic :: iso_c_binding
|
||||
|
||||
integer, parameter :: omp_integer_kind = c_int
|
||||
integer, parameter :: omp_logical_kind = 4
|
||||
integer, parameter :: omp_real_kind = c_float
|
||||
integer, parameter :: kmp_double_kind = c_double
|
||||
integer, parameter :: omp_lock_kind = c_intptr_t
|
||||
integer, parameter :: omp_nest_lock_kind = c_intptr_t
|
||||
integer, parameter :: omp_sched_kind = omp_integer_kind
|
||||
integer, parameter :: omp_proc_bind_kind = omp_integer_kind
|
||||
integer, parameter :: kmp_pointer_kind = c_intptr_t
|
||||
integer, parameter :: kmp_size_t_kind = c_size_t
|
||||
integer, parameter :: kmp_affinity_mask_kind = c_intptr_t
|
||||
integer, parameter :: kmp_cancel_kind = omp_integer_kind
|
||||
integer, parameter :: omp_lock_hint_kind = omp_integer_kind
|
||||
|
||||
end module omp_lib_kinds
|
||||
|
||||
module omp_lib
|
||||
|
||||
use omp_lib_kinds
|
||||
|
||||
integer (kind=omp_integer_kind), parameter :: openmp_version = @LIBOMP_OMP_YEAR_MONTH@
|
||||
integer (kind=omp_integer_kind), parameter :: kmp_version_major = @LIBOMP_VERSION_MAJOR@
|
||||
integer (kind=omp_integer_kind), parameter :: kmp_version_minor = @LIBOMP_VERSION_MINOR@
|
||||
integer (kind=omp_integer_kind), parameter :: kmp_version_build = @LIBOMP_VERSION_BUILD@
|
||||
character(*) kmp_build_date
|
||||
parameter( kmp_build_date = '@LIBOMP_BUILD_DATE@' )
|
||||
|
||||
integer(kind=omp_sched_kind), parameter :: omp_sched_static = 1
|
||||
integer(kind=omp_sched_kind), parameter :: omp_sched_dynamic = 2
|
||||
integer(kind=omp_sched_kind), parameter :: omp_sched_guided = 3
|
||||
integer(kind=omp_sched_kind), parameter :: omp_sched_auto = 4
|
||||
|
||||
|
||||
integer (kind=omp_proc_bind_kind), parameter :: omp_proc_bind_false = 0
|
||||
integer (kind=omp_proc_bind_kind), parameter :: omp_proc_bind_true = 1
|
||||
integer (kind=omp_proc_bind_kind), parameter :: omp_proc_bind_master = 2
|
||||
integer (kind=omp_proc_bind_kind), parameter :: omp_proc_bind_close = 3
|
||||
integer (kind=omp_proc_bind_kind), parameter :: omp_proc_bind_spread = 4
|
||||
|
||||
integer (kind=kmp_cancel_kind), parameter :: kmp_cancel_parallel = 1
|
||||
integer (kind=kmp_cancel_kind), parameter :: kmp_cancel_loop = 2
|
||||
integer (kind=kmp_cancel_kind), parameter :: kmp_cancel_sections = 3
|
||||
integer (kind=kmp_cancel_kind), parameter :: kmp_cancel_taskgroup = 4
|
||||
|
||||
integer (kind=omp_lock_hint_kind), parameter :: omp_lock_hint_none = 0
|
||||
integer (kind=omp_lock_hint_kind), parameter :: omp_lock_hint_uncontended = 1
|
||||
integer (kind=omp_lock_hint_kind), parameter :: omp_lock_hint_contended = 2
|
||||
integer (kind=omp_lock_hint_kind), parameter :: omp_lock_hint_nonspeculative = 4
|
||||
integer (kind=omp_lock_hint_kind), parameter :: omp_lock_hint_speculative = 8
|
||||
integer (kind=omp_lock_hint_kind), parameter :: kmp_lock_hint_hle = 65536
|
||||
integer (kind=omp_lock_hint_kind), parameter :: kmp_lock_hint_rtm = 131072
|
||||
integer (kind=omp_lock_hint_kind), parameter :: kmp_lock_hint_adaptive = 262144
|
||||
|
||||
interface
|
||||
|
||||
! ***
|
||||
! *** omp_* entry points
|
||||
! ***
|
||||
|
||||
subroutine omp_set_num_threads(num_threads) bind(c)
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_integer_kind), value :: num_threads
|
||||
end subroutine omp_set_num_threads
|
||||
|
||||
subroutine omp_set_dynamic(dynamic_threads) bind(c)
|
||||
use omp_lib_kinds
|
||||
logical (kind=omp_logical_kind), value :: dynamic_threads
|
||||
end subroutine omp_set_dynamic
|
||||
|
||||
subroutine omp_set_nested(nested) bind(c)
|
||||
use omp_lib_kinds
|
||||
logical (kind=omp_logical_kind), value :: nested
|
||||
end subroutine omp_set_nested
|
||||
|
||||
function omp_get_num_threads() bind(c)
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_integer_kind) omp_get_num_threads
|
||||
end function omp_get_num_threads
|
||||
|
||||
function omp_get_max_threads() bind(c)
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_integer_kind) omp_get_max_threads
|
||||
end function omp_get_max_threads
|
||||
|
||||
function omp_get_thread_num() bind(c)
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_integer_kind) omp_get_thread_num
|
||||
end function omp_get_thread_num
|
||||
|
||||
function omp_get_num_procs() bind(c)
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_integer_kind) omp_get_num_procs
|
||||
end function omp_get_num_procs
|
||||
|
||||
function omp_in_parallel() bind(c)
|
||||
use omp_lib_kinds
|
||||
logical (kind=omp_logical_kind) omp_in_parallel
|
||||
end function omp_in_parallel
|
||||
|
||||
function omp_in_final() bind(c)
|
||||
use omp_lib_kinds
|
||||
logical (kind=omp_logical_kind) omp_in_final
|
||||
end function omp_in_final
|
||||
|
||||
function omp_get_dynamic() bind(c)
|
||||
use omp_lib_kinds
|
||||
logical (kind=omp_logical_kind) omp_get_dynamic
|
||||
end function omp_get_dynamic
|
||||
|
||||
function omp_get_nested() bind(c)
|
||||
use omp_lib_kinds
|
||||
logical (kind=omp_logical_kind) omp_get_nested
|
||||
end function omp_get_nested
|
||||
|
||||
function omp_get_thread_limit() bind(c)
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_integer_kind) omp_get_thread_limit
|
||||
end function omp_get_thread_limit
|
||||
|
||||
subroutine omp_set_max_active_levels(max_levels) bind(c)
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_integer_kind), value :: max_levels
|
||||
end subroutine omp_set_max_active_levels
|
||||
|
||||
function omp_get_max_active_levels() bind(c)
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_integer_kind) omp_get_max_active_levels
|
||||
end function omp_get_max_active_levels
|
||||
|
||||
function omp_get_level() bind(c)
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_integer_kind) omp_get_level
|
||||
end function omp_get_level
|
||||
|
||||
function omp_get_active_level() bind(c)
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_integer_kind) omp_get_active_level
|
||||
end function omp_get_active_level
|
||||
|
||||
function omp_get_ancestor_thread_num(level) bind(c)
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_integer_kind) omp_get_ancestor_thread_num
|
||||
integer (kind=omp_integer_kind), value :: level
|
||||
end function omp_get_ancestor_thread_num
|
||||
|
||||
function omp_get_team_size(level) bind(c)
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_integer_kind) omp_get_team_size
|
||||
integer (kind=omp_integer_kind), value :: level
|
||||
end function omp_get_team_size
|
||||
|
||||
subroutine omp_set_schedule(kind, chunk_size) bind(c)
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_sched_kind), value :: kind
|
||||
integer (kind=omp_integer_kind), value :: chunk_size
|
||||
end subroutine omp_set_schedule
|
||||
|
||||
subroutine omp_get_schedule(kind, chunk_size) bind(c)
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_sched_kind) kind
|
||||
integer (kind=omp_integer_kind) chunk_size
|
||||
end subroutine omp_get_schedule
|
||||
|
||||
function omp_get_proc_bind() bind(c)
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_proc_bind_kind) omp_get_proc_bind
|
||||
end function omp_get_proc_bind
|
||||
|
||||
function omp_get_num_places() bind(c)
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_integer_kind) omp_get_num_places
|
||||
end function omp_get_num_places
|
||||
|
||||
function omp_get_place_num_procs(place_num) bind(c)
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_integer_kind), value :: place_num
|
||||
integer (kind=omp_integer_kind) omp_get_place_num_procs
|
||||
end function omp_get_place_num_procs
|
||||
|
||||
subroutine omp_get_place_proc_ids(place_num, ids) bind(c)
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_integer_kind), value :: place_num
|
||||
integer (kind=omp_integer_kind) ids(*)
|
||||
end subroutine omp_get_place_proc_ids
|
||||
|
||||
function omp_get_place_num() bind(c)
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_integer_kind) omp_get_place_num
|
||||
end function omp_get_place_num
|
||||
|
||||
function omp_get_partition_num_places() bind(c)
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_integer_kind) omp_get_partition_num_places
|
||||
end function omp_get_partition_num_places
|
||||
|
||||
subroutine omp_get_partition_place_nums(place_nums) bind(c)
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_integer_kind) place_nums(*)
|
||||
end subroutine omp_get_partition_place_nums
|
||||
|
||||
function omp_get_wtime() bind(c)
|
||||
use omp_lib_kinds
|
||||
real (kind=kmp_double_kind) omp_get_wtime
|
||||
end function omp_get_wtime
|
||||
|
||||
function omp_get_wtick() bind(c)
|
||||
use omp_lib_kinds
|
||||
real (kind=kmp_double_kind) omp_get_wtick
|
||||
end function omp_get_wtick
|
||||
|
||||
function omp_get_default_device() bind(c)
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_integer_kind) omp_get_default_device
|
||||
end function omp_get_default_device
|
||||
|
||||
subroutine omp_set_default_device(device_num) bind(c)
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_integer_kind), value :: device_num
|
||||
end subroutine omp_set_default_device
|
||||
|
||||
function omp_get_num_devices() bind(c)
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_integer_kind) omp_get_num_devices
|
||||
end function omp_get_num_devices
|
||||
|
||||
function omp_get_num_teams() bind(c)
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_integer_kind) omp_get_num_teams
|
||||
end function omp_get_num_teams
|
||||
|
||||
function omp_get_team_num() bind(c)
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_integer_kind) omp_get_team_num
|
||||
end function omp_get_team_num
|
||||
|
||||
function omp_get_cancellation() bind(c)
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_integer_kind) omp_get_cancellation
|
||||
end function omp_get_cancellation
|
||||
|
||||
function omp_is_initial_device() bind(c)
|
||||
use omp_lib_kinds
|
||||
logical (kind=omp_logical_kind) omp_is_initial_device
|
||||
end function omp_is_initial_device
|
||||
|
||||
function omp_get_initial_device() bind(c)
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_integer_kind) omp_get_initial_device
|
||||
end function omp_get_initial_device
|
||||
|
||||
subroutine omp_init_lock(svar) bind(c)
|
||||
!DIR$ IF(__INTEL_COMPILER.GE.1400)
|
||||
!DIR$ attributes known_intrinsic :: omp_init_lock
|
||||
!DIR$ ENDIF
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_lock_kind) svar
|
||||
end subroutine omp_init_lock
|
||||
|
||||
subroutine omp_destroy_lock(svar) bind(c)
|
||||
!DIR$ IF(__INTEL_COMPILER.GE.1400)
|
||||
!DIR$ attributes known_intrinsic :: omp_destroy_lock
|
||||
!DIR$ ENDIF
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_lock_kind) svar
|
||||
end subroutine omp_destroy_lock
|
||||
|
||||
subroutine omp_set_lock(svar) bind(c)
|
||||
!DIR$ IF(__INTEL_COMPILER.GE.1400)
|
||||
!DIR$ attributes known_intrinsic :: omp_set_lock
|
||||
!DIR$ ENDIF
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_lock_kind) svar
|
||||
end subroutine omp_set_lock
|
||||
|
||||
subroutine omp_unset_lock(svar) bind(c)
|
||||
!DIR$ IF(__INTEL_COMPILER.GE.1400)
|
||||
!DIR$ attributes known_intrinsic :: omp_unset_lock
|
||||
!DIR$ ENDIF
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_lock_kind) svar
|
||||
end subroutine omp_unset_lock
|
||||
|
||||
function omp_test_lock(svar) bind(c)
|
||||
!DIR$ IF(__INTEL_COMPILER.GE.1400)
|
||||
!DIR$ attributes known_intrinsic :: omp_test_lock
|
||||
!DIR$ ENDIF
|
||||
use omp_lib_kinds
|
||||
logical (kind=omp_logical_kind) omp_test_lock
|
||||
integer (kind=omp_lock_kind) svar
|
||||
end function omp_test_lock
|
||||
|
||||
subroutine omp_init_nest_lock(nvar) bind(c)
|
||||
!DIR$ IF(__INTEL_COMPILER.GE.1400)
|
||||
!DIR$ attributes known_intrinsic :: omp_init_nest_lock
|
||||
!DIR$ ENDIF
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_nest_lock_kind) nvar
|
||||
end subroutine omp_init_nest_lock
|
||||
|
||||
subroutine omp_destroy_nest_lock(nvar) bind(c)
|
||||
!DIR$ IF(__INTEL_COMPILER.GE.1400)
|
||||
!DIR$ attributes known_intrinsic :: omp_destroy_nest_lock
|
||||
!DIR$ ENDIF
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_nest_lock_kind) nvar
|
||||
end subroutine omp_destroy_nest_lock
|
||||
|
||||
subroutine omp_set_nest_lock(nvar) bind(c)
|
||||
!DIR$ IF(__INTEL_COMPILER.GE.1400)
|
||||
!DIR$ attributes known_intrinsic :: omp_set_nest_lock
|
||||
!DIR$ ENDIF
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_nest_lock_kind) nvar
|
||||
end subroutine omp_set_nest_lock
|
||||
|
||||
subroutine omp_unset_nest_lock(nvar) bind(c)
|
||||
!DIR$ IF(__INTEL_COMPILER.GE.1400)
|
||||
!DIR$ attributes known_intrinsic :: omp_unset_nest_lock
|
||||
!DIR$ ENDIF
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_nest_lock_kind) nvar
|
||||
end subroutine omp_unset_nest_lock
|
||||
|
||||
function omp_test_nest_lock(nvar) bind(c)
|
||||
!DIR$ IF(__INTEL_COMPILER.GE.1400)
|
||||
!DIR$ attributes known_intrinsic :: omp_test_nest_lock
|
||||
!DIR$ ENDIF
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_integer_kind) omp_test_nest_lock
|
||||
integer (kind=omp_nest_lock_kind) nvar
|
||||
end function omp_test_nest_lock
|
||||
|
||||
function omp_get_max_task_priority() bind(c)
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_integer_kind) omp_get_max_task_priority
|
||||
end function omp_get_max_task_priority
|
||||
|
||||
! ***
|
||||
! *** kmp_* entry points
|
||||
! ***
|
||||
|
||||
subroutine kmp_set_stacksize(size) bind(c)
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_integer_kind), value :: size
|
||||
end subroutine kmp_set_stacksize
|
||||
|
||||
subroutine kmp_set_stacksize_s(size) bind(c)
|
||||
use omp_lib_kinds
|
||||
integer (kind=kmp_size_t_kind), value :: size
|
||||
end subroutine kmp_set_stacksize_s
|
||||
|
||||
subroutine kmp_set_blocktime(msec) bind(c)
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_integer_kind), value :: msec
|
||||
end subroutine kmp_set_blocktime
|
||||
|
||||
subroutine kmp_set_library_serial() bind(c)
|
||||
end subroutine kmp_set_library_serial
|
||||
|
||||
subroutine kmp_set_library_turnaround() bind(c)
|
||||
end subroutine kmp_set_library_turnaround
|
||||
|
||||
subroutine kmp_set_library_throughput() bind(c)
|
||||
end subroutine kmp_set_library_throughput
|
||||
|
||||
subroutine kmp_set_library(libnum) bind(c)
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_integer_kind), value :: libnum
|
||||
end subroutine kmp_set_library
|
||||
|
||||
subroutine kmp_set_defaults(string) bind(c)
|
||||
use, intrinsic :: iso_c_binding
|
||||
character (kind=c_char) :: string(*)
|
||||
end subroutine kmp_set_defaults
|
||||
|
||||
function kmp_get_stacksize() bind(c)
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_integer_kind) kmp_get_stacksize
|
||||
end function kmp_get_stacksize
|
||||
|
||||
function kmp_get_stacksize_s() bind(c)
|
||||
use omp_lib_kinds
|
||||
integer (kind=kmp_size_t_kind) kmp_get_stacksize_s
|
||||
end function kmp_get_stacksize_s
|
||||
|
||||
function kmp_get_blocktime() bind(c)
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_integer_kind) kmp_get_blocktime
|
||||
end function kmp_get_blocktime
|
||||
|
||||
function kmp_get_library() bind(c)
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_integer_kind) kmp_get_library
|
||||
end function kmp_get_library
|
||||
|
||||
subroutine kmp_set_disp_num_buffers(num) bind(c)
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_integer_kind), value :: num
|
||||
end subroutine kmp_set_disp_num_buffers
|
||||
|
||||
function kmp_set_affinity(mask) bind(c)
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_integer_kind) kmp_set_affinity
|
||||
integer (kind=kmp_affinity_mask_kind) mask
|
||||
end function kmp_set_affinity
|
||||
|
||||
function kmp_get_affinity(mask) bind(c)
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_integer_kind) kmp_get_affinity
|
||||
integer (kind=kmp_affinity_mask_kind) mask
|
||||
end function kmp_get_affinity
|
||||
|
||||
function kmp_get_affinity_max_proc() bind(c)
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_integer_kind) kmp_get_affinity_max_proc
|
||||
end function kmp_get_affinity_max_proc
|
||||
|
||||
subroutine kmp_create_affinity_mask(mask) bind(c)
|
||||
use omp_lib_kinds
|
||||
integer (kind=kmp_affinity_mask_kind) mask
|
||||
end subroutine kmp_create_affinity_mask
|
||||
|
||||
subroutine kmp_destroy_affinity_mask(mask) bind(c)
|
||||
use omp_lib_kinds
|
||||
integer (kind=kmp_affinity_mask_kind) mask
|
||||
end subroutine kmp_destroy_affinity_mask
|
||||
|
||||
function kmp_set_affinity_mask_proc(proc, mask) bind(c)
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_integer_kind) kmp_set_affinity_mask_proc
|
||||
integer (kind=omp_integer_kind), value :: proc
|
||||
integer (kind=kmp_affinity_mask_kind) mask
|
||||
end function kmp_set_affinity_mask_proc
|
||||
|
||||
function kmp_unset_affinity_mask_proc(proc, mask) bind(c)
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_integer_kind) kmp_unset_affinity_mask_proc
|
||||
integer (kind=omp_integer_kind), value :: proc
|
||||
integer (kind=kmp_affinity_mask_kind) mask
|
||||
end function kmp_unset_affinity_mask_proc
|
||||
|
||||
function kmp_get_affinity_mask_proc(proc, mask) bind(c)
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_integer_kind) kmp_get_affinity_mask_proc
|
||||
integer (kind=omp_integer_kind), value :: proc
|
||||
integer (kind=kmp_affinity_mask_kind) mask
|
||||
end function kmp_get_affinity_mask_proc
|
||||
|
||||
function kmp_malloc(size) bind(c)
|
||||
use omp_lib_kinds
|
||||
integer (kind=kmp_pointer_kind) kmp_malloc
|
||||
integer (kind=kmp_size_t_kind), value :: size
|
||||
end function kmp_malloc
|
||||
|
||||
function kmp_aligned_malloc(size, alignment) bind(c)
|
||||
use omp_lib_kinds
|
||||
integer (kind=kmp_pointer_kind) kmp_aligned_malloc
|
||||
integer (kind=kmp_size_t_kind), value :: size
|
||||
integer (kind=kmp_size_t_kind), value :: alignment
|
||||
end function kmp_aligned_malloc
|
||||
|
||||
function kmp_calloc(nelem, elsize) bind(c)
|
||||
use omp_lib_kinds
|
||||
integer (kind=kmp_pointer_kind) kmp_calloc
|
||||
integer (kind=kmp_size_t_kind), value :: nelem
|
||||
integer (kind=kmp_size_t_kind), value :: elsize
|
||||
end function kmp_calloc
|
||||
|
||||
function kmp_realloc(ptr, size) bind(c)
|
||||
use omp_lib_kinds
|
||||
integer (kind=kmp_pointer_kind) kmp_realloc
|
||||
integer (kind=kmp_pointer_kind), value :: ptr
|
||||
integer (kind=kmp_size_t_kind), value :: size
|
||||
end function kmp_realloc
|
||||
|
||||
subroutine kmp_free(ptr) bind(c)
|
||||
use omp_lib_kinds
|
||||
integer (kind=kmp_pointer_kind), value :: ptr
|
||||
end subroutine kmp_free
|
||||
|
||||
subroutine kmp_set_warnings_on() bind(c)
|
||||
end subroutine kmp_set_warnings_on
|
||||
|
||||
subroutine kmp_set_warnings_off() bind(c)
|
||||
end subroutine kmp_set_warnings_off
|
||||
|
||||
function kmp_get_cancellation_status(cancelkind) bind(c)
|
||||
use omp_lib_kinds
|
||||
integer (kind=kmp_cancel_kind), value :: cancelkind
|
||||
logical (kind=omp_logical_kind) kmp_get_cancellation_status
|
||||
end function kmp_get_cancellation_status
|
||||
|
||||
subroutine omp_init_lock_with_hint(svar, hint) bind(c)
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_lock_kind) svar
|
||||
integer (kind=omp_lock_hint_kind), value :: hint
|
||||
end subroutine omp_init_lock_with_hint
|
||||
|
||||
subroutine omp_init_nest_lock_with_hint(nvar, hint) bind(c)
|
||||
use omp_lib_kinds
|
||||
integer (kind=omp_nest_lock_kind) nvar
|
||||
integer (kind=omp_lock_hint_kind), value :: hint
|
||||
end subroutine omp_init_nest_lock_with_hint
|
||||
|
||||
end interface
|
||||
|
||||
end module omp_lib
|
|
@ -1,644 +0,0 @@
|
|||
! include/45/omp_lib.h.var
|
||||
|
||||
!
|
||||
!//===----------------------------------------------------------------------===//
|
||||
!//
|
||||
!// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
||||
!// See https://llvm.org/LICENSE.txt for license information.
|
||||
!// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||
!//
|
||||
!//===----------------------------------------------------------------------===//
|
||||
!
|
||||
|
||||
!***
|
||||
!*** Some of the directives for the following routine extend past column 72,
|
||||
!*** so process this file in 132-column mode.
|
||||
!***
|
||||
|
||||
!DIR$ fixedformlinesize:132
|
||||
|
||||
integer, parameter :: omp_integer_kind = 4
|
||||
integer, parameter :: omp_logical_kind = 4
|
||||
integer, parameter :: omp_real_kind = 4
|
||||
integer, parameter :: omp_lock_kind = int_ptr_kind()
|
||||
integer, parameter :: omp_nest_lock_kind = int_ptr_kind()
|
||||
integer, parameter :: omp_sched_kind = omp_integer_kind
|
||||
integer, parameter :: omp_proc_bind_kind = omp_integer_kind
|
||||
integer, parameter :: kmp_pointer_kind = int_ptr_kind()
|
||||
integer, parameter :: kmp_size_t_kind = int_ptr_kind()
|
||||
integer, parameter :: kmp_affinity_mask_kind = int_ptr_kind()
|
||||
integer, parameter :: omp_lock_hint_kind = omp_integer_kind
|
||||
|
||||
integer (kind=omp_integer_kind), parameter :: openmp_version = @LIBOMP_OMP_YEAR_MONTH@
|
||||
integer (kind=omp_integer_kind), parameter :: kmp_version_major = @LIBOMP_VERSION_MAJOR@
|
||||
integer (kind=omp_integer_kind), parameter :: kmp_version_minor = @LIBOMP_VERSION_MINOR@
|
||||
integer (kind=omp_integer_kind), parameter :: kmp_version_build = @LIBOMP_VERSION_BUILD@
|
||||
character(*) kmp_build_date
|
||||
parameter( kmp_build_date = '@LIBOMP_BUILD_DATE@' )
|
||||
|
||||
integer(kind=omp_sched_kind), parameter :: omp_sched_static = 1
|
||||
integer(kind=omp_sched_kind), parameter :: omp_sched_dynamic = 2
|
||||
integer(kind=omp_sched_kind), parameter :: omp_sched_guided = 3
|
||||
integer(kind=omp_sched_kind), parameter :: omp_sched_auto = 4
|
||||
|
||||
integer (kind=omp_proc_bind_kind), parameter :: omp_proc_bind_false = 0
|
||||
integer (kind=omp_proc_bind_kind), parameter :: omp_proc_bind_true = 1
|
||||
integer (kind=omp_proc_bind_kind), parameter :: omp_proc_bind_master = 2
|
||||
integer (kind=omp_proc_bind_kind), parameter :: omp_proc_bind_close = 3
|
||||
integer (kind=omp_proc_bind_kind), parameter :: omp_proc_bind_spread = 4
|
||||
|
||||
integer (kind=omp_lock_hint_kind), parameter :: omp_lock_hint_none = 0
|
||||
integer (kind=omp_lock_hint_kind), parameter :: omp_lock_hint_uncontended = 1
|
||||
integer (kind=omp_lock_hint_kind), parameter :: omp_lock_hint_contended = 2
|
||||
integer (kind=omp_lock_hint_kind), parameter :: omp_lock_hint_nonspeculative = 4
|
||||
integer (kind=omp_lock_hint_kind), parameter :: omp_lock_hint_speculative = 8
|
||||
integer (kind=omp_lock_hint_kind), parameter :: kmp_lock_hint_hle = 65536
|
||||
integer (kind=omp_lock_hint_kind), parameter :: kmp_lock_hint_rtm = 131072
|
||||
integer (kind=omp_lock_hint_kind), parameter :: kmp_lock_hint_adaptive = 262144
|
||||
|
||||
interface
|
||||
|
||||
! ***
|
||||
! *** omp_* entry points
|
||||
! ***
|
||||
|
||||
subroutine omp_set_num_threads(num_threads) bind(c)
|
||||
import
|
||||
integer (kind=omp_integer_kind), value :: num_threads
|
||||
end subroutine omp_set_num_threads
|
||||
|
||||
subroutine omp_set_dynamic(dynamic_threads) bind(c)
|
||||
import
|
||||
logical (kind=omp_logical_kind), value :: dynamic_threads
|
||||
end subroutine omp_set_dynamic
|
||||
|
||||
subroutine omp_set_nested(nested) bind(c)
|
||||
import
|
||||
logical (kind=omp_logical_kind), value :: nested
|
||||
end subroutine omp_set_nested
|
||||
|
||||
function omp_get_num_threads() bind(c)
|
||||
import
|
||||
integer (kind=omp_integer_kind) omp_get_num_threads
|
||||
end function omp_get_num_threads
|
||||
|
||||
function omp_get_max_threads() bind(c)
|
||||
import
|
||||
integer (kind=omp_integer_kind) omp_get_max_threads
|
||||
end function omp_get_max_threads
|
||||
|
||||
function omp_get_thread_num() bind(c)
|
||||
import
|
||||
integer (kind=omp_integer_kind) omp_get_thread_num
|
||||
end function omp_get_thread_num
|
||||
|
||||
function omp_get_num_procs() bind(c)
|
||||
import
|
||||
integer (kind=omp_integer_kind) omp_get_num_procs
|
||||
end function omp_get_num_procs
|
||||
|
||||
function omp_in_parallel() bind(c)
|
||||
import
|
||||
logical (kind=omp_logical_kind) omp_in_parallel
|
||||
end function omp_in_parallel
|
||||
|
||||
function omp_in_final() bind(c)
|
||||
import
|
||||
logical (kind=omp_logical_kind) omp_in_final
|
||||
end function omp_in_final
|
||||
|
||||
function omp_get_dynamic() bind(c)
|
||||
import
|
||||
logical (kind=omp_logical_kind) omp_get_dynamic
|
||||
end function omp_get_dynamic
|
||||
|
||||
function omp_get_nested() bind(c)
|
||||
import
|
||||
logical (kind=omp_logical_kind) omp_get_nested
|
||||
end function omp_get_nested
|
||||
|
||||
function omp_get_thread_limit() bind(c)
|
||||
import
|
||||
integer (kind=omp_integer_kind) omp_get_thread_limit
|
||||
end function omp_get_thread_limit
|
||||
|
||||
subroutine omp_set_max_active_levels(max_levels) bind(c)
|
||||
import
|
||||
integer (kind=omp_integer_kind), value :: max_levels
|
||||
end subroutine omp_set_max_active_levels
|
||||
|
||||
function omp_get_max_active_levels() bind(c)
|
||||
import
|
||||
integer (kind=omp_integer_kind) omp_get_max_active_levels
|
||||
end function omp_get_max_active_levels
|
||||
|
||||
function omp_get_level() bind(c)
|
||||
import
|
||||
integer (kind=omp_integer_kind) omp_get_level
|
||||
end function omp_get_level
|
||||
|
||||
function omp_get_active_level() bind(c)
|
||||
import
|
||||
integer (kind=omp_integer_kind) omp_get_active_level
|
||||
end function omp_get_active_level
|
||||
|
||||
function omp_get_ancestor_thread_num(level) bind(c)
|
||||
import
|
||||
integer (kind=omp_integer_kind) omp_get_ancestor_thread_num
|
||||
integer (kind=omp_integer_kind), value :: level
|
||||
end function omp_get_ancestor_thread_num
|
||||
|
||||
function omp_get_team_size(level) bind(c)
|
||||
import
|
||||
integer (kind=omp_integer_kind) omp_get_team_size
|
||||
integer (kind=omp_integer_kind), value :: level
|
||||
end function omp_get_team_size
|
||||
|
||||
subroutine omp_set_schedule(kind, chunk_size) bind(c)
|
||||
import
|
||||
integer (kind=omp_sched_kind), value :: kind
|
||||
integer (kind=omp_integer_kind), value :: chunk_size
|
||||
end subroutine omp_set_schedule
|
||||
|
||||
subroutine omp_get_schedule(kind, chunk_size) bind(c)
|
||||
import
|
||||
integer (kind=omp_sched_kind) kind
|
||||
integer (kind=omp_integer_kind) chunk_size
|
||||
end subroutine omp_get_schedule
|
||||
|
||||
function omp_get_proc_bind() bind(c)
|
||||
import
|
||||
integer (kind=omp_proc_bind_kind) omp_get_proc_bind
|
||||
end function omp_get_proc_bind
|
||||
|
||||
function omp_get_num_places() bind(c)
|
||||
import
|
||||
integer (kind=omp_integer_kind) omp_get_num_places
|
||||
end function omp_get_num_places
|
||||
|
||||
function omp_get_place_num_procs(place_num) bind(c)
|
||||
import
|
||||
integer (kind=omp_integer_kind), value :: place_num
|
||||
integer (kind=omp_integer_kind) omp_get_place_num_procs
|
||||
end function omp_get_place_num_procs
|
||||
|
||||
subroutine omp_get_place_proc_ids(place_num, ids) bind(c)
|
||||
import
|
||||
integer (kind=omp_integer_kind), value :: place_num
|
||||
integer (kind=omp_integer_kind) ids(*)
|
||||
end subroutine omp_get_place_proc_ids
|
||||
|
||||
function omp_get_place_num() bind(c)
|
||||
import
|
||||
integer (kind=omp_integer_kind) omp_get_place_num
|
||||
end function omp_get_place_num
|
||||
|
||||
function omp_get_partition_num_places() bind(c)
|
||||
import
|
||||
integer (kind=omp_integer_kind) omp_get_partition_num_places
|
||||
end function omp_get_partition_num_places
|
||||
|
||||
subroutine omp_get_partition_place_nums(place_nums) bind(c)
|
||||
import
|
||||
integer (kind=omp_integer_kind) place_nums(*)
|
||||
end subroutine omp_get_partition_place_nums
|
||||
|
||||
function omp_get_wtime() bind(c)
|
||||
double precision omp_get_wtime
|
||||
end function omp_get_wtime
|
||||
|
||||
function omp_get_wtick() bind(c)
|
||||
double precision omp_get_wtick
|
||||
end function omp_get_wtick
|
||||
|
||||
function omp_get_default_device() bind(c)
|
||||
import
|
||||
integer (kind=omp_integer_kind) omp_get_default_device
|
||||
end function omp_get_default_device
|
||||
|
||||
subroutine omp_set_default_device(device_num) bind(c)
|
||||
import
|
||||
integer (kind=omp_integer_kind), value :: device_num
|
||||
end subroutine omp_set_default_device
|
||||
|
||||
function omp_get_num_devices() bind(c)
|
||||
import
|
||||
integer (kind=omp_integer_kind) omp_get_num_devices
|
||||
end function omp_get_num_devices
|
||||
|
||||
function omp_get_num_teams() bind(c)
|
||||
import
|
||||
integer (kind=omp_integer_kind) omp_get_num_teams
|
||||
end function omp_get_num_teams
|
||||
|
||||
function omp_get_team_num() bind(c)
|
||||
import
|
||||
integer (kind=omp_integer_kind) omp_get_team_num
|
||||
end function omp_get_team_num
|
||||
|
||||
function omp_is_initial_device() bind(c)
|
||||
import
|
||||
logical (kind=omp_logical_kind) omp_is_initial_device
|
||||
end function omp_is_initial_device
|
||||
|
||||
function omp_get_initial_device() bind(c)
|
||||
import
|
||||
integer (kind=omp_integer_kind) omp_get_initial_device
|
||||
end function omp_get_initial_device
|
||||
|
||||
subroutine omp_init_lock(svar) bind(c)
|
||||
!DIR$ IF(__INTEL_COMPILER.GE.1400)
|
||||
!DIR$ attributes known_intrinsic :: omp_init_lock
|
||||
!DIR$ ENDIF
|
||||
import
|
||||
integer (kind=omp_lock_kind) svar
|
||||
end subroutine omp_init_lock
|
||||
|
||||
subroutine omp_destroy_lock(svar) bind(c)
|
||||
!DIR$ IF(__INTEL_COMPILER.GE.1400)
|
||||
!DIR$ attributes known_intrinsic :: omp_destroy_lock
|
||||
!DIR$ ENDIF
|
||||
import
|
||||
integer (kind=omp_lock_kind) svar
|
||||
end subroutine omp_destroy_lock
|
||||
|
||||
subroutine omp_set_lock(svar) bind(c)
|
||||
!DIR$ IF(__INTEL_COMPILER.GE.1400)
|
||||
!DIR$ attributes known_intrinsic :: omp_set_lock
|
||||
!DIR$ ENDIF
|
||||
import
|
||||
integer (kind=omp_lock_kind) svar
|
||||
end subroutine omp_set_lock
|
||||
|
||||
subroutine omp_unset_lock(svar) bind(c)
|
||||
!DIR$ IF(__INTEL_COMPILER.GE.1400)
|
||||
!DIR$ attributes known_intrinsic :: omp_unset_lock
|
||||
!DIR$ ENDIF
|
||||
import
|
||||
integer (kind=omp_lock_kind) svar
|
||||
end subroutine omp_unset_lock
|
||||
|
||||
function omp_test_lock(svar) bind(c)
|
||||
!DIR$ IF(__INTEL_COMPILER.GE.1400)
|
||||
!DIR$ attributes known_intrinsic :: omp_test_lock
|
||||
!DIR$ ENDIF
|
||||
import
|
||||
logical (kind=omp_logical_kind) omp_test_lock
|
||||
integer (kind=omp_lock_kind) svar
|
||||
end function omp_test_lock
|
||||
|
||||
subroutine omp_init_nest_lock(nvar) bind(c)
|
||||
!DIR$ IF(__INTEL_COMPILER.GE.1400)
|
||||
!DIR$ attributes known_intrinsic :: omp_init_nest_lock
|
||||
!DIR$ ENDIF
|
||||
import
|
||||
integer (kind=omp_nest_lock_kind) nvar
|
||||
end subroutine omp_init_nest_lock
|
||||
|
||||
subroutine omp_destroy_nest_lock(nvar) bind(c)
|
||||
!DIR$ IF(__INTEL_COMPILER.GE.1400)
|
||||
!DIR$ attributes known_intrinsic :: omp_destroy_nest_lock
|
||||
!DIR$ ENDIF
|
||||
import
|
||||
integer (kind=omp_nest_lock_kind) nvar
|
||||
end subroutine omp_destroy_nest_lock
|
||||
|
||||
subroutine omp_set_nest_lock(nvar) bind(c)
|
||||
!DIR$ IF(__INTEL_COMPILER.GE.1400)
|
||||
!DIR$ attributes known_intrinsic :: omp_set_nest_lock
|
||||
!DIR$ ENDIF
|
||||
import
|
||||
integer (kind=omp_nest_lock_kind) nvar
|
||||
end subroutine omp_set_nest_lock
|
||||
|
||||
subroutine omp_unset_nest_lock(nvar) bind(c)
|
||||
!DIR$ IF(__INTEL_COMPILER.GE.1400)
|
||||
!DIR$ attributes known_intrinsic :: omp_unset_nest_lock
|
||||
!DIR$ ENDIF
|
||||
import
|
||||
integer (kind=omp_nest_lock_kind) nvar
|
||||
end subroutine omp_unset_nest_lock
|
||||
|
||||
function omp_test_nest_lock(nvar) bind(c)
|
||||
!DIR$ IF(__INTEL_COMPILER.GE.1400)
|
||||
!DIR$ attributes known_intrinsic :: omp_test_nest_lock
|
||||
!DIR$ ENDIF
|
||||
import
|
||||
integer (kind=omp_integer_kind) omp_test_nest_lock
|
||||
integer (kind=omp_nest_lock_kind) nvar
|
||||
end function omp_test_nest_lock
|
||||
|
||||
function omp_get_max_task_priority() bind(c)
|
||||
import
|
||||
integer (kind=omp_integer_kind) omp_get_max_task_priority
|
||||
end function omp_get_max_task_priority
|
||||
|
||||
! ***
|
||||
! *** kmp_* entry points
|
||||
! ***
|
||||
|
||||
subroutine kmp_set_stacksize(size) bind(c)
|
||||
import
|
||||
integer (kind=omp_integer_kind), value :: size
|
||||
end subroutine kmp_set_stacksize
|
||||
|
||||
subroutine kmp_set_stacksize_s(size) bind(c)
|
||||
import
|
||||
integer (kind=kmp_size_t_kind), value :: size
|
||||
end subroutine kmp_set_stacksize_s
|
||||
|
||||
subroutine kmp_set_blocktime(msec) bind(c)
|
||||
import
|
||||
integer (kind=omp_integer_kind), value :: msec
|
||||
end subroutine kmp_set_blocktime
|
||||
|
||||
subroutine kmp_set_library_serial() bind(c)
|
||||
end subroutine kmp_set_library_serial
|
||||
|
||||
subroutine kmp_set_library_turnaround() bind(c)
|
||||
end subroutine kmp_set_library_turnaround
|
||||
|
||||
subroutine kmp_set_library_throughput() bind(c)
|
||||
end subroutine kmp_set_library_throughput
|
||||
|
||||
subroutine kmp_set_library(libnum) bind(c)
|
||||
import
|
||||
integer (kind=omp_integer_kind), value :: libnum
|
||||
end subroutine kmp_set_library
|
||||
|
||||
subroutine kmp_set_defaults(string) bind(c)
|
||||
character string(*)
|
||||
end subroutine kmp_set_defaults
|
||||
|
||||
function kmp_get_stacksize() bind(c)
|
||||
import
|
||||
integer (kind=omp_integer_kind) kmp_get_stacksize
|
||||
end function kmp_get_stacksize
|
||||
|
||||
function kmp_get_stacksize_s() bind(c)
|
||||
import
|
||||
integer (kind=kmp_size_t_kind) kmp_get_stacksize_s
|
||||
end function kmp_get_stacksize_s
|
||||
|
||||
function kmp_get_blocktime() bind(c)
|
||||
import
|
||||
integer (kind=omp_integer_kind) kmp_get_blocktime
|
||||
end function kmp_get_blocktime
|
||||
|
||||
function kmp_get_library() bind(c)
|
||||
import
|
||||
integer (kind=omp_integer_kind) kmp_get_library
|
||||
end function kmp_get_library
|
||||
|
||||
subroutine kmp_set_disp_num_buffers(num) bind(c)
|
||||
import
|
||||
integer (kind=omp_integer_kind), value :: num
|
||||
end subroutine kmp_set_disp_num_buffers
|
||||
|
||||
function kmp_set_affinity(mask) bind(c)
|
||||
import
|
||||
integer (kind=omp_integer_kind) kmp_set_affinity
|
||||
integer (kind=kmp_affinity_mask_kind) mask
|
||||
end function kmp_set_affinity
|
||||
|
||||
function kmp_get_affinity(mask) bind(c)
|
||||
import
|
||||
integer (kind=omp_integer_kind) kmp_get_affinity
|
||||
integer (kind=kmp_affinity_mask_kind) mask
|
||||
end function kmp_get_affinity
|
||||
|
||||
function kmp_get_affinity_max_proc() bind(c)
|
||||
import
|
||||
integer (kind=omp_integer_kind) kmp_get_affinity_max_proc
|
||||
end function kmp_get_affinity_max_proc
|
||||
|
||||
subroutine kmp_create_affinity_mask(mask) bind(c)
|
||||
import
|
||||
integer (kind=kmp_affinity_mask_kind) mask
|
||||
end subroutine kmp_create_affinity_mask
|
||||
|
||||
subroutine kmp_destroy_affinity_mask(mask) bind(c)
|
||||
import
|
||||
integer (kind=kmp_affinity_mask_kind) mask
|
||||
end subroutine kmp_destroy_affinity_mask
|
||||
|
||||
function kmp_set_affinity_mask_proc(proc, mask) bind(c)
|
||||
import
|
||||
integer (kind=omp_integer_kind) kmp_set_affinity_mask_proc
|
||||
integer (kind=omp_integer_kind), value :: proc
|
||||
integer (kind=kmp_affinity_mask_kind) mask
|
||||
end function kmp_set_affinity_mask_proc
|
||||
|
||||
function kmp_unset_affinity_mask_proc(proc, mask) bind(c)
|
||||
import
|
||||
integer (kind=omp_integer_kind) kmp_unset_affinity_mask_proc
|
||||
integer (kind=omp_integer_kind), value :: proc
|
||||
integer (kind=kmp_affinity_mask_kind) mask
|
||||
end function kmp_unset_affinity_mask_proc
|
||||
|
||||
function kmp_get_affinity_mask_proc(proc, mask) bind(c)
|
||||
import
|
||||
integer (kind=omp_integer_kind) kmp_get_affinity_mask_proc
|
||||
integer (kind=omp_integer_kind), value :: proc
|
||||
integer (kind=kmp_affinity_mask_kind) mask
|
||||
end function kmp_get_affinity_mask_proc
|
||||
|
||||
function kmp_malloc(size) bind(c)
|
||||
import
|
||||
integer (kind=kmp_pointer_kind) kmp_malloc
|
||||
integer (kind=kmp_size_t_kind), value :: size
|
||||
end function kmp_malloc
|
||||
|
||||
function kmp_aligned_malloc(size, alignment) bind(c)
|
||||
import
|
||||
integer (kind=kmp_pointer_kind) kmp_aligned_malloc
|
||||
integer (kind=kmp_size_t_kind), value :: size
|
||||
integer (kind=kmp_size_t_kind), value :: alignment
|
||||
end function kmp_aligned_malloc
|
||||
|
||||
function kmp_calloc(nelem, elsize) bind(c)
|
||||
import
|
||||
integer (kind=kmp_pointer_kind) kmp_calloc
|
||||
integer (kind=kmp_size_t_kind), value :: nelem
|
||||
integer (kind=kmp_size_t_kind), value :: elsize
|
||||
end function kmp_calloc
|
||||
|
||||
function kmp_realloc(ptr, size) bind(c)
|
||||
import
|
||||
integer (kind=kmp_pointer_kind) kmp_realloc
|
||||
integer (kind=kmp_pointer_kind), value :: ptr
|
||||
integer (kind=kmp_size_t_kind), value :: size
|
||||
end function kmp_realloc
|
||||
|
||||
subroutine kmp_free(ptr) bind(c)
|
||||
import
|
||||
integer (kind=kmp_pointer_kind), value :: ptr
|
||||
end subroutine kmp_free
|
||||
|
||||
subroutine kmp_set_warnings_on() bind(c)
|
||||
end subroutine kmp_set_warnings_on
|
||||
|
||||
subroutine kmp_set_warnings_off() bind(c)
|
||||
end subroutine kmp_set_warnings_off
|
||||
|
||||
subroutine omp_init_lock_with_hint(svar, hint) bind(c)
|
||||
import
|
||||
integer (kind=omp_lock_kind) svar
|
||||
integer (kind=omp_lock_hint_kind), value :: hint
|
||||
end subroutine omp_init_lock_with_hint
|
||||
|
||||
subroutine omp_init_nest_lock_with_hint(nvar, hint) bind(c)
|
||||
import
|
||||
integer (kind=omp_nest_lock_kind) nvar
|
||||
integer (kind=omp_lock_hint_kind), value :: hint
|
||||
end subroutine omp_init_nest_lock_with_hint
|
||||
|
||||
end interface
|
||||
|
||||
!DIR$ IF DEFINED (__INTEL_OFFLOAD)
|
||||
!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_set_num_threads
|
||||
!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_set_dynamic
|
||||
!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_set_nested
|
||||
!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_get_num_threads
|
||||
!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_get_max_threads
|
||||
!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_get_thread_num
|
||||
!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_get_num_procs
|
||||
!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_in_parallel
|
||||
!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_in_final
|
||||
!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_get_dynamic
|
||||
!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_get_nested
|
||||
!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_get_thread_limit
|
||||
!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_set_max_active_levels
|
||||
!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_get_max_active_levels
|
||||
!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_get_level
|
||||
!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_get_active_level
|
||||
!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_get_ancestor_thread_num
|
||||
!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_get_team_size
|
||||
!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_set_schedule
|
||||
!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_get_schedule
|
||||
!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_get_proc_bind
|
||||
!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_get_wtime
|
||||
!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_get_wtick
|
||||
!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_get_default_device
|
||||
!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_set_default_device
|
||||
!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_is_initial_device
|
||||
!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_get_initial_device
|
||||
!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_get_num_devices
|
||||
!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_get_num_teams
|
||||
!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_get_team_num
|
||||
!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_init_lock
|
||||
!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_destroy_lock
|
||||
!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_set_lock
|
||||
!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_unset_lock
|
||||
!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_test_lock
|
||||
!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_init_nest_lock
|
||||
!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_destroy_nest_lock
|
||||
!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_set_nest_lock
|
||||
!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_unset_nest_lock
|
||||
!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_test_nest_lock
|
||||
!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_get_max_task_priority
|
||||
!DIR$ ATTRIBUTES OFFLOAD:MIC :: kmp_set_stacksize
|
||||
!DIR$ ATTRIBUTES OFFLOAD:MIC :: kmp_set_stacksize_s
|
||||
!DIR$ ATTRIBUTES OFFLOAD:MIC :: kmp_set_blocktime
|
||||
!DIR$ ATTRIBUTES OFFLOAD:MIC :: kmp_set_library_serial
|
||||
!DIR$ ATTRIBUTES OFFLOAD:MIC :: kmp_set_library_turnaround
|
||||
!DIR$ ATTRIBUTES OFFLOAD:MIC :: kmp_set_library_throughput
|
||||
!DIR$ ATTRIBUTES OFFLOAD:MIC :: kmp_set_library
|
||||
!DIR$ ATTRIBUTES OFFLOAD:MIC :: kmp_set_defaults
|
||||
!DIR$ ATTRIBUTES OFFLOAD:MIC :: kmp_get_stacksize
|
||||
!DIR$ ATTRIBUTES OFFLOAD:MIC :: kmp_get_stacksize_s
|
||||
!DIR$ ATTRIBUTES OFFLOAD:MIC :: kmp_get_blocktime
|
||||
!DIR$ ATTRIBUTES OFFLOAD:MIC :: kmp_get_library
|
||||
!DIR$ ATTRIBUTES OFFLOAD:MIC :: kmp_set_disp_num_buffers
|
||||
!DIR$ ATTRIBUTES OFFLOAD:MIC :: kmp_set_affinity
|
||||
!DIR$ ATTRIBUTES OFFLOAD:MIC :: kmp_get_affinity
|
||||
!DIR$ ATTRIBUTES OFFLOAD:MIC :: kmp_get_affinity_max_proc
|
||||
!DIR$ ATTRIBUTES OFFLOAD:MIC :: kmp_create_affinity_mask
|
||||
!DIR$ ATTRIBUTES OFFLOAD:MIC :: kmp_destroy_affinity_mask
|
||||
!DIR$ ATTRIBUTES OFFLOAD:MIC :: kmp_set_affinity_mask_proc
|
||||
!DIR$ ATTRIBUTES OFFLOAD:MIC :: kmp_unset_affinity_mask_proc
|
||||
!DIR$ ATTRIBUTES OFFLOAD:MIC :: kmp_get_affinity_mask_proc
|
||||
!DIR$ ATTRIBUTES OFFLOAD:MIC :: kmp_malloc
|
||||
!DIR$ ATTRIBUTES OFFLOAD:MIC :: kmp_aligned_malloc
|
||||
!DIR$ ATTRIBUTES OFFLOAD:MIC :: kmp_calloc
|
||||
!DIR$ ATTRIBUTES OFFLOAD:MIC :: kmp_realloc
|
||||
!DIR$ ATTRIBUTES OFFLOAD:MIC :: kmp_free
|
||||
!DIR$ ATTRIBUTES OFFLOAD:MIC :: kmp_set_warnings_on
|
||||
!DIR$ ATTRIBUTES OFFLOAD:MIC :: kmp_set_warnings_off
|
||||
!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_init_lock_with_hint
|
||||
!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_init_nest_lock_with_hint
|
||||
|
||||
!DIR$ IF(__INTEL_COMPILER.GE.1400)
|
||||
!$omp declare target(omp_set_num_threads )
|
||||
!$omp declare target(omp_set_dynamic )
|
||||
!$omp declare target(omp_set_nested )
|
||||
!$omp declare target(omp_get_num_threads )
|
||||
!$omp declare target(omp_get_max_threads )
|
||||
!$omp declare target(omp_get_thread_num )
|
||||
!$omp declare target(omp_get_num_procs )
|
||||
!$omp declare target(omp_in_parallel )
|
||||
!$omp declare target(omp_in_final )
|
||||
!$omp declare target(omp_get_dynamic )
|
||||
!$omp declare target(omp_get_nested )
|
||||
!$omp declare target(omp_get_thread_limit )
|
||||
!$omp declare target(omp_set_max_active_levels )
|
||||
!$omp declare target(omp_get_max_active_levels )
|
||||
!$omp declare target(omp_get_level )
|
||||
!$omp declare target(omp_get_active_level )
|
||||
!$omp declare target(omp_get_ancestor_thread_num )
|
||||
!$omp declare target(omp_get_team_size )
|
||||
!$omp declare target(omp_set_schedule )
|
||||
!$omp declare target(omp_get_schedule )
|
||||
!$omp declare target(omp_get_proc_bind )
|
||||
!$omp declare target(omp_get_wtime )
|
||||
!$omp declare target(omp_get_wtick )
|
||||
!$omp declare target(omp_get_default_device )
|
||||
!$omp declare target(omp_set_default_device )
|
||||
!$omp declare target(omp_is_initial_device )
|
||||
!$omp declare target(omp_get_initial_device )
|
||||
!$omp declare target(omp_get_num_devices )
|
||||
!$omp declare target(omp_get_num_teams )
|
||||
!$omp declare target(omp_get_team_num )
|
||||
!$omp declare target(omp_init_lock )
|
||||
!$omp declare target(omp_destroy_lock )
|
||||
!$omp declare target(omp_set_lock )
|
||||
!$omp declare target(omp_unset_lock )
|
||||
!$omp declare target(omp_test_lock )
|
||||
!$omp declare target(omp_init_nest_lock )
|
||||
!$omp declare target(omp_destroy_nest_lock )
|
||||
!$omp declare target(omp_set_nest_lock )
|
||||
!$omp declare target(omp_unset_nest_lock )
|
||||
!$omp declare target(omp_test_nest_lock )
|
||||
!$omp declare target(omp_get_max_task_priority )
|
||||
!$omp declare target(kmp_set_stacksize )
|
||||
!$omp declare target(kmp_set_stacksize_s )
|
||||
!$omp declare target(kmp_set_blocktime )
|
||||
!$omp declare target(kmp_set_library_serial )
|
||||
!$omp declare target(kmp_set_library_turnaround )
|
||||
!$omp declare target(kmp_set_library_throughput )
|
||||
!$omp declare target(kmp_set_library )
|
||||
!$omp declare target(kmp_set_defaults )
|
||||
!$omp declare target(kmp_get_stacksize )
|
||||
!$omp declare target(kmp_get_stacksize_s )
|
||||
!$omp declare target(kmp_get_blocktime )
|
||||
!$omp declare target(kmp_get_library )
|
||||
!$omp declare target(kmp_set_disp_num_buffers )
|
||||
!$omp declare target(kmp_set_affinity )
|
||||
!$omp declare target(kmp_get_affinity )
|
||||
!$omp declare target(kmp_get_affinity_max_proc )
|
||||
!$omp declare target(kmp_create_affinity_mask )
|
||||
!$omp declare target(kmp_destroy_affinity_mask )
|
||||
!$omp declare target(kmp_set_affinity_mask_proc )
|
||||
!$omp declare target(kmp_unset_affinity_mask_proc )
|
||||
!$omp declare target(kmp_get_affinity_mask_proc )
|
||||
!$omp declare target(kmp_malloc )
|
||||
!$omp declare target(kmp_aligned_malloc )
|
||||
!$omp declare target(kmp_calloc )
|
||||
!$omp declare target(kmp_realloc )
|
||||
!$omp declare target(kmp_free )
|
||||
!$omp declare target(kmp_set_warnings_on )
|
||||
!$omp declare target(kmp_set_warnings_off )
|
||||
!$omp declare target(omp_init_lock_with_hint )
|
||||
!$omp declare target(omp_init_nest_lock_with_hint )
|
||||
!DIR$ ENDIF
|
||||
!DIR$ ENDIF
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* include/50/omp-tools.h.var
|
||||
* include/omp-tools.h.var
|
||||
*/
|
||||
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
@ -371,7 +371,7 @@ typedef enum ompt_frame_flag_t {
|
|||
ompt_frame_cfa = 0x10,
|
||||
ompt_frame_framepointer = 0x20,
|
||||
ompt_frame_stackaddress = 0x30
|
||||
} ompt_frame_flag_t;
|
||||
} ompt_frame_flag_t;
|
||||
|
||||
typedef enum ompt_state_t {
|
||||
ompt_state_work_serial = 0x000,
|
||||
|
@ -720,14 +720,14 @@ typedef void (*ompt_callback_dispatch_t) (
|
|||
ompt_data_t *parallel_data,
|
||||
ompt_data_t *task_data,
|
||||
ompt_dispatch_t kind,
|
||||
ompt_data_t instance
|
||||
ompt_data_t instance
|
||||
);
|
||||
|
||||
typedef struct ompt_record_dispatch_t {
|
||||
ompt_id_t parallel_id;
|
||||
ompt_id_t task_id;
|
||||
ompt_dispatch_t kind;
|
||||
ompt_data_t instance;
|
||||
ompt_data_t instance;
|
||||
} ompt_record_dispatch_t;
|
||||
|
||||
typedef void (*ompt_callback_task_create_t) (
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* include/50/omp.h.var
|
||||
* include/omp.h.var
|
||||
*/
|
||||
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
! include/50/omp_lib.f.var
|
||||
! include/omp_lib.f.var
|
||||
|
||||
!
|
||||
!//===----------------------------------------------------------------------===//
|
|
@ -1,4 +1,4 @@
|
|||
! include/50/omp_lib.f90.var
|
||||
! include/omp_lib.f90.var
|
||||
|
||||
!
|
||||
!//===----------------------------------------------------------------------===//
|
|
@ -1,4 +1,4 @@
|
|||
! include/50/omp_lib.h.var
|
||||
! include/omp_lib.h.var
|
||||
|
||||
!
|
||||
!//===----------------------------------------------------------------------===//
|
|
@ -136,10 +136,8 @@ typedef unsigned int kmp_hwloc_depth_t;
|
|||
#include "ompt-internal.h"
|
||||
#endif
|
||||
|
||||
#if OMP_50_ENABLED
|
||||
// Affinity format function
|
||||
#include "kmp_str.h"
|
||||
#endif
|
||||
|
||||
// 0 - no fast memory allocation, alignment: 8-byte on x86, 16-byte on x64.
|
||||
// 3 - fast allocation using sync, non-sync free lists of any size, non-self
|
||||
|
@ -153,15 +151,8 @@ typedef unsigned int kmp_hwloc_depth_t;
|
|||
#define USE_NESTED_HOT_ARG(x)
|
||||
#else
|
||||
#if KMP_NESTED_HOT_TEAMS
|
||||
#if OMP_40_ENABLED
|
||||
#define USE_NESTED_HOT_ARG(x) , x
|
||||
#else
|
||||
// Nested hot teams feature depends on omp 4.0, disable it for earlier versions
|
||||
#undef KMP_NESTED_HOT_TEAMS
|
||||
#define KMP_NESTED_HOT_TEAMS 0
|
||||
#define USE_NESTED_HOT_ARG(x)
|
||||
#endif
|
||||
#else
|
||||
#define USE_NESTED_HOT_ARG(x)
|
||||
#endif
|
||||
#endif
|
||||
|
@ -361,12 +352,10 @@ enum sched_type : kmp_int32 {
|
|||
/* accessible only through KMP_SCHEDULE environment variable */
|
||||
kmp_sch_static_steal = 44,
|
||||
|
||||
#if OMP_45_ENABLED
|
||||
/* static with chunk adjustment (e.g., simd) */
|
||||
kmp_sch_static_balanced_chunked = 45,
|
||||
kmp_sch_guided_simd = 46, /**< guided with chunk adjustment */
|
||||
kmp_sch_runtime_simd = 47, /**< runtime with chunk adjustment */
|
||||
#endif
|
||||
|
||||
/* accessible only through KMP_SCHEDULE environment variable */
|
||||
kmp_sch_upper, /**< upper bound for unordered values */
|
||||
|
@ -381,11 +370,9 @@ enum sched_type : kmp_int32 {
|
|||
kmp_ord_trapezoidal = 71,
|
||||
kmp_ord_upper, /**< upper bound for ordered values */
|
||||
|
||||
#if OMP_40_ENABLED
|
||||
/* Schedules for Distribute construct */
|
||||
kmp_distribute_static_chunked = 91, /**< distribute static chunked */
|
||||
kmp_distribute_static = 92, /**< distribute static unspecialized */
|
||||
#endif
|
||||
|
||||
/* For the "nomerge" versions, kmp_dispatch_next*() will always return a
|
||||
single iteration/chunk, even if the loop is serialized. For the schedule
|
||||
|
@ -420,7 +407,6 @@ enum sched_type : kmp_int32 {
|
|||
kmp_nm_ord_trapezoidal = 199,
|
||||
kmp_nm_upper, /**< upper bound for nomerge values */
|
||||
|
||||
#if OMP_45_ENABLED
|
||||
/* Support for OpenMP 4.5 monotonic and nonmonotonic schedule modifiers. Since
|
||||
we need to distinguish the three possible cases (no modifier, monotonic
|
||||
modifier, nonmonotonic modifier), we need separate bits for each modifier.
|
||||
|
@ -452,17 +438,6 @@ enum sched_type : kmp_int32 {
|
|||
(s) & (kmp_sch_modifier_nonmonotonic | kmp_sch_modifier_monotonic)))
|
||||
#define SCHEDULE_SET_MODIFIERS(s, m) \
|
||||
(s = (enum sched_type)((kmp_int32)s | (kmp_int32)m))
|
||||
#else
|
||||
/* By doing this we hope to avoid multiple tests on OMP_45_ENABLED. Compilers
|
||||
can now eliminate tests on compile time constants and dead code that results
|
||||
from them, so we can leave code guarded by such an if in place. */
|
||||
#define SCHEDULE_WITHOUT_MODIFIERS(s) (s)
|
||||
#define SCHEDULE_HAS_MONOTONIC(s) false
|
||||
#define SCHEDULE_HAS_NONMONOTONIC(s) false
|
||||
#define SCHEDULE_HAS_NO_MODIFIERS(s) true
|
||||
#define SCHEDULE_GET_MODIFIERS(s) ((enum sched_type)0)
|
||||
#define SCHEDULE_SET_MODIFIERS(s, m) /* Nothing */
|
||||
#endif
|
||||
#define SCHEDULE_NONMONOTONIC 0
|
||||
#define SCHEDULE_MONOTONIC 1
|
||||
|
||||
|
@ -473,32 +448,24 @@ enum sched_type : kmp_int32 {
|
|||
static inline void
|
||||
__kmp_sched_apply_mods_stdkind(kmp_sched_t *kind,
|
||||
enum sched_type internal_kind) {
|
||||
#if OMP_50_ENABLED
|
||||
if (SCHEDULE_HAS_MONOTONIC(internal_kind)) {
|
||||
*kind = (kmp_sched_t)((int)*kind | (int)kmp_sched_monotonic);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
// Apply modifiers on standard kind to internal kind
|
||||
static inline void
|
||||
__kmp_sched_apply_mods_intkind(kmp_sched_t kind,
|
||||
enum sched_type *internal_kind) {
|
||||
#if OMP_50_ENABLED
|
||||
if ((int)kind & (int)kmp_sched_monotonic) {
|
||||
*internal_kind = (enum sched_type)((int)*internal_kind |
|
||||
(int)kmp_sch_modifier_monotonic);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
// Get standard schedule without modifiers
|
||||
static inline kmp_sched_t __kmp_sched_without_mods(kmp_sched_t kind) {
|
||||
#if OMP_50_ENABLED
|
||||
return (kmp_sched_t)((int)kind & ~((int)kmp_sched_monotonic));
|
||||
#else
|
||||
return kind;
|
||||
#endif
|
||||
}
|
||||
|
||||
/* Type to keep runtime schedule set via OMP_SCHEDULE or omp_set_schedule() */
|
||||
|
@ -828,8 +795,6 @@ extern char *__kmp_cpuinfo_file;
|
|||
|
||||
#endif /* KMP_AFFINITY_SUPPORTED */
|
||||
|
||||
#if OMP_40_ENABLED
|
||||
|
||||
// This needs to be kept in sync with the values in omp.h !!!
|
||||
typedef enum kmp_proc_bind_t {
|
||||
proc_bind_false = 0,
|
||||
|
@ -849,13 +814,9 @@ typedef struct kmp_nested_proc_bind_t {
|
|||
|
||||
extern kmp_nested_proc_bind_t __kmp_nested_proc_bind;
|
||||
|
||||
#endif /* OMP_40_ENABLED */
|
||||
|
||||
#if OMP_50_ENABLED
|
||||
extern int __kmp_display_affinity;
|
||||
extern char *__kmp_affinity_format;
|
||||
static const size_t KMP_AFFINITY_FORMAT_SIZE = 512;
|
||||
#endif // OMP_50_ENABLED
|
||||
|
||||
#if KMP_AFFINITY_SUPPORTED
|
||||
#define KMP_PLACE_ALL (-1)
|
||||
|
@ -869,7 +830,6 @@ static const size_t KMP_AFFINITY_FORMAT_SIZE = 512;
|
|||
|
||||
extern int __kmp_affinity_num_places;
|
||||
|
||||
#if OMP_40_ENABLED
|
||||
typedef enum kmp_cancel_kind_t {
|
||||
cancel_noreq = 0,
|
||||
cancel_parallel = 1,
|
||||
|
@ -877,7 +837,6 @@ typedef enum kmp_cancel_kind_t {
|
|||
cancel_sections = 3,
|
||||
cancel_taskgroup = 4
|
||||
} kmp_cancel_kind_t;
|
||||
#endif // OMP_40_ENABLED
|
||||
|
||||
// KMP_HW_SUBSET support:
|
||||
typedef struct kmp_hws_item {
|
||||
|
@ -906,7 +865,6 @@ extern int __kmp_hws_abs_flag; // absolute or per-item number requested
|
|||
#define KMP_GTID_UNKNOWN (-5) /* Is not known */
|
||||
#define KMP_GTID_MIN (-6) /* Minimal gtid for low bound check in DEBUG */
|
||||
|
||||
#if OMP_50_ENABLED
|
||||
/* OpenMP 5.0 Memory Management support */
|
||||
|
||||
#ifndef __OMP_H
|
||||
|
@ -1000,7 +958,6 @@ extern void __kmpc_free(int gtid, void *ptr, omp_allocator_handle_t al);
|
|||
|
||||
extern void __kmp_init_memkind();
|
||||
extern void __kmp_fini_memkind();
|
||||
#endif // OMP_50_ENABLED
|
||||
|
||||
/* ------------------------------------------------------------------------ */
|
||||
|
||||
|
@ -1738,11 +1695,9 @@ typedef struct dispatch_shared_info {
|
|||
dispatch_shared_info64_t s64;
|
||||
} u;
|
||||
volatile kmp_uint32 buffer_index;
|
||||
#if OMP_45_ENABLED
|
||||
volatile kmp_int32 doacross_buf_idx; // teamwise index
|
||||
volatile kmp_uint32 *doacross_flags; // shared array of iteration flags (0/1)
|
||||
kmp_int32 doacross_num_done; // count finished threads
|
||||
#endif
|
||||
#if KMP_USE_HIER_SCHED
|
||||
void *hier;
|
||||
#endif
|
||||
|
@ -1765,7 +1720,6 @@ typedef struct kmp_disp {
|
|||
|
||||
dispatch_private_info_t *th_disp_buffer;
|
||||
kmp_int32 th_disp_index;
|
||||
#if OMP_45_ENABLED
|
||||
kmp_int32 th_doacross_buf_idx; // thread's doacross buffer index
|
||||
volatile kmp_uint32 *th_doacross_flags; // pointer to shared array of flags
|
||||
union { // we can use union here because doacross cannot be used in
|
||||
|
@ -1773,14 +1727,6 @@ typedef struct kmp_disp {
|
|||
kmp_int64 *th_doacross_info; // info on loop bounds
|
||||
kmp_lock_t *th_steal_lock; // lock used for chunk stealing (8-byte variable)
|
||||
};
|
||||
#else
|
||||
#if KMP_STATIC_STEAL_ENABLED
|
||||
kmp_lock_t *th_steal_lock; // lock used for chunk stealing (8-byte variable)
|
||||
void *dummy_padding[1]; // make it 64 bytes on Intel(R) 64
|
||||
#else
|
||||
void *dummy_padding[2]; // make it 64 bytes on Intel(R) 64
|
||||
#endif
|
||||
#endif
|
||||
#if KMP_USE_INTERNODE_ALIGNMENT
|
||||
char more_padding[INTERNODE_CACHE_LINE];
|
||||
#endif
|
||||
|
@ -1868,10 +1814,8 @@ typedef struct kmp_internal_control {
|
|||
int max_active_levels; /* internal control for max_active_levels */
|
||||
kmp_r_sched_t
|
||||
sched; /* internal control for runtime schedule {sched,chunk} pair */
|
||||
#if OMP_40_ENABLED
|
||||
kmp_proc_bind_t proc_bind; /* internal control for affinity */
|
||||
kmp_int32 default_device; /* internal control for default device */
|
||||
#endif // OMP_40_ENABLED
|
||||
struct kmp_internal_control *next;
|
||||
} kmp_internal_control_t;
|
||||
|
||||
|
@ -2100,15 +2044,11 @@ typedef struct kmp_local {
|
|||
#define set__sched(xthread, xval) \
|
||||
(((xthread)->th.th_current_task->td_icvs.sched) = (xval))
|
||||
|
||||
#if OMP_40_ENABLED
|
||||
|
||||
#define set__proc_bind(xthread, xval) \
|
||||
(((xthread)->th.th_current_task->td_icvs.proc_bind) = (xval))
|
||||
#define get__proc_bind(xthread) \
|
||||
((xthread)->th.th_current_task->td_icvs.proc_bind)
|
||||
|
||||
#endif /* OMP_40_ENABLED */
|
||||
|
||||
// OpenMP tasking data structures
|
||||
|
||||
typedef enum kmp_tasking_mode {
|
||||
|
@ -2122,16 +2062,12 @@ extern kmp_tasking_mode_t
|
|||
__kmp_tasking_mode; /* determines how/when to execute tasks */
|
||||
extern int __kmp_task_stealing_constraint;
|
||||
extern int __kmp_enable_task_throttling;
|
||||
#if OMP_40_ENABLED
|
||||
extern kmp_int32 __kmp_default_device; // Set via OMP_DEFAULT_DEVICE if
|
||||
// specified, defaults to 0 otherwise
|
||||
#endif
|
||||
#if OMP_45_ENABLED
|
||||
// Set via OMP_MAX_TASK_PRIORITY if specified, defaults to 0 otherwise
|
||||
extern kmp_int32 __kmp_max_task_priority;
|
||||
// Set via KMP_TASKLOOP_MIN_TASKS if specified, defaults to 0 otherwise
|
||||
extern kmp_uint64 __kmp_taskloop_min_tasks;
|
||||
#endif
|
||||
|
||||
/* NOTE: kmp_taskdata_t and kmp_task_t structures allocated in single block with
|
||||
taskdata first */
|
||||
|
@ -2151,19 +2087,13 @@ extern kmp_uint64 __kmp_taskloop_min_tasks;
|
|||
*/
|
||||
typedef kmp_int32 (*kmp_routine_entry_t)(kmp_int32, void *);
|
||||
|
||||
#if OMP_40_ENABLED || OMP_45_ENABLED
|
||||
typedef union kmp_cmplrdata {
|
||||
#if OMP_45_ENABLED
|
||||
kmp_int32 priority; /**< priority specified by user for the task */
|
||||
#endif // OMP_45_ENABLED
|
||||
#if OMP_40_ENABLED
|
||||
kmp_routine_entry_t
|
||||
destructors; /* pointer to function to invoke deconstructors of
|
||||
firstprivate C++ objects */
|
||||
#endif // OMP_40_ENABLED
|
||||
/* future data */
|
||||
} kmp_cmplrdata_t;
|
||||
#endif
|
||||
|
||||
/* sizeof_kmp_task_t passed as arg to kmpc_omp_task call */
|
||||
/*!
|
||||
|
@ -2173,12 +2103,10 @@ typedef struct kmp_task { /* GEH: Shouldn't this be aligned somehow? */
|
|||
kmp_routine_entry_t
|
||||
routine; /**< pointer to routine to call for executing task */
|
||||
kmp_int32 part_id; /**< part id for the task */
|
||||
#if OMP_40_ENABLED || OMP_45_ENABLED
|
||||
kmp_cmplrdata_t
|
||||
data1; /* Two known optional additions: destructors and priority */
|
||||
kmp_cmplrdata_t data2; /* Process destructors first, priority second */
|
||||
/* future data */
|
||||
#endif
|
||||
/* future data */
|
||||
/* private vars */
|
||||
} kmp_task_t;
|
||||
|
||||
|
@ -2186,17 +2114,14 @@ typedef struct kmp_task { /* GEH: Shouldn't this be aligned somehow? */
|
|||
@}
|
||||
*/
|
||||
|
||||
#if OMP_40_ENABLED
|
||||
typedef struct kmp_taskgroup {
|
||||
std::atomic<kmp_int32> count; // number of allocated and incomplete tasks
|
||||
std::atomic<kmp_int32>
|
||||
cancel_request; // request for cancellation of this taskgroup
|
||||
struct kmp_taskgroup *parent; // parent taskgroup
|
||||
#if OMP_50_ENABLED
|
||||
// Block of data to perform task reduction
|
||||
void *reduce_data; // reduction related info
|
||||
kmp_int32 reduce_num_data; // number of data items to reduce
|
||||
#endif
|
||||
} kmp_taskgroup_t;
|
||||
|
||||
// forward declarations
|
||||
|
@ -2262,7 +2187,6 @@ typedef struct kmp_dephash {
|
|||
#endif
|
||||
} kmp_dephash_t;
|
||||
|
||||
#if OMP_50_ENABLED
|
||||
typedef struct kmp_task_affinity_info {
|
||||
kmp_intptr_t base_addr;
|
||||
size_t len;
|
||||
|
@ -2285,9 +2209,6 @@ typedef struct {
|
|||
kmp_task_t *task;
|
||||
} ed;
|
||||
} kmp_event_t;
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef BUILD_TIED_TASK_STACK
|
||||
|
||||
|
@ -2312,22 +2233,14 @@ typedef struct kmp_tasking_flags { /* Total struct must be exactly 32 bits */
|
|||
unsigned final : 1; /* task is final(1) so execute immediately */
|
||||
unsigned merged_if0 : 1; /* no __kmpc_task_{begin/complete}_if0 calls in if0
|
||||
code path */
|
||||
#if OMP_40_ENABLED
|
||||
unsigned destructors_thunk : 1; /* set if the compiler creates a thunk to
|
||||
invoke destructors from the runtime */
|
||||
#if OMP_45_ENABLED
|
||||
unsigned proxy : 1; /* task is a proxy task (it will be executed outside the
|
||||
context of the RTL) */
|
||||
unsigned priority_specified : 1; /* set if the compiler provides priority
|
||||
setting for the task */
|
||||
unsigned detachable : 1; /* 1 == can detach */
|
||||
unsigned reserved : 9; /* reserved for compiler use */
|
||||
#else
|
||||
unsigned reserved : 12; /* reserved for compiler use */
|
||||
#endif
|
||||
#else // OMP_40_ENABLED
|
||||
unsigned reserved : 13; /* reserved for compiler use */
|
||||
#endif // OMP_40_ENABLED
|
||||
|
||||
/* Library flags */ /* Total library flags must be 16 bits */
|
||||
unsigned tasktype : 1; /* task is either explicit(1) or implicit (0) */
|
||||
|
@ -2368,30 +2281,24 @@ struct kmp_taskdata { /* aligned during dynamic allocation */
|
|||
deallocated */
|
||||
std::atomic<kmp_int32>
|
||||
td_incomplete_child_tasks; /* Child tasks not yet complete */
|
||||
#if OMP_40_ENABLED
|
||||
kmp_taskgroup_t
|
||||
*td_taskgroup; // Each task keeps pointer to its current taskgroup
|
||||
kmp_dephash_t
|
||||
*td_dephash; // Dependencies for children tasks are tracked from here
|
||||
kmp_depnode_t
|
||||
*td_depnode; // Pointer to graph node if this task has dependencies
|
||||
#endif // OMP_40_ENABLED
|
||||
#if OMP_45_ENABLED
|
||||
kmp_task_team_t *td_task_team;
|
||||
kmp_int32 td_size_alloc; // The size of task structure, including shareds etc.
|
||||
#if defined(KMP_GOMP_COMPAT)
|
||||
// 4 or 8 byte integers for the loop bounds in GOMP_taskloop
|
||||
kmp_int32 td_size_loop_bounds;
|
||||
#endif
|
||||
#endif // OMP_45_ENABLED
|
||||
kmp_taskdata_t *td_last_tied; // keep tied task for task scheduling constraint
|
||||
#if defined(KMP_GOMP_COMPAT) && OMP_45_ENABLED
|
||||
#if defined(KMP_GOMP_COMPAT)
|
||||
// GOMP sends in a copy function for copy constructors
|
||||
void (*td_copy_func)(void *, void *);
|
||||
#endif
|
||||
#if OMP_50_ENABLED
|
||||
kmp_event_t td_allow_completion_event;
|
||||
#endif
|
||||
#if OMPT_SUPPORT
|
||||
ompt_task_info_t ompt_task_info;
|
||||
#endif
|
||||
|
@ -2445,12 +2352,8 @@ typedef struct kmp_base_task_team {
|
|||
executing this team? */
|
||||
/* TRUE means tt_threads_data is set up and initialized */
|
||||
kmp_int32 tt_nproc; /* #threads in team */
|
||||
kmp_int32
|
||||
tt_max_threads; /* number of entries allocated for threads_data array */
|
||||
#if OMP_45_ENABLED
|
||||
kmp_int32
|
||||
tt_found_proxy_tasks; /* Have we found proxy tasks since last barrier */
|
||||
#endif
|
||||
kmp_int32 tt_max_threads; // # entries allocated for threads_data array
|
||||
kmp_int32 tt_found_proxy_tasks; // found proxy tasks since last barrier
|
||||
kmp_int32 tt_untied_task_encountered;
|
||||
|
||||
KMP_ALIGN_CACHE
|
||||
|
@ -2486,12 +2389,10 @@ typedef struct kmp_hot_team_ptr {
|
|||
kmp_int32 hot_team_nth; // number of threads allocated for the hot_team
|
||||
} kmp_hot_team_ptr_t;
|
||||
#endif
|
||||
#if OMP_40_ENABLED
|
||||
typedef struct kmp_teams_size {
|
||||
kmp_int32 nteams; // number of teams in a league
|
||||
kmp_int32 nth; // number of threads in each team of the league
|
||||
} kmp_teams_size_t;
|
||||
#endif
|
||||
|
||||
// This struct stores a thread that acts as a "root" for a contention
|
||||
// group. Contention groups are rooted at kmp_root threads, but also at
|
||||
|
@ -2531,11 +2432,9 @@ typedef struct KMP_ALIGN_CACHE kmp_base_info {
|
|||
int th_team_nproc; /* number of threads in a team */
|
||||
kmp_info_p *th_team_master; /* the team's master thread */
|
||||
int th_team_serialized; /* team is serialized */
|
||||
#if OMP_40_ENABLED
|
||||
microtask_t th_teams_microtask; /* save entry address for teams construct */
|
||||
int th_teams_level; /* save initial level of teams construct */
|
||||
/* it is 0 on device but may be any on host */
|
||||
#endif
|
||||
|
||||
/* The blocktime info is copied from the team struct to the thread sruct */
|
||||
/* at the start of a barrier, and the values stored in the team are used */
|
||||
|
@ -2551,16 +2450,13 @@ typedef struct KMP_ALIGN_CACHE kmp_base_info {
|
|||
#if KMP_AFFINITY_SUPPORTED
|
||||
kmp_affin_mask_t *th_affin_mask; /* thread's current affinity mask */
|
||||
#endif
|
||||
#if OMP_50_ENABLED
|
||||
omp_allocator_handle_t th_def_allocator; /* default allocator */
|
||||
#endif
|
||||
/* The data set by the master at reinit, then R/W by the worker */
|
||||
KMP_ALIGN_CACHE int
|
||||
th_set_nproc; /* if > 0, then only use this request for the next fork */
|
||||
#if KMP_NESTED_HOT_TEAMS
|
||||
kmp_hot_team_ptr_t *th_hot_teams; /* array of hot teams */
|
||||
#endif
|
||||
#if OMP_40_ENABLED
|
||||
kmp_proc_bind_t
|
||||
th_set_proc_bind; /* if != proc_bind_default, use request for next fork */
|
||||
kmp_teams_size_t
|
||||
|
@ -2571,11 +2467,8 @@ typedef struct KMP_ALIGN_CACHE kmp_base_info {
|
|||
int th_first_place; /* first place in partition */
|
||||
int th_last_place; /* last place in partition */
|
||||
#endif
|
||||
#endif
|
||||
#if OMP_50_ENABLED
|
||||
int th_prev_level; /* previous level for affinity format */
|
||||
int th_prev_num_threads; /* previous num_threads for affinity format */
|
||||
#endif
|
||||
#if USE_ITT_BUILD
|
||||
kmp_uint64 th_bar_arrive_time; /* arrival to barrier timestamp */
|
||||
kmp_uint64 th_bar_min_time; /* minimum arrival time at the barrier */
|
||||
|
@ -2729,9 +2622,7 @@ typedef struct KMP_ALIGN_CACHE kmp_base_team {
|
|||
kmp_team_p *t_next_pool; // next free team in the team pool
|
||||
kmp_disp_t *t_dispatch; // thread's dispatch data
|
||||
kmp_task_team_t *t_task_team[2]; // Task team struct; switch between 2
|
||||
#if OMP_40_ENABLED
|
||||
kmp_proc_bind_t t_proc_bind; // bind type for par region
|
||||
#endif // OMP_40_ENABLED
|
||||
#if USE_ITT_BUILD
|
||||
kmp_uint64 t_region_time; // region begin timestamp
|
||||
#endif /* USE_ITT_BUILD */
|
||||
|
@ -2770,18 +2661,14 @@ typedef struct KMP_ALIGN_CACHE kmp_base_team {
|
|||
int t_id; // team's id, assigned by debugger.
|
||||
int t_active_level; // nested active parallel level
|
||||
kmp_r_sched_t t_sched; // run-time schedule for the team
|
||||
#if OMP_40_ENABLED && KMP_AFFINITY_SUPPORTED
|
||||
#if KMP_AFFINITY_SUPPORTED
|
||||
int t_first_place; // first & last place in parent thread's partition.
|
||||
int t_last_place; // Restore these values to master after par region.
|
||||
#endif // OMP_40_ENABLED && KMP_AFFINITY_SUPPORTED
|
||||
#if OMP_50_ENABLED
|
||||
#endif // KMP_AFFINITY_SUPPORTED
|
||||
int t_display_affinity;
|
||||
#endif
|
||||
int t_size_changed; // team size was changed?: 0: no, 1: yes, -1: changed via
|
||||
// omp_set_num_threads() call
|
||||
#if OMP_50_ENABLED
|
||||
// omp_set_num_threads() call
|
||||
omp_allocator_handle_t t_def_allocator; /* default allocator */
|
||||
#endif
|
||||
|
||||
// Read/write by workers as well
|
||||
#if (KMP_ARCH_X86 || KMP_ARCH_X86_64)
|
||||
|
@ -2793,11 +2680,9 @@ typedef struct KMP_ALIGN_CACHE kmp_base_team {
|
|||
#endif
|
||||
// Internal control stack for additional nested teams.
|
||||
KMP_ALIGN_CACHE kmp_internal_control_t *t_control_stack_top;
|
||||
// for SERIALIZED teams nested 2 or more levels deep
|
||||
#if OMP_40_ENABLED
|
||||
// for SERIALIZED teams nested 2 or more levels deep
|
||||
// typed flag to store request state of cancellation
|
||||
std::atomic<kmp_int32> t_cancel_request;
|
||||
#endif
|
||||
int t_master_active; // save on fork, restore on join
|
||||
void *t_copypriv_data; // team specific pointer to copyprivate data array
|
||||
#if KMP_OS_WINDOWS
|
||||
|
@ -3129,11 +3014,9 @@ extern const char *__kmp_speculative_statsfile;
|
|||
|
||||
#endif // KMP_USE_ADAPTIVE_LOCKS
|
||||
|
||||
#if OMP_40_ENABLED
|
||||
extern int __kmp_display_env; /* TRUE or FALSE */
|
||||
extern int __kmp_display_env_verbose; /* TRUE if OMP_DISPLAY_ENV=VERBOSE */
|
||||
extern int __kmp_omp_cancellation; /* TRUE or FALSE */
|
||||
#endif
|
||||
|
||||
/* ------------------------------------------------------------------------- */
|
||||
|
||||
|
@ -3326,12 +3209,10 @@ extern void ___kmp_thread_free(kmp_info_t *th, void *ptr KMP_SRC_LOC_DECL);
|
|||
|
||||
extern void __kmp_push_num_threads(ident_t *loc, int gtid, int num_threads);
|
||||
|
||||
#if OMP_40_ENABLED
|
||||
extern void __kmp_push_proc_bind(ident_t *loc, int gtid,
|
||||
kmp_proc_bind_t proc_bind);
|
||||
extern void __kmp_push_num_teams(ident_t *loc, int gtid, int num_teams,
|
||||
int num_threads);
|
||||
#endif
|
||||
|
||||
extern void __kmp_yield();
|
||||
|
||||
|
@ -3452,9 +3333,7 @@ extern void __kmp_affinity_initialize(void);
|
|||
extern void __kmp_affinity_uninitialize(void);
|
||||
extern void __kmp_affinity_set_init_mask(
|
||||
int gtid, int isa_root); /* set affinity according to KMP_AFFINITY */
|
||||
#if OMP_40_ENABLED
|
||||
extern void __kmp_affinity_set_place(int gtid);
|
||||
#endif
|
||||
extern void __kmp_affinity_determine_capable(const char *env_var);
|
||||
extern int __kmp_aux_set_affinity(void **mask);
|
||||
extern int __kmp_aux_get_affinity(void **mask);
|
||||
|
@ -3467,14 +3346,12 @@ extern void __kmp_balanced_affinity(kmp_info_t *th, int team_size);
|
|||
extern int kmp_set_thread_affinity_mask_initial(void);
|
||||
#endif
|
||||
#endif /* KMP_AFFINITY_SUPPORTED */
|
||||
#if OMP_50_ENABLED
|
||||
// No need for KMP_AFFINITY_SUPPORTED guard as only one field in the
|
||||
// format string is for affinity, so platforms that do not support
|
||||
// affinity can still use the other fields, e.g., %n for num_threads
|
||||
extern size_t __kmp_aux_capture_affinity(int gtid, const char *format,
|
||||
kmp_str_buf_t *buffer);
|
||||
extern void __kmp_aux_display_affinity(int gtid, const char *format);
|
||||
#endif
|
||||
|
||||
extern void __kmp_cleanup_hierarchy();
|
||||
extern void __kmp_get_hierarchy(kmp_uint32 nproc, kmp_bstate_t *thr_bar);
|
||||
|
@ -3544,7 +3421,6 @@ extern void __kmp_suspend_uninitialize_thread(kmp_info_t *th);
|
|||
|
||||
extern kmp_info_t *__kmp_allocate_thread(kmp_root_t *root, kmp_team_t *team,
|
||||
int tid);
|
||||
#if OMP_40_ENABLED
|
||||
extern kmp_team_t *
|
||||
__kmp_allocate_team(kmp_root_t *root, int new_nproc, int max_nproc,
|
||||
#if OMPT_SUPPORT
|
||||
|
@ -3552,15 +3428,6 @@ __kmp_allocate_team(kmp_root_t *root, int new_nproc, int max_nproc,
|
|||
#endif
|
||||
kmp_proc_bind_t proc_bind, kmp_internal_control_t *new_icvs,
|
||||
int argc USE_NESTED_HOT_ARG(kmp_info_t *thr));
|
||||
#else
|
||||
extern kmp_team_t *
|
||||
__kmp_allocate_team(kmp_root_t *root, int new_nproc, int max_nproc,
|
||||
#if OMPT_SUPPORT
|
||||
ompt_id_t ompt_parallel_id,
|
||||
#endif
|
||||
kmp_internal_control_t *new_icvs,
|
||||
int argc USE_NESTED_HOT_ARG(kmp_info_t *thr));
|
||||
#endif // OMP_40_ENABLED
|
||||
extern void __kmp_free_thread(kmp_info_t *);
|
||||
extern void __kmp_free_team(kmp_root_t *,
|
||||
kmp_team_t *USE_NESTED_HOT_ARG(kmp_info_t *));
|
||||
|
@ -3611,11 +3478,8 @@ extern void __kmp_join_call(ident_t *loc, int gtid
|
|||
,
|
||||
enum fork_context_e fork_context
|
||||
#endif
|
||||
#if OMP_40_ENABLED
|
||||
,
|
||||
int exit_teams = 0
|
||||
#endif
|
||||
);
|
||||
int exit_teams = 0);
|
||||
|
||||
extern void __kmp_serialized_parallel(ident_t *id, kmp_int32 gtid);
|
||||
extern void __kmp_internal_fork(ident_t *id, int gtid, kmp_team_t *team);
|
||||
|
@ -3630,12 +3494,10 @@ extern void __kmp_run_after_invoked_task(int gtid, int tid,
|
|||
|
||||
// should never have been exported
|
||||
KMP_EXPORT int __kmpc_invoke_task_func(int gtid);
|
||||
#if OMP_40_ENABLED
|
||||
extern int __kmp_invoke_teams_master(int gtid);
|
||||
extern void __kmp_teams_master(int gtid);
|
||||
extern int __kmp_aux_get_team_num();
|
||||
extern int __kmp_aux_get_num_teams();
|
||||
#endif
|
||||
extern void __kmp_save_internal_controls(kmp_info_t *thread);
|
||||
extern void __kmp_user_set_library(enum library_type arg);
|
||||
extern void __kmp_aux_set_library(enum library_type arg);
|
||||
|
@ -3663,12 +3525,10 @@ extern void __kmp_init_implicit_task(ident_t *loc_ref, kmp_info_t *this_thr,
|
|||
extern void __kmp_finish_implicit_task(kmp_info_t *this_thr);
|
||||
extern void __kmp_free_implicit_task(kmp_info_t *this_thr);
|
||||
|
||||
#if OMP_50_ENABLED
|
||||
extern kmp_event_t *__kmpc_task_allow_completion_event(ident_t *loc_ref,
|
||||
int gtid,
|
||||
kmp_task_t *task);
|
||||
extern void __kmp_fulfill_event(kmp_event_t *event);
|
||||
#endif
|
||||
|
||||
int __kmp_execute_tasks_32(kmp_info_t *thread, kmp_int32 gtid,
|
||||
kmp_flag_32 *flag, int final_spin,
|
||||
|
@ -3767,11 +3627,8 @@ KMP_EXPORT void __kmpc_critical(ident_t *, kmp_int32 global_tid,
|
|||
kmp_critical_name *);
|
||||
KMP_EXPORT void __kmpc_end_critical(ident_t *, kmp_int32 global_tid,
|
||||
kmp_critical_name *);
|
||||
|
||||
#if OMP_45_ENABLED
|
||||
KMP_EXPORT void __kmpc_critical_with_hint(ident_t *, kmp_int32 global_tid,
|
||||
kmp_critical_name *, uint32_t hint);
|
||||
#endif
|
||||
|
||||
KMP_EXPORT kmp_int32 __kmpc_barrier_master(ident_t *, kmp_int32 global_tid);
|
||||
KMP_EXPORT void __kmpc_end_barrier_master(ident_t *, kmp_int32 global_tid);
|
||||
|
@ -3832,8 +3689,6 @@ void __kmpc_omp_task_complete(ident_t *loc_ref, kmp_int32 gtid,
|
|||
|
||||
/* ------------------------------------------------------------------------ */
|
||||
|
||||
#if OMP_40_ENABLED
|
||||
|
||||
KMP_EXPORT void __kmpc_taskgroup(ident_t *loc, int gtid);
|
||||
KMP_EXPORT void __kmpc_end_taskgroup(ident_t *loc, int gtid);
|
||||
|
||||
|
@ -3846,7 +3701,6 @@ KMP_EXPORT void __kmpc_omp_wait_deps(ident_t *loc_ref, kmp_int32 gtid,
|
|||
kmp_depend_info_t *dep_list,
|
||||
kmp_int32 ndeps_noalias,
|
||||
kmp_depend_info_t *noalias_dep_list);
|
||||
|
||||
extern kmp_int32 __kmp_omp_task(kmp_int32 gtid, kmp_task_t *new_task,
|
||||
bool serialize_immediate);
|
||||
|
||||
|
@ -3857,8 +3711,6 @@ KMP_EXPORT kmp_int32 __kmpc_cancellationpoint(ident_t *loc_ref, kmp_int32 gtid,
|
|||
KMP_EXPORT kmp_int32 __kmpc_cancel_barrier(ident_t *loc_ref, kmp_int32 gtid);
|
||||
KMP_EXPORT int __kmp_get_cancellation_status(int cancel_kind);
|
||||
|
||||
#if OMP_45_ENABLED
|
||||
|
||||
KMP_EXPORT void __kmpc_proxy_task_completed(kmp_int32 gtid, kmp_task_t *ptask);
|
||||
KMP_EXPORT void __kmpc_proxy_task_completed_ooo(kmp_task_t *ptask);
|
||||
KMP_EXPORT void __kmpc_taskloop(ident_t *loc, kmp_int32 gtid, kmp_task_t *task,
|
||||
|
@ -3866,8 +3718,6 @@ KMP_EXPORT void __kmpc_taskloop(ident_t *loc, kmp_int32 gtid, kmp_task_t *task,
|
|||
kmp_uint64 *ub, kmp_int64 st, kmp_int32 nogroup,
|
||||
kmp_int32 sched, kmp_uint64 grainsize,
|
||||
void *task_dup);
|
||||
#endif
|
||||
#if OMP_50_ENABLED
|
||||
KMP_EXPORT void *__kmpc_task_reduction_init(int gtid, int num_data, void *data);
|
||||
KMP_EXPORT void *__kmpc_taskred_init(int gtid, int num_data, void *data);
|
||||
KMP_EXPORT void *__kmpc_task_reduction_get_th_data(int gtid, void *tg, void *d);
|
||||
|
@ -3881,9 +3731,6 @@ KMP_EXPORT void __kmpc_task_reduction_modifier_fini(ident_t *loc, int gtid,
|
|||
KMP_EXPORT kmp_int32 __kmpc_omp_reg_task_with_affinity(
|
||||
ident_t *loc_ref, kmp_int32 gtid, kmp_task_t *new_task, kmp_int32 naffins,
|
||||
kmp_task_affinity_info_t *affin_list);
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
/* Lock interface routines (fast versions with gtid passed in) */
|
||||
KMP_EXPORT void __kmpc_init_lock(ident_t *loc, kmp_int32 gtid,
|
||||
|
@ -3905,13 +3752,11 @@ KMP_EXPORT int __kmpc_test_lock(ident_t *loc, kmp_int32 gtid, void **user_lock);
|
|||
KMP_EXPORT int __kmpc_test_nest_lock(ident_t *loc, kmp_int32 gtid,
|
||||
void **user_lock);
|
||||
|
||||
#if OMP_45_ENABLED
|
||||
KMP_EXPORT void __kmpc_init_lock_with_hint(ident_t *loc, kmp_int32 gtid,
|
||||
void **user_lock, uintptr_t hint);
|
||||
KMP_EXPORT void __kmpc_init_nest_lock_with_hint(ident_t *loc, kmp_int32 gtid,
|
||||
void **user_lock,
|
||||
uintptr_t hint);
|
||||
#endif
|
||||
|
||||
/* Interface to fast scalable reduce methods routines */
|
||||
|
||||
|
@ -3949,7 +3794,6 @@ KMP_EXPORT void __kmpc_pop_num_threads(ident_t *loc, kmp_int32 global_tid);
|
|||
KMP_EXPORT void __kmpc_push_num_threads(ident_t *loc, kmp_int32 global_tid,
|
||||
kmp_int32 num_threads);
|
||||
|
||||
#if OMP_40_ENABLED
|
||||
KMP_EXPORT void __kmpc_push_proc_bind(ident_t *loc, kmp_int32 global_tid,
|
||||
int proc_bind);
|
||||
KMP_EXPORT void __kmpc_push_num_teams(ident_t *loc, kmp_int32 global_tid,
|
||||
|
@ -3957,8 +3801,6 @@ KMP_EXPORT void __kmpc_push_num_teams(ident_t *loc, kmp_int32 global_tid,
|
|||
kmp_int32 num_threads);
|
||||
KMP_EXPORT void __kmpc_fork_teams(ident_t *loc, kmp_int32 argc,
|
||||
kmpc_micro microtask, ...);
|
||||
#endif
|
||||
#if OMP_45_ENABLED
|
||||
struct kmp_dim { // loop bounds info casted to kmp_int64
|
||||
kmp_int64 lo; // lower
|
||||
kmp_int64 up; // upper
|
||||
|
@ -3972,7 +3814,6 @@ KMP_EXPORT void __kmpc_doacross_wait(ident_t *loc, kmp_int32 gtid,
|
|||
KMP_EXPORT void __kmpc_doacross_post(ident_t *loc, kmp_int32 gtid,
|
||||
const kmp_int64 *vec);
|
||||
KMP_EXPORT void __kmpc_doacross_fini(ident_t *loc, kmp_int32 gtid);
|
||||
#endif
|
||||
|
||||
KMP_EXPORT void *__kmpc_threadprivate_cached(ident_t *loc, kmp_int32 global_tid,
|
||||
void *data, size_t size,
|
||||
|
@ -4029,7 +3870,6 @@ KMP_EXPORT void KMPC_CONVENTION kmpc_set_library(int);
|
|||
KMP_EXPORT void KMPC_CONVENTION kmpc_set_defaults(char const *);
|
||||
KMP_EXPORT void KMPC_CONVENTION kmpc_set_disp_num_buffers(int);
|
||||
|
||||
#if OMP_50_ENABLED
|
||||
enum kmp_target_offload_kind {
|
||||
tgt_disabled = 0,
|
||||
tgt_default = 1,
|
||||
|
@ -4039,16 +3879,12 @@ typedef enum kmp_target_offload_kind kmp_target_offload_kind_t;
|
|||
// Set via OMP_TARGET_OFFLOAD if specified, defaults to tgt_default otherwise
|
||||
extern kmp_target_offload_kind_t __kmp_target_offload;
|
||||
extern int __kmpc_get_target_offload();
|
||||
#endif
|
||||
|
||||
#if OMP_40_ENABLED
|
||||
// Constants used in libomptarget
|
||||
#define KMP_DEVICE_DEFAULT -1 // This is libomptarget's default device.
|
||||
#define KMP_HOST_DEVICE -10 // This is what it is in libomptarget, go figure.
|
||||
#define KMP_DEVICE_ALL -11 // This is libomptarget's "all devices".
|
||||
#endif // OMP_40_ENABLED
|
||||
|
||||
#if OMP_50_ENABLED
|
||||
// OMP Pause Resource
|
||||
|
||||
// The following enum is used both to set the status in __kmp_pause_status, and
|
||||
|
@ -4073,7 +3909,6 @@ static inline void __kmp_resume_if_hard_paused() {
|
|||
__kmp_pause_status = kmp_not_paused;
|
||||
}
|
||||
}
|
||||
#endif // OMP_50_ENABLED
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
|
@ -3019,8 +3019,6 @@ static void __kmp_affinity_process_proclist(kmp_affin_mask_t **out_masks,
|
|||
KMP_CPU_FREE(sumMask);
|
||||
}
|
||||
|
||||
#if OMP_40_ENABLED
|
||||
|
||||
/*-----------------------------------------------------------------------------
|
||||
Re-parse the OMP_PLACES proc id list, forming the newMasks for the different
|
||||
places. Again, Here is the grammar:
|
||||
|
@ -3041,7 +3039,6 @@ signed := num
|
|||
signed := + signed
|
||||
signed := - signed
|
||||
-----------------------------------------------------------------------------*/
|
||||
|
||||
static void __kmp_process_subplace_list(const char **scan,
|
||||
kmp_affin_mask_t *osId2Mask,
|
||||
int maxOsId, kmp_affin_mask_t *tempMask,
|
||||
|
@ -3360,8 +3357,6 @@ void __kmp_affinity_process_placelist(kmp_affin_mask_t **out_masks,
|
|||
KMP_CPU_INTERNAL_FREE_ARRAY(newMasks, numNewMasks);
|
||||
}
|
||||
|
||||
#endif /* OMP_40_ENABLED */
|
||||
|
||||
#undef ADD_MASK
|
||||
#undef ADD_MASK_OSID
|
||||
|
||||
|
@ -4486,21 +4481,15 @@ static void __kmp_aux_affinity_initialize(void) {
|
|||
|
||||
case affinity_explicit:
|
||||
KMP_DEBUG_ASSERT(__kmp_affinity_proclist != NULL);
|
||||
#if OMP_40_ENABLED
|
||||
if (__kmp_nested_proc_bind.bind_types[0] == proc_bind_intel)
|
||||
#endif
|
||||
{
|
||||
if (__kmp_nested_proc_bind.bind_types[0] == proc_bind_intel) {
|
||||
__kmp_affinity_process_proclist(
|
||||
&__kmp_affinity_masks, &__kmp_affinity_num_masks,
|
||||
__kmp_affinity_proclist, osId2Mask, maxIndex);
|
||||
}
|
||||
#if OMP_40_ENABLED
|
||||
else {
|
||||
} else {
|
||||
__kmp_affinity_process_placelist(
|
||||
&__kmp_affinity_masks, &__kmp_affinity_num_masks,
|
||||
__kmp_affinity_proclist, osId2Mask, maxIndex);
|
||||
}
|
||||
#endif
|
||||
if (__kmp_affinity_num_masks == 0) {
|
||||
if (__kmp_affinity_verbose ||
|
||||
(__kmp_affinity_warnings && (__kmp_affinity_type != affinity_none))) {
|
||||
|
@ -4616,13 +4605,11 @@ static void __kmp_aux_affinity_initialize(void) {
|
|||
__kmp_affinity_num_masks = numUnique;
|
||||
}
|
||||
|
||||
#if OMP_40_ENABLED
|
||||
if ((__kmp_nested_proc_bind.bind_types[0] != proc_bind_intel) &&
|
||||
(__kmp_affinity_num_places > 0) &&
|
||||
((unsigned)__kmp_affinity_num_places < __kmp_affinity_num_masks)) {
|
||||
__kmp_affinity_num_masks = __kmp_affinity_num_places;
|
||||
}
|
||||
#endif
|
||||
|
||||
KMP_CPU_ALLOC_ARRAY(__kmp_affinity_masks, __kmp_affinity_num_masks);
|
||||
|
||||
|
@ -4692,9 +4679,7 @@ void __kmp_affinity_uninitialize(void) {
|
|||
}
|
||||
__kmp_affinity_num_masks = 0;
|
||||
__kmp_affinity_type = affinity_default;
|
||||
#if OMP_40_ENABLED
|
||||
__kmp_affinity_num_places = 0;
|
||||
#endif
|
||||
if (__kmp_affinity_proclist != NULL) {
|
||||
__kmp_free(__kmp_affinity_proclist);
|
||||
__kmp_affinity_proclist = NULL;
|
||||
|
@ -4735,10 +4720,7 @@ void __kmp_affinity_set_init_mask(int gtid, int isa_root) {
|
|||
kmp_affin_mask_t *mask;
|
||||
int i;
|
||||
|
||||
#if OMP_40_ENABLED
|
||||
if (KMP_AFFINITY_NON_PROC_BIND)
|
||||
#endif
|
||||
{
|
||||
if (KMP_AFFINITY_NON_PROC_BIND) {
|
||||
if ((__kmp_affinity_type == affinity_none) ||
|
||||
(__kmp_affinity_type == affinity_balanced)) {
|
||||
#if KMP_GROUP_AFFINITY
|
||||
|
@ -4754,9 +4736,7 @@ void __kmp_affinity_set_init_mask(int gtid, int isa_root) {
|
|||
i = (gtid + __kmp_affinity_offset) % __kmp_affinity_num_masks;
|
||||
mask = KMP_CPU_INDEX(__kmp_affinity_masks, i);
|
||||
}
|
||||
}
|
||||
#if OMP_40_ENABLED
|
||||
else {
|
||||
} else {
|
||||
if ((!isa_root) ||
|
||||
(__kmp_nested_proc_bind.bind_types[0] == proc_bind_false)) {
|
||||
#if KMP_GROUP_AFFINITY
|
||||
|
@ -4775,9 +4755,7 @@ void __kmp_affinity_set_init_mask(int gtid, int isa_root) {
|
|||
mask = KMP_CPU_INDEX(__kmp_affinity_masks, i);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
#if OMP_40_ENABLED
|
||||
th->th.th_current_place = i;
|
||||
if (isa_root) {
|
||||
th->th.th_new_place = i;
|
||||
|
@ -4797,17 +4775,6 @@ void __kmp_affinity_set_init_mask(int gtid, int isa_root) {
|
|||
KA_TRACE(100, ("__kmp_affinity_set_init_mask: binding T#%d to place %d\n",
|
||||
gtid, i));
|
||||
}
|
||||
#else
|
||||
if (i == -1) {
|
||||
KA_TRACE(
|
||||
100,
|
||||
("__kmp_affinity_set_init_mask: binding T#%d to __kmp_affin_fullMask\n",
|
||||
gtid));
|
||||
} else {
|
||||
KA_TRACE(100, ("__kmp_affinity_set_init_mask: binding T#%d to mask %d\n",
|
||||
gtid, i));
|
||||
}
|
||||
#endif /* OMP_40_ENABLED */
|
||||
|
||||
KMP_CPU_COPY(th->th.th_affin_mask, mask);
|
||||
|
||||
|
@ -4833,8 +4800,6 @@ void __kmp_affinity_set_init_mask(int gtid, int isa_root) {
|
|||
__kmp_set_system_affinity(th->th.th_affin_mask, TRUE);
|
||||
}
|
||||
|
||||
#if OMP_40_ENABLED
|
||||
|
||||
void __kmp_affinity_set_place(int gtid) {
|
||||
if (!KMP_AFFINITY_CAPABLE()) {
|
||||
return;
|
||||
|
@ -4875,8 +4840,6 @@ void __kmp_affinity_set_place(int gtid) {
|
|||
__kmp_set_system_affinity(th->th.th_affin_mask, TRUE);
|
||||
}
|
||||
|
||||
#endif /* OMP_40_ENABLED */
|
||||
|
||||
int __kmp_aux_set_affinity(void **mask) {
|
||||
int gtid;
|
||||
kmp_info_t *th;
|
||||
|
@ -4931,7 +4894,6 @@ int __kmp_aux_set_affinity(void **mask) {
|
|||
KMP_CPU_COPY(th->th.th_affin_mask, (kmp_affin_mask_t *)(*mask));
|
||||
}
|
||||
|
||||
#if OMP_40_ENABLED
|
||||
th->th.th_current_place = KMP_PLACE_UNDEFINED;
|
||||
th->th.th_new_place = KMP_PLACE_UNDEFINED;
|
||||
th->th.th_first_place = 0;
|
||||
|
@ -4939,7 +4901,6 @@ int __kmp_aux_set_affinity(void **mask) {
|
|||
|
||||
// Turn off 4.0 affinity for the current tread at this parallel level.
|
||||
th->th.th_current_task->td_icvs.proc_bind = proc_bind_false;
|
||||
#endif
|
||||
|
||||
return retval;
|
||||
}
|
||||
|
|
|
@ -33,7 +33,7 @@ typedef kmp_int64 bufsize;
|
|||
#endif
|
||||
#else
|
||||
typedef ssize_t bufsize;
|
||||
#endif
|
||||
#endif // KMP_OS_WINDOWS
|
||||
|
||||
/* The three modes of operation are, fifo search, lifo search, and best-fit */
|
||||
|
||||
|
@ -1220,7 +1220,6 @@ void ___kmp_thread_free(kmp_info_t *th, void *ptr KMP_SRC_LOC_DECL) {
|
|||
KE_TRACE(30, ("<- __kmp_thread_free()\n"));
|
||||
}
|
||||
|
||||
#if OMP_50_ENABLED
|
||||
/* OMP 5.0 Memory Management support */
|
||||
static const char *kmp_mk_lib_name;
|
||||
static void *h_memkind;
|
||||
|
@ -1630,8 +1629,6 @@ void __kmpc_free(int gtid, void *ptr, const omp_allocator_handle_t allocator) {
|
|||
allocator));
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
/* If LEAK_MEMORY is defined, __kmp_free() will *not* free memory. It causes
|
||||
memory leaks, but it may be useful for debugging memory corruptions, used
|
||||
freed pointers, etc. */
|
||||
|
|
|
@ -674,7 +674,7 @@ static inline void operator/=(kmp_cmplx128_a16_t &lhs,
|
|||
lhs.q /= rhs.q;
|
||||
}
|
||||
|
||||
#endif
|
||||
#endif // (KMP_ARCH_X86) && KMP_HAVE_QUAD
|
||||
|
||||
// ATOMIC implementation routines -----------------------------------------
|
||||
// One routine for each operation and operand type.
|
||||
|
@ -843,7 +843,7 @@ static inline void operator/=(kmp_cmplx128_a16_t &lhs,
|
|||
OP_CMPXCHG_WORKAROUND(TYPE, BITS, OP) \
|
||||
}
|
||||
// end of the second part of the workaround for C78287
|
||||
#endif
|
||||
#endif // USE_CMPXCHG_FIX
|
||||
|
||||
#else
|
||||
// -------------------------------------------------------------------------
|
||||
|
@ -1193,8 +1193,8 @@ MIN_MAX_CRITICAL(float16, max_a16, Quad_a16_t, <, 16r,
|
|||
1) // __kmpc_atomic_float16_max_a16
|
||||
MIN_MAX_CRITICAL(float16, min_a16, Quad_a16_t, >, 16r,
|
||||
1) // __kmpc_atomic_float16_min_a16
|
||||
#endif
|
||||
#endif
|
||||
#endif // (KMP_ARCH_X86)
|
||||
#endif // KMP_HAVE_QUAD
|
||||
// ------------------------------------------------------------------------
|
||||
// Need separate macros for .EQV. because of the need of complement (~)
|
||||
// OP ignored for critical sections, ^=~ used instead
|
||||
|
@ -1289,8 +1289,8 @@ ATOMIC_CRITICAL(float16, mul_a16, Quad_a16_t, *, 16r,
|
|||
1) // __kmpc_atomic_float16_mul_a16
|
||||
ATOMIC_CRITICAL(float16, div_a16, Quad_a16_t, /, 16r,
|
||||
1) // __kmpc_atomic_float16_div_a16
|
||||
#endif
|
||||
#endif
|
||||
#endif // (KMP_ARCH_X86)
|
||||
#endif // KMP_HAVE_QUAD
|
||||
// routines for complex types
|
||||
|
||||
#if USE_CMPXCHG_FIX
|
||||
|
@ -1341,10 +1341,8 @@ ATOMIC_CRITICAL(cmplx16, mul_a16, kmp_cmplx128_a16_t, *, 32c,
|
|||
1) // __kmpc_atomic_cmplx16_mul_a16
|
||||
ATOMIC_CRITICAL(cmplx16, div_a16, kmp_cmplx128_a16_t, /, 32c,
|
||||
1) // __kmpc_atomic_cmplx16_div_a16
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if OMP_40_ENABLED
|
||||
#endif // (KMP_ARCH_X86)
|
||||
#endif // KMP_HAVE_QUAD
|
||||
|
||||
// OpenMP 4.0: x = expr binop x for non-commutative operations.
|
||||
// Supported only on IA-32 architecture and Intel(R) 64
|
||||
|
@ -1523,8 +1521,8 @@ ATOMIC_CRITICAL_REV(float16, sub_a16, Quad_a16_t, -, 16r,
|
|||
1) // __kmpc_atomic_float16_sub_a16_rev
|
||||
ATOMIC_CRITICAL_REV(float16, div_a16, Quad_a16_t, /, 16r,
|
||||
1) // __kmpc_atomic_float16_div_a16_rev
|
||||
#endif
|
||||
#endif
|
||||
#endif // KMP_ARCH_X86
|
||||
#endif // KMP_HAVE_QUAD
|
||||
|
||||
// routines for complex types
|
||||
ATOMIC_CRITICAL_REV(cmplx4, sub, kmp_cmplx32, -, 8c,
|
||||
|
@ -1549,14 +1547,12 @@ ATOMIC_CRITICAL_REV(cmplx16, sub_a16, kmp_cmplx128_a16_t, -, 32c,
|
|||
1) // __kmpc_atomic_cmplx16_sub_a16_rev
|
||||
ATOMIC_CRITICAL_REV(cmplx16, div_a16, kmp_cmplx128_a16_t, /, 32c,
|
||||
1) // __kmpc_atomic_cmplx16_div_a16_rev
|
||||
#endif
|
||||
#endif
|
||||
#endif // KMP_ARCH_X86
|
||||
#endif // KMP_HAVE_QUAD
|
||||
|
||||
#endif // KMP_ARCH_X86 || KMP_ARCH_X86_64
|
||||
// End of OpenMP 4.0: x = expr binop x for non-commutative operations.
|
||||
|
||||
#endif // OMP_40_ENABLED
|
||||
|
||||
/* ------------------------------------------------------------------------ */
|
||||
/* Routines for mixed types of LHS and RHS, when RHS is "larger" */
|
||||
/* Note: in order to reduce the total number of types combinations */
|
||||
|
@ -1806,7 +1802,7 @@ ATOMIC_CRITICAL_REV_FP(float10, long double, div_rev, /, fp, _Quad, 10r,
|
|||
1) // __kmpc_atomic_float10_div_rev_fp
|
||||
#endif /* KMP_ARCH_X86 || KMP_ARCH_X86_64 */
|
||||
|
||||
#endif
|
||||
#endif // KMP_HAVE_QUAD
|
||||
|
||||
#if KMP_ARCH_X86 || KMP_ARCH_X86_64
|
||||
// ------------------------------------------------------------------------
|
||||
|
@ -2020,7 +2016,7 @@ ATOMIC_CRITICAL_READ_WRK(cmplx4, rd, kmp_cmplx32, +, 8c,
|
|||
#else
|
||||
ATOMIC_CRITICAL_READ(cmplx4, rd, kmp_cmplx32, +, 8c,
|
||||
1) // __kmpc_atomic_cmplx4_rd
|
||||
#endif
|
||||
#endif // (KMP_OS_WINDOWS)
|
||||
ATOMIC_CRITICAL_READ(cmplx8, rd, kmp_cmplx64, +, 16c,
|
||||
1) // __kmpc_atomic_cmplx8_rd
|
||||
ATOMIC_CRITICAL_READ(cmplx10, rd, kmp_cmplx80, +, 20c,
|
||||
|
@ -2033,8 +2029,8 @@ ATOMIC_CRITICAL_READ(float16, a16_rd, Quad_a16_t, +, 16r,
|
|||
1) // __kmpc_atomic_float16_a16_rd
|
||||
ATOMIC_CRITICAL_READ(cmplx16, a16_rd, kmp_cmplx128_a16_t, +, 32c,
|
||||
1) // __kmpc_atomic_cmplx16_a16_rd
|
||||
#endif
|
||||
#endif
|
||||
#endif // (KMP_ARCH_X86)
|
||||
#endif // KMP_HAVE_QUAD
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
// Atomic WRITE routines
|
||||
|
@ -2108,7 +2104,7 @@ ATOMIC_CMPXCHG_WR(fixed8, wr, kmp_int64, 64, =,
|
|||
#else
|
||||
ATOMIC_XCHG_WR(fixed8, wr, kmp_int64, 64, =,
|
||||
KMP_ARCH_X86) // __kmpc_atomic_fixed8_wr
|
||||
#endif
|
||||
#endif // (KMP_ARCH_X86)
|
||||
|
||||
ATOMIC_XCHG_FLOAT_WR(float4, wr, kmp_real32, 32, =,
|
||||
KMP_ARCH_X86) // __kmpc_atomic_float4_wr
|
||||
|
@ -2118,14 +2114,14 @@ ATOMIC_CMPXCHG_WR(float8, wr, kmp_real64, 64, =,
|
|||
#else
|
||||
ATOMIC_XCHG_FLOAT_WR(float8, wr, kmp_real64, 64, =,
|
||||
KMP_ARCH_X86) // __kmpc_atomic_float8_wr
|
||||
#endif
|
||||
#endif // (KMP_ARCH_X86)
|
||||
|
||||
ATOMIC_CRITICAL_WR(float10, wr, long double, =, 10r,
|
||||
1) // __kmpc_atomic_float10_wr
|
||||
#if KMP_HAVE_QUAD
|
||||
ATOMIC_CRITICAL_WR(float16, wr, QUAD_LEGACY, =, 16r,
|
||||
1) // __kmpc_atomic_float16_wr
|
||||
#endif
|
||||
#endif // KMP_HAVE_QUAD
|
||||
ATOMIC_CRITICAL_WR(cmplx4, wr, kmp_cmplx32, =, 8c, 1) // __kmpc_atomic_cmplx4_wr
|
||||
ATOMIC_CRITICAL_WR(cmplx8, wr, kmp_cmplx64, =, 16c,
|
||||
1) // __kmpc_atomic_cmplx8_wr
|
||||
|
@ -2139,8 +2135,8 @@ ATOMIC_CRITICAL_WR(float16, a16_wr, Quad_a16_t, =, 16r,
|
|||
1) // __kmpc_atomic_float16_a16_wr
|
||||
ATOMIC_CRITICAL_WR(cmplx16, a16_wr, kmp_cmplx128_a16_t, =, 32c,
|
||||
1) // __kmpc_atomic_cmplx16_a16_wr
|
||||
#endif
|
||||
#endif
|
||||
#endif // (KMP_ARCH_X86)
|
||||
#endif // KMP_HAVE_QUAD
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
// Atomic CAPTURE routines
|
||||
|
@ -2660,8 +2656,8 @@ MIN_MAX_CRITICAL_CPT(float16, max_a16_cpt, Quad_a16_t, <, 16r,
|
|||
1) // __kmpc_atomic_float16_max_a16_cpt
|
||||
MIN_MAX_CRITICAL_CPT(float16, min_a16_cpt, Quad_a16_t, >, 16r,
|
||||
1) // __kmpc_atomic_float16_mix_a16_cpt
|
||||
#endif
|
||||
#endif
|
||||
#endif // (KMP_ARCH_X86)
|
||||
#endif // KMP_HAVE_QUAD
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
#ifdef KMP_GOMP_COMPAT
|
||||
|
@ -2785,8 +2781,8 @@ ATOMIC_CRITICAL_CPT(float16, mul_a16_cpt, Quad_a16_t, *, 16r,
|
|||
1) // __kmpc_atomic_float16_mul_a16_cpt
|
||||
ATOMIC_CRITICAL_CPT(float16, div_a16_cpt, Quad_a16_t, /, 16r,
|
||||
1) // __kmpc_atomic_float16_div_a16_cpt
|
||||
#endif
|
||||
#endif
|
||||
#endif // (KMP_ARCH_X86)
|
||||
#endif // KMP_HAVE_QUAD
|
||||
|
||||
// routines for complex types
|
||||
|
||||
|
@ -2834,10 +2830,8 @@ ATOMIC_CRITICAL_CPT(cmplx16, mul_a16_cpt, kmp_cmplx128_a16_t, *, 32c,
|
|||
1) // __kmpc_atomic_cmplx16_mul_a16_cpt
|
||||
ATOMIC_CRITICAL_CPT(cmplx16, div_a16_cpt, kmp_cmplx128_a16_t, /, 32c,
|
||||
1) // __kmpc_atomic_cmplx16_div_a16_cpt
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if OMP_40_ENABLED
|
||||
#endif // (KMP_ARCH_X86)
|
||||
#endif // KMP_HAVE_QUAD
|
||||
|
||||
// OpenMP 4.0: v = x = expr binop x; { v = x; x = expr binop x; } { x = expr
|
||||
// binop x; v = x; } for non-commutative operations.
|
||||
|
@ -3000,8 +2994,8 @@ ATOMIC_CRITICAL_CPT_REV(float16, sub_a16_cpt_rev, Quad_a16_t, -, 16r,
|
|||
1) // __kmpc_atomic_float16_sub_a16_cpt_rev
|
||||
ATOMIC_CRITICAL_CPT_REV(float16, div_a16_cpt_rev, Quad_a16_t, /, 16r,
|
||||
1) // __kmpc_atomic_float16_div_a16_cpt_rev
|
||||
#endif
|
||||
#endif
|
||||
#endif // (KMP_ARCH_X86)
|
||||
#endif // KMP_HAVE_QUAD
|
||||
|
||||
// routines for complex types
|
||||
|
||||
|
@ -3067,8 +3061,8 @@ ATOMIC_CRITICAL_CPT_REV(cmplx16, sub_a16_cpt_rev, kmp_cmplx128_a16_t, -, 32c,
|
|||
1) // __kmpc_atomic_cmplx16_sub_a16_cpt_rev
|
||||
ATOMIC_CRITICAL_CPT_REV(cmplx16, div_a16_cpt_rev, kmp_cmplx128_a16_t, /, 32c,
|
||||
1) // __kmpc_atomic_cmplx16_div_a16_cpt_rev
|
||||
#endif
|
||||
#endif
|
||||
#endif // (KMP_ARCH_X86)
|
||||
#endif // KMP_HAVE_QUAD
|
||||
|
||||
// Capture reverse for mixed type: RHS=float16
|
||||
#if KMP_HAVE_QUAD
|
||||
|
@ -3247,7 +3241,7 @@ ATOMIC_CMPXCHG_SWP(float8, kmp_real64, 64,
|
|||
ATOMIC_XCHG_SWP(fixed8, kmp_int64, 64, KMP_ARCH_X86) // __kmpc_atomic_fixed8_swp
|
||||
ATOMIC_XCHG_FLOAT_SWP(float8, kmp_real64, 64,
|
||||
KMP_ARCH_X86) // __kmpc_atomic_float8_swp
|
||||
#endif
|
||||
#endif // (KMP_ARCH_X86)
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
// Routines for Extended types: long double, _Quad, complex flavours (use
|
||||
|
@ -3302,7 +3296,7 @@ ATOMIC_XCHG_FLOAT_SWP(float8, kmp_real64, 64,
|
|||
ATOMIC_CRITICAL_SWP(float10, long double, 10r, 1) // __kmpc_atomic_float10_swp
|
||||
#if KMP_HAVE_QUAD
|
||||
ATOMIC_CRITICAL_SWP(float16, QUAD_LEGACY, 16r, 1) // __kmpc_atomic_float16_swp
|
||||
#endif
|
||||
#endif // KMP_HAVE_QUAD
|
||||
// cmplx4 routine to return void
|
||||
ATOMIC_CRITICAL_SWP_WRK(cmplx4, kmp_cmplx32, 8c, 1) // __kmpc_atomic_cmplx4_swp
|
||||
|
||||
|
@ -3318,13 +3312,11 @@ ATOMIC_CRITICAL_SWP(float16_a16, Quad_a16_t, 16r,
|
|||
1) // __kmpc_atomic_float16_a16_swp
|
||||
ATOMIC_CRITICAL_SWP(cmplx16_a16, kmp_cmplx128_a16_t, 32c,
|
||||
1) // __kmpc_atomic_cmplx16_a16_swp
|
||||
#endif
|
||||
#endif
|
||||
#endif // (KMP_ARCH_X86)
|
||||
#endif // KMP_HAVE_QUAD
|
||||
|
||||
// End of OpenMP 4.0 Capture
|
||||
|
||||
#endif // OMP_40_ENABLED
|
||||
|
||||
#endif // KMP_ARCH_X86 || KMP_ARCH_X86_64
|
||||
|
||||
#undef OP_CRITICAL
|
||||
|
@ -3341,7 +3333,7 @@ void __kmpc_atomic_1(ident_t *id_ref, int gtid, void *lhs, void *rhs,
|
|||
FALSE /* must use lock */
|
||||
#else
|
||||
TRUE
|
||||
#endif
|
||||
#endif // KMP_ARCH_X86 && defined(KMP_GOMP_COMPAT)
|
||||
) {
|
||||
kmp_int8 old_value, new_value;
|
||||
|
||||
|
@ -3388,7 +3380,7 @@ void __kmpc_atomic_2(ident_t *id_ref, int gtid, void *lhs, void *rhs,
|
|||
TRUE /* no alignment problems */
|
||||
#else
|
||||
!((kmp_uintptr_t)lhs & 0x1) /* make sure address is 2-byte aligned */
|
||||
#endif
|
||||
#endif // KMP_ARCH_X86 && defined(KMP_GOMP_COMPAT)
|
||||
) {
|
||||
kmp_int16 old_value, new_value;
|
||||
|
||||
|
@ -3437,7 +3429,7 @@ void __kmpc_atomic_4(ident_t *id_ref, int gtid, void *lhs, void *rhs,
|
|||
TRUE /* no alignment problems */
|
||||
#else
|
||||
!((kmp_uintptr_t)lhs & 0x3) /* make sure address is 4-byte aligned */
|
||||
#endif
|
||||
#endif // KMP_ARCH_X86 || KMP_ARCH_X86_64
|
||||
) {
|
||||
kmp_int32 old_value, new_value;
|
||||
|
||||
|
@ -3487,7 +3479,7 @@ void __kmpc_atomic_8(ident_t *id_ref, int gtid, void *lhs, void *rhs,
|
|||
TRUE /* no alignment problems */
|
||||
#else
|
||||
!((kmp_uintptr_t)lhs & 0x7) /* make sure address is 8-byte aligned */
|
||||
#endif
|
||||
#endif // KMP_ARCH_X86 && defined(KMP_GOMP_COMPAT)
|
||||
) {
|
||||
kmp_int64 old_value, new_value;
|
||||
|
||||
|
|
|
@ -687,8 +687,6 @@ void __kmpc_atomic_cmplx16_div_a16(ident_t *id_ref, int gtid,
|
|||
#endif
|
||||
#endif
|
||||
|
||||
#if OMP_40_ENABLED
|
||||
|
||||
// OpenMP 4.0: x = expr binop x for non-commutative operations.
|
||||
// Supported only on IA-32 architecture and Intel(R) 64
|
||||
#if KMP_ARCH_X86 || KMP_ARCH_X86_64
|
||||
|
@ -793,8 +791,6 @@ void __kmpc_atomic_cmplx16_div_a16_rev(ident_t *id_ref, int gtid,
|
|||
|
||||
#endif // KMP_ARCH_X86 || KMP_ARCH_X86_64
|
||||
|
||||
#endif // OMP_40_ENABLED
|
||||
|
||||
// routines for mixed types
|
||||
|
||||
// RHS=float8
|
||||
|
@ -1403,8 +1399,6 @@ kmp_cmplx128_a16_t __kmpc_atomic_cmplx16_div_a16_cpt(ident_t *id_ref, int gtid,
|
|||
void __kmpc_atomic_start(void);
|
||||
void __kmpc_atomic_end(void);
|
||||
|
||||
#if OMP_40_ENABLED
|
||||
|
||||
// OpenMP 4.0: v = x = expr binop x; { v = x; x = expr binop x; } { x = expr
|
||||
// binop x; v = x; } for non-commutative operations.
|
||||
|
||||
|
@ -1760,8 +1754,6 @@ long double __kmpc_atomic_float10_div_cpt_rev_fp(ident_t *id_ref, int gtid,
|
|||
|
||||
// End of OpenMP 4.0 capture
|
||||
|
||||
#endif // OMP_40_ENABLED
|
||||
|
||||
#endif // KMP_ARCH_X86 || KMP_ARCH_X86_64
|
||||
|
||||
/* ------------------------------------------------------------------------ */
|
||||
|
|
|
@ -869,12 +869,10 @@ static void __kmp_hierarchical_barrier_gather(
|
|||
kmp_uint64 new_state;
|
||||
|
||||
int level = team->t.t_level;
|
||||
#if OMP_40_ENABLED
|
||||
if (other_threads[0]
|
||||
->th.th_teams_microtask) // are we inside the teams construct?
|
||||
if (this_thr->th.th_teams_size.nteams > 1)
|
||||
++level; // level was not increased in teams construct for team_of_masters
|
||||
#endif
|
||||
if (level == 1)
|
||||
thr_bar->use_oncore_barrier = 1;
|
||||
else
|
||||
|
@ -1099,7 +1097,6 @@ static void __kmp_hierarchical_barrier_release(
|
|||
|
||||
nproc = this_thr->th.th_team_nproc;
|
||||
int level = team->t.t_level;
|
||||
#if OMP_40_ENABLED
|
||||
if (team->t.t_threads[0]
|
||||
->th.th_teams_microtask) { // are we inside the teams construct?
|
||||
if (team->t.t_pkfn != (microtask_t)__kmp_teams_master &&
|
||||
|
@ -1108,7 +1105,6 @@ static void __kmp_hierarchical_barrier_release(
|
|||
if (this_thr->th.th_teams_size.nteams > 1)
|
||||
++level; // level was not increased in teams construct for team_of_masters
|
||||
}
|
||||
#endif
|
||||
if (level == 1)
|
||||
thr_bar->use_oncore_barrier = 1;
|
||||
else
|
||||
|
@ -1425,7 +1421,6 @@ static int __kmp_barrier_template(enum barrier_type bt, int gtid, int is_split,
|
|||
team->t.t_bar[bt].b_team_arrived += 1;
|
||||
#endif
|
||||
|
||||
#if OMP_40_ENABLED
|
||||
if (__kmp_omp_cancellation) {
|
||||
kmp_int32 cancel_request = KMP_ATOMIC_LD_RLX(&team->t.t_cancel_request);
|
||||
// Reset cancellation flag for worksharing constructs
|
||||
|
@ -1434,7 +1429,6 @@ static int __kmp_barrier_template(enum barrier_type bt, int gtid, int is_split,
|
|||
KMP_ATOMIC_ST_RLX(&team->t.t_cancel_request, cancel_noreq);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#if USE_ITT_BUILD
|
||||
/* TODO: In case of split reduction barrier, master thread may send
|
||||
acquired event early, before the final summation into the shared
|
||||
|
@ -1447,9 +1441,7 @@ static int __kmp_barrier_template(enum barrier_type bt, int gtid, int is_split,
|
|||
// Barrier - report frame end (only if active_level == 1)
|
||||
if ((__itt_frame_submit_v3_ptr || KMP_ITT_DEBUG) &&
|
||||
__kmp_forkjoin_frames_mode &&
|
||||
#if OMP_40_ENABLED
|
||||
this_thr->th.th_teams_microtask == NULL &&
|
||||
#endif
|
||||
team->t.t_active_level == 1) {
|
||||
ident_t *loc = __kmp_threads[gtid]->th.th_ident;
|
||||
kmp_uint64 cur_time = __itt_get_timestamp();
|
||||
|
@ -1540,7 +1532,6 @@ static int __kmp_barrier_template(enum barrier_type bt, int gtid, int is_split,
|
|||
} else { // Team is serialized.
|
||||
status = 0;
|
||||
if (__kmp_tasking_mode != tskm_immediate_exec) {
|
||||
#if OMP_45_ENABLED
|
||||
if (this_thr->th.th_task_team != NULL) {
|
||||
#if USE_ITT_NOTIFY
|
||||
void *itt_sync_obj = NULL;
|
||||
|
@ -1560,12 +1551,6 @@ static int __kmp_barrier_template(enum barrier_type bt, int gtid, int is_split,
|
|||
__kmp_itt_barrier_finished(gtid, itt_sync_obj);
|
||||
#endif /* USE_ITT_BUILD */
|
||||
}
|
||||
#else
|
||||
// The task team should be NULL for serialized code (tasks will be
|
||||
// executed immediately)
|
||||
KMP_DEBUG_ASSERT(team->t.t_task_team[this_thr->th.th_task_state] == NULL);
|
||||
KMP_DEBUG_ASSERT(this_thr->th.th_task_team == NULL);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
KA_TRACE(15, ("__kmp_barrier: T#%d(%d:%d) is leaving with return value %d\n",
|
||||
|
@ -1816,11 +1801,9 @@ void __kmp_join_barrier(int gtid) {
|
|||
if (__kmp_tasking_mode != tskm_immediate_exec) {
|
||||
__kmp_task_team_wait(this_thr, team USE_ITT_BUILD_ARG(itt_sync_obj));
|
||||
}
|
||||
#if OMP_50_ENABLED
|
||||
if (__kmp_display_affinity) {
|
||||
KMP_CHECK_UPDATE(team->t.t_display_affinity, 0);
|
||||
}
|
||||
#endif
|
||||
#if KMP_STATS_ENABLED
|
||||
// Have master thread flag the workers to indicate they are now waiting for
|
||||
// next parallel region, Also wake them up so they switch their timers to
|
||||
|
@ -1844,10 +1827,7 @@ void __kmp_join_barrier(int gtid) {
|
|||
#if USE_ITT_BUILD && USE_ITT_NOTIFY
|
||||
// Join barrier - report frame end
|
||||
if ((__itt_frame_submit_v3_ptr || KMP_ITT_DEBUG) &&
|
||||
__kmp_forkjoin_frames_mode &&
|
||||
#if OMP_40_ENABLED
|
||||
this_thr->th.th_teams_microtask == NULL &&
|
||||
#endif
|
||||
__kmp_forkjoin_frames_mode && this_thr->th.th_teams_microtask == NULL &&
|
||||
team->t.t_active_level == 1) {
|
||||
kmp_uint64 cur_time = __itt_get_timestamp();
|
||||
ident_t *loc = team->t.t_ident;
|
||||
|
@ -2088,17 +2068,13 @@ void __kmp_fork_barrier(int gtid, int tid) {
|
|||
__kmp_task_team_sync(this_thr, team);
|
||||
}
|
||||
|
||||
#if OMP_40_ENABLED && KMP_AFFINITY_SUPPORTED
|
||||
#if KMP_AFFINITY_SUPPORTED
|
||||
kmp_proc_bind_t proc_bind = team->t.t_proc_bind;
|
||||
if (proc_bind == proc_bind_intel) {
|
||||
#endif
|
||||
#if KMP_AFFINITY_SUPPORTED
|
||||
// Call dynamic affinity settings
|
||||
if (__kmp_affinity_type == affinity_balanced && team->t.t_size_changed) {
|
||||
__kmp_balanced_affinity(this_thr, team->t.t_nproc);
|
||||
}
|
||||
#endif // KMP_AFFINITY_SUPPORTED
|
||||
#if OMP_40_ENABLED && KMP_AFFINITY_SUPPORTED
|
||||
} else if (proc_bind != proc_bind_false) {
|
||||
if (this_thr->th.th_new_place == this_thr->th.th_current_place) {
|
||||
KA_TRACE(100, ("__kmp_fork_barrier: T#%d already in correct place %d\n",
|
||||
|
@ -2108,8 +2084,7 @@ void __kmp_fork_barrier(int gtid, int tid) {
|
|||
__kmp_affinity_set_place(gtid);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#if OMP_50_ENABLED
|
||||
#endif // KMP_AFFINITY_SUPPORTED
|
||||
// Perform the display affinity functionality
|
||||
if (__kmp_display_affinity) {
|
||||
if (team->t.t_display_affinity
|
||||
|
@ -2125,7 +2100,6 @@ void __kmp_fork_barrier(int gtid, int tid) {
|
|||
}
|
||||
if (!KMP_MASTER_TID(tid))
|
||||
KMP_CHECK_UPDATE(this_thr->th.th_def_allocator, team->t.t_def_allocator);
|
||||
#endif
|
||||
|
||||
#if USE_ITT_BUILD && USE_ITT_NOTIFY
|
||||
if (__itt_sync_create_ptr || KMP_ITT_DEBUG) {
|
||||
|
|
|
@ -15,8 +15,6 @@
|
|||
#include "ompt-specific.h"
|
||||
#endif
|
||||
|
||||
#if OMP_40_ENABLED
|
||||
|
||||
/*!
|
||||
@ingroup CANCELLATION
|
||||
@param loc_ref location of the original task directive
|
||||
|
@ -71,7 +69,7 @@ kmp_int32 __kmpc_cancel(ident_t *loc_ref, kmp_int32 gtid, kmp_int32 cncl_kind) {
|
|||
task_data, type | ompt_cancel_activated,
|
||||
OMPT_GET_RETURN_ADDRESS(0));
|
||||
}
|
||||
#endif
|
||||
#endif // OMPT_SUPPORT && OMPT_OPTIONAL
|
||||
return 1 /* true */;
|
||||
}
|
||||
break;
|
||||
|
@ -331,5 +329,3 @@ int __kmp_get_cancellation_status(int cancel_kind) {
|
|||
|
||||
return 0 /* false */;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
@ -64,11 +64,6 @@
|
|||
#define KMP_LIBRARY_FILE "@LIBOMP_LIB_FILE@"
|
||||
#define KMP_VERSION_MAJOR @LIBOMP_VERSION_MAJOR@
|
||||
#define KMP_VERSION_MINOR @LIBOMP_VERSION_MINOR@
|
||||
#define LIBOMP_OMP_VERSION @LIBOMP_OMP_VERSION@
|
||||
#define OMP_50_ENABLED (LIBOMP_OMP_VERSION >= 50)
|
||||
#define OMP_45_ENABLED (LIBOMP_OMP_VERSION >= 45)
|
||||
#define OMP_40_ENABLED (LIBOMP_OMP_VERSION >= 40)
|
||||
#define OMP_30_ENABLED (LIBOMP_OMP_VERSION >= 30)
|
||||
#cmakedefine01 LIBOMP_TSAN_SUPPORT
|
||||
#if LIBOMP_TSAN_SUPPORT
|
||||
#define TSAN_SUPPORT
|
||||
|
|
|
@ -244,8 +244,6 @@ void __kmpc_pop_num_threads(ident_t *loc, kmp_int32 global_tid) {
|
|||
/* the num_threads are automatically popped */
|
||||
}
|
||||
|
||||
#if OMP_40_ENABLED
|
||||
|
||||
void __kmpc_push_proc_bind(ident_t *loc, kmp_int32 global_tid,
|
||||
kmp_int32 proc_bind) {
|
||||
KA_TRACE(20, ("__kmpc_push_proc_bind: enter T#%d proc_bind=%d\n", global_tid,
|
||||
|
@ -254,8 +252,6 @@ void __kmpc_push_proc_bind(ident_t *loc, kmp_int32 global_tid,
|
|||
__kmp_push_proc_bind(loc, global_tid, (kmp_proc_bind_t)proc_bind);
|
||||
}
|
||||
|
||||
#endif /* OMP_40_ENABLED */
|
||||
|
||||
/*!
|
||||
@ingroup PARALLEL
|
||||
@param loc source location information
|
||||
|
@ -344,7 +340,6 @@ void __kmpc_fork_call(ident_t *loc, kmp_int32 argc, kmpc_micro microtask, ...) {
|
|||
#endif // KMP_STATS_ENABLED
|
||||
}
|
||||
|
||||
#if OMP_40_ENABLED
|
||||
/*!
|
||||
@ingroup PARALLEL
|
||||
@param loc source location information
|
||||
|
@ -462,7 +457,6 @@ void __kmpc_fork_teams(ident_t *loc, kmp_int32 argc, kmpc_micro microtask,
|
|||
}
|
||||
#endif // KMP_STATS_ENABLED
|
||||
}
|
||||
#endif /* OMP_40_ENABLED */
|
||||
|
||||
// I don't think this function should ever have been exported.
|
||||
// The __kmpc_ prefix was misapplied. I'm fairly certain that no generated
|
||||
|
@ -516,20 +510,15 @@ void __kmpc_end_serialized_parallel(ident_t *loc, kmp_int32 global_tid) {
|
|||
if (!TCR_4(__kmp_init_parallel))
|
||||
__kmp_parallel_initialize();
|
||||
|
||||
#if OMP_50_ENABLED
|
||||
__kmp_resume_if_soft_paused();
|
||||
#endif
|
||||
|
||||
this_thr = __kmp_threads[global_tid];
|
||||
serial_team = this_thr->th.th_serial_team;
|
||||
|
||||
#if OMP_45_ENABLED
|
||||
kmp_task_team_t *task_team = this_thr->th.th_task_team;
|
||||
|
||||
// we need to wait for the proxy tasks before finishing the thread
|
||||
if (task_team != NULL && task_team->tt.tt_found_proxy_tasks)
|
||||
__kmp_task_team_wait(this_thr, serial_team USE_ITT_BUILD_ARG(NULL));
|
||||
#endif
|
||||
|
||||
KMP_MB();
|
||||
KMP_DEBUG_ASSERT(serial_team);
|
||||
|
@ -584,9 +573,7 @@ void __kmpc_end_serialized_parallel(ident_t *loc, kmp_int32 global_tid) {
|
|||
serial_team->t.t_dispatch->th_disp_buffer->next;
|
||||
__kmp_free(disp_buffer);
|
||||
}
|
||||
#if OMP_50_ENABLED
|
||||
this_thr->th.th_def_allocator = serial_team->t.t_def_allocator; // restore
|
||||
#endif
|
||||
|
||||
--serial_team->t.t_serialized;
|
||||
if (serial_team->t.t_serialized == 0) {
|
||||
|
@ -731,15 +718,12 @@ void __kmpc_barrier(ident_t *loc, kmp_int32 global_tid) {
|
|||
if (!TCR_4(__kmp_init_parallel))
|
||||
__kmp_parallel_initialize();
|
||||
|
||||
#if OMP_50_ENABLED
|
||||
__kmp_resume_if_soft_paused();
|
||||
#endif
|
||||
|
||||
if (__kmp_env_consistency_check) {
|
||||
if (loc == 0) {
|
||||
KMP_WARNING(ConstructIdentInvalid); // ??? What does it mean for the user?
|
||||
}
|
||||
|
||||
__kmp_check_barrier(global_tid, ct_barrier, loc);
|
||||
}
|
||||
|
||||
|
@ -783,9 +767,7 @@ kmp_int32 __kmpc_master(ident_t *loc, kmp_int32 global_tid) {
|
|||
if (!TCR_4(__kmp_init_parallel))
|
||||
__kmp_parallel_initialize();
|
||||
|
||||
#if OMP_50_ENABLED
|
||||
__kmp_resume_if_soft_paused();
|
||||
#endif
|
||||
|
||||
if (KMP_MASTER_GTID(global_tid)) {
|
||||
KMP_COUNT_BLOCK(OMP_MASTER);
|
||||
|
@ -877,9 +859,7 @@ void __kmpc_ordered(ident_t *loc, kmp_int32 gtid) {
|
|||
if (!TCR_4(__kmp_init_parallel))
|
||||
__kmp_parallel_initialize();
|
||||
|
||||
#if OMP_50_ENABLED
|
||||
__kmp_resume_if_soft_paused();
|
||||
#endif
|
||||
|
||||
#if USE_ITT_BUILD
|
||||
__kmp_itt_ordered_prep(gtid);
|
||||
|
@ -1634,9 +1614,7 @@ kmp_int32 __kmpc_barrier_master(ident_t *loc, kmp_int32 global_tid) {
|
|||
if (!TCR_4(__kmp_init_parallel))
|
||||
__kmp_parallel_initialize();
|
||||
|
||||
#if OMP_50_ENABLED
|
||||
__kmp_resume_if_soft_paused();
|
||||
#endif
|
||||
|
||||
if (__kmp_env_consistency_check)
|
||||
__kmp_check_barrier(global_tid, ct_barrier, loc);
|
||||
|
@ -1696,9 +1674,7 @@ kmp_int32 __kmpc_barrier_master_nowait(ident_t *loc, kmp_int32 global_tid) {
|
|||
if (!TCR_4(__kmp_init_parallel))
|
||||
__kmp_parallel_initialize();
|
||||
|
||||
#if OMP_50_ENABLED
|
||||
__kmp_resume_if_soft_paused();
|
||||
#endif
|
||||
|
||||
if (__kmp_env_consistency_check) {
|
||||
if (loc == 0) {
|
||||
|
@ -1919,7 +1895,6 @@ int ompc_get_team_size(int level) {
|
|||
return __kmp_get_team_size(__kmp_entry_gtid(), level);
|
||||
}
|
||||
|
||||
#if OMP_50_ENABLED
|
||||
/* OpenMP 5.0 Affinity Format API */
|
||||
|
||||
void ompc_set_affinity_format(char const *format) {
|
||||
|
@ -1970,7 +1945,6 @@ size_t ompc_capture_affinity(char *buffer, size_t buf_size,
|
|||
__kmp_str_buf_free(&capture_buf);
|
||||
return num_required;
|
||||
}
|
||||
#endif /* OMP_50_ENABLED */
|
||||
|
||||
void kmpc_set_stacksize(int arg) {
|
||||
// __kmp_aux_set_stacksize initializes the library if needed
|
||||
|
@ -3345,7 +3319,6 @@ __kmp_end_critical_section_reduce_block(ident_t *loc, kmp_int32 global_tid,
|
|||
#endif // KMP_USE_DYNAMIC_LOCK
|
||||
} // __kmp_end_critical_section_reduce_block
|
||||
|
||||
#if OMP_40_ENABLED
|
||||
static __forceinline int
|
||||
__kmp_swap_teams_for_teams_reduction(kmp_info_t *th, kmp_team_t **team_p,
|
||||
int *task_state) {
|
||||
|
@ -3380,7 +3353,6 @@ __kmp_restore_swapped_teams(kmp_info_t *th, kmp_team_t *team, int task_state) {
|
|||
th->th.th_task_team = team->t.t_task_team[task_state];
|
||||
th->th.th_task_state = task_state;
|
||||
}
|
||||
#endif
|
||||
|
||||
/* 2.a.i. Reduce Block without a terminating barrier */
|
||||
/*!
|
||||
|
@ -3407,11 +3379,9 @@ __kmpc_reduce_nowait(ident_t *loc, kmp_int32 global_tid, kmp_int32 num_vars,
|
|||
KMP_COUNT_BLOCK(REDUCE_nowait);
|
||||
int retval = 0;
|
||||
PACKED_REDUCTION_METHOD_T packed_reduction_method;
|
||||
#if OMP_40_ENABLED
|
||||
kmp_info_t *th;
|
||||
kmp_team_t *team;
|
||||
int teams_swapped = 0, task_state;
|
||||
#endif
|
||||
KA_TRACE(10, ("__kmpc_reduce_nowait() enter: called T#%d\n", global_tid));
|
||||
|
||||
// why do we need this initialization here at all?
|
||||
|
@ -3423,9 +3393,7 @@ __kmpc_reduce_nowait(ident_t *loc, kmp_int32 global_tid, kmp_int32 num_vars,
|
|||
if (!TCR_4(__kmp_init_parallel))
|
||||
__kmp_parallel_initialize();
|
||||
|
||||
#if OMP_50_ENABLED
|
||||
__kmp_resume_if_soft_paused();
|
||||
#endif
|
||||
|
||||
// check correctness of reduce block nesting
|
||||
#if KMP_USE_DYNAMIC_LOCK
|
||||
|
@ -3436,10 +3404,8 @@ __kmpc_reduce_nowait(ident_t *loc, kmp_int32 global_tid, kmp_int32 num_vars,
|
|||
__kmp_push_sync(global_tid, ct_reduce, loc, NULL);
|
||||
#endif
|
||||
|
||||
#if OMP_40_ENABLED
|
||||
th = __kmp_thread_from_gtid(global_tid);
|
||||
teams_swapped = __kmp_swap_teams_for_teams_reduction(th, &team, &task_state);
|
||||
#endif // OMP_40_ENABLED
|
||||
|
||||
// packed_reduction_method value will be reused by __kmp_end_reduce* function,
|
||||
// the value should be kept in a variable
|
||||
|
@ -3540,11 +3506,9 @@ __kmpc_reduce_nowait(ident_t *loc, kmp_int32 global_tid, kmp_int32 num_vars,
|
|||
// should never reach this block
|
||||
KMP_ASSERT(0); // "unexpected method"
|
||||
}
|
||||
#if OMP_40_ENABLED
|
||||
if (teams_swapped) {
|
||||
__kmp_restore_swapped_teams(th, team, task_state);
|
||||
}
|
||||
#endif
|
||||
KA_TRACE(
|
||||
10,
|
||||
("__kmpc_reduce_nowait() exit: called T#%d: method %08x, returns %08x\n",
|
||||
|
@ -3630,11 +3594,9 @@ kmp_int32 __kmpc_reduce(ident_t *loc, kmp_int32 global_tid, kmp_int32 num_vars,
|
|||
KMP_COUNT_BLOCK(REDUCE_wait);
|
||||
int retval = 0;
|
||||
PACKED_REDUCTION_METHOD_T packed_reduction_method;
|
||||
#if OMP_40_ENABLED
|
||||
kmp_info_t *th;
|
||||
kmp_team_t *team;
|
||||
int teams_swapped = 0, task_state;
|
||||
#endif
|
||||
|
||||
KA_TRACE(10, ("__kmpc_reduce() enter: called T#%d\n", global_tid));
|
||||
|
||||
|
@ -3647,9 +3609,7 @@ kmp_int32 __kmpc_reduce(ident_t *loc, kmp_int32 global_tid, kmp_int32 num_vars,
|
|||
if (!TCR_4(__kmp_init_parallel))
|
||||
__kmp_parallel_initialize();
|
||||
|
||||
#if OMP_50_ENABLED
|
||||
__kmp_resume_if_soft_paused();
|
||||
#endif
|
||||
|
||||
// check correctness of reduce block nesting
|
||||
#if KMP_USE_DYNAMIC_LOCK
|
||||
|
@ -3660,10 +3620,8 @@ kmp_int32 __kmpc_reduce(ident_t *loc, kmp_int32 global_tid, kmp_int32 num_vars,
|
|||
__kmp_push_sync(global_tid, ct_reduce, loc, NULL);
|
||||
#endif
|
||||
|
||||
#if OMP_40_ENABLED
|
||||
th = __kmp_thread_from_gtid(global_tid);
|
||||
teams_swapped = __kmp_swap_teams_for_teams_reduction(th, &team, &task_state);
|
||||
#endif // OMP_40_ENABLED
|
||||
|
||||
packed_reduction_method = __kmp_determine_reduction_method(
|
||||
loc, global_tid, num_vars, reduce_size, reduce_data, reduce_func, lck);
|
||||
|
@ -3726,16 +3684,13 @@ kmp_int32 __kmpc_reduce(ident_t *loc, kmp_int32 global_tid, kmp_int32 num_vars,
|
|||
// should never reach this block
|
||||
KMP_ASSERT(0); // "unexpected method"
|
||||
}
|
||||
#if OMP_40_ENABLED
|
||||
if (teams_swapped) {
|
||||
__kmp_restore_swapped_teams(th, team, task_state);
|
||||
}
|
||||
#endif
|
||||
|
||||
KA_TRACE(10,
|
||||
("__kmpc_reduce() exit: called T#%d: method %08x, returns %08x\n",
|
||||
global_tid, packed_reduction_method, retval));
|
||||
|
||||
return retval;
|
||||
}
|
||||
|
||||
|
@ -3753,18 +3708,14 @@ void __kmpc_end_reduce(ident_t *loc, kmp_int32 global_tid,
|
|||
kmp_critical_name *lck) {
|
||||
|
||||
PACKED_REDUCTION_METHOD_T packed_reduction_method;
|
||||
#if OMP_40_ENABLED
|
||||
kmp_info_t *th;
|
||||
kmp_team_t *team;
|
||||
int teams_swapped = 0, task_state;
|
||||
#endif
|
||||
|
||||
KA_TRACE(10, ("__kmpc_end_reduce() enter: called T#%d\n", global_tid));
|
||||
|
||||
#if OMP_40_ENABLED
|
||||
th = __kmp_thread_from_gtid(global_tid);
|
||||
teams_swapped = __kmp_swap_teams_for_teams_reduction(th, &team, &task_state);
|
||||
#endif // OMP_40_ENABLED
|
||||
|
||||
packed_reduction_method = __KMP_GET_REDUCTION_METHOD(global_tid);
|
||||
|
||||
|
@ -3772,7 +3723,6 @@ void __kmpc_end_reduce(ident_t *loc, kmp_int32 global_tid,
|
|||
// tool (it's a terminating barrier on constructs if NOWAIT not specified)
|
||||
|
||||
if (packed_reduction_method == critical_reduce_block) {
|
||||
|
||||
__kmp_end_critical_section_reduce_block(loc, global_tid, lck);
|
||||
|
||||
// TODO: implicit barrier: should be exposed
|
||||
|
@ -3853,11 +3803,9 @@ void __kmpc_end_reduce(ident_t *loc, kmp_int32 global_tid,
|
|||
// should never reach this block
|
||||
KMP_ASSERT(0); // "unexpected method"
|
||||
}
|
||||
#if OMP_40_ENABLED
|
||||
if (teams_swapped) {
|
||||
__kmp_restore_swapped_teams(th, team, task_state);
|
||||
}
|
||||
#endif
|
||||
|
||||
if (__kmp_env_consistency_check)
|
||||
__kmp_pop_sync(global_tid, ct_reduce, loc);
|
||||
|
@ -3903,7 +3851,6 @@ kmp_uint64 __kmpc_get_parent_taskid() {
|
|||
|
||||
} // __kmpc_get_parent_taskid
|
||||
|
||||
#if OMP_45_ENABLED
|
||||
/*!
|
||||
@ingroup WORK_SHARING
|
||||
@param loc source location information.
|
||||
|
@ -4215,9 +4162,7 @@ void __kmpc_doacross_fini(ident_t *loc, int gtid) {
|
|||
pr_buf->th_doacross_info = NULL;
|
||||
KA_TRACE(20, ("__kmpc_doacross_fini() exit: T#%d\n", gtid));
|
||||
}
|
||||
#endif
|
||||
|
||||
#if OMP_50_ENABLED
|
||||
/* omp_alloc/omp_free only defined for C/C++, not for Fortran */
|
||||
void *omp_alloc(size_t size, omp_allocator_handle_t allocator) {
|
||||
return __kmpc_alloc(__kmp_entry_gtid(), size, allocator);
|
||||
|
@ -4240,6 +4185,3 @@ int __kmpc_pause_resource(kmp_pause_status_t level) {
|
|||
}
|
||||
return __kmp_pause_resource(level);
|
||||
}
|
||||
#endif // OMP_50_ENABLED
|
||||
|
||||
// end of file //
|
||||
|
|
|
@ -101,13 +101,11 @@ kmp_omp_struct_info_t __kmp_omp_debug_struct_info = {
|
|||
offset_and_size_of(kmp_base_info_t, th_bar),
|
||||
offset_and_size_of(kmp_bstate_t, b_worker_arrived),
|
||||
|
||||
#if OMP_40_ENABLED
|
||||
// teams information
|
||||
offset_and_size_of(kmp_base_info_t, th_teams_microtask),
|
||||
offset_and_size_of(kmp_base_info_t, th_teams_level),
|
||||
offset_and_size_of(kmp_teams_size_t, nteams),
|
||||
offset_and_size_of(kmp_teams_size_t, nth),
|
||||
#endif
|
||||
|
||||
// kmp_desc structure (for info field above)
|
||||
sizeof(kmp_desc_base_t),
|
||||
|
@ -133,9 +131,7 @@ kmp_omp_struct_info_t __kmp_omp_debug_struct_info = {
|
|||
offset_and_size_of(kmp_base_team_t, t_pkfn),
|
||||
offset_and_size_of(kmp_base_team_t, t_task_team),
|
||||
offset_and_size_of(kmp_base_team_t, t_implicit_task_taskdata),
|
||||
#if OMP_40_ENABLED
|
||||
offset_and_size_of(kmp_base_team_t, t_cancel_request),
|
||||
#endif
|
||||
offset_and_size_of(kmp_base_team_t, t_bar),
|
||||
offset_and_size_of(kmp_balign_team_t, b_master_arrived),
|
||||
offset_and_size_of(kmp_balign_team_t, b_team_arrived),
|
||||
|
@ -195,7 +191,6 @@ kmp_omp_struct_info_t __kmp_omp_debug_struct_info = {
|
|||
offset_and_size_of(kmp_taskdata_t, td_taskwait_counter),
|
||||
offset_and_size_of(kmp_taskdata_t, td_taskwait_thread),
|
||||
|
||||
#if OMP_40_ENABLED
|
||||
offset_and_size_of(kmp_taskdata_t, td_taskgroup),
|
||||
offset_and_size_of(kmp_taskgroup_t, count),
|
||||
offset_and_size_of(kmp_taskgroup_t, cancel_request),
|
||||
|
@ -207,7 +202,6 @@ kmp_omp_struct_info_t __kmp_omp_debug_struct_info = {
|
|||
offset_and_size_of(kmp_base_depnode_t, task),
|
||||
offset_and_size_of(kmp_base_depnode_t, npredecessors),
|
||||
offset_and_size_of(kmp_base_depnode_t, nrefs),
|
||||
#endif
|
||||
offset_and_size_of(kmp_task_t, routine),
|
||||
|
||||
// thread_data_t.
|
||||
|
|
|
@ -133,13 +133,10 @@ void __kmp_dispatch_init_algorithm(ident_t *loc, int gtid,
|
|||
active = !team->t.t_serialized;
|
||||
|
||||
#if USE_ITT_BUILD
|
||||
int itt_need_metadata_reporting = __itt_metadata_add_ptr &&
|
||||
__kmp_forkjoin_frames_mode == 3 &&
|
||||
KMP_MASTER_GTID(gtid) &&
|
||||
#if OMP_40_ENABLED
|
||||
th->th.th_teams_microtask == NULL &&
|
||||
#endif
|
||||
team->t.t_active_level == 1;
|
||||
int itt_need_metadata_reporting =
|
||||
__itt_metadata_add_ptr && __kmp_forkjoin_frames_mode == 3 &&
|
||||
KMP_MASTER_GTID(gtid) && th->th.th_teams_microtask == NULL &&
|
||||
team->t.t_active_level == 1;
|
||||
#endif
|
||||
|
||||
#if KMP_USE_HIER_SCHED
|
||||
|
@ -244,7 +241,6 @@ void __kmp_dispatch_init_algorithm(ident_t *loc, int gtid,
|
|||
schedule = kmp_sch_guided_iterative_chunked;
|
||||
KMP_WARNING(DispatchManyThreads);
|
||||
}
|
||||
#if OMP_45_ENABLED
|
||||
if (schedule == kmp_sch_runtime_simd) {
|
||||
// compiler provides simd_width in the chunk parameter
|
||||
schedule = team->t.t_sched.r_sched_type;
|
||||
|
@ -278,7 +274,6 @@ void __kmp_dispatch_init_algorithm(ident_t *loc, int gtid,
|
|||
}
|
||||
#endif
|
||||
}
|
||||
#endif // OMP_45_ENABLED
|
||||
pr->u.p.parm1 = chunk;
|
||||
}
|
||||
KMP_ASSERT2((kmp_sch_lower < schedule && schedule < kmp_sch_upper),
|
||||
|
@ -461,7 +456,6 @@ void __kmp_dispatch_init_algorithm(ident_t *loc, int gtid,
|
|||
}
|
||||
break;
|
||||
} // case
|
||||
#if OMP_45_ENABLED
|
||||
case kmp_sch_static_balanced_chunked: {
|
||||
// similar to balanced, but chunk adjusted to multiple of simd width
|
||||
T nth = nproc;
|
||||
|
@ -476,7 +470,6 @@ void __kmp_dispatch_init_algorithm(ident_t *loc, int gtid,
|
|||
break;
|
||||
} // case
|
||||
case kmp_sch_guided_simd:
|
||||
#endif // OMP_45_ENABLED
|
||||
case kmp_sch_guided_iterative_chunked: {
|
||||
KD_TRACE(
|
||||
100,
|
||||
|
@ -783,9 +776,7 @@ __kmp_dispatch_init(ident_t *loc, int gtid, enum sched_type schedule, T lb,
|
|||
if (!TCR_4(__kmp_init_parallel))
|
||||
__kmp_parallel_initialize();
|
||||
|
||||
#if OMP_50_ENABLED
|
||||
__kmp_resume_if_soft_paused();
|
||||
#endif
|
||||
|
||||
#if INCLUDE_SSC_MARKS
|
||||
SSC_MARK_DISPATCH_INIT();
|
||||
|
@ -851,13 +842,10 @@ __kmp_dispatch_init(ident_t *loc, int gtid, enum sched_type schedule, T lb,
|
|||
|
||||
#if USE_ITT_BUILD
|
||||
kmp_uint64 cur_chunk = chunk;
|
||||
int itt_need_metadata_reporting = __itt_metadata_add_ptr &&
|
||||
__kmp_forkjoin_frames_mode == 3 &&
|
||||
KMP_MASTER_GTID(gtid) &&
|
||||
#if OMP_40_ENABLED
|
||||
th->th.th_teams_microtask == NULL &&
|
||||
#endif
|
||||
team->t.t_active_level == 1;
|
||||
int itt_need_metadata_reporting =
|
||||
__itt_metadata_add_ptr && __kmp_forkjoin_frames_mode == 3 &&
|
||||
KMP_MASTER_GTID(gtid) && th->th.th_teams_microtask == NULL &&
|
||||
team->t.t_active_level == 1;
|
||||
#endif
|
||||
if (!active) {
|
||||
pr = reinterpret_cast<dispatch_private_info_template<T> *>(
|
||||
|
@ -933,9 +921,7 @@ __kmp_dispatch_init(ident_t *loc, int gtid, enum sched_type schedule, T lb,
|
|||
break;
|
||||
case kmp_sch_guided_iterative_chunked:
|
||||
case kmp_sch_guided_analytical_chunked:
|
||||
#if OMP_45_ENABLED
|
||||
case kmp_sch_guided_simd:
|
||||
#endif
|
||||
schedtype = 2;
|
||||
break;
|
||||
default:
|
||||
|
@ -1594,7 +1580,6 @@ int __kmp_dispatch_next_algorithm(int gtid,
|
|||
} // case
|
||||
break;
|
||||
|
||||
#if OMP_45_ENABLED
|
||||
case kmp_sch_guided_simd: {
|
||||
// same as iterative but curr-chunk adjusted to be multiple of given
|
||||
// chunk
|
||||
|
@ -1667,7 +1652,6 @@ int __kmp_dispatch_next_algorithm(int gtid,
|
|||
} // if
|
||||
} // case
|
||||
break;
|
||||
#endif // OMP_45_ENABLED
|
||||
|
||||
case kmp_sch_guided_analytical_chunked: {
|
||||
T chunkspec = pr->u.p.parm1;
|
||||
|
@ -2203,10 +2187,8 @@ static void __kmp_dist_get_bounds(ident_t *loc, kmp_int32 gtid,
|
|||
}
|
||||
th = __kmp_threads[gtid];
|
||||
team = th->th.th_team;
|
||||
#if OMP_40_ENABLED
|
||||
KMP_DEBUG_ASSERT(th->th.th_teams_microtask); // we are in the teams construct
|
||||
nteams = th->th.th_teams_size.nteams;
|
||||
#endif
|
||||
team_id = team->t.t_master_tid;
|
||||
KMP_DEBUG_ASSERT(nteams == (kmp_uint32)team->t.t_parent->t.t_nproc);
|
||||
|
||||
|
|
|
@ -171,11 +171,9 @@ template <typename T> struct dispatch_shared_info_template {
|
|||
dispatch_shared_info64_t s64;
|
||||
} u;
|
||||
volatile kmp_uint32 buffer_index;
|
||||
#if OMP_45_ENABLED
|
||||
volatile kmp_int32 doacross_buf_idx; // teamwise index
|
||||
kmp_uint32 *doacross_flags; // array of iteration flags (0/1)
|
||||
kmp_int32 doacross_num_done; // count finished threads
|
||||
#endif
|
||||
#if KMP_USE_HIER_SCHED
|
||||
kmp_hier_t<T> *hier;
|
||||
#endif
|
||||
|
|
|
@ -941,9 +941,7 @@ void __kmp_dispatch_init_hierarchy(ident_t *loc, int n,
|
|||
KMP_DEBUG_ASSERT(new_chunks);
|
||||
if (!TCR_4(__kmp_init_parallel))
|
||||
__kmp_parallel_initialize();
|
||||
#if OMP_50_ENABLED
|
||||
__kmp_resume_if_soft_paused();
|
||||
#endif
|
||||
|
||||
th = __kmp_threads[gtid];
|
||||
team = th->th.th_team;
|
||||
|
|
|
@ -20,11 +20,9 @@
|
|||
|
||||
#include "kmp_i18n.h"
|
||||
|
||||
#if OMP_50_ENABLED
|
||||
// For affinity format functions
|
||||
#include "kmp_io.h"
|
||||
#include "kmp_str.h"
|
||||
#endif
|
||||
|
||||
#if OMPT_SUPPORT
|
||||
#include "ompt-specific.h"
|
||||
|
@ -349,7 +347,6 @@ int FTN_STDCALL KMP_EXPAND_NAME(FTN_GET_MAX_THREADS)(void) {
|
|||
#endif
|
||||
}
|
||||
|
||||
#if OMP_50_ENABLED
|
||||
int FTN_STDCALL FTN_CONTROL_TOOL(int command, int modifier, void *arg) {
|
||||
#if defined(KMP_STUB) || !OMPT_SUPPORT
|
||||
return -2;
|
||||
|
@ -526,7 +523,6 @@ size_t FTN_STDCALL FTN_CAPTURE_AFFINITY(char *buffer, char const *format,
|
|||
return num_required;
|
||||
#endif
|
||||
}
|
||||
#endif /* OMP_50_ENABLED */
|
||||
|
||||
int FTN_STDCALL KMP_EXPAND_NAME(FTN_GET_THREAD_NUM)(void) {
|
||||
#ifdef KMP_STUB
|
||||
|
@ -651,7 +647,6 @@ int FTN_STDCALL KMP_EXPAND_NAME(FTN_IN_PARALLEL)(void) {
|
|||
return 0;
|
||||
#else
|
||||
kmp_info_t *th = __kmp_entry_thread();
|
||||
#if OMP_40_ENABLED
|
||||
if (th->th.th_teams_microtask) {
|
||||
// AC: r_in_parallel does not work inside teams construct where real
|
||||
// parallel is inactive, but all threads have same root, so setting it in
|
||||
|
@ -659,7 +654,6 @@ int FTN_STDCALL KMP_EXPAND_NAME(FTN_IN_PARALLEL)(void) {
|
|||
// The solution is to use per-team nesting level
|
||||
return (th->th.th_team->t.t_active_level ? 1 : 0);
|
||||
} else
|
||||
#endif /* OMP_40_ENABLED */
|
||||
return (th->th.th_root->r.r_in_parallel ? FTN_TRUE : FTN_FALSE);
|
||||
#endif
|
||||
}
|
||||
|
@ -764,8 +758,6 @@ int FTN_STDCALL KMP_EXPAND_NAME(FTN_IN_FINAL)(void) {
|
|||
#endif
|
||||
}
|
||||
|
||||
#if OMP_40_ENABLED
|
||||
|
||||
kmp_proc_bind_t FTN_STDCALL KMP_EXPAND_NAME(FTN_GET_PROC_BIND)(void) {
|
||||
#ifdef KMP_STUB
|
||||
return __kmps_get_proc_bind();
|
||||
|
@ -774,7 +766,6 @@ kmp_proc_bind_t FTN_STDCALL KMP_EXPAND_NAME(FTN_GET_PROC_BIND)(void) {
|
|||
#endif
|
||||
}
|
||||
|
||||
#if OMP_45_ENABLED
|
||||
int FTN_STDCALL KMP_EXPAND_NAME(FTN_GET_NUM_PLACES)(void) {
|
||||
#if defined(KMP_STUB) || !KMP_AFFINITY_SUPPORTED
|
||||
return 0;
|
||||
|
@ -912,7 +903,6 @@ void
|
|||
}
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
int FTN_STDCALL KMP_EXPAND_NAME(FTN_GET_NUM_TEAMS)(void) {
|
||||
#ifdef KMP_STUB
|
||||
|
@ -972,11 +962,6 @@ int FTN_STDCALL KMP_EXPAND_NAME(FTN_IS_INITIAL_DEVICE)(void) {
|
|||
return 1; // This is the host
|
||||
}
|
||||
|
||||
#endif // OMP_40_ENABLED
|
||||
|
||||
#if OMP_45_ENABLED
|
||||
// OpenMP 4.5 entries
|
||||
|
||||
// libomptarget, if loaded, provides this function
|
||||
int FTN_STDCALL FTN_GET_INITIAL_DEVICE(void) KMP_WEAK_ATTRIBUTE;
|
||||
int FTN_STDCALL FTN_GET_INITIAL_DEVICE(void) {
|
||||
|
@ -1025,7 +1010,6 @@ int FTN_STDCALL FTN_TARGET_DISASSOCIATE_PTR(void *host_ptr, int device_num) {
|
|||
return -1;
|
||||
}
|
||||
#endif // defined(KMP_STUB)
|
||||
#endif // OMP_45_ENABLED
|
||||
|
||||
#ifdef KMP_STUB
|
||||
typedef enum { UNINIT = -1, UNLOCKED, LOCKED } kmp_stub_lock_t;
|
||||
|
@ -1298,7 +1282,6 @@ void FTN_STDCALL FTN_SET_DEFAULTS(char const *str
|
|||
|
||||
/* ------------------------------------------------------------------------ */
|
||||
|
||||
#if OMP_40_ENABLED
|
||||
/* returns the status of cancellation */
|
||||
int FTN_STDCALL KMP_EXPAND_NAME(FTN_GET_CANCELLATION)(void) {
|
||||
#ifdef KMP_STUB
|
||||
|
@ -1320,9 +1303,6 @@ int FTN_STDCALL FTN_GET_CANCELLATION_STATUS(int cancel_kind) {
|
|||
#endif
|
||||
}
|
||||
|
||||
#endif // OMP_40_ENABLED
|
||||
|
||||
#if OMP_45_ENABLED
|
||||
/* returns the maximum allowed task priority */
|
||||
int FTN_STDCALL KMP_EXPAND_NAME(FTN_GET_MAX_TASK_PRIORITY)(void) {
|
||||
#ifdef KMP_STUB
|
||||
|
@ -1334,9 +1314,7 @@ int FTN_STDCALL KMP_EXPAND_NAME(FTN_GET_MAX_TASK_PRIORITY)(void) {
|
|||
return __kmp_max_task_priority;
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
#if OMP_50_ENABLED
|
||||
// This function will be defined in libomptarget. When libomptarget is not
|
||||
// loaded, we assume we are on the host and return KMP_HOST_DEVICE.
|
||||
// Compiler/libomptarget will handle this if called inside target.
|
||||
|
@ -1393,8 +1371,6 @@ void FTN_STDCALL FTN_FULFILL_EVENT(kmp_event_t *event) {
|
|||
#endif
|
||||
}
|
||||
|
||||
#endif // OMP_50_ENABLED
|
||||
|
||||
// GCC compatibility (versioned symbols)
|
||||
#ifdef KMP_USE_VERSION_SYMBOLS
|
||||
|
||||
|
@ -1469,7 +1445,6 @@ KMP_VERSION_SYMBOL(FTN_TEST_NEST_LOCK, 30, "OMP_3.0");
|
|||
// OMP_3.1 versioned symbol
|
||||
KMP_VERSION_SYMBOL(FTN_IN_FINAL, 31, "OMP_3.1");
|
||||
|
||||
#if OMP_40_ENABLED
|
||||
// OMP_4.0 versioned symbols
|
||||
KMP_VERSION_SYMBOL(FTN_GET_PROC_BIND, 40, "OMP_4.0");
|
||||
KMP_VERSION_SYMBOL(FTN_GET_NUM_TEAMS, 40, "OMP_4.0");
|
||||
|
@ -1479,9 +1454,7 @@ KMP_VERSION_SYMBOL(FTN_GET_DEFAULT_DEVICE, 40, "OMP_4.0");
|
|||
KMP_VERSION_SYMBOL(FTN_SET_DEFAULT_DEVICE, 40, "OMP_4.0");
|
||||
KMP_VERSION_SYMBOL(FTN_IS_INITIAL_DEVICE, 40, "OMP_4.0");
|
||||
KMP_VERSION_SYMBOL(FTN_GET_NUM_DEVICES, 40, "OMP_4.0");
|
||||
#endif /* OMP_40_ENABLED */
|
||||
|
||||
#if OMP_45_ENABLED
|
||||
// OMP_4.5 versioned symbols
|
||||
KMP_VERSION_SYMBOL(FTN_GET_MAX_TASK_PRIORITY, 45, "OMP_4.5");
|
||||
KMP_VERSION_SYMBOL(FTN_GET_NUM_PLACES, 45, "OMP_4.5");
|
||||
|
@ -1491,16 +1464,13 @@ KMP_VERSION_SYMBOL(FTN_GET_PLACE_NUM, 45, "OMP_4.5");
|
|||
KMP_VERSION_SYMBOL(FTN_GET_PARTITION_NUM_PLACES, 45, "OMP_4.5");
|
||||
KMP_VERSION_SYMBOL(FTN_GET_PARTITION_PLACE_NUMS, 45, "OMP_4.5");
|
||||
// KMP_VERSION_SYMBOL(FTN_GET_INITIAL_DEVICE, 45, "OMP_4.5");
|
||||
#endif
|
||||
|
||||
#if OMP_50_ENABLED
|
||||
// OMP_5.0 versioned symbols
|
||||
// KMP_VERSION_SYMBOL(FTN_GET_DEVICE_NUM, 50, "OMP_5.0");
|
||||
// KMP_VERSION_SYMBOL(FTN_PAUSE_RESOURCE, 50, "OMP_5.0");
|
||||
// KMP_VERSION_SYMBOL(FTN_PAUSE_RESOURCE_ALL, 50, "OMP_5.0");
|
||||
// KMP_VERSION_SYMBOL(FTN_GET_SUPPORTED_ACTIVE_LEVELS, 50, "OMP_5.0");
|
||||
// KMP_VERSION_SYMBOL(FTN_FULFILL_EVENT, 50, "OMP_5.0");
|
||||
#endif
|
||||
|
||||
#endif // KMP_USE_VERSION_SYMBOLS
|
||||
|
||||
|
|
|
@ -71,10 +71,8 @@
|
|||
#define FTN_GET_TEAM_SIZE omp_get_team_size
|
||||
#define FTN_IN_FINAL omp_in_final
|
||||
#define FTN_GET_PROC_BIND omp_get_proc_bind
|
||||
#if OMP_40_ENABLED
|
||||
#define FTN_GET_NUM_TEAMS omp_get_num_teams
|
||||
#define FTN_GET_TEAM_NUM omp_get_team_num
|
||||
#endif
|
||||
#define FTN_INIT_LOCK omp_init_lock
|
||||
#if KMP_USE_DYNAMIC_LOCK
|
||||
#define FTN_INIT_LOCK_WITH_HINT omp_init_lock_with_hint
|
||||
|
@ -96,19 +94,14 @@
|
|||
#define FTN_GET_WTIME omp_get_wtime
|
||||
#define FTN_GET_WTICK omp_get_wtick
|
||||
|
||||
#if OMP_40_ENABLED
|
||||
#define FTN_GET_NUM_DEVICES omp_get_num_devices
|
||||
#define FTN_GET_DEFAULT_DEVICE omp_get_default_device
|
||||
#define FTN_SET_DEFAULT_DEVICE omp_set_default_device
|
||||
#define FTN_IS_INITIAL_DEVICE omp_is_initial_device
|
||||
#endif
|
||||
|
||||
#if OMP_40_ENABLED
|
||||
#define FTN_GET_CANCELLATION omp_get_cancellation
|
||||
#define FTN_GET_CANCELLATION_STATUS kmp_get_cancellation_status
|
||||
#endif
|
||||
|
||||
#if OMP_45_ENABLED
|
||||
#define FTN_GET_MAX_TASK_PRIORITY omp_get_max_task_priority
|
||||
#define FTN_GET_NUM_PLACES omp_get_num_places
|
||||
#define FTN_GET_PLACE_NUM_PROCS omp_get_place_num_procs
|
||||
|
@ -126,9 +119,7 @@
|
|||
#define FTN_TARGET_ASSOCIATE_PTR omp_target_associate_ptr
|
||||
#define FTN_TARGET_DISASSOCIATE_PTR omp_target_disassociate_ptr
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if OMP_50_ENABLED
|
||||
#define FTN_CONTROL_TOOL omp_control_tool
|
||||
#define FTN_INIT_ALLOCATOR omp_init_allocator
|
||||
#define FTN_DESTROY_ALLOCATOR omp_destroy_allocator
|
||||
|
@ -143,7 +134,6 @@
|
|||
#define FTN_PAUSE_RESOURCE_ALL omp_pause_resource_all
|
||||
#define FTN_GET_SUPPORTED_ACTIVE_LEVELS omp_get_supported_active_levels
|
||||
#define FTN_FULFILL_EVENT omp_fulfill_event
|
||||
#endif
|
||||
|
||||
#endif /* KMP_FTN_PLAIN */
|
||||
|
||||
|
@ -202,10 +192,8 @@
|
|||
#define FTN_GET_TEAM_SIZE omp_get_team_size_
|
||||
#define FTN_IN_FINAL omp_in_final_
|
||||
#define FTN_GET_PROC_BIND omp_get_proc_bind_
|
||||
#if OMP_40_ENABLED
|
||||
#define FTN_GET_NUM_TEAMS omp_get_num_teams_
|
||||
#define FTN_GET_TEAM_NUM omp_get_team_num_
|
||||
#endif
|
||||
#define FTN_INIT_LOCK omp_init_lock_
|
||||
#if KMP_USE_DYNAMIC_LOCK
|
||||
#define FTN_INIT_LOCK_WITH_HINT omp_init_lock_with_hint_
|
||||
|
@ -227,19 +215,14 @@
|
|||
#define FTN_GET_WTIME omp_get_wtime_
|
||||
#define FTN_GET_WTICK omp_get_wtick_
|
||||
|
||||
#if OMP_40_ENABLED
|
||||
#define FTN_GET_NUM_DEVICES omp_get_num_devices_
|
||||
#define FTN_GET_DEFAULT_DEVICE omp_get_default_device_
|
||||
#define FTN_SET_DEFAULT_DEVICE omp_set_default_device_
|
||||
#define FTN_IS_INITIAL_DEVICE omp_is_initial_device_
|
||||
#endif
|
||||
|
||||
#if OMP_40_ENABLED
|
||||
#define FTN_GET_CANCELLATION omp_get_cancellation_
|
||||
#define FTN_GET_CANCELLATION_STATUS kmp_get_cancellation_status_
|
||||
#endif
|
||||
|
||||
#if OMP_45_ENABLED
|
||||
#define FTN_GET_MAX_TASK_PRIORITY omp_get_max_task_priority_
|
||||
#define FTN_GET_NUM_PLACES omp_get_num_places_
|
||||
#define FTN_GET_PLACE_NUM_PROCS omp_get_place_num_procs_
|
||||
|
@ -257,9 +240,7 @@
|
|||
#define FTN_TARGET_ASSOCIATE_PTR omp_target_associate_ptr_
|
||||
#define FTN_TARGET_DISASSOCIATE_PTR omp_target_disassociate_ptr_
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if OMP_50_ENABLED
|
||||
#define FTN_CONTROL_TOOL omp_control_tool_
|
||||
#define FTN_INIT_ALLOCATOR omp_init_allocator_
|
||||
#define FTN_DESTROY_ALLOCATOR omp_destroy_allocator_
|
||||
|
@ -276,7 +257,6 @@
|
|||
#define FTN_PAUSE_RESOURCE_ALL omp_pause_resource_all_
|
||||
#define FTN_GET_SUPPORTED_ACTIVE_LEVELS omp_get_supported_active_levels_
|
||||
#define FTN_FULFILL_EVENT omp_fulfill_event_
|
||||
#endif
|
||||
|
||||
#endif /* KMP_FTN_APPEND */
|
||||
|
||||
|
@ -335,10 +315,8 @@
|
|||
#define FTN_GET_TEAM_SIZE OMP_GET_TEAM_SIZE
|
||||
#define FTN_IN_FINAL OMP_IN_FINAL
|
||||
#define FTN_GET_PROC_BIND OMP_GET_PROC_BIND
|
||||
#if OMP_40_ENABLED
|
||||
#define FTN_GET_NUM_TEAMS OMP_GET_NUM_TEAMS
|
||||
#define FTN_GET_TEAM_NUM OMP_GET_TEAM_NUM
|
||||
#endif
|
||||
#define FTN_INIT_LOCK OMP_INIT_LOCK
|
||||
#if KMP_USE_DYNAMIC_LOCK
|
||||
#define FTN_INIT_LOCK_WITH_HINT OMP_INIT_LOCK_WITH_HINT
|
||||
|
@ -360,19 +338,14 @@
|
|||
#define FTN_GET_WTIME OMP_GET_WTIME
|
||||
#define FTN_GET_WTICK OMP_GET_WTICK
|
||||
|
||||
#if OMP_40_ENABLED
|
||||
#define FTN_GET_NUM_DEVICES OMP_GET_NUM_DEVICES
|
||||
#define FTN_GET_DEFAULT_DEVICE OMP_GET_DEFAULT_DEVICE
|
||||
#define FTN_SET_DEFAULT_DEVICE OMP_SET_DEFAULT_DEVICE
|
||||
#define FTN_IS_INITIAL_DEVICE OMP_IS_INITIAL_DEVICE
|
||||
#endif
|
||||
|
||||
#if OMP_40_ENABLED
|
||||
#define FTN_GET_CANCELLATION OMP_GET_CANCELLATION
|
||||
#define FTN_GET_CANCELLATION_STATUS KMP_GET_CANCELLATION_STATUS
|
||||
#endif
|
||||
|
||||
#if OMP_45_ENABLED
|
||||
#define FTN_GET_MAX_TASK_PRIORITY OMP_GET_MAX_TASK_PRIORITY
|
||||
#define FTN_GET_NUM_PLACES OMP_GET_NUM_PLACES
|
||||
#define FTN_GET_PLACE_NUM_PROCS OMP_GET_PLACE_NUM_PROCS
|
||||
|
@ -390,9 +363,7 @@
|
|||
#define FTN_TARGET_ASSOCIATE_PTR OMP_TARGET_ASSOCIATE_PTR
|
||||
#define FTN_TARGET_DISASSOCIATE_PTR OMP_TARGET_DISASSOCIATE_PTR
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if OMP_50_ENABLED
|
||||
#define FTN_CONTROL_TOOL OMP_CONTROL_TOOL
|
||||
#define FTN_INIT_ALLOCATOR OMP_INIT_ALLOCATOR
|
||||
#define FTN_DESTROY_ALLOCATOR OMP_DESTROY_ALLOCATOR
|
||||
|
@ -407,7 +378,6 @@
|
|||
#define FTN_PAUSE_RESOURCE_ALL OMP_PAUSE_RESOURCE_ALL
|
||||
#define FTN_GET_SUPPORTED_ACTIVE_LEVELS OMP_GET_SUPPORTED_ACTIVE_LEVELS
|
||||
#define FTN_FULFILL_EVENT OMP_FULFILL_EVENT
|
||||
#endif
|
||||
|
||||
#endif /* KMP_FTN_UPPER */
|
||||
|
||||
|
@ -466,10 +436,8 @@
|
|||
#define FTN_GET_TEAM_SIZE OMP_GET_TEAM_SIZE_
|
||||
#define FTN_IN_FINAL OMP_IN_FINAL_
|
||||
#define FTN_GET_PROC_BIND OMP_GET_PROC_BIND_
|
||||
#if OMP_40_ENABLED
|
||||
#define FTN_GET_NUM_TEAMS OMP_GET_NUM_TEAMS_
|
||||
#define FTN_GET_TEAM_NUM OMP_GET_TEAM_NUM_
|
||||
#endif
|
||||
#define FTN_INIT_LOCK OMP_INIT_LOCK_
|
||||
#if KMP_USE_DYNAMIC_LOCK
|
||||
#define FTN_INIT_LOCK_WITH_HINT OMP_INIT_LOCK_WITH_HINT_
|
||||
|
@ -491,19 +459,14 @@
|
|||
#define FTN_GET_WTIME OMP_GET_WTIME_
|
||||
#define FTN_GET_WTICK OMP_GET_WTICK_
|
||||
|
||||
#if OMP_40_ENABLED
|
||||
#define FTN_GET_NUM_DEVICES OMP_GET_NUM_DEVICES_
|
||||
#define FTN_GET_DEFAULT_DEVICE OMP_GET_DEFAULT_DEVICE_
|
||||
#define FTN_SET_DEFAULT_DEVICE OMP_SET_DEFAULT_DEVICE_
|
||||
#define FTN_IS_INITIAL_DEVICE OMP_IS_INITIAL_DEVICE_
|
||||
#endif
|
||||
|
||||
#if OMP_40_ENABLED
|
||||
#define FTN_GET_CANCELLATION OMP_GET_CANCELLATION_
|
||||
#define FTN_GET_CANCELLATION_STATUS KMP_GET_CANCELLATION_STATUS_
|
||||
#endif
|
||||
|
||||
#if OMP_45_ENABLED
|
||||
#define FTN_GET_MAX_TASK_PRIORITY OMP_GET_MAX_TASK_PRIORITY_
|
||||
#define FTN_GET_NUM_PLACES OMP_GET_NUM_PLACES_
|
||||
#define FTN_GET_PLACE_NUM_PROCS OMP_GET_PLACE_NUM_PROCS_
|
||||
|
@ -521,9 +484,7 @@
|
|||
#define FTN_TARGET_ASSOCIATE_PTR OMP_TARGET_ASSOCIATE_PTR_
|
||||
#define FTN_TARGET_DISASSOCIATE_PTR OMP_TARGET_DISASSOCIATE_PTR_
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if OMP_50_ENABLED
|
||||
#define FTN_CONTROL_TOOL OMP_CONTROL_TOOL_
|
||||
#define FTN_INIT_ALLOCATOR OMP_INIT_ALLOCATOR_
|
||||
#define FTN_DESTROY_ALLOCATOR OMP_DESTROY_ALLOCATOR_
|
||||
|
@ -540,7 +501,6 @@
|
|||
#define FTN_PAUSE_RESOURCE_ALL OMP_PAUSE_RESOURCE_ALL_
|
||||
#define FTN_GET_SUPPORTED_ACTIVE_LEVELS OMP_GET_SUPPORTED_ACTIVE_LEVELS_
|
||||
#define FTN_FULFILL_EVENT OMP_FULFILL_EVENT_
|
||||
#endif
|
||||
|
||||
#endif /* KMP_FTN_UAPPEND */
|
||||
|
||||
|
|
|
@ -202,11 +202,9 @@ const char *__kmp_speculative_statsfile = "-";
|
|||
|
||||
#endif // KMP_USE_ADAPTIVE_LOCKS
|
||||
|
||||
#if OMP_40_ENABLED
|
||||
int __kmp_display_env = FALSE;
|
||||
int __kmp_display_env_verbose = FALSE;
|
||||
int __kmp_omp_cancellation = FALSE;
|
||||
#endif
|
||||
|
||||
/* map OMP 3.0 schedule types with our internal schedule types */
|
||||
enum sched_type __kmp_sch_map[kmp_sched_upper - kmp_sched_lower_ext +
|
||||
|
@ -270,15 +268,10 @@ char *__kmp_cpuinfo_file = NULL;
|
|||
|
||||
#endif /* KMP_AFFINITY_SUPPORTED */
|
||||
|
||||
#if OMP_40_ENABLED
|
||||
kmp_nested_proc_bind_t __kmp_nested_proc_bind = {NULL, 0, 0};
|
||||
int __kmp_affinity_num_places = 0;
|
||||
#endif
|
||||
|
||||
#if OMP_50_ENABLED
|
||||
int __kmp_display_affinity = FALSE;
|
||||
char *__kmp_affinity_format = NULL;
|
||||
#endif // OMP_50_ENABLED
|
||||
|
||||
kmp_hws_item_t __kmp_hws_socket = {0, 0};
|
||||
kmp_hws_item_t __kmp_hws_node = {0, 0};
|
||||
|
@ -288,17 +281,12 @@ kmp_hws_item_t __kmp_hws_proc = {0, 0};
|
|||
int __kmp_hws_requested = 0;
|
||||
int __kmp_hws_abs_flag = 0; // absolute or per-item number requested
|
||||
|
||||
#if OMP_40_ENABLED
|
||||
kmp_int32 __kmp_default_device = 0;
|
||||
#endif
|
||||
|
||||
kmp_tasking_mode_t __kmp_tasking_mode = tskm_task_teams;
|
||||
#if OMP_45_ENABLED
|
||||
kmp_int32 __kmp_max_task_priority = 0;
|
||||
kmp_uint64 __kmp_taskloop_min_tasks = 0;
|
||||
#endif
|
||||
|
||||
#if OMP_50_ENABLED
|
||||
int __kmp_memkind_available = 0;
|
||||
omp_allocator_handle_t const omp_null_allocator = NULL;
|
||||
omp_allocator_handle_t const omp_default_mem_alloc =
|
||||
|
@ -331,7 +319,6 @@ omp_memspace_handle_t const omp_high_bw_mem_space =
|
|||
(omp_memspace_handle_t const)3;
|
||||
omp_memspace_handle_t const omp_low_lat_mem_space =
|
||||
(omp_memspace_handle_t const)4;
|
||||
#endif
|
||||
|
||||
/* This check ensures that the compiler is passing the correct data type for the
|
||||
flags formal parameter of the function kmpc_omp_task_alloc(). If the type is
|
||||
|
@ -539,11 +526,9 @@ int _You_must_link_with_Intel_OpenMP_library = 1;
|
|||
int _You_must_link_with_Microsoft_OpenMP_library = 1;
|
||||
#endif
|
||||
|
||||
#if OMP_50_ENABLED
|
||||
kmp_target_offload_kind_t __kmp_target_offload = tgt_default;
|
||||
|
||||
// OMP Pause Resources
|
||||
kmp_pause_status_t __kmp_pause_status = kmp_not_paused;
|
||||
#endif // OMP_50_ENABLED
|
||||
|
||||
// end of file //
|
||||
|
|
|
@ -118,10 +118,7 @@ int KMP_EXPAND_NAME(KMP_API_NAME_GOMP_SINGLE_START)(void) {
|
|||
|
||||
if (!TCR_4(__kmp_init_parallel))
|
||||
__kmp_parallel_initialize();
|
||||
|
||||
#if OMP_50_ENABLED
|
||||
__kmp_resume_if_soft_paused();
|
||||
#endif
|
||||
|
||||
// 3rd parameter == FALSE prevents kmp_enter_single from pushing a
|
||||
// workshare when USE_CHECKS is defined. We need to avoid the push,
|
||||
|
@ -170,10 +167,7 @@ void *KMP_EXPAND_NAME(KMP_API_NAME_GOMP_SINGLE_COPY_START)(void) {
|
|||
|
||||
if (!TCR_4(__kmp_init_parallel))
|
||||
__kmp_parallel_initialize();
|
||||
|
||||
#if OMP_50_ENABLED
|
||||
__kmp_resume_if_soft_paused();
|
||||
#endif
|
||||
|
||||
// If this is the first thread to enter, return NULL. The generated code will
|
||||
// then call GOMP_single_copy_end() for this thread only, with the
|
||||
|
@ -595,14 +589,10 @@ void KMP_EXPAND_NAME(KMP_API_NAME_GOMP_PARALLEL_END)(void) {
|
|||
return status; \
|
||||
}
|
||||
|
||||
#if OMP_45_ENABLED
|
||||
#define KMP_DOACROSS_FINI(status, gtid) \
|
||||
if (!status && __kmp_threads[gtid]->th.th_dispatch->th_doacross_flags) { \
|
||||
__kmpc_doacross_fini(NULL, gtid); \
|
||||
}
|
||||
#else
|
||||
#define KMP_DOACROSS_FINI(status, gtid) /* Nothing */
|
||||
#endif
|
||||
|
||||
#define LOOP_NEXT(func, fini_code) \
|
||||
int func(long *p_lb, long *p_ub) { \
|
||||
|
@ -658,7 +648,6 @@ LOOP_RUNTIME_START(
|
|||
LOOP_NEXT(KMP_EXPAND_NAME(KMP_API_NAME_GOMP_LOOP_ORDERED_RUNTIME_NEXT),
|
||||
{ KMP_DISPATCH_FINI_CHUNK(&loc, gtid); })
|
||||
|
||||
#if OMP_45_ENABLED
|
||||
#define LOOP_DOACROSS_START(func, schedule) \
|
||||
bool func(unsigned ncounts, long *counts, long chunk_sz, long *p_lb, \
|
||||
long *p_ub) { \
|
||||
|
@ -764,7 +753,6 @@ LOOP_DOACROSS_START(
|
|||
LOOP_DOACROSS_RUNTIME_START(
|
||||
KMP_EXPAND_NAME(KMP_API_NAME_GOMP_LOOP_DOACROSS_RUNTIME_START),
|
||||
kmp_sch_runtime)
|
||||
#endif // OMP_45_ENABLED
|
||||
|
||||
void KMP_EXPAND_NAME(KMP_API_NAME_GOMP_LOOP_END)(void) {
|
||||
int gtid = __kmp_get_gtid();
|
||||
|
@ -927,7 +915,6 @@ LOOP_RUNTIME_START_ULL(
|
|||
LOOP_NEXT_ULL(KMP_EXPAND_NAME(KMP_API_NAME_GOMP_LOOP_ULL_ORDERED_RUNTIME_NEXT),
|
||||
{ KMP_DISPATCH_FINI_CHUNK_ULL(&loc, gtid); })
|
||||
|
||||
#if OMP_45_ENABLED
|
||||
#define LOOP_DOACROSS_START_ULL(func, schedule) \
|
||||
int func(unsigned ncounts, unsigned long long *counts, \
|
||||
unsigned long long chunk_sz, unsigned long long *p_lb, \
|
||||
|
@ -1037,7 +1024,6 @@ LOOP_DOACROSS_START_ULL(
|
|||
LOOP_DOACROSS_RUNTIME_START_ULL(
|
||||
KMP_EXPAND_NAME(KMP_API_NAME_GOMP_LOOP_ULL_DOACROSS_RUNTIME_START),
|
||||
kmp_sch_runtime)
|
||||
#endif
|
||||
|
||||
// Combined parallel / loop worksharing constructs
|
||||
//
|
||||
|
@ -1120,12 +1106,8 @@ PARALLEL_LOOP_START(
|
|||
void KMP_EXPAND_NAME(KMP_API_NAME_GOMP_TASK)(void (*func)(void *), void *data,
|
||||
void (*copy_func)(void *, void *),
|
||||
long arg_size, long arg_align,
|
||||
bool if_cond, unsigned gomp_flags
|
||||
#if OMP_40_ENABLED
|
||||
,
|
||||
void **depend
|
||||
#endif
|
||||
) {
|
||||
bool if_cond, unsigned gomp_flags,
|
||||
void **depend) {
|
||||
MKLOC(loc, "GOMP_task");
|
||||
int gtid = __kmp_entry_gtid();
|
||||
kmp_int32 flags = 0;
|
||||
|
@ -1176,7 +1158,6 @@ void KMP_EXPAND_NAME(KMP_API_NAME_GOMP_TASK)(void (*func)(void *), void *data,
|
|||
#endif
|
||||
|
||||
if (if_cond) {
|
||||
#if OMP_40_ENABLED
|
||||
if (gomp_flags & 8) {
|
||||
KMP_ASSERT(depend);
|
||||
const size_t ndeps = (kmp_intptr_t)depend[0];
|
||||
|
@ -1191,7 +1172,6 @@ void KMP_EXPAND_NAME(KMP_API_NAME_GOMP_TASK)(void (*func)(void *), void *data,
|
|||
}
|
||||
__kmpc_omp_task_with_deps(&loc, gtid, task, ndeps, dep_list, 0, NULL);
|
||||
} else {
|
||||
#endif
|
||||
__kmpc_omp_task(&loc, gtid, task);
|
||||
}
|
||||
} else {
|
||||
|
@ -1376,8 +1356,6 @@ void KMP_EXPAND_NAME(KMP_API_NAME_GOMP_TASKYIELD)(void) {
|
|||
return;
|
||||
}
|
||||
|
||||
#if OMP_40_ENABLED // these are new GOMP_4.0 entry points
|
||||
|
||||
void KMP_EXPAND_NAME(KMP_API_NAME_GOMP_PARALLEL)(void (*task)(void *),
|
||||
void *data,
|
||||
unsigned num_threads,
|
||||
|
@ -1635,9 +1613,6 @@ void KMP_EXPAND_NAME(KMP_API_NAME_GOMP_TEAMS)(unsigned int num_teams,
|
|||
unsigned int thread_limit) {
|
||||
return;
|
||||
}
|
||||
#endif // OMP_40_ENABLED
|
||||
|
||||
#if OMP_45_ENABLED
|
||||
|
||||
// Task duplication function which copies src to dest (both are
|
||||
// preallocated task structures)
|
||||
|
@ -1838,8 +1813,6 @@ void KMP_EXPAND_NAME(KMP_API_NAME_GOMP_DOACROSS_ULL_WAIT)(
|
|||
va_end(args);
|
||||
}
|
||||
|
||||
#endif // OMP_45_ENABLED
|
||||
|
||||
/* The following sections of code create aliases for the GOMP_* functions, then
|
||||
create versioned symbols using the assembler directive .symver. This is only
|
||||
pertinent for ELF .so library. The KMP_VERSION_SYMBOL macro is defined in
|
||||
|
@ -1927,7 +1900,6 @@ KMP_VERSION_SYMBOL(KMP_API_NAME_GOMP_LOOP_ULL_STATIC_START, 20, "GOMP_2.0");
|
|||
KMP_VERSION_SYMBOL(KMP_API_NAME_GOMP_TASKYIELD, 30, "GOMP_3.0");
|
||||
|
||||
// GOMP_4.0 versioned symbols
|
||||
#if OMP_40_ENABLED
|
||||
KMP_VERSION_SYMBOL(KMP_API_NAME_GOMP_PARALLEL, 40, "GOMP_4.0");
|
||||
KMP_VERSION_SYMBOL(KMP_API_NAME_GOMP_PARALLEL_SECTIONS, 40, "GOMP_4.0");
|
||||
KMP_VERSION_SYMBOL(KMP_API_NAME_GOMP_PARALLEL_LOOP_DYNAMIC, 40, "GOMP_4.0");
|
||||
|
@ -1946,10 +1918,8 @@ KMP_VERSION_SYMBOL(KMP_API_NAME_GOMP_TARGET_DATA, 40, "GOMP_4.0");
|
|||
KMP_VERSION_SYMBOL(KMP_API_NAME_GOMP_TARGET_END_DATA, 40, "GOMP_4.0");
|
||||
KMP_VERSION_SYMBOL(KMP_API_NAME_GOMP_TARGET_UPDATE, 40, "GOMP_4.0");
|
||||
KMP_VERSION_SYMBOL(KMP_API_NAME_GOMP_TEAMS, 40, "GOMP_4.0");
|
||||
#endif
|
||||
|
||||
// GOMP_4.5 versioned symbols
|
||||
#if OMP_45_ENABLED
|
||||
KMP_VERSION_SYMBOL(KMP_API_NAME_GOMP_TASKLOOP, 45, "GOMP_4.5");
|
||||
KMP_VERSION_SYMBOL(KMP_API_NAME_GOMP_TASKLOOP_ULL, 45, "GOMP_4.5");
|
||||
KMP_VERSION_SYMBOL(KMP_API_NAME_GOMP_DOACROSS_POST, 45, "GOMP_4.5");
|
||||
|
@ -1972,7 +1942,6 @@ KMP_VERSION_SYMBOL(KMP_API_NAME_GOMP_LOOP_ULL_DOACROSS_GUIDED_START, 45,
|
|||
"GOMP_4.5");
|
||||
KMP_VERSION_SYMBOL(KMP_API_NAME_GOMP_LOOP_ULL_DOACROSS_RUNTIME_START, 45,
|
||||
"GOMP_4.5");
|
||||
#endif
|
||||
|
||||
#endif // KMP_USE_VERSION_SYMBOLS
|
||||
|
||||
|
|
|
@ -106,16 +106,14 @@ typedef struct {
|
|||
th_task_state; // alternating 0/1 for task team identification
|
||||
offset_and_size_t th_bar;
|
||||
offset_and_size_t th_b_worker_arrived; // the worker increases it by 1 when it
|
||||
// arrives to the barrier
|
||||
// arrives to the barrier
|
||||
|
||||
#if OMP_40_ENABLED
|
||||
/* teams information */
|
||||
offset_and_size_t th_teams_microtask; // entry address for teams construct
|
||||
offset_and_size_t th_teams_level; // initial level of teams construct
|
||||
offset_and_size_t th_teams_nteams; // number of teams in a league
|
||||
offset_and_size_t
|
||||
th_teams_nth; // number of threads in each team of the league
|
||||
#endif
|
||||
|
||||
/* kmp_desc structure (for info field above) */
|
||||
kmp_int32 ds_sizeof_struct;
|
||||
|
@ -135,9 +133,7 @@ typedef struct {
|
|||
offset_and_size_t t_pkfn;
|
||||
offset_and_size_t t_task_team; // task team structure
|
||||
offset_and_size_t t_implicit_task; // taskdata for the thread's implicit task
|
||||
#if OMP_40_ENABLED
|
||||
offset_and_size_t t_cancel_request;
|
||||
#endif
|
||||
offset_and_size_t t_bar;
|
||||
offset_and_size_t
|
||||
t_b_master_arrived; // increased by 1 when master arrives to a barrier
|
||||
|
@ -203,7 +199,6 @@ typedef struct {
|
|||
offset_and_size_t
|
||||
td_taskwait_thread; // gtid + 1 of thread encountered taskwait
|
||||
|
||||
#if OMP_40_ENABLED
|
||||
/* Taskgroup */
|
||||
offset_and_size_t td_taskgroup; // pointer to the current taskgroup
|
||||
offset_and_size_t
|
||||
|
@ -219,7 +214,6 @@ typedef struct {
|
|||
offset_and_size_t dn_task;
|
||||
offset_and_size_t dn_npredecessors;
|
||||
offset_and_size_t dn_nrefs;
|
||||
#endif
|
||||
offset_and_size_t dn_routine;
|
||||
|
||||
/* kmp_thread_data_t */
|
||||
|
|
|
@ -965,9 +965,7 @@ typedef void (*microtask_t)(int *gtid, int *npr, ...);
|
|||
#endif
|
||||
|
||||
// Enable dynamic user lock
|
||||
#if OMP_45_ENABLED
|
||||
#define KMP_USE_DYNAMIC_LOCK 1
|
||||
#endif
|
||||
|
||||
// Enable Intel(R) Transactional Synchronization Extensions (Intel(R) TSX) if
|
||||
// dynamic user lock is turned on
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -178,7 +178,6 @@ static void __kmp_for_static_init(ident_t *loc, kmp_int32 global_tid,
|
|||
return;
|
||||
}
|
||||
|
||||
#if OMP_40_ENABLED
|
||||
// Although there are schedule enumerations above kmp_ord_upper which are not
|
||||
// schedules for "distribute", the only ones which are useful are dynamic, so
|
||||
// cannot be seen here, since this codepath is only executed for static
|
||||
|
@ -189,9 +188,7 @@ static void __kmp_for_static_init(ident_t *loc, kmp_int32 global_tid,
|
|||
kmp_distribute_static; // AC: convert to usual schedule type
|
||||
tid = th->th.th_team->t.t_master_tid;
|
||||
team = th->th.th_team->t.t_parent;
|
||||
} else
|
||||
#endif
|
||||
{
|
||||
} else {
|
||||
tid = __kmp_tid_from_gtid(global_tid);
|
||||
team = th->th.th_team;
|
||||
}
|
||||
|
@ -352,7 +349,6 @@ static void __kmp_for_static_init(ident_t *loc, kmp_int32 global_tid,
|
|||
*plastiter = (tid == ((trip_count - 1) / (UT)chunk) % nth);
|
||||
break;
|
||||
}
|
||||
#if OMP_45_ENABLED
|
||||
case kmp_sch_static_balanced_chunked: {
|
||||
T old_upper = *pupper;
|
||||
// round up to make sure the chunk is enough to cover all iterations
|
||||
|
@ -374,7 +370,6 @@ static void __kmp_for_static_init(ident_t *loc, kmp_int32 global_tid,
|
|||
*plastiter = (tid == ((trip_count - 1) / (UT)chunk));
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
default:
|
||||
KMP_ASSERT2(0, "__kmpc_for_static_init: unknown scheduling type");
|
||||
break;
|
||||
|
@ -383,10 +378,7 @@ static void __kmp_for_static_init(ident_t *loc, kmp_int32 global_tid,
|
|||
#if USE_ITT_BUILD
|
||||
// Report loop metadata
|
||||
if (KMP_MASTER_TID(tid) && __itt_metadata_add_ptr &&
|
||||
__kmp_forkjoin_frames_mode == 3 &&
|
||||
#if OMP_40_ENABLED
|
||||
th->th.th_teams_microtask == NULL &&
|
||||
#endif
|
||||
__kmp_forkjoin_frames_mode == 3 && th->th.th_teams_microtask == NULL &&
|
||||
team->t.t_active_level == 1) {
|
||||
kmp_uint64 cur_chunk = chunk;
|
||||
// Calculate chunk in case it was not specified; it is specified for
|
||||
|
@ -484,10 +476,8 @@ static void __kmp_dist_for_static_init(ident_t *loc, kmp_int32 gtid,
|
|||
th = __kmp_threads[gtid];
|
||||
nth = th->th.th_team_nproc;
|
||||
team = th->th.th_team;
|
||||
#if OMP_40_ENABLED
|
||||
KMP_DEBUG_ASSERT(th->th.th_teams_microtask); // we are in the teams construct
|
||||
nteams = th->th.th_teams_size.nteams;
|
||||
#endif
|
||||
team_id = team->t.t_master_tid;
|
||||
KMP_DEBUG_ASSERT(nteams == (kmp_uint32)team->t.t_parent->t.t_nproc);
|
||||
|
||||
|
@ -727,10 +717,8 @@ static void __kmp_team_static_init(ident_t *loc, kmp_int32 gtid,
|
|||
}
|
||||
th = __kmp_threads[gtid];
|
||||
team = th->th.th_team;
|
||||
#if OMP_40_ENABLED
|
||||
KMP_DEBUG_ASSERT(th->th.th_teams_microtask); // we are in the teams construct
|
||||
nteams = th->th.th_teams_size.nteams;
|
||||
#endif
|
||||
team_id = team->t.t_master_tid;
|
||||
KMP_DEBUG_ASSERT(nteams == (kmp_uint32)team->t.t_parent->t.t_nproc);
|
||||
|
||||
|
|
|
@ -1236,7 +1236,6 @@ static void __kmp_stg_print_max_active_levels(kmp_str_buf_t *buffer,
|
|||
__kmp_stg_print_int(buffer, name, __kmp_dflt_max_active_levels);
|
||||
} // __kmp_stg_print_max_active_levels
|
||||
|
||||
#if OMP_40_ENABLED
|
||||
// -----------------------------------------------------------------------------
|
||||
// OpenMP 4.0: OMP_DEFAULT_DEVICE
|
||||
static void __kmp_stg_parse_default_device(char const *name, char const *value,
|
||||
|
@ -1249,9 +1248,7 @@ static void __kmp_stg_print_default_device(kmp_str_buf_t *buffer,
|
|||
char const *name, void *data) {
|
||||
__kmp_stg_print_int(buffer, name, __kmp_default_device);
|
||||
} // __kmp_stg_print_default_device
|
||||
#endif
|
||||
|
||||
#if OMP_50_ENABLED
|
||||
// -----------------------------------------------------------------------------
|
||||
// OpenMP 5.0: OMP_TARGET_OFFLOAD
|
||||
static void __kmp_stg_parse_target_offload(char const *name, char const *value,
|
||||
|
@ -1293,9 +1290,7 @@ static void __kmp_stg_print_target_offload(kmp_str_buf_t *buffer,
|
|||
}
|
||||
__kmp_str_buf_print(buffer, "=%s\n", value);
|
||||
} // __kmp_stg_print_target_offload
|
||||
#endif
|
||||
|
||||
#if OMP_45_ENABLED
|
||||
// -----------------------------------------------------------------------------
|
||||
// OpenMP 4.5: OMP_MAX_TASK_PRIORITY
|
||||
static void __kmp_stg_parse_max_task_priority(char const *name,
|
||||
|
@ -1322,7 +1317,6 @@ static void __kmp_stg_print_taskloop_min_tasks(kmp_str_buf_t *buffer,
|
|||
char const *name, void *data) {
|
||||
__kmp_stg_print_int(buffer, name, __kmp_taskloop_min_tasks);
|
||||
} // __kmp_stg_print_taskloop_min_tasks
|
||||
#endif // OMP_45_ENABLED
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// KMP_DISP_NUM_BUFFERS
|
||||
|
@ -2093,61 +2087,43 @@ static void __kmp_parse_affinity_env(char const *name, char const *value,
|
|||
++gran; \
|
||||
}
|
||||
|
||||
#if OMP_40_ENABLED
|
||||
KMP_DEBUG_ASSERT((__kmp_nested_proc_bind.bind_types != NULL) &&
|
||||
(__kmp_nested_proc_bind.used > 0));
|
||||
#endif
|
||||
|
||||
while (*buf != '\0') {
|
||||
start = next = buf;
|
||||
|
||||
if (__kmp_match_str("none", buf, CCAST(const char **, &next))) {
|
||||
set_type(affinity_none);
|
||||
#if OMP_40_ENABLED
|
||||
__kmp_nested_proc_bind.bind_types[0] = proc_bind_false;
|
||||
#endif
|
||||
buf = next;
|
||||
} else if (__kmp_match_str("scatter", buf, CCAST(const char **, &next))) {
|
||||
set_type(affinity_scatter);
|
||||
#if OMP_40_ENABLED
|
||||
__kmp_nested_proc_bind.bind_types[0] = proc_bind_intel;
|
||||
#endif
|
||||
buf = next;
|
||||
} else if (__kmp_match_str("compact", buf, CCAST(const char **, &next))) {
|
||||
set_type(affinity_compact);
|
||||
#if OMP_40_ENABLED
|
||||
__kmp_nested_proc_bind.bind_types[0] = proc_bind_intel;
|
||||
#endif
|
||||
buf = next;
|
||||
} else if (__kmp_match_str("logical", buf, CCAST(const char **, &next))) {
|
||||
set_type(affinity_logical);
|
||||
#if OMP_40_ENABLED
|
||||
__kmp_nested_proc_bind.bind_types[0] = proc_bind_intel;
|
||||
#endif
|
||||
buf = next;
|
||||
} else if (__kmp_match_str("physical", buf, CCAST(const char **, &next))) {
|
||||
set_type(affinity_physical);
|
||||
#if OMP_40_ENABLED
|
||||
__kmp_nested_proc_bind.bind_types[0] = proc_bind_intel;
|
||||
#endif
|
||||
buf = next;
|
||||
} else if (__kmp_match_str("explicit", buf, CCAST(const char **, &next))) {
|
||||
set_type(affinity_explicit);
|
||||
#if OMP_40_ENABLED
|
||||
__kmp_nested_proc_bind.bind_types[0] = proc_bind_intel;
|
||||
#endif
|
||||
buf = next;
|
||||
} else if (__kmp_match_str("balanced", buf, CCAST(const char **, &next))) {
|
||||
set_type(affinity_balanced);
|
||||
#if OMP_40_ENABLED
|
||||
__kmp_nested_proc_bind.bind_types[0] = proc_bind_intel;
|
||||
#endif
|
||||
buf = next;
|
||||
} else if (__kmp_match_str("disabled", buf, CCAST(const char **, &next))) {
|
||||
set_type(affinity_disabled);
|
||||
#if OMP_40_ENABLED
|
||||
__kmp_nested_proc_bind.bind_types[0] = proc_bind_false;
|
||||
#endif
|
||||
buf = next;
|
||||
} else if (__kmp_match_str("verbose", buf, CCAST(const char **, &next))) {
|
||||
set_verbose(TRUE);
|
||||
|
@ -2306,9 +2282,7 @@ static void __kmp_parse_affinity_env(char const *name, char const *value,
|
|||
if (!type) {
|
||||
KMP_WARNING(AffProcListNoType, name);
|
||||
*out_type = affinity_explicit;
|
||||
#if OMP_40_ENABLED
|
||||
__kmp_nested_proc_bind.bind_types[0] = proc_bind_intel;
|
||||
#endif
|
||||
} else if (*out_type != affinity_explicit) {
|
||||
KMP_WARNING(AffProcListNotExplicit, name);
|
||||
KMP_ASSERT(*out_proclist != NULL);
|
||||
|
@ -2527,9 +2501,7 @@ static void __kmp_stg_parse_gomp_cpu_affinity(char const *name,
|
|||
__kmp_affinity_proclist = temp_proclist;
|
||||
__kmp_affinity_type = affinity_explicit;
|
||||
__kmp_affinity_gran = affinity_gran_fine;
|
||||
#if OMP_40_ENABLED
|
||||
__kmp_nested_proc_bind.bind_types[0] = proc_bind_intel;
|
||||
#endif
|
||||
} else {
|
||||
KMP_WARNING(AffSyntaxError, name);
|
||||
if (temp_proclist != NULL) {
|
||||
|
@ -2539,16 +2511,12 @@ static void __kmp_stg_parse_gomp_cpu_affinity(char const *name,
|
|||
} else {
|
||||
// Warning already emitted
|
||||
__kmp_affinity_type = affinity_none;
|
||||
#if OMP_40_ENABLED
|
||||
__kmp_nested_proc_bind.bind_types[0] = proc_bind_false;
|
||||
#endif
|
||||
}
|
||||
} // __kmp_stg_parse_gomp_cpu_affinity
|
||||
|
||||
#endif /* KMP_GOMP_COMPAT */
|
||||
|
||||
#if OMP_40_ENABLED
|
||||
|
||||
/*-----------------------------------------------------------------------------
|
||||
The OMP_PLACES proc id list parser. Here is the grammar:
|
||||
|
||||
|
@ -2971,40 +2939,6 @@ static void __kmp_stg_print_places(kmp_str_buf_t *buffer, char const *name,
|
|||
}
|
||||
}
|
||||
|
||||
#endif /* OMP_40_ENABLED */
|
||||
|
||||
#if (!OMP_40_ENABLED)
|
||||
|
||||
static void __kmp_stg_parse_proc_bind(char const *name, char const *value,
|
||||
void *data) {
|
||||
int enabled;
|
||||
kmp_setting_t **rivals = (kmp_setting_t **)data;
|
||||
int rc;
|
||||
|
||||
rc = __kmp_stg_check_rivals(name, value, rivals);
|
||||
if (rc) {
|
||||
return;
|
||||
}
|
||||
|
||||
// In OMP 3.1, OMP_PROC_BIND is strictly a boolean
|
||||
__kmp_stg_parse_bool(name, value, &enabled);
|
||||
if (enabled) {
|
||||
// OMP_PROC_BIND => granularity=fine,scatter on MIC
|
||||
// OMP_PROC_BIND => granularity=core,scatter elsewhere
|
||||
__kmp_affinity_type = affinity_scatter;
|
||||
#if KMP_MIC_SUPPORTED
|
||||
if (__kmp_mic_type != non_mic)
|
||||
__kmp_affinity_gran = affinity_gran_fine;
|
||||
else
|
||||
#endif
|
||||
__kmp_affinity_gran = affinity_gran_core;
|
||||
} else {
|
||||
__kmp_affinity_type = affinity_none;
|
||||
}
|
||||
} // __kmp_parse_proc_bind
|
||||
|
||||
#endif /* if (! OMP_40_ENABLED) */
|
||||
|
||||
static void __kmp_stg_parse_topology_method(char const *name, char const *value,
|
||||
void *data) {
|
||||
if (__kmp_str_match("all", 1, value)) {
|
||||
|
@ -3131,8 +3065,6 @@ static void __kmp_stg_print_topology_method(kmp_str_buf_t *buffer,
|
|||
|
||||
#endif /* KMP_AFFINITY_SUPPORTED */
|
||||
|
||||
#if OMP_40_ENABLED
|
||||
|
||||
// OMP_PROC_BIND / bind-var is functional on all 4.0 builds, including OS X*
|
||||
// OMP_PLACES / place-partition-var is not.
|
||||
static void __kmp_stg_parse_proc_bind(char const *name, char const *value,
|
||||
|
@ -3319,9 +3251,6 @@ static void __kmp_stg_print_proc_bind(kmp_str_buf_t *buffer, char const *name,
|
|||
}
|
||||
}
|
||||
|
||||
#endif /* OMP_40_ENABLED */
|
||||
|
||||
#if OMP_50_ENABLED
|
||||
static void __kmp_stg_parse_display_affinity(char const *name,
|
||||
char const *value, void *data) {
|
||||
__kmp_stg_parse_bool(name, value, &__kmp_display_affinity);
|
||||
|
@ -3484,8 +3413,6 @@ static void __kmp_stg_print_allocator(kmp_str_buf_t *buffer, char const *name,
|
|||
}
|
||||
}
|
||||
|
||||
#endif /* OMP_50_ENABLED */
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// OMP_DYNAMIC
|
||||
|
||||
|
@ -3719,7 +3646,6 @@ static const char *__kmp_parse_single_omp_schedule(const char *name,
|
|||
}
|
||||
}
|
||||
#endif // KMP_USE_HIER_SCHED
|
||||
#if OMP_45_ENABLED
|
||||
// Read in schedule modifier if specified
|
||||
enum sched_type sched_modifier = (enum sched_type)0;
|
||||
if (*delim == ':') {
|
||||
|
@ -3740,7 +3666,6 @@ static const char *__kmp_parse_single_omp_schedule(const char *name,
|
|||
return NULL;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
// Read in schedule kind (required)
|
||||
if (!__kmp_strcasecmp_with_sentinel("dynamic", ptr, *delim))
|
||||
sched = kmp_sch_dynamic_chunked;
|
||||
|
@ -4699,8 +4624,6 @@ static void __kmp_stg_print_task_throttling(kmp_str_buf_t *buffer,
|
|||
// -----------------------------------------------------------------------------
|
||||
// OMP_DISPLAY_ENV
|
||||
|
||||
#if OMP_40_ENABLED
|
||||
|
||||
static void __kmp_stg_parse_omp_display_env(char const *name, char const *value,
|
||||
void *data) {
|
||||
if (__kmp_str_match("VERBOSE", 1, value)) {
|
||||
|
@ -4708,7 +4631,6 @@ static void __kmp_stg_parse_omp_display_env(char const *name, char const *value,
|
|||
} else {
|
||||
__kmp_stg_parse_bool(name, value, &__kmp_display_env);
|
||||
}
|
||||
|
||||
} // __kmp_stg_parse_omp_display_env
|
||||
|
||||
static void __kmp_stg_print_omp_display_env(kmp_str_buf_t *buffer,
|
||||
|
@ -4734,9 +4656,7 @@ static void __kmp_stg_print_omp_cancellation(kmp_str_buf_t *buffer,
|
|||
__kmp_stg_print_bool(buffer, name, __kmp_omp_cancellation);
|
||||
} // __kmp_stg_print_omp_cancellation
|
||||
|
||||
#endif
|
||||
|
||||
#if OMP_50_ENABLED && OMPT_SUPPORT
|
||||
#if OMPT_SUPPORT
|
||||
static int __kmp_tool = 1;
|
||||
|
||||
static void __kmp_stg_parse_omp_tool(char const *name, char const *value,
|
||||
|
@ -4821,20 +4741,14 @@ static kmp_setting_t __kmp_stg_table[] = {
|
|||
__kmp_stg_print_task_stealing, NULL, 0, 0},
|
||||
{"OMP_MAX_ACTIVE_LEVELS", __kmp_stg_parse_max_active_levels,
|
||||
__kmp_stg_print_max_active_levels, NULL, 0, 0},
|
||||
#if OMP_40_ENABLED
|
||||
{"OMP_DEFAULT_DEVICE", __kmp_stg_parse_default_device,
|
||||
__kmp_stg_print_default_device, NULL, 0, 0},
|
||||
#endif
|
||||
#if OMP_50_ENABLED
|
||||
{"OMP_TARGET_OFFLOAD", __kmp_stg_parse_target_offload,
|
||||
__kmp_stg_print_target_offload, NULL, 0, 0},
|
||||
#endif
|
||||
#if OMP_45_ENABLED
|
||||
{"OMP_MAX_TASK_PRIORITY", __kmp_stg_parse_max_task_priority,
|
||||
__kmp_stg_print_max_task_priority, NULL, 0, 0},
|
||||
{"KMP_TASKLOOP_MIN_TASKS", __kmp_stg_parse_taskloop_min_tasks,
|
||||
__kmp_stg_print_taskloop_min_tasks, NULL, 0, 0},
|
||||
#endif
|
||||
{"OMP_THREAD_LIMIT", __kmp_stg_parse_thread_limit,
|
||||
__kmp_stg_print_thread_limit, NULL, 0, 0},
|
||||
{"KMP_TEAMS_THREAD_LIMIT", __kmp_stg_parse_teams_thread_limit,
|
||||
|
@ -4933,33 +4847,24 @@ static kmp_setting_t __kmp_stg_table[] = {
|
|||
{"GOMP_CPU_AFFINITY", __kmp_stg_parse_gomp_cpu_affinity, NULL,
|
||||
/* no print */ NULL, 0, 0},
|
||||
#endif /* KMP_GOMP_COMPAT */
|
||||
#if OMP_40_ENABLED
|
||||
{"OMP_PROC_BIND", __kmp_stg_parse_proc_bind, __kmp_stg_print_proc_bind,
|
||||
NULL, 0, 0},
|
||||
{"OMP_PLACES", __kmp_stg_parse_places, __kmp_stg_print_places, NULL, 0, 0},
|
||||
#else
|
||||
{"OMP_PROC_BIND", __kmp_stg_parse_proc_bind, NULL, /* no print */ NULL, 0,
|
||||
0},
|
||||
#endif /* OMP_40_ENABLED */
|
||||
{"KMP_TOPOLOGY_METHOD", __kmp_stg_parse_topology_method,
|
||||
__kmp_stg_print_topology_method, NULL, 0, 0},
|
||||
|
||||
#else
|
||||
|
||||
// KMP_AFFINITY is not supported on OS X*, nor is OMP_PLACES.
|
||||
// OMP_PROC_BIND and proc-bind-var are supported, however.
|
||||
#if OMP_40_ENABLED
|
||||
// KMP_AFFINITY is not supported on OS X*, nor is OMP_PLACES.
|
||||
// OMP_PROC_BIND and proc-bind-var are supported, however.
|
||||
{"OMP_PROC_BIND", __kmp_stg_parse_proc_bind, __kmp_stg_print_proc_bind,
|
||||
NULL, 0, 0},
|
||||
#endif
|
||||
|
||||
#endif // KMP_AFFINITY_SUPPORTED
|
||||
#if OMP_50_ENABLED
|
||||
{"OMP_DISPLAY_AFFINITY", __kmp_stg_parse_display_affinity,
|
||||
__kmp_stg_print_display_affinity, NULL, 0, 0},
|
||||
{"OMP_AFFINITY_FORMAT", __kmp_stg_parse_affinity_format,
|
||||
__kmp_stg_print_affinity_format, NULL, 0, 0},
|
||||
#endif
|
||||
{"KMP_INIT_AT_FORK", __kmp_stg_parse_init_at_fork,
|
||||
__kmp_stg_print_init_at_fork, NULL, 0, 0},
|
||||
{"KMP_SCHEDULE", __kmp_stg_parse_schedule, __kmp_stg_print_schedule, NULL,
|
||||
|
@ -5020,19 +4925,14 @@ static kmp_setting_t __kmp_stg_table[] = {
|
|||
{"KMP_ENABLE_TASK_THROTTLING", __kmp_stg_parse_task_throttling,
|
||||
__kmp_stg_print_task_throttling, NULL, 0, 0},
|
||||
|
||||
#if OMP_40_ENABLED
|
||||
{"OMP_DISPLAY_ENV", __kmp_stg_parse_omp_display_env,
|
||||
__kmp_stg_print_omp_display_env, NULL, 0, 0},
|
||||
{"OMP_CANCELLATION", __kmp_stg_parse_omp_cancellation,
|
||||
__kmp_stg_print_omp_cancellation, NULL, 0, 0},
|
||||
#endif
|
||||
|
||||
#if OMP_50_ENABLED
|
||||
{"OMP_ALLOCATOR", __kmp_stg_parse_allocator, __kmp_stg_print_allocator,
|
||||
NULL, 0, 0},
|
||||
#endif
|
||||
|
||||
#if OMP_50_ENABLED && OMPT_SUPPORT
|
||||
#if OMPT_SUPPORT
|
||||
{"OMP_TOOL", __kmp_stg_parse_omp_tool, __kmp_stg_print_omp_tool, NULL, 0,
|
||||
0},
|
||||
{"OMP_TOOL_LIBRARIES", __kmp_stg_parse_omp_tool_libraries,
|
||||
|
@ -5218,7 +5118,6 @@ static void __kmp_stg_init(void) {
|
|||
omp_proc_bind->data = CCAST(kmp_setting_t **, rivals);
|
||||
rivals[i++] = NULL;
|
||||
|
||||
#if OMP_40_ENABLED
|
||||
static kmp_setting_t *volatile places_rivals[4];
|
||||
i = 0;
|
||||
|
||||
|
@ -5232,7 +5131,6 @@ static void __kmp_stg_init(void) {
|
|||
places_rivals[i++] = omp_places;
|
||||
omp_places->data = CCAST(kmp_setting_t **, places_rivals);
|
||||
places_rivals[i++] = NULL;
|
||||
#endif
|
||||
}
|
||||
#else
|
||||
// KMP_AFFINITY not supported, so OMP_PROC_BIND has no rivals.
|
||||
|
@ -5454,7 +5352,6 @@ void __kmp_env_initialize(char const *string) {
|
|||
}
|
||||
#undef FIND
|
||||
|
||||
#if OMP_40_ENABLED
|
||||
// Also reset the affinity flags if OMP_PROC_BIND is specified.
|
||||
aff_str = __kmp_env_blk_var(&block, "OMP_PROC_BIND");
|
||||
if (aff_str != NULL) {
|
||||
|
@ -5463,12 +5360,10 @@ void __kmp_env_initialize(char const *string) {
|
|||
__kmp_affinity_top_method = affinity_top_method_default;
|
||||
__kmp_affinity_respect_mask = affinity_respect_mask_default;
|
||||
}
|
||||
#endif /* OMP_40_ENABLED */
|
||||
}
|
||||
|
||||
#endif /* KMP_AFFINITY_SUPPORTED */
|
||||
|
||||
#if OMP_40_ENABLED
|
||||
// Set up the nested proc bind type vector.
|
||||
if (__kmp_nested_proc_bind.bind_types == NULL) {
|
||||
__kmp_nested_proc_bind.bind_types =
|
||||
|
@ -5485,9 +5380,7 @@ void __kmp_env_initialize(char const *string) {
|
|||
__kmp_nested_proc_bind.bind_types[0] = proc_bind_false;
|
||||
#endif
|
||||
}
|
||||
#endif /* OMP_40_ENABLED */
|
||||
|
||||
#if OMP_50_ENABLED
|
||||
// Set up the affinity format ICV
|
||||
// Grab the default affinity format string from the message catalog
|
||||
kmp_msg_t m =
|
||||
|
@ -5500,7 +5393,6 @@ void __kmp_env_initialize(char const *string) {
|
|||
}
|
||||
KMP_STRCPY_S(__kmp_affinity_format, KMP_AFFINITY_FORMAT_SIZE, m.str);
|
||||
__kmp_str_free(&m.str);
|
||||
#endif
|
||||
|
||||
// Now process all of the settings.
|
||||
for (i = 0; i < block.count; ++i) {
|
||||
|
@ -5575,14 +5467,12 @@ void __kmp_env_initialize(char const *string) {
|
|||
}
|
||||
}
|
||||
|
||||
#if OMP_40_ENABLED
|
||||
if (__kmp_affinity_type == affinity_disabled) {
|
||||
__kmp_nested_proc_bind.bind_types[0] = proc_bind_false;
|
||||
} else if (__kmp_nested_proc_bind.bind_types[0] == proc_bind_true) {
|
||||
// OMP_PROC_BIND=true maps to OMP_PROC_BIND=spread.
|
||||
__kmp_nested_proc_bind.bind_types[0] = proc_bind_spread;
|
||||
}
|
||||
#endif /* OMP_40_ENABLED */
|
||||
|
||||
if (KMP_AFFINITY_CAPABLE()) {
|
||||
|
||||
|
@ -5619,20 +5509,16 @@ void __kmp_env_initialize(char const *string) {
|
|||
// processor groups, or if the user requested it, and OMP 4.0
|
||||
// affinity is not in effect.
|
||||
if (((__kmp_num_proc_groups > 1) &&
|
||||
(__kmp_affinity_type == affinity_default)
|
||||
#if OMP_40_ENABLED
|
||||
&& (__kmp_nested_proc_bind.bind_types[0] == proc_bind_default))
|
||||
#endif
|
||||
|| (__kmp_affinity_top_method == affinity_top_method_group)) {
|
||||
(__kmp_affinity_type == affinity_default) &&
|
||||
(__kmp_nested_proc_bind.bind_types[0] == proc_bind_default)) ||
|
||||
(__kmp_affinity_top_method == affinity_top_method_group)) {
|
||||
if (__kmp_affinity_respect_mask == affinity_respect_mask_default &&
|
||||
exactly_one_group) {
|
||||
__kmp_affinity_respect_mask = FALSE;
|
||||
}
|
||||
if (__kmp_affinity_type == affinity_default) {
|
||||
__kmp_affinity_type = affinity_compact;
|
||||
#if OMP_40_ENABLED
|
||||
__kmp_nested_proc_bind.bind_types[0] = proc_bind_intel;
|
||||
#endif
|
||||
}
|
||||
if (__kmp_affinity_top_method == affinity_top_method_default) {
|
||||
if (__kmp_affinity_gran == affinity_gran_default) {
|
||||
|
@ -5713,17 +5599,13 @@ void __kmp_env_initialize(char const *string) {
|
|||
__kmp_affinity_respect_mask = TRUE;
|
||||
}
|
||||
}
|
||||
#if OMP_40_ENABLED
|
||||
if ((__kmp_nested_proc_bind.bind_types[0] != proc_bind_intel) &&
|
||||
(__kmp_nested_proc_bind.bind_types[0] != proc_bind_default)) {
|
||||
if (__kmp_affinity_type == affinity_default) {
|
||||
__kmp_affinity_type = affinity_compact;
|
||||
__kmp_affinity_dups = FALSE;
|
||||
}
|
||||
} else
|
||||
#endif /* OMP_40_ENABLED */
|
||||
if (__kmp_affinity_type == affinity_default) {
|
||||
#if OMP_40_ENABLED
|
||||
} else if (__kmp_affinity_type == affinity_default) {
|
||||
#if KMP_MIC_SUPPORTED
|
||||
if (__kmp_mic_type != non_mic) {
|
||||
__kmp_nested_proc_bind.bind_types[0] = proc_bind_intel;
|
||||
|
@ -5732,7 +5614,6 @@ void __kmp_env_initialize(char const *string) {
|
|||
{
|
||||
__kmp_nested_proc_bind.bind_types[0] = proc_bind_false;
|
||||
}
|
||||
#endif /* OMP_40_ENABLED */
|
||||
#if KMP_MIC_SUPPORTED
|
||||
if (__kmp_mic_type != non_mic) {
|
||||
__kmp_affinity_type = affinity_scatter;
|
||||
|
@ -5769,11 +5650,9 @@ void __kmp_env_initialize(char const *string) {
|
|||
K_DIAG(1, ("__kmp_affinity_gran == %d\n", __kmp_affinity_gran));
|
||||
|
||||
KMP_DEBUG_ASSERT(__kmp_affinity_type != affinity_default);
|
||||
#if OMP_40_ENABLED
|
||||
KMP_DEBUG_ASSERT(__kmp_nested_proc_bind.bind_types[0] != proc_bind_default);
|
||||
K_DIAG(1, ("__kmp_nested_proc_bind.bind_types[0] == %d\n",
|
||||
__kmp_nested_proc_bind.bind_types[0]));
|
||||
#endif
|
||||
}
|
||||
|
||||
#endif /* KMP_AFFINITY_SUPPORTED */
|
||||
|
@ -5840,7 +5719,6 @@ void __kmp_env_print() {
|
|||
|
||||
} // __kmp_env_print
|
||||
|
||||
#if OMP_40_ENABLED
|
||||
void __kmp_env_print_2() {
|
||||
|
||||
kmp_env_blk_t block;
|
||||
|
@ -5878,6 +5756,5 @@ void __kmp_env_print_2() {
|
|||
__kmp_printf("\n");
|
||||
|
||||
} // __kmp_env_print_2
|
||||
#endif // OMP_40_ENABLED
|
||||
|
||||
// end of file
|
||||
|
|
|
@ -16,9 +16,7 @@
|
|||
void __kmp_reset_global_vars(void);
|
||||
void __kmp_env_initialize(char const *);
|
||||
void __kmp_env_print();
|
||||
#if OMP_40_ENABLED
|
||||
void __kmp_env_print_2();
|
||||
#endif // OMP_40_ENABLED
|
||||
|
||||
int __kmp_initial_threads_capacity(int req_nproc);
|
||||
void __kmp_init_dflt_team_nth();
|
||||
|
|
|
@ -275,15 +275,11 @@ void __kmps_get_schedule(kmp_sched_t *kind, int *modifier) {
|
|||
*modifier = __kmps_sched_modifier;
|
||||
} // __kmps_get_schedule
|
||||
|
||||
#if OMP_40_ENABLED
|
||||
|
||||
kmp_proc_bind_t __kmps_get_proc_bind(void) {
|
||||
i;
|
||||
return 0;
|
||||
} // __kmps_get_proc_bind
|
||||
|
||||
#endif /* OMP_40_ENABLED */
|
||||
|
||||
double __kmps_get_wtime(void) {
|
||||
// Elapsed wall clock time (in second) from "sometime in the past".
|
||||
double wtime = 0.0;
|
||||
|
@ -335,7 +331,6 @@ double __kmps_get_wtick(void) {
|
|||
return wtick;
|
||||
} // __kmps_get_wtick
|
||||
|
||||
#if OMP_50_ENABLED
|
||||
/* OpenMP 5.0 Memory Management */
|
||||
#if KMP_OS_WINDOWS
|
||||
omp_allocator_handle_t const omp_null_allocator = 0;
|
||||
|
@ -386,6 +381,5 @@ size_t omp_capture_affinity(char *buffer, size_t buf_size, char const *format) {
|
|||
i;
|
||||
return 0;
|
||||
}
|
||||
#endif /* OMP_50_ENABLED */
|
||||
|
||||
// end of file //
|
||||
|
|
|
@ -41,9 +41,7 @@ typedef enum kmp_sched {
|
|||
void __kmps_set_schedule(kmp_sched_t kind, int modifier);
|
||||
void __kmps_get_schedule(kmp_sched_t *kind, int *modifier);
|
||||
|
||||
#if OMP_40_ENABLED
|
||||
kmp_proc_bind_t __kmps_get_proc_bind(void);
|
||||
#endif /* OMP_40_ENABLED */
|
||||
|
||||
double __kmps_get_wtime();
|
||||
double __kmps_get_wtick();
|
||||
|
|
|
@ -20,8 +20,6 @@
|
|||
#include "ompt-specific.h"
|
||||
#endif
|
||||
|
||||
#if OMP_40_ENABLED
|
||||
|
||||
// TODO: Improve memory allocation? keep a list of pre-allocated structures?
|
||||
// allocate in blocks? re-use list finished list entries?
|
||||
// TODO: don't use atomic ref counters for stack-allocated nodes.
|
||||
|
@ -535,10 +533,8 @@ kmp_int32 __kmpc_omp_task_with_deps(ident_t *loc_ref, kmp_int32 gtid,
|
|||
bool serial = current_task->td_flags.team_serial ||
|
||||
current_task->td_flags.tasking_ser ||
|
||||
current_task->td_flags.final;
|
||||
#if OMP_45_ENABLED
|
||||
kmp_task_team_t *task_team = thread->th.th_task_team;
|
||||
serial = serial && !(task_team && task_team->tt.tt_found_proxy_tasks);
|
||||
#endif
|
||||
|
||||
if (!serial && (ndeps > 0 || ndeps_noalias > 0)) {
|
||||
/* if no dependencies have been tracked yet, create the dependence hash */
|
||||
|
@ -623,10 +619,8 @@ void __kmpc_omp_wait_deps(ident_t *loc_ref, kmp_int32 gtid, kmp_int32 ndeps,
|
|||
bool ignore = current_task->td_flags.team_serial ||
|
||||
current_task->td_flags.tasking_ser ||
|
||||
current_task->td_flags.final;
|
||||
#if OMP_45_ENABLED
|
||||
ignore = ignore && thread->th.th_task_team != NULL &&
|
||||
thread->th.th_task_team->tt.tt_found_proxy_tasks == FALSE;
|
||||
#endif
|
||||
ignore = ignore || current_task->td_dephash == NULL;
|
||||
|
||||
if (ignore) {
|
||||
|
@ -659,5 +653,3 @@ void __kmpc_omp_wait_deps(ident_t *loc_ref, kmp_int32 gtid, kmp_int32 ndeps,
|
|||
KA_TRACE(10, ("__kmpc_omp_wait_deps(exit): T#%d finished waiting : loc=%p\n",
|
||||
gtid, loc_ref));
|
||||
}
|
||||
|
||||
#endif /* OMP_40_ENABLED */
|
||||
|
|
|
@ -17,8 +17,6 @@
|
|||
|
||||
#include "kmp.h"
|
||||
|
||||
#if OMP_40_ENABLED
|
||||
|
||||
#define KMP_ACQUIRE_DEPNODE(gtid, n) __kmp_acquire_lock(&(n)->dn.lock, (gtid))
|
||||
#define KMP_RELEASE_DEPNODE(gtid, n) __kmp_release_lock(&(n)->dn.lock, (gtid))
|
||||
|
||||
|
@ -144,6 +142,4 @@ static inline void __kmp_release_deps(kmp_int32 gtid, kmp_taskdata_t *task) {
|
|||
gtid, task));
|
||||
}
|
||||
|
||||
#endif // OMP_40_ENABLED
|
||||
|
||||
#endif // KMP_TASKDEPS_H
|
||||
|
|
|
@ -30,10 +30,7 @@ static void __kmp_alloc_task_deque(kmp_info_t *thread,
|
|||
kmp_thread_data_t *thread_data);
|
||||
static int __kmp_realloc_task_threads_data(kmp_info_t *thread,
|
||||
kmp_task_team_t *task_team);
|
||||
|
||||
#if OMP_45_ENABLED
|
||||
static void __kmp_bottom_half_finish_proxy(kmp_int32 gtid, kmp_task_t *ptask);
|
||||
#endif
|
||||
|
||||
#ifdef BUILD_TIED_TASK_STACK
|
||||
|
||||
|
@ -391,7 +388,6 @@ static kmp_int32 __kmp_push_task(kmp_int32 gtid, kmp_task_t *task) {
|
|||
// Lock the deque for the task push operation
|
||||
if (!locked) {
|
||||
__kmp_acquire_bootstrap_lock(&thread_data->td.td_deque_lock);
|
||||
#if OMP_45_ENABLED
|
||||
// Need to recheck as we can get a proxy task from thread outside of OpenMP
|
||||
if (TCR_4(thread_data->td.td_deque_ntasks) >=
|
||||
TASK_DEQUE_SIZE(thread_data->td)) {
|
||||
|
@ -408,7 +404,6 @@ static kmp_int32 __kmp_push_task(kmp_int32 gtid, kmp_task_t *task) {
|
|||
__kmp_realloc_task_deque(thread, thread_data);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
// Must have room since no thread can add tasks but calling thread
|
||||
KMP_DEBUG_ASSERT(TCR_4(thread_data->td.td_deque_ntasks) <
|
||||
|
@ -552,10 +547,8 @@ static inline void __ompt_task_init(kmp_taskdata_t *task, int tid) {
|
|||
task->ompt_task_info.frame.enter_frame = ompt_data_none;
|
||||
task->ompt_task_info.frame.exit_frame_flags = ompt_frame_runtime | ompt_frame_framepointer;
|
||||
task->ompt_task_info.frame.enter_frame_flags = ompt_frame_runtime | ompt_frame_framepointer;
|
||||
#if OMP_40_ENABLED
|
||||
task->ompt_task_info.ndeps = 0;
|
||||
task->ompt_task_info.deps = NULL;
|
||||
#endif /* OMP_40_ENABLED */
|
||||
}
|
||||
|
||||
// __ompt_task_start:
|
||||
|
@ -742,16 +735,11 @@ static void __kmp_free_task(kmp_int32 gtid, kmp_taskdata_t *taskdata,
|
|||
static void __kmp_free_task_and_ancestors(kmp_int32 gtid,
|
||||
kmp_taskdata_t *taskdata,
|
||||
kmp_info_t *thread) {
|
||||
#if OMP_45_ENABLED
|
||||
// Proxy tasks must always be allowed to free their parents
|
||||
// because they can be run in background even in serial mode.
|
||||
kmp_int32 team_serial =
|
||||
(taskdata->td_flags.team_serial || taskdata->td_flags.tasking_ser) &&
|
||||
!taskdata->td_flags.proxy;
|
||||
#else
|
||||
kmp_int32 team_serial =
|
||||
taskdata->td_flags.team_serial || taskdata->td_flags.tasking_ser;
|
||||
#endif
|
||||
KMP_DEBUG_ASSERT(taskdata->td_flags.tasktype == TASK_EXPLICIT);
|
||||
|
||||
kmp_int32 children = KMP_ATOMIC_DEC(&taskdata->td_allocated_child_tasks) - 1;
|
||||
|
@ -816,10 +804,8 @@ static void __kmp_task_finish(kmp_int32 gtid, kmp_task_t *task,
|
|||
kmp_taskdata_t *resumed_task) {
|
||||
kmp_taskdata_t *taskdata = KMP_TASK_TO_TASKDATA(task);
|
||||
kmp_info_t *thread = __kmp_threads[gtid];
|
||||
#if OMP_45_ENABLED
|
||||
kmp_task_team_t *task_team =
|
||||
thread->th.th_task_team; // might be NULL for serial teams...
|
||||
#endif // OMP_45_ENABLED
|
||||
kmp_int32 children = 0;
|
||||
|
||||
KA_TRACE(10, ("__kmp_task_finish(enter): T#%d finishing task %p and resuming "
|
||||
|
@ -877,7 +863,6 @@ static void __kmp_task_finish(kmp_int32 gtid, kmp_task_t *task,
|
|||
|
||||
KMP_DEBUG_ASSERT(taskdata->td_flags.complete == 0);
|
||||
bool detach = false;
|
||||
#if OMP_50_ENABLED
|
||||
if (taskdata->td_flags.detachable == TASK_DETACHABLE) {
|
||||
if (taskdata->td_allow_completion_event.type ==
|
||||
KMP_EVENT_ALLOW_COMPLETION) {
|
||||
|
@ -891,7 +876,6 @@ static void __kmp_task_finish(kmp_int32 gtid, kmp_task_t *task,
|
|||
__kmp_release_tas_lock(&taskdata->td_allow_completion_event.lock, gtid);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
KMP_DEBUG_ASSERT(taskdata->td_flags.started == 1);
|
||||
KMP_DEBUG_ASSERT(taskdata->td_flags.freed == 0);
|
||||
|
||||
|
@ -905,17 +889,13 @@ static void __kmp_task_finish(kmp_int32 gtid, kmp_task_t *task,
|
|||
children =
|
||||
KMP_ATOMIC_DEC(&taskdata->td_parent->td_incomplete_child_tasks) - 1;
|
||||
KMP_DEBUG_ASSERT(children >= 0);
|
||||
#if OMP_40_ENABLED
|
||||
if (taskdata->td_taskgroup)
|
||||
KMP_ATOMIC_DEC(&taskdata->td_taskgroup->count);
|
||||
__kmp_release_deps(gtid, taskdata);
|
||||
#if OMP_45_ENABLED
|
||||
} else if (task_team && task_team->tt.tt_found_proxy_tasks) {
|
||||
// if we found proxy tasks there could exist a dependency chain
|
||||
// with the proxy task as origin
|
||||
__kmp_release_deps(gtid, taskdata);
|
||||
#endif // OMP_45_ENABLED
|
||||
#endif // OMP_40_ENABLED
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -929,7 +909,6 @@ static void __kmp_task_finish(kmp_int32 gtid, kmp_task_t *task,
|
|||
20, ("__kmp_task_finish: T#%d finished task %p, %d incomplete children\n",
|
||||
gtid, taskdata, children));
|
||||
|
||||
#if OMP_40_ENABLED
|
||||
/* If the tasks' destructor thunk flag has been set, we need to invoke the
|
||||
destructor thunk that has been generated by the compiler. The code is
|
||||
placed here, since at this point other tasks might have been released
|
||||
|
@ -941,7 +920,6 @@ static void __kmp_task_finish(kmp_int32 gtid, kmp_task_t *task,
|
|||
KMP_ASSERT(destr_thunk);
|
||||
destr_thunk(gtid, task);
|
||||
}
|
||||
#endif // OMP_40_ENABLED
|
||||
|
||||
// bookkeeping for resuming task:
|
||||
// GEH - note tasking_ser => task_serial
|
||||
|
@ -1073,9 +1051,7 @@ void __kmp_init_implicit_task(ident_t *loc_ref, kmp_info_t *this_thr,
|
|||
|
||||
task->td_flags.tiedness = TASK_TIED;
|
||||
task->td_flags.tasktype = TASK_IMPLICIT;
|
||||
#if OMP_45_ENABLED
|
||||
task->td_flags.proxy = TASK_FULL;
|
||||
#endif
|
||||
|
||||
// All implicit tasks are executed immediately, not deferred
|
||||
task->td_flags.task_serial = 1;
|
||||
|
@ -1087,22 +1063,16 @@ void __kmp_init_implicit_task(ident_t *loc_ref, kmp_info_t *this_thr,
|
|||
task->td_flags.complete = 0;
|
||||
task->td_flags.freed = 0;
|
||||
|
||||
#if OMP_40_ENABLED
|
||||
task->td_depnode = NULL;
|
||||
#endif
|
||||
task->td_last_tied = task;
|
||||
#if OMP_50_ENABLED
|
||||
task->td_allow_completion_event.type = KMP_EVENT_UNINITIALIZED;
|
||||
#endif
|
||||
|
||||
if (set_curr_task) { // only do this init first time thread is created
|
||||
KMP_ATOMIC_ST_REL(&task->td_incomplete_child_tasks, 0);
|
||||
// Not used: don't need to deallocate implicit task
|
||||
KMP_ATOMIC_ST_REL(&task->td_allocated_child_tasks, 0);
|
||||
#if OMP_40_ENABLED
|
||||
task->td_taskgroup = NULL; // An implicit task does not have taskgroup
|
||||
task->td_dephash = NULL;
|
||||
#endif
|
||||
__kmp_push_current_task_to_thread(this_thr, team, tid);
|
||||
} else {
|
||||
KMP_DEBUG_ASSERT(task->td_incomplete_child_tasks == 0);
|
||||
|
@ -1212,19 +1182,14 @@ kmp_task_t *__kmp_task_alloc(ident_t *loc_ref, kmp_int32 gtid,
|
|||
KMP_CHECK_UPDATE(thread->th.th_task_team->tt.tt_untied_task_encountered, 1);
|
||||
}
|
||||
|
||||
#if OMP_50_ENABLED
|
||||
// Detachable tasks are not proxy tasks yet but could be in the future. Doing
|
||||
// the tasking setup
|
||||
// when that happens is too late.
|
||||
if (flags->proxy == TASK_PROXY || flags->detachable == TASK_DETACHABLE) {
|
||||
#endif
|
||||
#if OMP_45_ENABLED
|
||||
if (flags->proxy == TASK_PROXY) {
|
||||
flags->tiedness = TASK_UNTIED;
|
||||
flags->merged_if0 = 1;
|
||||
#if OMP_50_ENABLED
|
||||
}
|
||||
#endif
|
||||
/* are we running in a sequential parallel or tskm_immediate_exec... we need
|
||||
tasking support enabled */
|
||||
if ((thread->th.th_task_team) == NULL) {
|
||||
|
@ -1258,7 +1223,6 @@ kmp_task_t *__kmp_task_alloc(ident_t *loc_ref, kmp_int32 gtid,
|
|||
if (task_team->tt.tt_found_proxy_tasks == FALSE)
|
||||
TCW_4(task_team->tt.tt_found_proxy_tasks, TRUE);
|
||||
}
|
||||
#endif
|
||||
|
||||
// Calculate shared structure offset including padding after kmp_task_t struct
|
||||
// to align pointers in shared struct
|
||||
|
@ -1314,26 +1278,18 @@ kmp_task_t *__kmp_task_alloc(ident_t *loc_ref, kmp_int32 gtid,
|
|||
taskdata->td_taskwait_counter = 0;
|
||||
taskdata->td_taskwait_thread = 0;
|
||||
KMP_DEBUG_ASSERT(taskdata->td_parent != NULL);
|
||||
#if OMP_45_ENABLED
|
||||
// avoid copying icvs for proxy tasks
|
||||
if (flags->proxy == TASK_FULL)
|
||||
#endif
|
||||
copy_icvs(&taskdata->td_icvs, &taskdata->td_parent->td_icvs);
|
||||
|
||||
taskdata->td_flags.tiedness = flags->tiedness;
|
||||
taskdata->td_flags.final = flags->final;
|
||||
taskdata->td_flags.merged_if0 = flags->merged_if0;
|
||||
#if OMP_40_ENABLED
|
||||
taskdata->td_flags.destructors_thunk = flags->destructors_thunk;
|
||||
#endif // OMP_40_ENABLED
|
||||
#if OMP_45_ENABLED
|
||||
taskdata->td_flags.proxy = flags->proxy;
|
||||
#if OMP_50_ENABLED
|
||||
taskdata->td_flags.detachable = flags->detachable;
|
||||
#endif
|
||||
taskdata->td_task_team = thread->th.th_task_team;
|
||||
taskdata->td_size_alloc = shareds_offset + sizeof_shareds;
|
||||
#endif
|
||||
taskdata->td_flags.tasktype = TASK_EXPLICIT;
|
||||
|
||||
// GEH - TODO: fix this to copy parent task's value of tasking_ser flag
|
||||
|
@ -1360,40 +1316,28 @@ kmp_task_t *__kmp_task_alloc(ident_t *loc_ref, kmp_int32 gtid,
|
|||
KMP_ATOMIC_ST_RLX(&taskdata->td_incomplete_child_tasks, 0);
|
||||
// start at one because counts current task and children
|
||||
KMP_ATOMIC_ST_RLX(&taskdata->td_allocated_child_tasks, 1);
|
||||
#if OMP_40_ENABLED
|
||||
taskdata->td_taskgroup =
|
||||
parent_task->td_taskgroup; // task inherits taskgroup from the parent task
|
||||
taskdata->td_dephash = NULL;
|
||||
taskdata->td_depnode = NULL;
|
||||
#endif
|
||||
if (flags->tiedness == TASK_UNTIED)
|
||||
taskdata->td_last_tied = NULL; // will be set when the task is scheduled
|
||||
else
|
||||
taskdata->td_last_tied = taskdata;
|
||||
#if OMP_50_ENABLED
|
||||
taskdata->td_allow_completion_event.type = KMP_EVENT_UNINITIALIZED;
|
||||
#endif
|
||||
#if OMPT_SUPPORT
|
||||
if (UNLIKELY(ompt_enabled.enabled))
|
||||
__ompt_task_init(taskdata, gtid);
|
||||
#endif
|
||||
// Only need to keep track of child task counts if team parallel and tasking not
|
||||
// serialized or if it is a proxy or detachable task
|
||||
#if OMP_45_ENABLED
|
||||
if (flags->proxy == TASK_PROXY ||
|
||||
#if OMP_50_ENABLED
|
||||
flags->detachable == TASK_DETACHABLE ||
|
||||
#endif
|
||||
!(taskdata->td_flags.team_serial || taskdata->td_flags.tasking_ser))
|
||||
#else
|
||||
if (!(taskdata->td_flags.team_serial || taskdata->td_flags.tasking_ser))
|
||||
#endif
|
||||
{
|
||||
KMP_ATOMIC_INC(&parent_task->td_incomplete_child_tasks);
|
||||
#if OMP_40_ENABLED
|
||||
if (parent_task->td_taskgroup)
|
||||
KMP_ATOMIC_INC(&parent_task->td_taskgroup->count);
|
||||
#endif
|
||||
// Only need to keep track of allocated child tasks for explicit tasks since
|
||||
// implicit not deallocated
|
||||
if (taskdata->td_parent->td_flags.tasktype == TASK_EXPLICIT) {
|
||||
|
@ -1418,27 +1362,12 @@ kmp_task_t *__kmpc_omp_task_alloc(ident_t *loc_ref, kmp_int32 gtid,
|
|||
input_flags->native = FALSE;
|
||||
// __kmp_task_alloc() sets up all other runtime flags
|
||||
|
||||
#if OMP_45_ENABLED
|
||||
#if OMP_50_ENABLED
|
||||
KA_TRACE(10, ("__kmpc_omp_task_alloc(enter): T#%d loc=%p, flags=(%s %s %s) "
|
||||
"sizeof_task=%ld sizeof_shared=%ld entry=%p\n",
|
||||
gtid, loc_ref, input_flags->tiedness ? "tied " : "untied",
|
||||
input_flags->proxy ? "proxy" : "",
|
||||
input_flags->detachable ? "detachable" : "", sizeof_kmp_task_t,
|
||||
sizeof_shareds, task_entry));
|
||||
#else
|
||||
KA_TRACE(10, ("__kmpc_omp_task_alloc(enter): T#%d loc=%p, flags=(%s %s) "
|
||||
"sizeof_task=%ld sizeof_shared=%ld entry=%p\n",
|
||||
gtid, loc_ref, input_flags->tiedness ? "tied " : "untied",
|
||||
input_flags->proxy ? "proxy" : "", sizeof_kmp_task_t,
|
||||
sizeof_shareds, task_entry));
|
||||
#endif
|
||||
#else
|
||||
KA_TRACE(10, ("__kmpc_omp_task_alloc(enter): T#%d loc=%p, flags=(%s) "
|
||||
"sizeof_task=%ld sizeof_shared=%ld entry=%p\n",
|
||||
gtid, loc_ref, input_flags->tiedness ? "tied " : "untied",
|
||||
sizeof_kmp_task_t, sizeof_shareds, task_entry));
|
||||
#endif
|
||||
|
||||
retval = __kmp_task_alloc(loc_ref, gtid, input_flags, sizeof_kmp_task_t,
|
||||
sizeof_shareds, task_entry);
|
||||
|
@ -1458,7 +1387,6 @@ kmp_task_t *__kmpc_omp_target_task_alloc(ident_t *loc_ref, kmp_int32 gtid,
|
|||
sizeof_shareds, task_entry);
|
||||
}
|
||||
|
||||
#if OMP_50_ENABLED
|
||||
/*!
|
||||
@ingroup TASKING
|
||||
@param loc_ref location of the original task directive
|
||||
|
@ -1478,7 +1406,6 @@ __kmpc_omp_reg_task_with_affinity(ident_t *loc_ref, kmp_int32 gtid,
|
|||
kmp_task_affinity_info_t *affin_list) {
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
// __kmp_invoke_task: invoke the specified task
|
||||
//
|
||||
|
@ -1489,14 +1416,11 @@ static void __kmp_invoke_task(kmp_int32 gtid, kmp_task_t *task,
|
|||
kmp_taskdata_t *current_task) {
|
||||
kmp_taskdata_t *taskdata = KMP_TASK_TO_TASKDATA(task);
|
||||
kmp_info_t *thread;
|
||||
#if OMP_40_ENABLED
|
||||
int discard = 0 /* false */;
|
||||
#endif
|
||||
KA_TRACE(
|
||||
30, ("__kmp_invoke_task(enter): T#%d invoking task %p, current_task=%p\n",
|
||||
gtid, taskdata, current_task));
|
||||
KMP_DEBUG_ASSERT(task);
|
||||
#if OMP_45_ENABLED
|
||||
if (taskdata->td_flags.proxy == TASK_PROXY &&
|
||||
taskdata->td_flags.complete == 1) {
|
||||
// This is a proxy task that was already completed but it needs to run
|
||||
|
@ -1514,7 +1438,6 @@ static void __kmp_invoke_task(kmp_int32 gtid, kmp_task_t *task,
|
|||
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
#if OMPT_SUPPORT
|
||||
// For untied tasks, the first task executed only calls __kmpc_omp_task and
|
||||
|
@ -1532,17 +1455,12 @@ static void __kmp_invoke_task(kmp_int32 gtid, kmp_task_t *task,
|
|||
}
|
||||
#endif
|
||||
|
||||
#if OMP_45_ENABLED
|
||||
// Proxy tasks are not handled by the runtime
|
||||
if (taskdata->td_flags.proxy != TASK_PROXY) {
|
||||
#endif
|
||||
ANNOTATE_HAPPENS_AFTER(task);
|
||||
__kmp_task_start(gtid, task, current_task); // OMPT only if not discarded
|
||||
#if OMP_45_ENABLED
|
||||
}
|
||||
#endif
|
||||
|
||||
#if OMP_40_ENABLED
|
||||
// TODO: cancel tasks if the parallel region has also been cancelled
|
||||
// TODO: check if this sequence can be hoisted above __kmp_task_start
|
||||
// if cancellation has been enabled for this run ...
|
||||
|
@ -1600,7 +1518,6 @@ static void __kmp_invoke_task(kmp_int32 gtid, kmp_task_t *task,
|
|||
break;
|
||||
}
|
||||
#endif // KMP_STATS_ENABLED
|
||||
#endif // OMP_40_ENABLED
|
||||
|
||||
// OMPT task begin
|
||||
#if OMPT_SUPPORT
|
||||
|
@ -1640,15 +1557,11 @@ static void __kmp_invoke_task(kmp_int32 gtid, kmp_task_t *task,
|
|||
}
|
||||
#endif
|
||||
|
||||
#if OMP_40_ENABLED
|
||||
}
|
||||
#endif // OMP_40_ENABLED
|
||||
|
||||
|
||||
#if OMP_45_ENABLED
|
||||
// Proxy tasks are not handled by the runtime
|
||||
if (taskdata->td_flags.proxy != TASK_PROXY) {
|
||||
#endif
|
||||
ANNOTATE_HAPPENS_BEFORE(taskdata->td_parent);
|
||||
#if OMPT_SUPPORT
|
||||
if (UNLIKELY(ompt_enabled.enabled)) {
|
||||
|
@ -1660,9 +1573,7 @@ static void __kmp_invoke_task(kmp_int32 gtid, kmp_task_t *task,
|
|||
} else
|
||||
#endif
|
||||
__kmp_task_finish<false>(gtid, task, current_task);
|
||||
#if OMP_45_ENABLED
|
||||
}
|
||||
#endif
|
||||
|
||||
KA_TRACE(
|
||||
30,
|
||||
|
@ -1743,14 +1654,10 @@ kmp_int32 __kmp_omp_task(kmp_int32 gtid, kmp_task_t *new_task,
|
|||
bool serialize_immediate) {
|
||||
kmp_taskdata_t *new_taskdata = KMP_TASK_TO_TASKDATA(new_task);
|
||||
|
||||
/* Should we execute the new task or queue it? For now, let's just always try to
|
||||
queue it. If the queue fills up, then we'll execute it. */
|
||||
#if OMP_45_ENABLED
|
||||
/* Should we execute the new task or queue it? For now, let's just always try
|
||||
to queue it. If the queue fills up, then we'll execute it. */
|
||||
if (new_taskdata->td_flags.proxy == TASK_PROXY ||
|
||||
__kmp_push_task(gtid, new_task) == TASK_NOT_PUSHED) // if cannot defer
|
||||
#else
|
||||
if (__kmp_push_task(gtid, new_task) == TASK_NOT_PUSHED) // if cannot defer
|
||||
#endif
|
||||
{ // Execute this task immediately
|
||||
kmp_taskdata_t *current_task = __kmp_threads[gtid]->th.th_current_task;
|
||||
if (serialize_immediate)
|
||||
|
@ -1939,10 +1846,8 @@ static kmp_int32 __kmpc_omp_taskwait_template(ident_t *loc_ref, kmp_int32 gtid,
|
|||
bool must_wait =
|
||||
!taskdata->td_flags.team_serial && !taskdata->td_flags.final;
|
||||
|
||||
#if OMP_45_ENABLED
|
||||
must_wait = must_wait || (thread->th.th_task_team != NULL &&
|
||||
thread->th.th_task_team->tt.tt_found_proxy_tasks);
|
||||
#endif
|
||||
if (must_wait) {
|
||||
kmp_flag_32 flag(RCAST(std::atomic<kmp_uint32> *,
|
||||
&(taskdata->td_incomplete_child_tasks)),
|
||||
|
@ -2077,7 +1982,6 @@ kmp_int32 __kmpc_omp_taskyield(ident_t *loc_ref, kmp_int32 gtid, int end_part) {
|
|||
return TASK_CURRENT_NOT_QUEUED;
|
||||
}
|
||||
|
||||
#if OMP_50_ENABLED
|
||||
// Task Reduction implementation
|
||||
//
|
||||
// Note: initial implementation didn't take into account the possibility
|
||||
|
@ -2490,9 +2394,7 @@ Finalize task reduction for a parallel or worksharing.
|
|||
void __kmpc_task_reduction_modifier_fini(ident_t *loc, int gtid, int is_ws) {
|
||||
__kmpc_end_taskgroup(loc, gtid);
|
||||
}
|
||||
#endif
|
||||
|
||||
#if OMP_40_ENABLED
|
||||
// __kmpc_taskgroup: Start a new taskgroup
|
||||
void __kmpc_taskgroup(ident_t *loc, int gtid) {
|
||||
kmp_info_t *thread = __kmp_threads[gtid];
|
||||
|
@ -2503,10 +2405,8 @@ void __kmpc_taskgroup(ident_t *loc, int gtid) {
|
|||
KMP_ATOMIC_ST_RLX(&tg_new->count, 0);
|
||||
KMP_ATOMIC_ST_RLX(&tg_new->cancel_request, cancel_noreq);
|
||||
tg_new->parent = taskdata->td_taskgroup;
|
||||
#if OMP_50_ENABLED
|
||||
tg_new->reduce_data = NULL;
|
||||
tg_new->reduce_num_data = 0;
|
||||
#endif
|
||||
taskdata->td_taskgroup = tg_new;
|
||||
|
||||
#if OMPT_SUPPORT && OMPT_OPTIONAL
|
||||
|
@ -2575,14 +2475,9 @@ void __kmpc_end_taskgroup(ident_t *loc, int gtid) {
|
|||
}
|
||||
#endif
|
||||
|
||||
#if OMP_45_ENABLED
|
||||
if (!taskdata->td_flags.team_serial ||
|
||||
(thread->th.th_task_team != NULL &&
|
||||
thread->th.th_task_team->tt.tt_found_proxy_tasks))
|
||||
#else
|
||||
if (!taskdata->td_flags.team_serial)
|
||||
#endif
|
||||
{
|
||||
thread->th.th_task_team->tt.tt_found_proxy_tasks)) {
|
||||
kmp_flag_32 flag(RCAST(std::atomic<kmp_uint32> *, &(taskgroup->count)),
|
||||
0U);
|
||||
while (KMP_ATOMIC_LD_ACQ(&taskgroup->count) != 0) {
|
||||
|
@ -2608,7 +2503,6 @@ void __kmpc_end_taskgroup(ident_t *loc, int gtid) {
|
|||
}
|
||||
KMP_DEBUG_ASSERT(taskgroup->count == 0);
|
||||
|
||||
#if OMP_50_ENABLED
|
||||
if (taskgroup->reduce_data != NULL) { // need to reduce?
|
||||
int cnt;
|
||||
void *reduce_data;
|
||||
|
@ -2657,7 +2551,6 @@ void __kmpc_end_taskgroup(ident_t *loc, int gtid) {
|
|||
__kmp_task_reduction_fini(thread, taskgroup);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
// Restore parent taskgroup for the current task
|
||||
taskdata->td_taskgroup = taskgroup->parent;
|
||||
__kmp_thread_free(thread, taskgroup);
|
||||
|
@ -2674,7 +2567,6 @@ void __kmpc_end_taskgroup(ident_t *loc, int gtid) {
|
|||
}
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
// __kmp_remove_my_task: remove a task from my own deque
|
||||
static kmp_task_t *__kmp_remove_my_task(kmp_info_t *thread, kmp_int32 gtid,
|
||||
|
@ -2917,11 +2809,7 @@ static inline int __kmp_execute_tasks_template(
|
|||
|
||||
nthreads = task_team->tt.tt_nproc;
|
||||
unfinished_threads = &(task_team->tt.tt_unfinished_threads);
|
||||
#if OMP_45_ENABLED
|
||||
KMP_DEBUG_ASSERT(nthreads > 1 || task_team->tt.tt_found_proxy_tasks);
|
||||
#else
|
||||
KMP_DEBUG_ASSERT(nthreads > 1);
|
||||
#endif
|
||||
KMP_DEBUG_ASSERT(*unfinished_threads >= 0);
|
||||
|
||||
while (1) { // Outer loop keeps trying to find tasks in case of single thread
|
||||
|
@ -3046,17 +2934,11 @@ static inline int __kmp_execute_tasks_template(
|
|||
}
|
||||
}
|
||||
|
||||
// The task source has been exhausted. If in final spin loop of barrier, check
|
||||
// if termination condition is satisfied.
|
||||
#if OMP_45_ENABLED
|
||||
// The work queue may be empty but there might be proxy tasks still
|
||||
// executing
|
||||
// The task source has been exhausted. If in final spin loop of barrier,
|
||||
// check if termination condition is satisfied. The work queue may be empty
|
||||
// but there might be proxy tasks still executing.
|
||||
if (final_spin &&
|
||||
KMP_ATOMIC_LD_ACQ(¤t_task->td_incomplete_child_tasks) == 0)
|
||||
#else
|
||||
if (final_spin)
|
||||
#endif
|
||||
{
|
||||
KMP_ATOMIC_LD_ACQ(¤t_task->td_incomplete_child_tasks) == 0) {
|
||||
// First, decrement the #unfinished threads, if that has not already been
|
||||
// done. This decrement might be to the spin location, and result in the
|
||||
// termination condition being satisfied.
|
||||
|
@ -3092,14 +2974,11 @@ static inline int __kmp_execute_tasks_template(
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
#if OMP_45_ENABLED
|
||||
// We could be getting tasks from target constructs; if this is the only
|
||||
// thread, keep trying to execute tasks from own queue
|
||||
if (nthreads == 1)
|
||||
use_own_tasks = 1;
|
||||
else
|
||||
#endif
|
||||
{
|
||||
else {
|
||||
KA_TRACE(15,
|
||||
("__kmp_execute_tasks_template: T#%d can't find work\n", gtid));
|
||||
return FALSE;
|
||||
|
@ -3222,12 +3101,8 @@ static void __kmp_enable_tasking(kmp_task_team_t *task_team,
|
|||
* exit __kmp_<barrier_kind>_release at the next barrier. I.e. the lifetimes
|
||||
* of the kmp_task_team_t structs for consecutive barriers can overlap
|
||||
* (and will, unless the master thread is the last thread to exit the barrier
|
||||
* release phase, which is not typical).
|
||||
*
|
||||
* The existence of such a struct is useful outside the context of tasking,
|
||||
* but for now, I'm trying to keep it specific to the OMP_30_ENABLED macro,
|
||||
* so that any performance differences show up when comparing the 2.5 vs. 3.0
|
||||
* libraries.
|
||||
* release phase, which is not typical). The existence of such a struct is
|
||||
* useful outside the context of tasking.
|
||||
*
|
||||
* We currently use the existence of the threads array as an indicator that
|
||||
* tasks were spawned since the last barrier. If the structure is to be
|
||||
|
@ -3456,9 +3331,7 @@ static kmp_task_team_t *__kmp_allocate_task_team(kmp_info_t *thread,
|
|||
}
|
||||
|
||||
TCW_4(task_team->tt.tt_found_tasks, FALSE);
|
||||
#if OMP_45_ENABLED
|
||||
TCW_4(task_team->tt.tt_found_proxy_tasks, FALSE);
|
||||
#endif
|
||||
task_team->tt.tt_nproc = nthreads = team->t.t_nproc;
|
||||
|
||||
KMP_ATOMIC_ST_REL(&task_team->tt.tt_unfinished_threads, nthreads);
|
||||
|
@ -3620,9 +3493,7 @@ void __kmp_task_team_setup(kmp_info_t *this_thr, kmp_team_t *team, int always) {
|
|||
team->t.t_nproc != task_team->tt.tt_nproc) {
|
||||
TCW_4(task_team->tt.tt_nproc, team->t.t_nproc);
|
||||
TCW_4(task_team->tt.tt_found_tasks, FALSE);
|
||||
#if OMP_45_ENABLED
|
||||
TCW_4(task_team->tt.tt_found_proxy_tasks, FALSE);
|
||||
#endif
|
||||
KMP_ATOMIC_ST_REL(&task_team->tt.tt_unfinished_threads,
|
||||
team->t.t_nproc);
|
||||
TCW_4(task_team->tt.tt_active, TRUE);
|
||||
|
@ -3693,13 +3564,9 @@ void __kmp_task_team_wait(
|
|||
("__kmp_task_team_wait: Master T#%d deactivating task_team %p: "
|
||||
"setting active to false, setting local and team's pointer to NULL\n",
|
||||
__kmp_gtid_from_thread(this_thr), task_team));
|
||||
#if OMP_45_ENABLED
|
||||
KMP_DEBUG_ASSERT(task_team->tt.tt_nproc > 1 ||
|
||||
task_team->tt.tt_found_proxy_tasks == TRUE);
|
||||
TCW_SYNC_4(task_team->tt.tt_found_proxy_tasks, FALSE);
|
||||
#else
|
||||
KMP_DEBUG_ASSERT(task_team->tt.tt_nproc > 1);
|
||||
#endif
|
||||
KMP_CHECK_UPDATE(task_team->tt.tt_untied_task_encountered, 0);
|
||||
TCW_SYNC_4(task_team->tt.tt_active, FALSE);
|
||||
KMP_MB();
|
||||
|
@ -3743,8 +3610,6 @@ void __kmp_tasking_barrier(kmp_team_t *team, kmp_info_t *thread, int gtid) {
|
|||
#endif /* USE_ITT_BUILD */
|
||||
}
|
||||
|
||||
#if OMP_45_ENABLED
|
||||
|
||||
// __kmp_give_task puts a task into a given thread queue if:
|
||||
// - the queue for that thread was created
|
||||
// - there's space in that queue
|
||||
|
@ -3964,7 +3829,6 @@ void __kmpc_proxy_task_completed_ooo(kmp_task_t *ptask) {
|
|||
taskdata));
|
||||
}
|
||||
|
||||
#if OMP_50_ENABLED
|
||||
kmp_event_t *__kmpc_task_allow_completion_event(ident_t *loc_ref, int gtid,
|
||||
kmp_task_t *task) {
|
||||
kmp_taskdata_t *td = KMP_TASK_TO_TASKDATA(task);
|
||||
|
@ -4014,7 +3878,6 @@ void __kmp_fulfill_event(kmp_event_t *event) {
|
|||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
// __kmp_task_dup_alloc: Allocate the taskdata and make a copy of source task
|
||||
// for taskloop
|
||||
|
@ -4667,5 +4530,3 @@ void __kmpc_taskloop(ident_t *loc, int gtid, kmp_task_t *task, int if_val,
|
|||
}
|
||||
KA_TRACE(20, ("__kmpc_taskloop(exit): T#%d\n", gtid));
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
@ -88,16 +88,7 @@
|
|||
int const __kmp_version_major = KMP_VERSION_MAJOR;
|
||||
int const __kmp_version_minor = KMP_VERSION_MINOR;
|
||||
int const __kmp_version_build = KMP_VERSION_BUILD;
|
||||
int const __kmp_openmp_version =
|
||||
#if OMP_50_ENABLED
|
||||
201611;
|
||||
#elif OMP_45_ENABLED
|
||||
201511;
|
||||
#elif OMP_40_ENABLED
|
||||
201307;
|
||||
#else
|
||||
201107;
|
||||
#endif
|
||||
int const __kmp_openmp_version = 201611;
|
||||
|
||||
/* Do NOT change the format of this string! Intel(R) Thread Profiler checks for
|
||||
a specific format some changes in the recognition routine there need to be
|
||||
|
|
|
@ -274,19 +274,13 @@ final_spin=FALSE)
|
|||
|
||||
KMP_INIT_YIELD(spins); // Setup for waiting
|
||||
|
||||
if (__kmp_dflt_blocktime != KMP_MAX_BLOCKTIME
|
||||
#if OMP_50_ENABLED
|
||||
|| __kmp_pause_status == kmp_soft_paused
|
||||
#endif
|
||||
) {
|
||||
if (__kmp_dflt_blocktime != KMP_MAX_BLOCKTIME ||
|
||||
__kmp_pause_status == kmp_soft_paused) {
|
||||
#if KMP_USE_MONITOR
|
||||
// The worker threads cannot rely on the team struct existing at this point.
|
||||
// Use the bt values cached in the thread struct instead.
|
||||
#ifdef KMP_ADJUST_BLOCKTIME
|
||||
if (
|
||||
#if OMP_50_ENABLED
|
||||
__kmp_pause_status == kmp_soft_paused ||
|
||||
#endif
|
||||
if (__kmp_pause_status == kmp_soft_paused ||
|
||||
(__kmp_zero_bt && !this_thr->th.th_team_bt_set))
|
||||
// Force immediate suspend if not set by user and more threads than
|
||||
// available procs
|
||||
|
@ -310,12 +304,10 @@ final_spin=FALSE)
|
|||
th_gtid, __kmp_global.g.g_time.dt.t_value, hibernate,
|
||||
hibernate - __kmp_global.g.g_time.dt.t_value));
|
||||
#else
|
||||
#if OMP_50_ENABLED
|
||||
if (__kmp_pause_status == kmp_soft_paused) {
|
||||
// Force immediate suspend
|
||||
hibernate_goal = KMP_NOW();
|
||||
} else
|
||||
#endif
|
||||
hibernate_goal = KMP_NOW() + this_thr->th.th_team_bt_intervals;
|
||||
poll_count = 0;
|
||||
#endif // KMP_USE_MONITOR
|
||||
|
@ -387,11 +379,8 @@ final_spin=FALSE)
|
|||
}
|
||||
|
||||
// Don't suspend if KMP_BLOCKTIME is set to "infinite"
|
||||
if (__kmp_dflt_blocktime == KMP_MAX_BLOCKTIME
|
||||
#if OMP_50_ENABLED
|
||||
&& __kmp_pause_status != kmp_soft_paused
|
||||
#endif
|
||||
)
|
||||
if (__kmp_dflt_blocktime == KMP_MAX_BLOCKTIME &&
|
||||
__kmp_pause_status != kmp_soft_paused)
|
||||
continue;
|
||||
|
||||
// Don't suspend if there is a likelihood of new tasks being spawned.
|
||||
|
@ -411,11 +400,9 @@ final_spin=FALSE)
|
|||
if (!sleepable)
|
||||
continue;
|
||||
|
||||
#if OMP_50_ENABLED
|
||||
if (__kmp_dflt_blocktime == KMP_MAX_BLOCKTIME &&
|
||||
__kmp_pause_status != kmp_soft_paused)
|
||||
continue;
|
||||
#endif
|
||||
|
||||
KF_TRACE(50, ("__kmp_wait_sleep: T#%d suspend time reached\n", th_gtid));
|
||||
|
||||
|
|
|
@ -76,14 +76,9 @@
|
|||
|
||||
#define ompt_callback_mutex_released_implemented ompt_event_MAY_ALWAYS_OPTIONAL
|
||||
|
||||
#if OMP_40_ENABLED
|
||||
#define ompt_callback_dependences_implemented \
|
||||
ompt_event_MAY_ALWAYS_OPTIONAL
|
||||
#define ompt_callback_task_dependence_implemented ompt_event_MAY_ALWAYS_OPTIONAL
|
||||
#else
|
||||
#define ompt_callback_dependences_implemented ompt_event_UNIMPLEMENTED
|
||||
#define ompt_callback_task_dependence_implemented ompt_event_UNIMPLEMENTED
|
||||
#endif /* OMP_40_ENABLED */
|
||||
|
||||
#define ompt_callback_work_implemented ompt_event_MAY_ALWAYS_OPTIONAL
|
||||
|
||||
|
|
|
@ -57,10 +57,8 @@ typedef struct {
|
|||
ompt_data_t task_data;
|
||||
struct kmp_taskdata *scheduling_parent;
|
||||
int thread_num;
|
||||
#if OMP_40_ENABLED
|
||||
int ndeps;
|
||||
ompt_dependence_t *deps;
|
||||
#endif /* OMP_40_ENABLED */
|
||||
} ompt_task_info_t;
|
||||
|
||||
typedef struct {
|
||||
|
@ -88,7 +86,7 @@ typedef struct {
|
|||
|
||||
extern ompt_callbacks_internal_t ompt_callbacks;
|
||||
|
||||
#if OMP_40_ENABLED && OMPT_SUPPORT && OMPT_OPTIONAL
|
||||
#if OMPT_SUPPORT && OMPT_OPTIONAL
|
||||
#if USE_FAST_MEMORY
|
||||
#define KMP_OMPT_DEPS_ALLOC __kmp_fast_allocate
|
||||
#define KMP_OMPT_DEPS_FREE __kmp_fast_free
|
||||
|
@ -96,7 +94,7 @@ extern ompt_callbacks_internal_t ompt_callbacks;
|
|||
#define KMP_OMPT_DEPS_ALLOC __kmp_thread_malloc
|
||||
#define KMP_OMPT_DEPS_FREE __kmp_thread_free
|
||||
#endif
|
||||
#endif /* OMP_40_ENABLED && OMPT_SUPPORT && OMPT_OPTIONAL */
|
||||
#endif /* OMPT_SUPPORT && OMPT_OPTIONAL */
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
|
|
@ -1264,11 +1264,9 @@ static void __kmp_atfork_child(void) {
|
|||
// over-subscription after the fork and this can improve things for
|
||||
// scripting languages that use OpenMP inside process-parallel code).
|
||||
__kmp_affinity_type = affinity_none;
|
||||
#if OMP_40_ENABLED
|
||||
if (__kmp_nested_proc_bind.bind_types != NULL) {
|
||||
__kmp_nested_proc_bind.bind_types[0] = proc_bind_false;
|
||||
}
|
||||
#endif // OMP_40_ENABLED
|
||||
#endif // KMP_AFFINITY_SUPPORTED
|
||||
|
||||
__kmp_init_runtime = FALSE;
|
||||
|
@ -1438,7 +1436,6 @@ static inline void __kmp_suspend_template(int th_gtid, C *flag) {
|
|||
/* TODO: shouldn't this use release semantics to ensure that
|
||||
__kmp_suspend_initialize_thread gets called first? */
|
||||
old_spin = flag->set_sleeping();
|
||||
#if OMP_50_ENABLED
|
||||
if (__kmp_dflt_blocktime == KMP_MAX_BLOCKTIME &&
|
||||
__kmp_pause_status != kmp_soft_paused) {
|
||||
flag->unset_sleeping();
|
||||
|
@ -1446,7 +1443,6 @@ static inline void __kmp_suspend_template(int th_gtid, C *flag) {
|
|||
KMP_CHECK_SYSFAIL("pthread_mutex_unlock", status);
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
KF_TRACE(5, ("__kmp_suspend_template: T#%d set sleep bit for spin(%p)==%x,"
|
||||
" was %x\n",
|
||||
th_gtid, flag->get(), flag->load(), old_spin));
|
||||
|
|
|
@ -372,14 +372,12 @@ static inline void __kmp_suspend_template(int th_gtid, C *flag) {
|
|||
/* TODO: shouldn't this use release semantics to ensure that
|
||||
__kmp_suspend_initialize_thread gets called first? */
|
||||
old_spin = flag->set_sleeping();
|
||||
#if OMP_50_ENABLED
|
||||
if (__kmp_dflt_blocktime == KMP_MAX_BLOCKTIME &&
|
||||
__kmp_pause_status != kmp_soft_paused) {
|
||||
flag->unset_sleeping();
|
||||
__kmp_win32_mutex_unlock(&th->th.th_suspend_mx);
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
KF_TRACE(5, ("__kmp_suspend_template: T#%d set sleep bit for flag's"
|
||||
" loc(%p)==%d\n",
|
||||
|
|
|
@ -1,2 +0,0 @@
|
|||
if 'openmp-5.0' not in config.available_features:
|
||||
config.unsupported = True
|
|
@ -91,15 +91,6 @@ if config.has_ompt:
|
|||
# for callback.h
|
||||
config.test_flags += " -I " + config.test_source_root + "/ompt"
|
||||
|
||||
if config.libomp_omp_version >= 50:
|
||||
config.available_features.add("openmp-5.0")
|
||||
|
||||
if config.libomp_omp_version >= 45:
|
||||
config.available_features.add("openmp-4.5")
|
||||
|
||||
if config.libomp_omp_version >= 40:
|
||||
config.available_features.add("openmp-4.0")
|
||||
|
||||
if 'Linux' in config.operating_system:
|
||||
config.available_features.add("linux")
|
||||
|
||||
|
|
|
@ -6,7 +6,6 @@ config.test_compiler_features = @OPENMP_TEST_COMPILER_FEATURES@
|
|||
config.test_filecheck = "@OPENMP_FILECHECK_EXECUTABLE@"
|
||||
config.test_openmp_flags = "@OPENMP_TEST_OPENMP_FLAGS@"
|
||||
config.test_extra_flags = "@OPENMP_TEST_FLAGS@"
|
||||
config.libomp_omp_version = @LIBOMP_OMP_VERSION@
|
||||
config.libomp_obj_root = "@CMAKE_CURRENT_BINARY_DIR@"
|
||||
config.library_dir = "@LIBOMP_LIBRARY_DIR@"
|
||||
config.omp_header_directory = "@LIBOMP_BINARY_DIR@/src"
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
// RUN: %libomp-compile-and-run
|
||||
|
||||
// REQUIRES: openmp-5.0
|
||||
|
||||
#include <omp.h>
|
||||
|
||||
int main()
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
// RUN: %libomp-cxx-compile-and-run
|
||||
// RUN: %libomp-cxx-compile -DFLG=1 && %libomp-run
|
||||
// REQUIRES: openmp-5.0
|
||||
// GCC-5 is needed for OpenMP 4.0 support (taskgroup)
|
||||
// XFAIL: gcc-4
|
||||
#include <cstdio>
|
||||
|
|
Loading…
Reference in New Issue