aboutsummaryrefslogtreecommitdiff
path: root/openmp/runtime
diff options
context:
space:
mode:
Diffstat (limited to 'openmp/runtime')
-rw-r--r--openmp/runtime/CMakeLists.txt25
-rw-r--r--openmp/runtime/cmake/LibompCheckFortranFlag.cmake29
-rw-r--r--openmp/runtime/cmake/LibompExports.cmake5
-rw-r--r--openmp/runtime/cmake/LibompHandleFlags.cmake193
-rw-r--r--openmp/runtime/cmake/LibompUtils.cmake210
-rw-r--r--openmp/runtime/cmake/config-ix.cmake4
-rw-r--r--openmp/runtime/src/CMakeLists.txt109
-rw-r--r--openmp/runtime/src/dllexports2
-rw-r--r--openmp/runtime/src/exports_so.txt2
-rw-r--r--openmp/runtime/src/exports_test_so.txt2
-rw-r--r--openmp/runtime/src/include/omp.h.var5
-rw-r--r--openmp/runtime/src/include/omp_lib.F90.var1183
-rw-r--r--openmp/runtime/src/include/omp_lib.h.var1298
-rw-r--r--openmp/runtime/src/kmp.h6
-rw-r--r--openmp/runtime/src/kmp_csupport.cpp2
-rw-r--r--openmp/runtime/src/kmp_ftn_entry.h35
-rw-r--r--openmp/runtime/src/kmp_ftn_os.h8
-rw-r--r--openmp/runtime/src/z_Linux_asm.S4
-rw-r--r--openmp/runtime/test/api/omp_device_uid.c77
19 files changed, 176 insertions, 3023 deletions
diff --git a/openmp/runtime/CMakeLists.txt b/openmp/runtime/CMakeLists.txt
index 93eb14f..93948b9 100644
--- a/openmp/runtime/CMakeLists.txt
+++ b/openmp/runtime/CMakeLists.txt
@@ -15,14 +15,8 @@ endif()
# Add cmake directory to search for custom cmake functions
set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake ${CMAKE_MODULE_PATH})
-# Set libomp version
-set(LIBOMP_VERSION_MAJOR 5)
-set(LIBOMP_VERSION_MINOR 0)
-
# These include files are in the cmake/ subdirectory
-include(LibompUtils)
include(LibompGetArchitecture)
-include(LibompHandleFlags)
include(LibompDefinitions)
# Determine the target architecture
@@ -102,15 +96,12 @@ libomp_check_variable(LIBOMP_ARCH 32e x86_64 32 i386 arm ppc ppc64 ppc64le aarch
set(LIBOMP_LIB_TYPE normal CACHE STRING
"Performance,Profiling,Stubs library (normal/profile/stubs)")
libomp_check_variable(LIBOMP_LIB_TYPE normal profile stubs)
-# Set the OpenMP Year and Month associated with version
-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")
libomp_check_variable(LIBOMP_MIC_ARCH knf knc)
endif()
-set(LIBOMP_FORTRAN_MODULES FALSE CACHE BOOL
- "Create Fortran module files? (requires fortran compiler)")
+
# - Support for universal fat binary builds on Mac
# - Having this extra variable allows people to build this library as a universal library
@@ -147,8 +138,6 @@ else()
set(LIBOMP_LIBFLAGS "" CACHE STRING
"Appended user specified linked libs flags. (e.g., -lm)")
endif()
-set(LIBOMP_FFLAGS "" CACHE STRING
- "Appended user specified Fortran compiler flags. These are only used if LIBOMP_FORTRAN_MODULES==TRUE.")
# Should the libomp library and generated headers be copied into the original source exports/ directory
# Turning this to FALSE aids parallel builds to not interfere with each other.
@@ -163,14 +152,6 @@ set(LIBOMP_USE_HWLOC FALSE CACHE BOOL
set(LIBOMP_HWLOC_INSTALL_DIR /usr/local CACHE PATH
"Install path for hwloc library")
-# Get the build number from kmp_version.cpp
-libomp_get_build_number("${CMAKE_CURRENT_SOURCE_DIR}" LIBOMP_VERSION_BUILD)
-math(EXPR LIBOMP_VERSION_BUILD_YEAR "${LIBOMP_VERSION_BUILD}/10000")
-math(EXPR LIBOMP_VERSION_BUILD_MONTH_DAY "${LIBOMP_VERSION_BUILD}%10000")
-
-# Currently don't record any timestamps
-set(LIBOMP_BUILD_DATE "No_Timestamp")
-
# Architecture
set(IA32 FALSE)
set(INTEL64 FALSE)
@@ -272,10 +253,6 @@ set(LIBOMP_TOOLS_DIR ${LIBOMP_BASE_DIR}/tools)
set(LIBOMP_INC_DIR ${LIBOMP_SRC_DIR}/include)
set(LIBOMP_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR})
-# Enabling Fortran if it is needed
-if(${LIBOMP_FORTRAN_MODULES})
- enable_language(Fortran)
-endif()
# Enable MASM Compiler if it is needed (Windows only)
if(WIN32)
enable_language(ASM_MASM)
diff --git a/openmp/runtime/cmake/LibompCheckFortranFlag.cmake b/openmp/runtime/cmake/LibompCheckFortranFlag.cmake
deleted file mode 100644
index 344389f..0000000
--- a/openmp/runtime/cmake/LibompCheckFortranFlag.cmake
+++ /dev/null
@@ -1,29 +0,0 @@
-#
-#//===----------------------------------------------------------------------===//
-#//
-#// 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
-#//
-#//===----------------------------------------------------------------------===//
-#
-
-# Checking a fortran compiler flag
-# There is no real trivial way to do this in CMake, so we implement it here
-# this will have ${boolean} = TRUE if the flag succeeds, otherwise false.
-function(libomp_check_fortran_flag flag boolean)
- if(NOT DEFINED "${boolean}")
- set(retval TRUE)
- set(fortran_source
-" program hello
- print *, \"Hello World!\"
- end program hello")
-
- # Compiling as a part of runtimes introduces ARCH-unknown-linux-gnu as a
- # part of a working directory. So adding a guard for unknown.
- set(failed_regexes "[Ee]rror;[Uu]nknown[^-];[Ss]kipping")
- include(CheckFortranSourceCompiles)
- check_fortran_source_compiles("${fortran_source}" ${boolean} FAIL_REGEX "${failed_regexes}")
- set(${boolean} ${${boolean}} PARENT_SCOPE)
- endif()
-endfunction()
diff --git a/openmp/runtime/cmake/LibompExports.cmake b/openmp/runtime/cmake/LibompExports.cmake
index 461e47d..6dfe4f4 100644
--- a/openmp/runtime/cmake/LibompExports.cmake
+++ b/openmp/runtime/cmake/LibompExports.cmake
@@ -65,11 +65,14 @@ if(${LIBOMP_OMPT_SUPPORT})
)
endif()
if(${LIBOMP_FORTRAN_MODULES})
- add_custom_command(TARGET libomp-mod POST_BUILD
+ # We cannot attach a POST_BUILD command to libomp-mod, so instead attach it
+ # to omp and ensure that libomp-mod is built before by adding a dependency
+ add_custom_command(TARGET omp POST_BUILD
COMMAND ${CMAKE_COMMAND} -E make_directory ${LIBOMP_EXPORTS_MOD_DIR}
COMMAND ${CMAKE_COMMAND} -E copy omp_lib.mod ${LIBOMP_EXPORTS_MOD_DIR}
COMMAND ${CMAKE_COMMAND} -E copy omp_lib_kinds.mod ${LIBOMP_EXPORTS_MOD_DIR}
)
+ add_dependencies(omp libomp-mod)
add_custom_command(TARGET omp POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy omp_lib.h ${LIBOMP_EXPORTS_CMN_DIR}
)
diff --git a/openmp/runtime/cmake/LibompHandleFlags.cmake b/openmp/runtime/cmake/LibompHandleFlags.cmake
deleted file mode 100644
index c36a88f..0000000
--- a/openmp/runtime/cmake/LibompHandleFlags.cmake
+++ /dev/null
@@ -1,193 +0,0 @@
-#
-#//===----------------------------------------------------------------------===//
-#//
-#// 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
-#//
-#//===----------------------------------------------------------------------===//
-#
-
-# Setup the flags correctly for cmake (covert to string)
-# Pretty them up (STRIP any beginning and trailing whitespace,
-# remove duplicates, remove empty entries)
-macro(libomp_setup_flags flags)
- if(NOT "${${flags}}" STREQUAL "") # if flags are empty, don't do anything
- set(flags_local)
- list(REMOVE_DUPLICATES ${flags}) # remove duplicates
- list(REMOVE_ITEM ${flags} "") # remove empty items
- libomp_list_to_string("${${flags}}" flags_local)
- string(STRIP "${flags_local}" flags_local)
- set(${flags} "${flags_local}")
- endif()
-endmacro()
-
-# C++ compiler flags
-function(libomp_get_cxxflags cxxflags)
- set(flags_local)
-
- # GCC silently accepts any -Wno-<foo> option, but warns about those options
- # being unrecognized only if the compilation triggers other warnings to be
- # printed. Therefore, check for whether the compiler supports options in the
- # form -W<foo>, and if supported, add the corresponding -Wno-<foo> option.
-
- libomp_append(flags_local -fno-exceptions LIBOMP_HAVE_FNO_EXCEPTIONS_FLAG)
- libomp_append(flags_local -fno-rtti LIBOMP_HAVE_FNO_RTTI_FLAG)
- libomp_append(flags_local -Wno-class-memaccess LIBOMP_HAVE_WCLASS_MEMACCESS_FLAG)
- libomp_append(flags_local -Wno-covered-switch-default LIBOMP_HAVE_WCOVERED_SWITCH_DEFAULT_FLAG)
- libomp_append(flags_local -Wno-frame-address LIBOMP_HAVE_WFRAME_ADDRESS_FLAG)
- libomp_append(flags_local -Wno-strict-aliasing LIBOMP_HAVE_WSTRICT_ALIASING_FLAG)
- libomp_append(flags_local -Wstringop-overflow=0 LIBOMP_HAVE_WSTRINGOP_OVERFLOW_FLAG)
- libomp_append(flags_local -Wno-stringop-truncation LIBOMP_HAVE_WSTRINGOP_TRUNCATION_FLAG)
- libomp_append(flags_local -Wno-switch LIBOMP_HAVE_WSWITCH_FLAG)
- libomp_append(flags_local -Wno-uninitialized LIBOMP_HAVE_WUNINITIALIZED_FLAG)
- libomp_append(flags_local -Wno-return-type-c-linkage LIBOMP_HAVE_WRETURN_TYPE_C_LINKAGE_FLAG)
- libomp_append(flags_local -Wno-cast-qual LIBOMP_HAVE_WCAST_QUAL_FLAG)
- libomp_append(flags_local -Wno-int-to-void-pointer-cast LIBOMP_HAVE_WINT_TO_VOID_POINTER_CAST_FLAG)
- # libomp_append(flags_local -Wconversion LIBOMP_HAVE_WCONVERSION_FLAG)
- libomp_append(flags_local /GS LIBOMP_HAVE_GS_FLAG)
- libomp_append(flags_local /EHsc LIBOMP_HAVE_EHSC_FLAG)
- libomp_append(flags_local /Oy- LIBOMP_HAVE_OY__FLAG)
- if(${IA32} OR ${INTEL64})
- libomp_append(flags_local -mrtm LIBOMP_HAVE_MRTM_FLAG)
- endif()
- # Intel(R) C Compiler flags
- libomp_append(flags_local /Qsafeseh LIBOMP_HAVE_QSAFESEH_FLAG)
- libomp_append(flags_local -Qoption,cpp,--extended_float_types LIBOMP_HAVE_EXTENDED_FLOAT_TYPES_FLAG)
- libomp_append(flags_local -Qlong_double LIBOMP_HAVE_LONG_DOUBLE_FLAG)
- libomp_append(flags_local -Qdiag-disable:177 LIBOMP_HAVE_DIAG_DISABLE_177_FLAG)
- if(${RELEASE_BUILD} OR ${RELWITHDEBINFO_BUILD})
- libomp_append(flags_local -Qinline-min-size=1 LIBOMP_HAVE_INLINE_MIN_SIZE_FLAG)
- endif()
- # Architectural C and C++ flags
- if(CMAKE_SIZEOF_VOID_P EQUAL 4)
- libomp_append(flags_local -m32 LIBOMP_HAVE_M32_FLAG)
- endif()
- if(${IA32})
- libomp_append(flags_local /arch:SSE2 LIBOMP_HAVE_ARCH_SSE2_FLAG)
- libomp_append(flags_local -msse2 LIBOMP_HAVE_MSSE2_FLAG)
- libomp_append(flags_local -falign-stack=maintain-16-byte LIBOMP_HAVE_FALIGN_STACK_FLAG)
- elseif(${MIC})
- libomp_append(flags_local -mmic LIBOMP_HAVE_MMIC_FLAG)
- libomp_append(flags_local -ftls-model=initial-exec LIBOMP_HAVE_FTLS_MODEL_FLAG)
- libomp_append(flags_local "-opt-streaming-stores never" LIBOMP_HAVE_OPT_STREAMING_STORES_FLAG)
- endif()
- set(cxxflags_local ${flags_local} ${LIBOMP_CXXFLAGS})
- libomp_setup_flags(cxxflags_local)
- set(${cxxflags} ${cxxflags_local} PARENT_SCOPE)
-endfunction()
-
-# Assembler flags
-function(libomp_get_asmflags asmflags)
- set(asmflags_local)
- # Architectural assembler flags
- if(CMAKE_SIZEOF_VOID_P EQUAL 4)
- libomp_append(asmflags_local -m32 LIBOMP_HAVE_M32_FLAG)
- endif()
- if(${IA32})
- libomp_append(asmflags_local /safeseh LIBOMP_HAVE_SAFESEH_MASM_FLAG)
- libomp_append(asmflags_local /coff LIBOMP_HAVE_COFF_MASM_FLAG)
- elseif(${MIC})
- libomp_append(asmflags_local -mmic LIBOMP_HAVE_MMIC_FLAG)
- endif()
- set(asmflags_local ${asmflags_local} ${LIBOMP_ASMFLAGS})
- libomp_setup_flags(asmflags_local)
- set(${asmflags} ${asmflags_local} PARENT_SCOPE)
-endfunction()
-
-# Linker flags
-function(libomp_get_ldflags ldflags)
- set(ldflags_local)
- libomp_append(ldflags_local "${CMAKE_LINK_DEF_FILE_FLAG}${CMAKE_CURRENT_BINARY_DIR}/${LIBOMP_LIB_NAME}.def"
- IF_DEFINED CMAKE_LINK_DEF_FILE_FLAG)
- libomp_append(ldflags_local "${CMAKE_C_OSX_CURRENT_VERSION_FLAG}${LIBOMP_VERSION_MAJOR}.${LIBOMP_VERSION_MINOR}"
- IF_DEFINED CMAKE_C_OSX_CURRENT_VERSION_FLAG)
- libomp_append(ldflags_local "${CMAKE_C_OSX_COMPATIBILITY_VERSION_FLAG}${LIBOMP_VERSION_MAJOR}.${LIBOMP_VERSION_MINOR}"
- IF_DEFINED CMAKE_C_OSX_COMPATIBILITY_VERSION_FLAG)
- libomp_append(ldflags_local -Wl,--as-needed LIBOMP_HAVE_AS_NEEDED_FLAG)
- libomp_append(ldflags_local "-Wl,--version-script=${LIBOMP_SRC_DIR}/exports_so.txt" LIBOMP_HAVE_VERSION_SCRIPT_FLAG)
- libomp_append(ldflags_local -static-libgcc LIBOMP_HAVE_STATIC_LIBGCC_FLAG)
- libomp_append(ldflags_local -Wl,-z,noexecstack LIBOMP_HAVE_Z_NOEXECSTACK_FLAG)
- libomp_append(ldflags_local -no-intel-extensions LIBOMP_HAVE_NO_INTEL_EXTENSIONS_FLAG)
- libomp_append(ldflags_local -static-intel LIBOMP_HAVE_STATIC_INTEL_FLAG)
- libomp_append(ldflags_local /SAFESEH LIBOMP_HAVE_SAFESEH_FLAG)
- # Architectural linker flags
- if(CMAKE_SIZEOF_VOID_P EQUAL 4)
- libomp_append(ldflags_local -m32 LIBOMP_HAVE_M32_FLAG)
- endif()
- if(${IA32})
- libomp_append(ldflags_local -msse2 LIBOMP_HAVE_MSSE2_FLAG)
- elseif(${MIC})
- libomp_append(ldflags_local -mmic LIBOMP_HAVE_MMIC_FLAG)
- libomp_append(ldflags_local -Wl,-x LIBOMP_HAVE_X_FLAG)
- endif()
- set(ldflags_local ${ldflags_local} ${LIBOMP_LDFLAGS})
- libomp_setup_flags(ldflags_local)
- set(${ldflags} ${ldflags_local} PARENT_SCOPE)
-endfunction()
-
-# Library flags
-function(libomp_get_libflags libflags)
- set(libflags_local)
- libomp_append(libflags_local "${CMAKE_THREAD_LIBS_INIT}")
- libomp_append(libflags_local "${LIBOMP_HWLOC_LIBRARY}" LIBOMP_USE_HWLOC)
- if(${IA32})
- libomp_append(libflags_local -lirc_pic LIBOMP_HAVE_IRC_PIC_LIBRARY)
- endif()
- if(MINGW)
- libomp_append(libflags_local -lpsapi LIBOMP_HAVE_PSAPI)
- endif()
- if(LIBOMP_HAVE_SHM_OPEN_WITH_LRT)
- libomp_append(libflags_local -lrt)
- endif()
- if("${CMAKE_SYSTEM_NAME}" MATCHES "DragonFly|FreeBSD|OpenBSD")
- libomp_append(libflags_local "-Wl,--no-as-needed" LIBOMP_HAVE_AS_NEEDED_FLAG)
- libomp_append(libflags_local "-lm")
- libomp_append(libflags_local "-Wl,--as-needed" LIBOMP_HAVE_AS_NEEDED_FLAG)
- if ("${CMAKE_SYSTEM_NAME}" STREQUAL "DragonFly")
- libomp_append(libflags_local "-lkvm")
- endif()
- elseif("${CMAKE_SYSTEM_NAME}" MATCHES "Linux|NetBSD|SunOS")
- libomp_append(libflags_local -lm)
- endif()
- set(libflags_local ${libflags_local} ${LIBOMP_LIBFLAGS})
- libomp_setup_flags(libflags_local)
- libomp_string_to_list("${libflags_local}" libflags_local_list)
- set(${libflags} ${libflags_local_list} PARENT_SCOPE)
-endfunction()
-
-# Fortran flags
-function(libomp_get_fflags fflags)
- set(fflags_local)
- if(CMAKE_SIZEOF_VOID_P EQUAL 4)
- libomp_append(fflags_local -m32 LIBOMP_HAVE_M32_FORTRAN_FLAG)
- endif()
- set(fflags_local ${fflags_local} ${LIBOMP_FFLAGS})
- libomp_setup_flags(fflags_local)
- set(${fflags} ${fflags_local} PARENT_SCOPE)
-endfunction()
-
-# Python generate-defs.py flags (For Windows only)
-function(libomp_get_gdflags gdflags)
- set(gdflags_local)
- if(${IA32})
- set(libomp_gdflag_arch arch_32)
- libomp_append(gdflags_local "-D IS_IA_ARCH")
- elseif(${INTEL64})
- set(libomp_gdflag_arch arch_32e)
- libomp_append(gdflags_local "-D IS_IA_ARCH")
- else()
- set(libomp_gdflag_arch arch_${LIBOMP_ARCH})
- endif()
- libomp_append(gdflags_local "-D ${libomp_gdflag_arch}")
- libomp_append(gdflags_local "-D msvc_compat")
- libomp_append(gdflags_local "-D norm" NORMAL_LIBRARY)
- libomp_append(gdflags_local "-D prof" PROFILE_LIBRARY)
- 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(${DEBUG_BUILD} OR ${RELWITHDEBINFO_BUILD})
- libomp_append(gdflags_local "-D KMP_DEBUG")
- endif()
- set(${gdflags} ${gdflags_local} PARENT_SCOPE)
-endfunction()
diff --git a/openmp/runtime/cmake/LibompUtils.cmake b/openmp/runtime/cmake/LibompUtils.cmake
deleted file mode 100644
index a810881..0000000
--- a/openmp/runtime/cmake/LibompUtils.cmake
+++ /dev/null
@@ -1,210 +0,0 @@
-#
-#//===----------------------------------------------------------------------===//
-#//
-#// 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
-#//
-#//===----------------------------------------------------------------------===//
-#
-
-# void libomp_say(string message_to_user);
-# - prints out message_to_user
-macro(libomp_say message_to_user)
- message(STATUS "LIBOMP: ${message_to_user}")
-endmacro()
-
-# void libomp_warning_say(string message_to_user);
-# - prints out message_to_user with a warning
-macro(libomp_warning_say message_to_user)
- message(WARNING "LIBOMP: ${message_to_user}")
-endmacro()
-
-# void libomp_error_say(string message_to_user);
-# - prints out message_to_user with an error and exits cmake
-macro(libomp_error_say message_to_user)
- message(FATAL_ERROR "LIBOMP: ${message_to_user}")
-endmacro()
-
-# libomp_append(<flag> <flags_list> [(IF_TRUE | IF_FALSE | IF_TRUE_1_0 ) BOOLEAN])
-#
-# libomp_append(<flag> <flags_list>)
-# - unconditionally appends <flag> to the list of definitions
-#
-# libomp_append(<flag> <flags_list> <BOOLEAN>)
-# - appends <flag> to the list of definitions if BOOLEAN is true
-#
-# libomp_append(<flag> <flags_list> IF_TRUE <BOOLEAN>)
-# - appends <flag> to the list of definitions if BOOLEAN is true
-#
-# libomp_append(<flag> <flags_list> IF_FALSE <BOOLEAN>)
-# - appends <flag> to the list of definitions if BOOLEAN is false
-#
-# libomp_append(<flag> <flags_list> IF_DEFINED <VARIABLE>)
-# - appends <flag> to the list of definitions if VARIABLE is defined
-#
-# libomp_append(<flag> <flags_list> IF_TRUE_1_0 <BOOLEAN>)
-# - appends <flag>=1 to the list of definitions if <BOOLEAN> is true, <flag>=0 otherwise
-# e.g., libomp_append("-D USE_FEATURE" IF_TRUE_1_0 HAVE_FEATURE)
-# appends "-D USE_FEATURE=1" if HAVE_FEATURE is true
-# or "-D USE_FEATURE=0" if HAVE_FEATURE is false
-macro(libomp_append flags flag)
- if(NOT (${ARGC} EQUAL 2 OR ${ARGC} EQUAL 3 OR ${ARGC} EQUAL 4))
- libomp_error_say("libomp_append: takes 2, 3, or 4 arguments")
- endif()
- if(${ARGC} EQUAL 2)
- list(APPEND ${flags} "${flag}")
- elseif(${ARGC} EQUAL 3)
- if(${ARGV2})
- list(APPEND ${flags} "${flag}")
- endif()
- else()
- if(${ARGV2} STREQUAL "IF_TRUE")
- if(${ARGV3})
- list(APPEND ${flags} "${flag}")
- endif()
- elseif(${ARGV2} STREQUAL "IF_FALSE")
- if(NOT ${ARGV3})
- list(APPEND ${flags} "${flag}")
- endif()
- elseif(${ARGV2} STREQUAL "IF_DEFINED")
- if(DEFINED ${ARGV3})
- list(APPEND ${flags} "${flag}")
- endif()
- elseif(${ARGV2} STREQUAL "IF_TRUE_1_0")
- if(${ARGV3})
- list(APPEND ${flags} "${flag}=1")
- else()
- list(APPEND ${flags} "${flag}=0")
- endif()
- else()
- libomp_error_say("libomp_append: third argument must be one of IF_TRUE, IF_FALSE, IF_DEFINED, IF_TRUE_1_0")
- endif()
- endif()
-endmacro()
-
-# void libomp_get_legal_arch(string* return_arch_string);
-# - returns (through return_arch_string) the formal architecture
-# string or warns user of unknown architecture
-function(libomp_get_legal_arch return_arch_string)
- if(${IA32})
- set(${return_arch_string} "IA-32" PARENT_SCOPE)
- elseif(${INTEL64})
- set(${return_arch_string} "Intel(R) 64" PARENT_SCOPE)
- elseif(${MIC})
- set(${return_arch_string} "Intel(R) Many Integrated Core Architecture" PARENT_SCOPE)
- elseif(${ARM})
- set(${return_arch_string} "ARM" PARENT_SCOPE)
- elseif(${PPC64BE})
- set(${return_arch_string} "PPC64BE" PARENT_SCOPE)
- elseif(${PPC64LE})
- set(${return_arch_string} "PPC64LE" PARENT_SCOPE)
- elseif(${AARCH64})
- set(${return_arch_string} "AARCH64" PARENT_SCOPE)
- elseif(${AARCH64_32})
- set(${return_arch_string} "AARCH64_32" PARENT_SCOPE)
- elseif(${AARCH64_A64FX})
- set(${return_arch_string} "AARCH64_A64FX" PARENT_SCOPE)
- elseif(${MIPS})
- set(${return_arch_string} "MIPS" PARENT_SCOPE)
- elseif(${MIPS64})
- set(${return_arch_string} "MIPS64" PARENT_SCOPE)
- elseif(${RISCV64})
- set(${return_arch_string} "RISCV64" PARENT_SCOPE)
- elseif(${LOONGARCH64})
- set(${return_arch_string} "LOONGARCH64" PARENT_SCOPE)
- elseif(${VE})
- set(${return_arch_string} "VE" PARENT_SCOPE)
- elseif(${S390X})
- set(${return_arch_string} "S390X" PARENT_SCOPE)
- elseif(${SPARC})
- set(${return_arch_string} "SPARC" PARENT_SCOPE)
- elseif(${SPARCV9})
- set(${return_arch_string} "SPARCV9" PARENT_SCOPE)
- else()
- set(${return_arch_string} "${LIBOMP_ARCH}" PARENT_SCOPE)
- libomp_warning_say("libomp_get_legal_arch(): Warning: Unknown architecture: Using ${LIBOMP_ARCH}")
- endif()
-endfunction()
-
-# void libomp_check_variable(string var, ...);
-# - runs through all values checking if ${var} == value
-# - uppercase and lowercase do not matter
-# - if the var is found, then just print it out
-# - if the var is not found, then error out
-function(libomp_check_variable var)
- set(valid_flag 0)
- string(TOLOWER "${${var}}" var_lower)
- foreach(value IN LISTS ARGN)
- string(TOLOWER "${value}" value_lower)
- if("${var_lower}" STREQUAL "${value_lower}")
- set(valid_flag 1)
- set(the_value "${value}")
- endif()
- endforeach()
- if(${valid_flag} EQUAL 0)
- libomp_error_say("libomp_check_variable(): ${var} = ${${var}} is unknown")
- endif()
-endfunction()
-
-# void libomp_get_build_number(string src_dir, string* return_build_number);
-# - grab the eight digit build number (or 00000000) from kmp_version.cpp
-function(libomp_get_build_number src_dir return_build_number)
- # sets file_lines_list to a list of all lines in kmp_version.cpp
- file(STRINGS "${src_dir}/src/kmp_version.cpp" file_lines_list)
-
- # runs through each line in kmp_version.cpp
- foreach(line IN LISTS file_lines_list)
- # if the line begins with "#define KMP_VERSION_BUILD" then we take not of the build number
- string(REGEX MATCH "^[ \t]*#define[ \t]+KMP_VERSION_BUILD" valid "${line}")
- if(NOT "${valid}" STREQUAL "") # if we matched "#define KMP_VERSION_BUILD", then grab the build number
- string(REGEX REPLACE "^[ \t]*#define[ \t]+KMP_VERSION_BUILD[ \t]+([0-9]+)" "\\1"
- build_number "${line}"
- )
- endif()
- endforeach()
- set(${return_build_number} "${build_number}" PARENT_SCOPE) # return build number
-endfunction()
-
-# void libomp_get_legal_type(string* return_legal_type);
-# - set the legal type name Performance/Profiling/Stub
-function(libomp_get_legal_type return_legal_type)
- if(${NORMAL_LIBRARY})
- set(${return_legal_type} "Performance" PARENT_SCOPE)
- elseif(${PROFILE_LIBRARY})
- set(${return_legal_type} "Profiling" PARENT_SCOPE)
- elseif(${STUBS_LIBRARY})
- set(${return_legal_type} "Stub" PARENT_SCOPE)
- endif()
-endfunction()
-
-# void libomp_add_suffix(string suffix, list<string>* list_of_items);
-# - returns list_of_items with suffix appended to all items
-# - original list is modified
-function(libomp_add_suffix suffix list_of_items)
- set(local_list "")
- foreach(item IN LISTS "${list_of_items}")
- if(NOT "${item}" STREQUAL "")
- list(APPEND local_list "${item}${suffix}")
- endif()
- endforeach()
- set(${list_of_items} "${local_list}" PARENT_SCOPE)
-endfunction()
-
-# void libomp_list_to_string(list<string> list_of_things, string* return_string);
-# - converts a list to a space separated string
-function(libomp_list_to_string list_of_things return_string)
- string(REPLACE ";" " " output_variable "${list_of_things}")
- set(${return_string} "${output_variable}" PARENT_SCOPE)
-endfunction()
-
-# void libomp_string_to_list(string str, list<string>* return_list);
-# - converts a string to a semicolon separated list
-# - what it really does is just string_replace all running whitespace to a semicolon
-# - in cmake, a list is strings separated by semicolons: i.e., list of four items, list = "item1;item2;item3;item4"
-function(libomp_string_to_list str return_list)
- set(outstr)
- string(REGEX REPLACE "[ \t]+" ";" outstr "${str}")
- set(${return_list} "${outstr}" PARENT_SCOPE)
-endfunction()
-
diff --git a/openmp/runtime/cmake/config-ix.cmake b/openmp/runtime/cmake/config-ix.cmake
index 30b69d46..150a0c3 100644
--- a/openmp/runtime/cmake/config-ix.cmake
+++ b/openmp/runtime/cmake/config-ix.cmake
@@ -16,7 +16,6 @@ include(CheckIncludeFile)
include(CheckLibraryExists)
include(CheckIncludeFiles)
include(CheckSymbolExists)
-include(LibompCheckFortranFlag)
include(LLVMCheckCompilerLinkerFlag)
# Check for versioned symbols
@@ -97,9 +96,6 @@ if(WIN32)
endforeach()
endforeach()
endif()
-if(${LIBOMP_FORTRAN_MODULES})
- libomp_check_fortran_flag(-m32 LIBOMP_HAVE_M32_FORTRAN_FLAG)
-endif()
# Check non-posix pthread API here before CMAKE_REQUIRED_DEFINITIONS gets messed up
check_symbol_exists(pthread_setname_np "pthread.h" LIBOMP_HAVE_PTHREAD_SETNAME_NP)
diff --git a/openmp/runtime/src/CMakeLists.txt b/openmp/runtime/src/CMakeLists.txt
index 6ac047a..0c08047 100644
--- a/openmp/runtime/src/CMakeLists.txt
+++ b/openmp/runtime/src/CMakeLists.txt
@@ -254,23 +254,35 @@ set(LIBOMP_INCLUDE_DIR ${CMAKE_CURRENT_BINARY_DIR} PARENT_SCOPE)
# Add symbolic links to libomp
if(NOT WIN32)
- add_custom_command(TARGET omp POST_BUILD
- COMMAND ${CMAKE_COMMAND} -E create_symlink ${LIBOMP_LIB_FILE}
- libgomp${LIBOMP_LIBRARY_SUFFIX}
- COMMAND ${CMAKE_COMMAND} -E create_symlink ${LIBOMP_LIB_FILE}
- libiomp5${LIBOMP_LIBRARY_SUFFIX}
- WORKING_DIRECTORY ${LIBOMP_LIBRARY_DIR}
- )
- if(LIBOMP_ENABLE_SHARED)
- if(APPLE)
- set(VERSIONED_LIBGOMP_NAME libgomp.1${LIBOMP_LIBRARY_SUFFIX})
- else()
- set(VERSIONED_LIBGOMP_NAME libgomp${LIBOMP_LIBRARY_SUFFIX}.1)
- endif()
+ if(AIX)
+ # On AIX, libomp.a is the name for both static and shared objects.
+ set(LIBOMP_AIX_SUFFIX ${CMAKE_STATIC_LIBRARY_SUFFIX})
+ add_custom_command(TARGET omp POST_BUILD
+ COMMAND ${CMAKE_COMMAND} -E create_symlink
+ ${LIBOMP_LIB_NAME}${LIBOMP_AIX_SUFFIX} libgomp${LIBOMP_AIX_SUFFIX}
+ COMMAND ${CMAKE_COMMAND} -E create_symlink
+ ${LIBOMP_LIB_NAME}${LIBOMP_AIX_SUFFIX} libiomp5${LIBOMP_AIX_SUFFIX}
+ WORKING_DIRECTORY ${LIBOMP_LIBRARY_DIR}
+ )
+ else()
add_custom_command(TARGET omp POST_BUILD
- COMMAND ${CMAKE_COMMAND} -E create_symlink ${LIBOMP_LIB_FILE} ${VERSIONED_LIBGOMP_NAME}
+ COMMAND ${CMAKE_COMMAND} -E create_symlink ${LIBOMP_LIB_FILE}
+ libiomp5${LIBOMP_LIBRARY_SUFFIX}
+ COMMAND ${CMAKE_COMMAND} -E create_symlink ${LIBOMP_LIB_FILE}
+ libgomp${LIBOMP_LIBRARY_SUFFIX}
WORKING_DIRECTORY ${LIBOMP_LIBRARY_DIR}
)
+ if(LIBOMP_ENABLE_SHARED)
+ if(APPLE)
+ set(VERSIONED_LIBGOMP_NAME libgomp.1${LIBOMP_LIBRARY_SUFFIX})
+ else()
+ set(VERSIONED_LIBGOMP_NAME libgomp${LIBOMP_LIBRARY_SUFFIX}.1)
+ endif()
+ add_custom_command(TARGET omp POST_BUILD
+ COMMAND ${CMAKE_COMMAND} -E create_symlink ${LIBOMP_LIB_FILE} ${VERSIONED_LIBGOMP_NAME}
+ WORKING_DIRECTORY ${LIBOMP_LIBRARY_DIR}
+ )
+ endif()
endif()
endif()
@@ -365,51 +377,6 @@ if(WIN32)
endif()
endif()
-# Building the Fortran module files
-# One compilation step creates both omp_lib.mod and omp_lib_kinds.mod
-configure_file(${LIBOMP_INC_DIR}/omp_lib.h.var omp_lib.h @ONLY)
-configure_file(${LIBOMP_INC_DIR}/omp_lib.F90.var omp_lib.F90 @ONLY)
-
-set(BUILD_FORTRAN_MODULES False)
-if (NOT ${LIBOMP_FORTRAN_MODULES_COMPILER} STREQUAL "")
- # If libomp is built as an LLVM runtime and the flang compiler is available,
- # compile the Fortran module files.
- message(STATUS "configuring openmp to build Fortran module files using ${LIBOMP_FORTRAN_MODULES_COMPILER}")
- set(LIBOMP_FORTRAN_SOURCE_FILE omp_lib.F90)
- add_custom_target(libomp-mod ALL DEPENDS omp_lib.mod omp_lib_kinds.mod)
- add_custom_command(
- OUTPUT omp_lib.mod omp_lib_kinds.mod
- COMMAND ${LIBOMP_FORTRAN_MODULES_COMPILER} -cpp -fsyntax-only ${LIBOMP_FORTRAN_SOURCE_FILE}
- DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/${LIBOMP_FORTRAN_SOURCE_FILE}
- ${CMAKE_CURRENT_BINARY_DIR}/omp_lib.h
- )
- set(BUILD_FORTRAN_MODULES True)
-elseif(${LIBOMP_FORTRAN_MODULES})
- # The following requests explicit building of the Fortran module files
- # Workaround for gfortran to build modules with the
- # omp_sched_monotonic integer parameter
- if (CMAKE_Fortran_COMPILER_ID STREQUAL "GNU")
- set(ADDITIONAL_Fortran_FLAGS "-fno-range-check")
- endif()
- add_custom_target(libomp-mod ALL DEPENDS omp_lib.mod omp_lib_kinds.mod)
- set_target_properties(libomp-mod PROPERTIES FOLDER "OpenMP/Misc")
- libomp_get_fflags(LIBOMP_CONFIGURED_FFLAGS)
- if(CMAKE_Fortran_COMPILER_SUPPORTS_F90)
- set(LIBOMP_FORTRAN_SOURCE_FILE omp_lib.F90)
- else()
- message(FATAL_ERROR "Fortran module build requires Fortran 90 compiler")
- endif()
- add_custom_command(
- OUTPUT omp_lib.mod omp_lib_kinds.mod
- COMMAND ${CMAKE_Fortran_COMPILER} -c ${ADDITIONAL_Fortran_FLAGS}
- ${LIBOMP_CONFIGURED_FFLAGS} ${LIBOMP_FORTRAN_SOURCE_FILE}
- DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/${LIBOMP_FORTRAN_SOURCE_FILE}
- ${CMAKE_CURRENT_BINARY_DIR}/omp_lib.h
- )
- set_directory_properties(PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES omp_lib${CMAKE_C_OUTPUT_EXTENSION})
- set(BUILD_FORTRAN_MODULES True)
-endif()
-
# Move files to exports/ directory if requested
if(${LIBOMP_COPY_EXPORTS})
include(LibompExports)
@@ -459,13 +426,19 @@ else()
if(${LIBOMP_INSTALL_ALIASES})
# Create aliases (symlinks) of the library for backwards compatibility
extend_path(outdir "${CMAKE_INSTALL_PREFIX}" "${OPENMP_INSTALL_LIBDIR}")
+ if(AIX)
+ # On AIX, libomp.a is the name for both static and shared objects.
+ set(LIBRARY_SUFFIX ${CMAKE_STATIC_LIBRARY_SUFFIX})
+ else()
+ set(LIBRARY_SUFFIX ${LIBOMP_LIBRARY_SUFFIX})
+ endif()
set(LIBOMP_ALIASES "libgomp;libiomp5")
foreach(alias IN LISTS LIBOMP_ALIASES)
- install(CODE "execute_process(COMMAND \"\${CMAKE_COMMAND}\" -E create_symlink \"${LIBOMP_LIB_FILE}\"
- \"${alias}${LIBOMP_LIBRARY_SUFFIX}\" WORKING_DIRECTORY
+ install(CODE "execute_process(COMMAND \"\${CMAKE_COMMAND}\" -E create_symlink \"${LIBOMP_LIB_NAME}${LIBRARY_SUFFIX}\"
+ \"${alias}${LIBRARY_SUFFIX}\" WORKING_DIRECTORY
\"\$ENV{DESTDIR}${outdir}\")")
endforeach()
- if(LIBOMP_ENABLE_SHARED)
+ if(LIBOMP_ENABLE_SHARED AND NOT AIX)
install(CODE "execute_process(COMMAND \"\${CMAKE_COMMAND}\" -E create_symlink \"${LIBOMP_LIB_FILE}\"
\"${VERSIONED_LIBGOMP_NAME}\" WORKING_DIRECTORY
\"\$ENV{DESTDIR}${outdir}\")")
@@ -484,15 +457,3 @@ if(${LIBOMP_OMPT_SUPPORT})
install(FILES ${LIBOMP_HEADERS_INTDIR}/omp-tools.h DESTINATION ${LIBOMP_HEADERS_INSTALL_PATH} RENAME ompt.h)
set(LIBOMP_OMP_TOOLS_INCLUDE_DIR ${CMAKE_CURRENT_BINARY_DIR} PARENT_SCOPE)
endif()
-if(${BUILD_FORTRAN_MODULES})
- set (destination ${LIBOMP_HEADERS_INSTALL_PATH})
- if (NOT ${LIBOMP_MODULES_INSTALL_PATH} STREQUAL "")
- set (destination ${LIBOMP_MODULES_INSTALL_PATH})
- endif()
- install(FILES
- ${CMAKE_CURRENT_BINARY_DIR}/omp_lib.h
- ${CMAKE_CURRENT_BINARY_DIR}/omp_lib.mod
- ${CMAKE_CURRENT_BINARY_DIR}/omp_lib_kinds.mod
- DESTINATION ${destination}
- )
-endif()
diff --git a/openmp/runtime/src/dllexports b/openmp/runtime/src/dllexports
index 3983dae..00becd1 100644
--- a/openmp/runtime/src/dllexports
+++ b/openmp/runtime/src/dllexports
@@ -544,6 +544,8 @@ kmp_set_disp_num_buffers 890
omp_get_devices_all_allocator 819
omp_get_memspace_num_resources 820
omp_get_submemspace 821
+ omp_get_device_from_uid 822
+ omp_get_uid_from_device 823
%ifndef stub
__kmpc_set_default_allocator
__kmpc_get_default_allocator
diff --git a/openmp/runtime/src/exports_so.txt b/openmp/runtime/src/exports_so.txt
index 124c80a..d826882 100644
--- a/openmp/runtime/src/exports_so.txt
+++ b/openmp/runtime/src/exports_so.txt
@@ -105,6 +105,8 @@ OMP_4.5 {
} OMP_4.0;
OMP_5.0 {
} OMP_4.5;
+OMP_6.0 {
+} OMP_5.0;
# sets up GCC GOMP_ version dependency chain
GOMP_1.0 {
diff --git a/openmp/runtime/src/exports_test_so.txt b/openmp/runtime/src/exports_test_so.txt
index c0a08e6..02ef8ec 100644
--- a/openmp/runtime/src/exports_test_so.txt
+++ b/openmp/runtime/src/exports_test_so.txt
@@ -36,6 +36,8 @@ OMP_4.5 {
} OMP_4.0;
OMP_5.0 {
} OMP_4.5;
+OMP_6.0 {
+} OMP_5.0;
# sets up GCC GOMP_ version dependency chain
GOMP_1.0 {
diff --git a/openmp/runtime/src/include/omp.h.var b/openmp/runtime/src/include/omp.h.var
index 74f385f..e98df73 100644
--- a/openmp/runtime/src/include/omp.h.var
+++ b/openmp/runtime/src/include/omp.h.var
@@ -536,6 +536,11 @@
/* OpenMP 5.2 */
extern int __KAI_KMPC_CONVENTION omp_in_explicit_task(void);
+ #define omp_invalid_device -2
+
+ /* OpenMP 6.0 */
+ extern int __KAI_KMPC_CONVENTION omp_get_device_from_uid(const char *DeviceUid);
+ extern const char * __KAI_KMPC_CONVENTION omp_get_uid_from_device(int DeviceNum);
/* LLVM Extensions */
extern void *llvm_omp_target_dynamic_shared_alloc(void);
diff --git a/openmp/runtime/src/include/omp_lib.F90.var b/openmp/runtime/src/include/omp_lib.F90.var
deleted file mode 100644
index 90d7e49..0000000
--- a/openmp/runtime/src/include/omp_lib.F90.var
+++ /dev/null
@@ -1,1183 +0,0 @@
-! include/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
-
- ! Set PRIVATE by default to explicitly only export what is meant
- ! to be exported by this MODULE.
- private
-
- integer, parameter, public :: omp_integer_kind = c_int
- integer, parameter, public :: omp_logical_kind = 4
- integer, parameter, public :: omp_real_kind = c_float
- integer, parameter, public :: kmp_double_kind = c_double
- integer, parameter, public :: omp_lock_kind = c_intptr_t
- integer, parameter, public :: omp_nest_lock_kind = c_intptr_t
- integer, parameter, public :: omp_sched_kind = omp_integer_kind
- integer, parameter, public :: omp_proc_bind_kind = omp_integer_kind
- integer, parameter, public :: kmp_pointer_kind = c_intptr_t
- integer, parameter, public :: kmp_size_t_kind = c_size_t
- integer, parameter, public :: kmp_affinity_mask_kind = c_intptr_t
- integer, parameter, public :: kmp_cancel_kind = omp_integer_kind
- integer, parameter, public :: omp_sync_hint_kind = omp_integer_kind
- integer, parameter, public :: omp_lock_hint_kind = omp_sync_hint_kind
- integer, parameter, public :: omp_control_tool_kind = omp_integer_kind
- integer, parameter, public :: omp_control_tool_result_kind = omp_integer_kind
- integer, parameter, public :: omp_allocator_handle_kind = c_intptr_t
- integer, parameter, public :: omp_memspace_handle_kind = c_intptr_t
- integer, parameter, public :: omp_alloctrait_key_kind = omp_integer_kind
- integer, parameter, public :: omp_alloctrait_val_kind = c_intptr_t
- integer, parameter, public :: omp_interop_kind = c_intptr_t
- integer, parameter, public :: omp_interop_fr_kind = omp_integer_kind
-
- type omp_alloctrait
- integer(kind=omp_alloctrait_key_kind) key
- integer(kind=omp_alloctrait_val_kind) value
- end type omp_alloctrait
- public :: omp_alloctrait
-
- integer, parameter, public :: omp_pause_resource_kind = omp_integer_kind
- integer, parameter, public :: omp_depend_kind = c_intptr_t
- integer, parameter, public :: omp_event_handle_kind = c_intptr_t
-
- end module omp_lib_kinds
-
- module omp_lib
-
- use omp_lib_kinds
-
- ! Set PRIVATE by default to explicitly only export what is meant
- ! to be exported by this MODULE.
- private
-
- ! Re-export definitions in omp_lib_kinds
- public :: omp_integer_kind
- public :: omp_logical_kind
- public :: omp_real_kind
- public :: kmp_double_kind
- public :: omp_lock_kind
- public :: omp_nest_lock_kind
- public :: omp_sched_kind
- public :: omp_proc_bind_kind
- public :: kmp_pointer_kind
- public :: kmp_size_t_kind
- public :: kmp_affinity_mask_kind
- public :: kmp_cancel_kind
- public :: omp_sync_hint_kind
- public :: omp_lock_hint_kind
- public :: omp_control_tool_kind
- public :: omp_control_tool_result_kind
- public :: omp_allocator_handle_kind
- public :: omp_memspace_handle_kind
- public :: omp_alloctrait_key_kind
- public :: omp_alloctrait_val_kind
- public :: omp_interop_kind
- public :: omp_interop_fr_kind
- public :: omp_alloctrait
- public :: omp_pause_resource_kind
- public :: omp_depend_kind
- public :: omp_event_handle_kind
-
- integer (kind=omp_integer_kind), parameter, public :: openmp_version = @LIBOMP_OMP_YEAR_MONTH@
- integer (kind=omp_integer_kind), parameter, public :: kmp_version_major = @LIBOMP_VERSION_MAJOR@
- integer (kind=omp_integer_kind), parameter, public :: kmp_version_minor = @LIBOMP_VERSION_MINOR@
- integer (kind=omp_integer_kind), parameter, public :: kmp_version_build = @LIBOMP_VERSION_BUILD@
- character(*) kmp_build_date
- parameter( kmp_build_date = '@LIBOMP_BUILD_DATE@' )
-
- integer(kind=omp_sched_kind), parameter, public :: omp_sched_static = 1
- integer(kind=omp_sched_kind), parameter, public :: omp_sched_dynamic = 2
- integer(kind=omp_sched_kind), parameter, public :: omp_sched_guided = 3
- integer(kind=omp_sched_kind), parameter, public :: omp_sched_auto = 4
- integer(kind=omp_sched_kind), parameter, public :: omp_sched_monotonic = int(Z'80000000', kind=omp_sched_kind)
-
- integer (kind=omp_proc_bind_kind), parameter, public :: omp_proc_bind_false = 0
- integer (kind=omp_proc_bind_kind), parameter, public :: omp_proc_bind_true = 1
- integer (kind=omp_proc_bind_kind), parameter, public :: omp_proc_bind_master = 2
- integer (kind=omp_proc_bind_kind), parameter, public :: omp_proc_bind_close = 3
- integer (kind=omp_proc_bind_kind), parameter, public :: omp_proc_bind_spread = 4
-
- integer (kind=kmp_cancel_kind), parameter, public :: kmp_cancel_parallel = 1
- integer (kind=kmp_cancel_kind), parameter, public :: kmp_cancel_loop = 2
- integer (kind=kmp_cancel_kind), parameter, public :: kmp_cancel_sections = 3
- integer (kind=kmp_cancel_kind), parameter, public :: kmp_cancel_taskgroup = 4
-
- integer (kind=omp_sync_hint_kind), parameter, public :: omp_sync_hint_none = 0
- integer (kind=omp_sync_hint_kind), parameter, public :: omp_sync_hint_uncontended = 1
- integer (kind=omp_sync_hint_kind), parameter, public :: omp_sync_hint_contended = 2
- integer (kind=omp_sync_hint_kind), parameter, public :: omp_sync_hint_nonspeculative = 4
- integer (kind=omp_sync_hint_kind), parameter, public :: omp_sync_hint_speculative = 8
- integer (kind=omp_lock_hint_kind), parameter, public :: omp_lock_hint_none = omp_sync_hint_none
- integer (kind=omp_lock_hint_kind), parameter, public :: omp_lock_hint_uncontended = omp_sync_hint_uncontended
- integer (kind=omp_lock_hint_kind), parameter, public :: omp_lock_hint_contended = omp_sync_hint_contended
- integer (kind=omp_lock_hint_kind), parameter, public :: omp_lock_hint_nonspeculative = omp_sync_hint_nonspeculative
- integer (kind=omp_lock_hint_kind), parameter, public :: omp_lock_hint_speculative = omp_sync_hint_speculative
- integer (kind=omp_lock_hint_kind), parameter, public :: kmp_lock_hint_hle = 65536
- integer (kind=omp_lock_hint_kind), parameter, public :: kmp_lock_hint_rtm = 131072
- integer (kind=omp_lock_hint_kind), parameter, public :: kmp_lock_hint_adaptive = 262144
-
- integer (kind=omp_control_tool_kind), parameter, public :: omp_control_tool_start = 1
- integer (kind=omp_control_tool_kind), parameter, public :: omp_control_tool_pause = 2
- integer (kind=omp_control_tool_kind), parameter, public :: omp_control_tool_flush = 3
- integer (kind=omp_control_tool_kind), parameter, public :: omp_control_tool_end = 4
-
- integer (kind=omp_control_tool_result_kind), parameter, public :: omp_control_tool_notool = -2
- integer (kind=omp_control_tool_result_kind), parameter, public :: omp_control_tool_nocallback = -1
- integer (kind=omp_control_tool_result_kind), parameter, public :: omp_control_tool_success = 0
- integer (kind=omp_control_tool_result_kind), parameter, public :: omp_control_tool_ignored = 1
-
- integer (kind=omp_alloctrait_key_kind), parameter, public :: omp_atk_sync_hint = 1
- integer (kind=omp_alloctrait_key_kind), parameter, public :: omp_atk_alignment = 2
- integer (kind=omp_alloctrait_key_kind), parameter, public :: omp_atk_access = 3
- integer (kind=omp_alloctrait_key_kind), parameter, public :: omp_atk_pool_size = 4
- integer (kind=omp_alloctrait_key_kind), parameter, public :: omp_atk_fallback = 5
- integer (kind=omp_alloctrait_key_kind), parameter, public :: omp_atk_fb_data = 6
- integer (kind=omp_alloctrait_key_kind), parameter, public :: omp_atk_pinned = 7
- integer (kind=omp_alloctrait_key_kind), parameter, public :: omp_atk_partition = 8
- integer (kind=omp_alloctrait_key_kind), parameter, public :: omp_atk_pin_device = 9
- integer (kind=omp_alloctrait_key_kind), parameter, public :: omp_atk_preferred_device = 10
- integer (kind=omp_alloctrait_key_kind), parameter, public :: omp_atk_device_access = 11
- integer (kind=omp_alloctrait_key_kind), parameter, public :: omp_atk_target_access = 12
- integer (kind=omp_alloctrait_key_kind), parameter, public :: omp_atk_atomic_scope = 13
- integer (kind=omp_alloctrait_key_kind), parameter, public :: omp_atk_part_size = 14
-
- integer (kind=omp_alloctrait_val_kind), parameter, public :: omp_atv_default = -1
- integer (kind=omp_alloctrait_val_kind), parameter, public :: omp_atv_false = 0
- integer (kind=omp_alloctrait_val_kind), parameter, public :: omp_atv_true = 1
- integer (kind=omp_alloctrait_val_kind), parameter, public :: omp_atv_contended = 3
- integer (kind=omp_alloctrait_val_kind), parameter, public :: omp_atv_uncontended = 4
- integer (kind=omp_alloctrait_val_kind), parameter, public :: omp_atv_serialized = 5
- integer (kind=omp_alloctrait_val_kind), parameter, public :: omp_atv_sequential = omp_atv_serialized
- integer (kind=omp_alloctrait_val_kind), parameter, public :: omp_atv_private = 6
- integer (kind=omp_alloctrait_val_kind), parameter, public :: omp_atv_device = 7
- integer (kind=omp_alloctrait_val_kind), parameter, public :: omp_atv_thread = 8
- integer (kind=omp_alloctrait_val_kind), parameter, public :: omp_atv_pteam = 9
- integer (kind=omp_alloctrait_val_kind), parameter, public :: omp_atv_cgroup = 10
- integer (kind=omp_alloctrait_val_kind), parameter, public :: omp_atv_default_mem_fb = 11
- integer (kind=omp_alloctrait_val_kind), parameter, public :: omp_atv_null_fb = 12
- integer (kind=omp_alloctrait_val_kind), parameter, public :: omp_atv_abort_fb = 13
- integer (kind=omp_alloctrait_val_kind), parameter, public :: omp_atv_allocator_fb = 14
- integer (kind=omp_alloctrait_val_kind), parameter, public :: omp_atv_environment = 15
- integer (kind=omp_alloctrait_val_kind), parameter, public :: omp_atv_nearest = 16
- integer (kind=omp_alloctrait_val_kind), parameter, public :: omp_atv_blocked = 17
- integer (kind=omp_alloctrait_val_kind), parameter, public :: omp_atv_interleaved = 18
- integer (kind=omp_alloctrait_val_kind), parameter, public :: omp_atv_all = 19
- integer (kind=omp_alloctrait_val_kind), parameter, public :: omp_atv_single = 20
- integer (kind=omp_alloctrait_val_kind), parameter, public :: omp_atv_multiple = 21
- integer (kind=omp_alloctrait_val_kind), parameter, public :: omp_atv_memspace = 22
-
- integer (kind=omp_allocator_handle_kind), parameter, public :: omp_null_allocator = 0
- integer (kind=omp_allocator_handle_kind), parameter, public :: omp_default_mem_alloc = 1
- integer (kind=omp_allocator_handle_kind), parameter, public :: omp_large_cap_mem_alloc = 2
- integer (kind=omp_allocator_handle_kind), parameter, public :: omp_const_mem_alloc = 3
- integer (kind=omp_allocator_handle_kind), parameter, public :: omp_high_bw_mem_alloc = 4
- integer (kind=omp_allocator_handle_kind), parameter, public :: omp_low_lat_mem_alloc = 5
- integer (kind=omp_allocator_handle_kind), parameter, public :: omp_cgroup_mem_alloc = 6
- integer (kind=omp_allocator_handle_kind), parameter, public :: omp_pteam_mem_alloc = 7
- integer (kind=omp_allocator_handle_kind), parameter, public :: omp_thread_mem_alloc = 8
- integer (kind=omp_allocator_handle_kind), parameter, public :: llvm_omp_target_host_mem_alloc = 100
- integer (kind=omp_allocator_handle_kind), parameter, public :: llvm_omp_target_shared_mem_alloc = 101
- integer (kind=omp_allocator_handle_kind), parameter, public :: llvm_omp_target_device_mem_alloc = 102
-
- integer (kind=omp_memspace_handle_kind), parameter, public :: omp_null_mem_space = 0
- integer (kind=omp_memspace_handle_kind), parameter, public :: omp_default_mem_space = 99
- integer (kind=omp_memspace_handle_kind), parameter, public :: omp_large_cap_mem_space = 1
- integer (kind=omp_memspace_handle_kind), parameter, public :: omp_const_mem_space = 2
- integer (kind=omp_memspace_handle_kind), parameter, public :: omp_high_bw_mem_space = 3
- integer (kind=omp_memspace_handle_kind), parameter, public :: omp_low_lat_mem_space = 4
- integer (kind=omp_memspace_handle_kind), parameter, public :: llvm_omp_target_host_mem_space = 100
- integer (kind=omp_memspace_handle_kind), parameter, public :: llvm_omp_target_shared_mem_space = 101
- integer (kind=omp_memspace_handle_kind), parameter, public :: llvm_omp_target_device_mem_space = 102
-
- integer (kind=omp_pause_resource_kind), parameter, public :: omp_pause_resume = 0
- integer (kind=omp_pause_resource_kind), parameter, public :: omp_pause_soft = 1
- integer (kind=omp_pause_resource_kind), parameter, public :: omp_pause_hard = 2
- integer (kind=omp_pause_resource_kind), parameter, public :: omp_pause_stop_tool = 3
-
- integer (kind=omp_interop_fr_kind), parameter, public :: omp_ifr_cuda = 1
- integer (kind=omp_interop_fr_kind), parameter, public :: omp_ifr_cuda_driver = 2
- integer (kind=omp_interop_fr_kind), parameter, public :: omp_ifr_opencl = 3
- integer (kind=omp_interop_fr_kind), parameter, public :: omp_ifr_sycl = 4
- integer (kind=omp_interop_fr_kind), parameter, public :: omp_ifr_hip = 5
- integer (kind=omp_interop_fr_kind), parameter, public :: omp_ifr_level_zero = 6
- integer (kind=omp_interop_fr_kind), parameter, public :: omp_ifr_last = 7
-
- integer (kind=omp_interop_kind), parameter, public :: omp_interop_none = 0
-
- 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
- logical (kind=omp_logical_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
-
- function omp_get_device_num() bind(c)
- use omp_lib_kinds
- integer (kind=omp_integer_kind) omp_get_device_num
- end function omp_get_device_num
-
- function omp_pause_resource(kind, device_num) bind(c)
- use omp_lib_kinds
- integer (kind=omp_pause_resource_kind), value :: kind
- integer (kind=omp_integer_kind), value :: device_num
- integer (kind=omp_integer_kind) omp_pause_resource
- end function omp_pause_resource
-
- function omp_pause_resource_all(kind) bind(c)
- use omp_lib_kinds
- integer (kind=omp_pause_resource_kind), value :: kind
- integer (kind=omp_integer_kind) omp_pause_resource_all
- end function omp_pause_resource_all
-
- function omp_get_supported_active_levels() bind(c)
- use omp_lib_kinds
- integer (kind=omp_integer_kind) omp_get_supported_active_levels
- end function omp_get_supported_active_levels
-
- subroutine omp_fulfill_event(event) bind(c)
- use omp_lib_kinds
- integer (kind=omp_event_handle_kind), value :: event
- end subroutine omp_fulfill_event
-
- subroutine omp_init_lock(svar) bind(c)
-#ifdef __INTEL_COMPILER
-!DIR$ IF(__INTEL_COMPILER.GE.1400)
-!DIR$ attributes known_intrinsic :: omp_init_lock
-!DIR$ ENDIF
-#endif
- use omp_lib_kinds
- integer (kind=omp_lock_kind) svar
- end subroutine omp_init_lock
-
- subroutine omp_destroy_lock(svar) bind(c)
-#ifdef __INTEL_COMPILER
-!DIR$ IF(__INTEL_COMPILER.GE.1400)
-!DIR$ attributes known_intrinsic :: omp_destroy_lock
-!DIR$ ENDIF
-#endif
- use omp_lib_kinds
- integer (kind=omp_lock_kind) svar
- end subroutine omp_destroy_lock
-
- subroutine omp_set_lock(svar) bind(c)
-#ifdef __INTEL_COMPILER
-!DIR$ IF(__INTEL_COMPILER.GE.1400)
-!DIR$ attributes known_intrinsic :: omp_set_lock
-!DIR$ ENDIF
-#endif
- use omp_lib_kinds
- integer (kind=omp_lock_kind) svar
- end subroutine omp_set_lock
-
- subroutine omp_unset_lock(svar) bind(c)
-#ifdef __INTEL_COMPILER
-!DIR$ IF(__INTEL_COMPILER.GE.1400)
-!DIR$ attributes known_intrinsic :: omp_unset_lock
-!DIR$ ENDIF
-#endif
- use omp_lib_kinds
- integer (kind=omp_lock_kind) svar
- end subroutine omp_unset_lock
-
- function omp_test_lock(svar) bind(c)
-#ifdef __INTEL_COMPILER
-!DIR$ IF(__INTEL_COMPILER.GE.1400)
-!DIR$ attributes known_intrinsic :: omp_test_lock
-!DIR$ ENDIF
-#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)
-#ifdef __INTEL_COMPILER
-!DIR$ IF(__INTEL_COMPILER.GE.1400)
-!DIR$ attributes known_intrinsic :: omp_init_nest_lock
-!DIR$ ENDIF
-#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)
-#ifdef __INTEL_COMPILER
-!DIR$ IF(__INTEL_COMPILER.GE.1400)
-!DIR$ attributes known_intrinsic :: omp_destroy_nest_lock
-!DIR$ ENDIF
-#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)
-#ifdef __INTEL_COMPILER
-!DIR$ IF(__INTEL_COMPILER.GE.1400)
-!DIR$ attributes known_intrinsic :: omp_set_nest_lock
-!DIR$ ENDIF
-#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)
-#ifdef __INTEL_COMPILER
-!DIR$ IF(__INTEL_COMPILER.GE.1400)
-!DIR$ attributes known_intrinsic :: omp_unset_nest_lock
-!DIR$ ENDIF
-#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)
-#ifdef __INTEL_COMPILER
-!DIR$ IF(__INTEL_COMPILER.GE.1400)
-!DIR$ attributes known_intrinsic :: omp_test_nest_lock
-!DIR$ ENDIF
-#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
-
- 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
-
- function omp_control_tool(command, modifier, arg) bind(c)
- use omp_lib_kinds
- integer (kind=omp_integer_kind) omp_control_tool
- integer (kind=omp_control_tool_kind), value :: command
- integer (kind=omp_control_tool_kind), value :: modifier
- integer (kind=kmp_pointer_kind), optional :: arg
- end function omp_control_tool
-
- function omp_init_allocator(memspace, ntraits, traits)
- use omp_lib_kinds
- integer (kind=omp_allocator_handle_kind) omp_init_allocator
- integer (kind=omp_memspace_handle_kind) :: memspace
- integer (kind=omp_integer_kind) :: ntraits
- type(omp_alloctrait), intent(in) :: traits(*)
- end function omp_init_allocator
-
- subroutine omp_destroy_allocator(allocator) bind(c)
- use omp_lib_kinds
- integer (kind=omp_allocator_handle_kind), value :: allocator
- end subroutine omp_destroy_allocator
-
- subroutine omp_set_default_allocator(allocator) bind(c)
- use omp_lib_kinds
- integer (kind=omp_allocator_handle_kind), value :: allocator
- end subroutine omp_set_default_allocator
-
- function omp_get_default_allocator() bind(c)
- use omp_lib_kinds
- integer (kind=omp_allocator_handle_kind) omp_get_default_allocator
- end function omp_get_default_allocator
-
- subroutine omp_set_affinity_format(format)
- character (len=*) :: format
- end subroutine omp_set_affinity_format
-
- function omp_get_affinity_format(buffer)
- use omp_lib_kinds
- character (len=*) :: buffer
- integer (kind=kmp_size_t_kind) :: omp_get_affinity_format
- end function omp_get_affinity_format
-
- subroutine omp_display_affinity(format)
- character (len=*) :: format
- end subroutine omp_display_affinity
-
- function omp_capture_affinity(buffer, format)
- use omp_lib_kinds
- character (len=*) :: format
- character (len=*) :: buffer
- integer (kind=kmp_size_t_kind) :: omp_capture_affinity
- end function omp_capture_affinity
-
- subroutine omp_set_num_teams(num_teams) bind(c)
- use omp_lib_kinds
- integer (kind=omp_integer_kind), value :: num_teams
- end subroutine omp_set_num_teams
-
- function omp_get_max_teams() bind(c)
- use omp_lib_kinds
- integer (kind=omp_integer_kind) omp_get_max_teams
- end function omp_get_max_teams
-
- subroutine omp_set_teams_thread_limit(thread_limit) bind(c)
- use omp_lib_kinds
- integer (kind=omp_integer_kind), value :: thread_limit
- end subroutine omp_set_teams_thread_limit
-
- function omp_get_teams_thread_limit() bind(c)
- use omp_lib_kinds
- integer (kind=omp_integer_kind) omp_get_teams_thread_limit
- end function omp_get_teams_thread_limit
-
- subroutine omp_display_env(verbose) bind(c)
- use omp_lib_kinds
- logical (kind=omp_logical_kind), value :: verbose
- end subroutine omp_display_env
-
- function omp_target_alloc(size, device_num) bind(c)
- use, intrinsic :: iso_c_binding, only: c_ptr, c_size_t, c_int
- type(c_ptr) omp_target_alloc
- integer(c_size_t), value :: size
- integer(c_int), value :: device_num
- end function omp_target_alloc
-
- subroutine omp_target_free(device_ptr, device_num) bind(c)
- use, intrinsic :: iso_c_binding, only: c_ptr, c_int
- type(c_ptr), value :: device_ptr
- integer(c_int), value :: device_num
- end subroutine omp_target_free
-
- function omp_target_is_present(ptr, device_num) bind(c)
- use, intrinsic :: iso_c_binding, only: c_ptr, c_int
- integer(c_int) omp_target_is_present
- type(c_ptr), value :: ptr
- integer(c_int), value :: device_num
- end function omp_target_is_present
-
- function omp_target_memcpy(dst, src, length, dst_offset, src_offset, &
- dst_device_num, src_device_num) bind(c)
- use, intrinsic :: iso_c_binding, only: c_ptr, c_size_t, c_int
- integer(c_int) omp_target_memcpy
- type(c_ptr), value :: dst, src
- integer(c_size_t), value :: length, dst_offset, src_offset
- integer(c_int), value :: dst_device_num, src_device_num
- end function omp_target_memcpy
-
- function omp_target_memcpy_rect(dst, src, element_size, num_dims, &
- volume, dst_offsets, src_offsets, dst_dimensions, &
- src_dimensions, dst_device_num, src_device_num) bind(c)
- use, intrinsic :: iso_c_binding, only: c_ptr, c_size_t, c_int
- integer(c_int) omp_target_memcpy_rect
- type(c_ptr), value :: dst, src
- integer(c_size_t), value :: element_size
- integer(c_int), value :: num_dims, dst_device_num, src_device_num
- integer(c_size_t), intent(in) :: volume(*), dst_offsets(*), &
- src_offsets(*), dst_dimensions(*), src_dimensions(*)
- end function omp_target_memcpy_rect
-
- function omp_target_memcpy_async(dst, src, length, dst_offset, &
- src_offset, dst_device_num, src_device_num, depobj_count, &
- depobj_list) bind(c)
- use omp_lib_kinds
- use, intrinsic :: iso_c_binding, only: c_ptr, c_size_t, c_int
- integer(c_int) omp_target_memcpy_async
- type(c_ptr), value :: dst, src
- integer(c_size_t), value :: length, dst_offset, src_offset
- integer(c_int), value :: dst_device_num, src_device_num, &
- depobj_count
- integer(omp_depend_kind), optional :: depobj_list(*)
- end function omp_target_memcpy_async
-
- function omp_target_memcpy_rect_async(dst, src, element_size, &
- num_dims, volume, dst_offsets, src_offsets, dst_dimensions, &
- src_dimensions, dst_device_num, src_device_num, depobj_count, &
- depobj_list) bind(c)
- use omp_lib_kinds
- use, intrinsic :: iso_c_binding, only: c_ptr, c_size_t, c_int
- integer(c_int) omp_target_memcpy_rect_async
- type(c_ptr), value :: dst, src
- integer(c_size_t), value :: element_size
- integer(c_int), value :: num_dims, dst_device_num, src_device_num, &
- depobj_count
- integer(c_size_t), intent(in) :: volume(*), dst_offsets(*), &
- src_offsets(*), dst_dimensions(*), src_dimensions(*)
- integer (omp_depend_kind), optional :: depobj_list(*)
- end function omp_target_memcpy_rect_async
-
- function omp_target_memset(ptr, val, count, device_num) bind(c)
- use, intrinsic :: iso_c_binding, only : c_ptr, c_int, c_size_t
- type(c_ptr) :: omp_target_memset
- type(c_ptr), value :: ptr
- integer(c_int), value :: val
- integer(c_size_t), value :: count
- integer(c_int), value :: device_num
- end function
-
- function omp_target_memset_async(ptr, val, count, device_num, &
- depobj_count, depobj_list) bind(c)
- use omp_lib_kinds
- use, intrinsic :: iso_c_binding, only : c_ptr, c_int, c_size_t
- type(c_ptr) :: omp_target_memset_async
- type(c_ptr), value :: ptr
- integer(c_int), value :: val
- integer(c_size_t), value :: count
- integer(c_int), value :: device_num
- integer(c_int), value :: depobj_count
- integer(omp_depend_kind), optional :: depobj_list(*)
- end function
-
- function omp_target_associate_ptr(host_ptr, device_ptr, size, &
- device_offset, device_num) bind(c)
- use, intrinsic :: iso_c_binding, only: c_ptr, c_size_t, c_int
- integer(c_int) omp_target_associate_ptr
- type(c_ptr), value :: host_ptr, device_ptr
- integer(c_size_t), value :: size, device_offset
- integer(c_int), value :: device_num
- end function omp_target_associate_ptr
-
- function omp_get_mapped_ptr(ptr, device_num) bind(c)
- use, intrinsic :: iso_c_binding, only: c_ptr, c_int
- type(c_ptr) omp_get_mapped_ptr
- type(c_ptr), value :: ptr
- integer(c_int), value :: device_num
- end function omp_get_mapped_ptr
-
- function omp_target_disassociate_ptr(ptr, device_num) bind(c)
- use, intrinsic :: iso_c_binding, only: c_ptr, c_int
- integer(c_int) omp_target_disassociate_ptr
- type(c_ptr), value :: ptr
- integer(c_int), value :: device_num
- end function omp_target_disassociate_ptr
-
- function omp_target_is_accessible(ptr, size, device_num) bind(c)
- use, intrinsic :: iso_c_binding, only : c_ptr, c_size_t, c_int
- integer(c_int) omp_target_is_accessible
- type(c_ptr), value :: ptr
- integer(c_size_t), value :: size
- integer(c_int), value :: device_num
- end function omp_target_is_accessible
-
- function omp_alloc(size, allocator) bind(c)
- use omp_lib_kinds
- use, intrinsic :: iso_c_binding, only : c_ptr, c_size_t
- type(c_ptr) omp_alloc
- integer(c_size_t), value :: size
- integer(omp_allocator_handle_kind), value :: allocator
- end function omp_alloc
-
- function omp_aligned_alloc(alignment, size, allocator) bind(c)
- use omp_lib_kinds
- use, intrinsic :: iso_c_binding, only : c_ptr, c_size_t
- type(c_ptr) omp_aligned_alloc
- integer(c_size_t), value :: alignment, size
- integer(omp_allocator_handle_kind), value :: allocator
- end function omp_aligned_alloc
-
- function omp_calloc(nmemb, size, allocator) bind(c)
- use omp_lib_kinds
- use, intrinsic :: iso_c_binding, only : c_ptr, c_size_t
- type(c_ptr) omp_calloc
- integer(c_size_t), value :: nmemb, size
- integer(omp_allocator_handle_kind), value :: allocator
- end function omp_calloc
-
- function omp_aligned_calloc(alignment, nmemb, size, allocator) bind(c)
- use omp_lib_kinds
- use, intrinsic :: iso_c_binding, only : c_ptr, c_size_t
- type(c_ptr) omp_aligned_calloc
- integer(c_size_t), value :: alignment, nmemb, size
- integer(omp_allocator_handle_kind), value :: allocator
- end function omp_aligned_calloc
-
- function omp_realloc(ptr, size, allocator, free_allocator) bind(c)
- use omp_lib_kinds
- use, intrinsic :: iso_c_binding, only : c_ptr, c_size_t
- type(c_ptr) omp_realloc
- type(c_ptr), value :: ptr
- integer(c_size_t), value :: size
- integer(omp_allocator_handle_kind), value :: allocator
- integer(omp_allocator_handle_kind), value :: free_allocator
- end function omp_realloc
-
- subroutine omp_free(ptr, allocator) bind(c)
- use omp_lib_kinds
- use, intrinsic :: iso_c_binding, only : c_ptr
- type(c_ptr), value :: ptr
- integer(omp_allocator_handle_kind), value :: allocator
- end subroutine omp_free
-
- function omp_in_explicit_task() bind(c)
- use omp_lib_kinds
- logical (kind=omp_logical_kind) omp_in_explicit_task
- end function omp_in_explicit_task
-
- function omp_get_devices_memspace(ndevs, devs, memspace)
- use omp_lib_kinds
- integer(omp_memspace_handle_kind) :: omp_get_devices_memspace
- integer, intent(in) :: ndevs
- integer, intent(in) :: devs(*)
- integer(omp_memspace_handle_kind), intent(in) :: memspace
- end function omp_get_devices_memspace
-
- function omp_get_device_memspace(dev, memspace)
- use omp_lib_kinds
- integer(omp_memspace_handle_kind) :: omp_get_device_memspace
- integer, intent(in) :: dev
- integer(omp_memspace_handle_kind), intent(in) :: memspace
- end function omp_get_device_memspace
-
- function omp_get_devices_and_host_memspace(ndevs, devs, memspace)
- use omp_lib_kinds
- integer(omp_memspace_handle_kind) :: &
- omp_get_devices_and_host_memspace
- integer, intent(in) :: ndevs
- integer, intent(in) :: devs(*)
- integer(omp_memspace_handle_kind), intent(in) :: memspace
- end function omp_get_devices_and_host_memspace
-
- function omp_get_device_and_host_memspace(dev, memspace)
- use omp_lib_kinds
- integer(omp_memspace_handle_kind) :: &
- omp_get_device_and_host_memspace
- integer, intent(in) :: dev
- integer(omp_memspace_handle_kind), intent(in) :: memspace
- end function omp_get_device_and_host_memspace
-
- function omp_get_devices_all_memspace(memspace)
- use omp_lib_kinds
- integer(omp_memspace_handle_kind) :: omp_get_devices_all_memspace
- integer(omp_memspace_handle_kind), intent(in) :: memspace
- end function omp_get_devices_all_memspace
-
- function omp_get_devices_allocator(ndevs, devs, memspace)
- use omp_lib_kinds
- integer(omp_allocator_handle_kind) :: omp_get_devices_allocator
- integer, intent(in) :: ndevs
- integer, intent(in) :: devs(*)
- integer(omp_memspace_handle_kind), intent(in) :: memspace
- end function omp_get_devices_allocator
-
- function omp_get_device_allocator(dev, memspace)
- use omp_lib_kinds
- integer(omp_allocator_handle_kind) :: omp_get_device_allocator
- integer, intent(in) :: dev
- integer(omp_memspace_handle_kind), intent(in) :: memspace
- end function omp_get_device_allocator
-
- function omp_get_devices_and_host_allocator(ndevs, devs, memspace)
- use omp_lib_kinds
- integer(omp_allocator_handle_kind) :: &
- omp_get_devices_and_host_allocator
- integer, intent(in) :: ndevs
- integer, intent(in) :: devs(*)
- integer(omp_memspace_handle_kind), intent(in) :: memspace
- end function omp_get_devices_and_host_allocator
-
- function omp_get_device_and_host_allocator(dev, memspace)
- use omp_lib_kinds
- integer(omp_allocator_handle_kind) :: &
- omp_get_device_and_host_allocator
- integer, intent(in) :: dev
- integer(omp_memspace_handle_kind), intent(in) :: memspace
- end function omp_get_device_and_host_allocator
-
- function omp_get_devices_all_allocator(memspace)
- use omp_lib_kinds
- integer(omp_allocator_handle_kind) :: &
- omp_get_devices_all_allocator
- integer(omp_memspace_handle_kind), intent(in) :: memspace
- end function omp_get_devices_all_allocator
-
- function omp_get_memspace_num_resources(memspace)
- use omp_lib_kinds
- integer omp_get_memspace_num_resources
- integer(omp_memspace_handle_kind), intent(in) :: memspace
- end function omp_get_memspace_num_resources
-
- function omp_get_submemspace(memspace, num_resources, resources)
- use omp_lib_kinds
- integer(omp_memspace_handle_kind) omp_get_submemspace
- integer(omp_memspace_handle_kind), intent(in) :: memspace
- integer, intent(in) :: num_resources
- integer, intent(in) :: resources(*)
- end function omp_get_submemspace
-
-! ***
-! *** 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)
- character (len=*) :: 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
-
- end interface
-
- ! make the above routine definitions public
- public :: omp_set_num_threads
- public :: omp_set_dynamic
- public :: omp_set_nested
- public :: omp_get_num_threads
- public :: omp_get_max_threads
- public :: omp_get_thread_num
- public :: omp_get_num_procs
- public :: omp_in_parallel
- public :: omp_in_final
- public :: omp_get_dynamic
- public :: omp_get_nested
- public :: omp_get_thread_limit
- public :: omp_set_max_active_levels
- public :: omp_get_max_active_levels
- public :: omp_get_level
- public :: omp_get_active_level
- public :: omp_get_ancestor_thread_num
- public :: omp_get_team_size
- public :: omp_set_schedule
- public :: omp_get_schedule
- public :: omp_get_proc_bind
- public :: omp_get_num_places
- public :: omp_get_place_num_procs
- public :: omp_get_place_proc_ids
- public :: omp_get_place_num
- public :: omp_get_partition_num_places
- public :: omp_get_partition_place_nums
- public :: omp_get_wtime
- public :: omp_get_wtick
- public :: omp_get_default_device
- public :: omp_set_default_device
- public :: omp_get_num_devices
- public :: omp_get_num_teams
- public :: omp_get_team_num
- public :: omp_get_cancellation
- public :: omp_is_initial_device
- public :: omp_get_initial_device
- public :: omp_get_device_num
- public :: omp_pause_resource
- public :: omp_pause_resource_all
- public :: omp_get_supported_active_levels
- public :: omp_fulfill_event
- public :: omp_init_lock
- public :: omp_destroy_lock
- public :: omp_set_lock
- public :: omp_unset_lock
- public :: omp_test_lock
- public :: omp_init_nest_lock
- public :: omp_destroy_nest_lock
- public :: omp_set_nest_lock
- public :: omp_unset_nest_lock
- public :: omp_test_nest_lock
- public :: omp_get_max_task_priority
- public :: omp_init_lock_with_hint
- public :: omp_init_nest_lock_with_hint
- public :: omp_control_tool
- public :: omp_init_allocator
- public :: omp_destroy_allocator
- public :: omp_set_default_allocator
- public :: omp_get_default_allocator
- public :: omp_set_affinity_format
- public :: omp_get_affinity_format
- public :: omp_display_affinity
- public :: omp_capture_affinity
- public :: omp_set_num_teams
- public :: omp_get_max_teams
- public :: omp_set_teams_thread_limit
- public :: omp_get_teams_thread_limit
- public :: omp_display_env
- public :: omp_target_alloc
- public :: omp_target_free
- public :: omp_target_is_present
- public :: omp_target_memcpy
- public :: omp_target_memcpy_rect
- public :: omp_target_memcpy_async
- public :: omp_target_memcpy_rect_async
- public :: omp_target_memset
- public :: omp_target_memset_async
- public :: omp_target_associate_ptr
- public :: omp_get_mapped_ptr
- public :: omp_target_disassociate_ptr
- public :: omp_target_is_accessible
- public :: omp_alloc
- public :: omp_aligned_alloc
- public :: omp_calloc
- public :: omp_aligned_calloc
- public :: omp_realloc
- public :: omp_free
- public :: omp_in_explicit_task
- public :: kmp_set_stacksize
- public :: kmp_set_stacksize_s
- public :: kmp_set_blocktime
- public :: kmp_set_library_serial
- public :: kmp_set_library_turnaround
- public :: kmp_set_library_throughput
- public :: kmp_set_library
- public :: kmp_set_defaults
- public :: kmp_get_stacksize
- public :: kmp_get_stacksize_s
- public :: kmp_get_blocktime
- public :: kmp_get_library
- public :: kmp_set_disp_num_buffers
- public :: kmp_set_affinity
- public :: kmp_get_affinity
- public :: kmp_get_affinity_max_proc
- public :: kmp_create_affinity_mask
- public :: kmp_destroy_affinity_mask
- public :: kmp_set_affinity_mask_proc
- public :: kmp_unset_affinity_mask_proc
- public :: kmp_get_affinity_mask_proc
- public :: kmp_malloc
- public :: kmp_aligned_malloc
- public :: kmp_calloc
- public :: kmp_realloc
- public :: kmp_free
- public :: kmp_set_warnings_on
- public :: kmp_set_warnings_off
- public :: kmp_get_cancellation_status
-
- end module omp_lib
diff --git a/openmp/runtime/src/include/omp_lib.h.var b/openmp/runtime/src/include/omp_lib.h.var
deleted file mode 100644
index a50bb01..0000000
--- a/openmp/runtime/src/include/omp_lib.h.var
+++ /dev/null
@@ -1,1298 +0,0 @@
-! include/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
-!//
-!//===----------------------------------------------------------------------===//
-!
-
- integer omp_integer_kind
- parameter(omp_integer_kind=4)
- integer omp_logical_kind
- parameter(omp_logical_kind=4)
- integer omp_real_kind
- parameter(omp_real_kind=4)
- integer omp_lock_kind
- parameter(omp_lock_kind=int_ptr_kind())
- integer omp_nest_lock_kind
- parameter(omp_nest_lock_kind=int_ptr_kind())
- integer omp_sched_kind
- parameter(omp_sched_kind=omp_integer_kind)
- integer omp_proc_bind_kind
- parameter(omp_proc_bind_kind=omp_integer_kind)
- integer kmp_pointer_kind
- parameter(kmp_pointer_kind=int_ptr_kind())
- integer kmp_size_t_kind
- parameter(kmp_size_t_kind=int_ptr_kind())
- integer kmp_affinity_mask_kind
- parameter(kmp_affinity_mask_kind=int_ptr_kind())
- integer omp_sync_hint_kind
- parameter(omp_sync_hint_kind=omp_integer_kind)
- integer omp_lock_hint_kind
- parameter(omp_lock_hint_kind=omp_sync_hint_kind)
- integer omp_control_tool_kind
- parameter(omp_control_tool_kind=omp_integer_kind)
- integer omp_control_tool_result_kind
- parameter(omp_control_tool_result_kind=omp_integer_kind)
- integer omp_allocator_handle_kind
- parameter(omp_allocator_handle_kind=int_ptr_kind())
- integer omp_memspace_handle_kind
- parameter(omp_memspace_handle_kind=int_ptr_kind())
- integer omp_alloctrait_key_kind
- parameter(omp_alloctrait_key_kind=omp_integer_kind)
- integer omp_alloctrait_val_kind
- parameter(omp_alloctrait_val_kind=int_ptr_kind())
- integer omp_pause_resource_kind
- parameter(omp_pause_resource_kind=omp_integer_kind)
- integer omp_depend_kind
- parameter(omp_depend_kind=int_ptr_kind())
- integer omp_event_handle_kind
- parameter(omp_event_handle_kind=int_ptr_kind())
- integer omp_interop_kind
- parameter(omp_interop_kind=int_ptr_kind())
- integer omp_interop_fr_kind
- parameter(omp_interop_fr_kind=omp_integer_kind)
-
- integer(kind=omp_integer_kind)openmp_version
- parameter(openmp_version=@LIBOMP_OMP_YEAR_MONTH@)
- integer(kind=omp_integer_kind)kmp_version_major
- parameter(kmp_version_major=@LIBOMP_VERSION_MAJOR@)
- integer(kind=omp_integer_kind)kmp_version_minor
- parameter(kmp_version_minor=@LIBOMP_VERSION_MINOR@)
- integer(kind=omp_integer_kind)kmp_version_build
- parameter(kmp_version_build=@LIBOMP_VERSION_BUILD@)
- character(*)kmp_build_date
- parameter(kmp_build_date='@LIBOMP_BUILD_DATE@')
-
- integer(kind=omp_sched_kind)omp_sched_static
- parameter(omp_sched_static=1)
- integer(kind=omp_sched_kind)omp_sched_dynamic
- parameter(omp_sched_dynamic=2)
- integer(kind=omp_sched_kind)omp_sched_guided
- parameter(omp_sched_guided=3)
- integer(kind=omp_sched_kind)omp_sched_auto
- parameter(omp_sched_auto=4)
- integer(kind=omp_sched_kind)omp_sched_monotonic
- parameter(omp_sched_monotonic=Z'80000000')
-
- integer(kind=omp_proc_bind_kind)omp_proc_bind_false
- parameter(omp_proc_bind_false=0)
- integer(kind=omp_proc_bind_kind)omp_proc_bind_true
- parameter(omp_proc_bind_true=1)
- integer(kind=omp_proc_bind_kind)omp_proc_bind_master
- parameter(omp_proc_bind_master=2)
- integer(kind=omp_proc_bind_kind)omp_proc_bind_close
- parameter(omp_proc_bind_close=3)
- integer(kind=omp_proc_bind_kind)omp_proc_bind_spread
- parameter(omp_proc_bind_spread=4)
-
- integer(kind=omp_sync_hint_kind)omp_sync_hint_none
- parameter(omp_sync_hint_none=0)
- integer(kind=omp_sync_hint_kind)omp_sync_hint_uncontended
- parameter(omp_sync_hint_uncontended=1)
- integer(kind=omp_sync_hint_kind)omp_sync_hint_contended
- parameter(omp_sync_hint_contended=2)
- integer(kind=omp_sync_hint_kind)omp_sync_hint_nonspeculative
- parameter(omp_sync_hint_nonspeculative=4)
- integer(kind=omp_sync_hint_kind)omp_sync_hint_speculative
- parameter(omp_sync_hint_speculative=8)
- integer(kind=omp_lock_hint_kind)omp_lock_hint_none
- parameter(omp_lock_hint_none=omp_sync_hint_none)
- integer(kind=omp_lock_hint_kind)omp_lock_hint_uncontended
- parameter(omp_lock_hint_uncontended=omp_sync_hint_uncontended)
- integer(kind=omp_lock_hint_kind)omp_lock_hint_contended
- parameter(omp_lock_hint_contended=omp_sync_hint_contended)
- integer(kind=omp_lock_hint_kind)omp_lock_hint_nonspeculative
- parameter(omp_lock_hint_nonspeculative=4)
- integer(kind=omp_lock_hint_kind)omp_lock_hint_speculative
- parameter(omp_lock_hint_speculative=omp_sync_hint_speculative)
- integer(kind=omp_lock_hint_kind)kmp_lock_hint_hle
- parameter(kmp_lock_hint_hle=65536)
- integer(kind=omp_lock_hint_kind)kmp_lock_hint_rtm
- parameter(kmp_lock_hint_rtm=131072)
- integer(kind=omp_lock_hint_kind)kmp_lock_hint_adaptive
- parameter(kmp_lock_hint_adaptive=262144)
-
- integer(kind=omp_control_tool_kind)omp_control_tool_start
- parameter(omp_control_tool_start=1)
- integer(kind=omp_control_tool_kind)omp_control_tool_pause
- parameter(omp_control_tool_pause=2)
- integer(kind=omp_control_tool_kind)omp_control_tool_flush
- parameter(omp_control_tool_flush=3)
- integer(kind=omp_control_tool_kind)omp_control_tool_end
- parameter(omp_control_tool_end=4)
-
- integer(omp_control_tool_result_kind)omp_control_tool_notool
- parameter(omp_control_tool_notool=-2)
- integer(omp_control_tool_result_kind)omp_control_tool_nocallback
- parameter(omp_control_tool_nocallback=-1)
- integer(omp_control_tool_result_kind)omp_control_tool_success
- parameter(omp_control_tool_success=0)
- integer(omp_control_tool_result_kind)omp_control_tool_ignored
- parameter(omp_control_tool_ignored=1)
-
- integer(kind=omp_alloctrait_key_kind)omp_atk_sync_hint
- parameter(omp_atk_sync_hint=1)
- integer(kind=omp_alloctrait_key_kind)omp_atk_alignment
- parameter(omp_atk_alignment=2)
- integer(kind=omp_alloctrait_key_kind)omp_atk_access
- parameter(omp_atk_access=3)
- integer(kind=omp_alloctrait_key_kind)omp_atk_pool_size
- parameter(omp_atk_pool_size=4)
- integer(kind=omp_alloctrait_key_kind)omp_atk_fallback
- parameter(omp_atk_fallback=5)
- integer(kind=omp_alloctrait_key_kind)omp_atk_fb_data
- parameter(omp_atk_fb_data=6)
- integer(kind=omp_alloctrait_key_kind)omp_atk_pinned
- parameter(omp_atk_pinned=7)
- integer(kind=omp_alloctrait_key_kind)omp_atk_partition
- parameter(omp_atk_partition=8)
- integer(kind=omp_alloctrait_key_kind)omp_atk_pin_device
- parameter(omp_atk_pin_device=9)
- integer(kind=omp_alloctrait_key_kind)omp_atk_preferred_device
- parameter(omp_atk_preferred_device=10)
- integer(kind=omp_alloctrait_key_kind)omp_atk_device_access
- parameter(omp_atk_device_access=11)
- integer(kind=omp_alloctrait_key_kind)omp_atk_target_access
- parameter(omp_atk_target_access=12)
- integer(kind=omp_alloctrait_key_kind)omp_atk_atomic_scope
- parameter(omp_atk_atomic_scope=13)
- integer(kind=omp_alloctrait_key_kind)omp_atk_part_size
- parameter(omp_atk_part_size=14)
-
- integer(kind=omp_alloctrait_val_kind)omp_atv_default
- parameter(omp_atv_default=-1)
- ! Reserved for future use
- integer(kind=omp_alloctrait_val_kind)omp_atv_false
- parameter(omp_atv_false=0)
- ! Reserved for future use
- integer(kind=omp_alloctrait_val_kind)omp_atv_true
- parameter(omp_atv_true=1)
- integer(kind=omp_alloctrait_val_kind)omp_atv_contended
- parameter(omp_atv_contended=3)
- integer(kind=omp_alloctrait_val_kind)omp_atv_uncontended
- parameter(omp_atv_uncontended=4)
- integer(kind=omp_alloctrait_val_kind)omp_atv_serialized
- parameter(omp_atv_serialized=5)
- integer(kind=omp_alloctrait_val_kind)omp_atv_sequential
- parameter(omp_atv_sequential=5)
- integer(kind=omp_alloctrait_val_kind)omp_atv_private
- parameter(omp_atv_private=6)
- integer(kind=omp_alloctrait_val_kind)omp_atv_device
- parameter(omp_atv_device=7)
- integer(kind=omp_alloctrait_val_kind)omp_atv_thread
- parameter(omp_atv_thread=8)
- integer(kind=omp_alloctrait_val_kind)omp_atv_pteam
- parameter(omp_atv_pteam=9)
- integer(kind=omp_alloctrait_val_kind)omp_atv_cgroup
- parameter(omp_atv_cgroup=10)
- integer(kind=omp_alloctrait_val_kind)omp_atv_default_mem_fb
- parameter(omp_atv_default_mem_fb=11)
- integer(kind=omp_alloctrait_val_kind)omp_atv_null_fb
- parameter(omp_atv_null_fb=12)
- integer(kind=omp_alloctrait_val_kind)omp_atv_abort_fb
- parameter(omp_atv_abort_fb=13)
- integer(kind=omp_alloctrait_val_kind)omp_atv_allocator_fb
- parameter(omp_atv_allocator_fb=14)
- integer(kind=omp_alloctrait_val_kind)omp_atv_environment
- parameter(omp_atv_environment=15)
- integer(kind=omp_alloctrait_val_kind)omp_atv_nearest
- parameter(omp_atv_nearest=16)
- integer(kind=omp_alloctrait_val_kind)omp_atv_blocked
- parameter(omp_atv_blocked=17)
- integer(kind=omp_alloctrait_val_kind)omp_atv_interleaved
- parameter(omp_atv_interleaved=18)
- integer(kind=omp_alloctrait_val_kind)omp_atv_all
- parameter(omp_atv_all=19)
- integer(kind=omp_alloctrait_val_kind)omp_atv_single
- parameter(omp_atv_single=20)
- integer(kind=omp_alloctrait_val_kind)omp_atv_multiple
- parameter(omp_atv_multiple=21)
- integer(kind=omp_alloctrait_val_kind)omp_atv_memspace
- parameter(omp_atv_memspace=22)
-
- type omp_alloctrait
- integer (kind=omp_alloctrait_key_kind) key
- integer (kind=omp_alloctrait_val_kind) value
- end type omp_alloctrait
-
- integer(kind=omp_allocator_handle_kind)omp_null_allocator
- parameter(omp_null_allocator=0)
- integer(kind=omp_allocator_handle_kind)omp_default_mem_alloc
- parameter(omp_default_mem_alloc=1)
- integer(kind=omp_allocator_handle_kind)omp_large_cap_mem_alloc
- parameter(omp_large_cap_mem_alloc=2)
- integer(kind=omp_allocator_handle_kind)omp_const_mem_alloc
- parameter(omp_const_mem_alloc=3)
- integer(kind=omp_allocator_handle_kind)omp_high_bw_mem_alloc
- parameter(omp_high_bw_mem_alloc=4)
- integer(kind=omp_allocator_handle_kind)omp_low_lat_mem_alloc
- parameter(omp_low_lat_mem_alloc=5)
- integer(kind=omp_allocator_handle_kind)omp_cgroup_mem_alloc
- parameter(omp_cgroup_mem_alloc=6)
- integer(kind=omp_allocator_handle_kind)omp_pteam_mem_alloc
- parameter(omp_pteam_mem_alloc=7)
- integer(kind=omp_allocator_handle_kind)omp_thread_mem_alloc
- parameter(omp_thread_mem_alloc=8)
- integer(omp_allocator_handle_kind)llvm_omp_target_host_mem_alloc
- parameter(llvm_omp_target_host_mem_alloc=100)
- integer(omp_allocator_handle_kind)llvm_omp_target_shared_mem_alloc
- parameter(llvm_omp_target_shared_mem_alloc=101)
- integer(omp_allocator_handle_kind)llvm_omp_target_device_mem_alloc
- parameter(llvm_omp_target_device_mem_alloc=102)
-
- integer(kind=omp_memspace_handle_kind)omp_null_mem_space
- parameter(omp_null_mem_space=0)
- integer(kind=omp_memspace_handle_kind)omp_default_mem_space
- parameter(omp_default_mem_space=99)
- integer(kind=omp_memspace_handle_kind)omp_large_cap_mem_space
- parameter(omp_large_cap_mem_space=1)
- integer(kind=omp_memspace_handle_kind)omp_const_mem_space
- parameter(omp_const_mem_space=2)
- integer(kind=omp_memspace_handle_kind)omp_high_bw_mem_space
- parameter(omp_high_bw_mem_space=3)
- integer(kind=omp_memspace_handle_kind)omp_low_lat_mem_space
- parameter(omp_low_lat_mem_space=4)
- integer(omp_memspace_handle_kind)llvm_omp_target_host_mem_space
- parameter(llvm_omp_target_host_mem_space=100)
- integer(omp_memspace_handle_kind)llvm_omp_target_shared_mem_space
- parameter(llvm_omp_target_shared_mem_space=101)
- integer(omp_memspace_handle_kind)llvm_omp_target_device_mem_space
- parameter(llvm_omp_target_device_mem_space=102)
-
- integer(kind=omp_pause_resource_kind)omp_pause_resume
- parameter(omp_pause_resume=0)
- integer(kind=omp_pause_resource_kind)omp_pause_soft
- parameter(omp_pause_soft=1)
- integer(kind=omp_pause_resource_kind)omp_pause_hard
- parameter(omp_pause_hard=2)
- integer(kind=omp_pause_resource_kind)omp_pause_stop_tool
- parameter(omp_pause_stop_tool=3)
-
- integer(kind=omp_interop_fr_kind)omp_ifr_cuda
- parameter(omp_ifr_cuda=1)
- integer(kind=omp_interop_fr_kind)omp_ifr_cuda_driver
- parameter(omp_ifr_cuda_driver=2)
- integer(kind=omp_interop_fr_kind)omp_ifr_opencl
- parameter(omp_ifr_opencl=3)
- integer(kind=omp_interop_fr_kind)omp_ifr_sycl
- parameter(omp_ifr_sycl=4)
- integer(kind=omp_interop_fr_kind)omp_ifr_hip
- parameter(omp_ifr_hip=5)
- integer(kind=omp_interop_fr_kind)omp_ifr_level_zero
- parameter(omp_ifr_level_zero=6)
- integer(kind=omp_interop_fr_kind)omp_ifr_last
- parameter(omp_ifr_last=7)
-
- integer(kind=omp_interop_kind)omp_interop_none
- parameter(omp_interop_none=0)
-
- 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
-
- function omp_get_device_num() bind(c)
- import
- integer (kind=omp_integer_kind) omp_get_device_num
- end function omp_get_device_num
-
- function omp_pause_resource(kind, device_num) bind(c)
- import
- integer (kind=omp_pause_resource_kind), value :: kind
- integer (kind=omp_integer_kind), value :: device_num
- integer (kind=omp_integer_kind) omp_pause_resource
- end function omp_pause_resource
-
- function omp_pause_resource_all(kind) bind(c)
- import
- integer (kind=omp_pause_resource_kind), value :: kind
- integer (kind=omp_integer_kind) omp_pause_resource_all
- end function omp_pause_resource_all
-
- function omp_get_supported_active_levels() bind(c)
- import
- integer(kind=omp_integer_kind)omp_get_supported_active_levels
- end function omp_get_supported_active_levels
-
- subroutine omp_fulfill_event(event) bind(c)
- import
- integer (kind=omp_event_handle_kind), value :: event
- end subroutine omp_fulfill_event
-
- subroutine omp_init_lock(svar) bind(c)
-#ifdef __INTEL_COMPILER
-!DIR$ IF(__INTEL_COMPILER.GE.1400)
-!DIR$ attributes known_intrinsic :: omp_init_lock
-!DIR$ ENDIF
-#endif
- import
- integer (kind=omp_lock_kind) svar
- end subroutine omp_init_lock
-
- subroutine omp_destroy_lock(svar) bind(c)
-#ifdef __INTEL_COMPILER
-!DIR$ IF(__INTEL_COMPILER.GE.1400)
-!DIR$ attributes known_intrinsic :: omp_destroy_lock
-!DIR$ ENDIF
-#endif
- import
- integer (kind=omp_lock_kind) svar
- end subroutine omp_destroy_lock
-
- subroutine omp_set_lock(svar) bind(c)
-#ifdef __INTEL_COMPILER
-!DIR$ IF(__INTEL_COMPILER.GE.1400)
-!DIR$ attributes known_intrinsic :: omp_set_lock
-!DIR$ ENDIF
-#endif
- import
- integer (kind=omp_lock_kind) svar
- end subroutine omp_set_lock
-
- subroutine omp_unset_lock(svar) bind(c)
-#ifdef __INTEL_COMPILER
-!DIR$ IF(__INTEL_COMPILER.GE.1400)
-!DIR$ attributes known_intrinsic :: omp_unset_lock
-!DIR$ ENDIF
-#endif
- import
- integer (kind=omp_lock_kind) svar
- end subroutine omp_unset_lock
-
- function omp_test_lock(svar) bind(c)
-#ifdef __INTEL_COMPILER
-!DIR$ IF(__INTEL_COMPILER.GE.1400)
-!DIR$ attributes known_intrinsic :: omp_test_lock
-!DIR$ ENDIF
-#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)
-#ifdef __INTEL_COMPILER
-!DIR$ IF(__INTEL_COMPILER.GE.1400)
-!DIR$ attributes known_intrinsic :: omp_init_nest_lock
-!DIR$ ENDIF
-#endif
- import
- integer (kind=omp_nest_lock_kind) nvar
- end subroutine omp_init_nest_lock
-
- subroutine omp_destroy_nest_lock(nvar) bind(c)
-#ifdef __INTEL_COMPILER
-!DIR$ IF(__INTEL_COMPILER.GE.1400)
-!DIR$ attributes known_intrinsic :: omp_destroy_nest_lock
-!DIR$ ENDIF
-#endif
- import
- integer (kind=omp_nest_lock_kind) nvar
- end subroutine omp_destroy_nest_lock
-
- subroutine omp_set_nest_lock(nvar) bind(c)
-#ifdef __INTEL_COMPILER
-!DIR$ IF(__INTEL_COMPILER.GE.1400)
-!DIR$ attributes known_intrinsic :: omp_set_nest_lock
-!DIR$ ENDIF
-#endif
- import
- integer (kind=omp_nest_lock_kind) nvar
- end subroutine omp_set_nest_lock
-
- subroutine omp_unset_nest_lock(nvar) bind(c)
-#ifdef __INTEL_COMPILER
-!DIR$ IF(__INTEL_COMPILER.GE.1400)
-!DIR$ attributes known_intrinsic :: omp_unset_nest_lock
-!DIR$ ENDIF
-#endif
- import
- integer (kind=omp_nest_lock_kind) nvar
- end subroutine omp_unset_nest_lock
-
- function omp_test_nest_lock(nvar) bind(c)
-#ifdef __INTEL_COMPILER
-!DIR$ IF(__INTEL_COMPILER.GE.1400)
-!DIR$ attributes known_intrinsic :: omp_test_nest_lock
-!DIR$ ENDIF
-#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
-
- 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
-
- function omp_control_tool(command, modifier, arg) bind(c)
- import
- integer (kind=omp_integer_kind) omp_control_tool
- integer (kind=omp_control_tool_kind), value :: command
- integer (kind=omp_control_tool_kind), value :: modifier
- integer (kind=kmp_pointer_kind), optional :: arg
- end function omp_control_tool
-
- function omp_init_allocator(memspace, ntraits, traits)
- import
- integer (omp_allocator_handle_kind) omp_init_allocator
- integer (omp_memspace_handle_kind) :: memspace
- integer (omp_integer_kind) :: ntraits
- type(omp_alloctrait), intent(in) :: traits(*)
- end function omp_init_allocator
-
- subroutine omp_destroy_allocator(allocator) bind(c)
- import
- integer (omp_allocator_handle_kind), value :: allocator
- end subroutine omp_destroy_allocator
-
- subroutine omp_set_default_allocator(allocator) bind(c)
- import
- integer (omp_allocator_handle_kind), value :: allocator
- end subroutine omp_set_default_allocator
-
- function omp_get_default_allocator() bind(c)
- import
- integer (omp_allocator_handle_kind) omp_get_default_allocator
- end function omp_get_default_allocator
-
- subroutine omp_set_affinity_format(format)
- character (len=*) :: format
- end subroutine omp_set_affinity_format
-
- function omp_get_affinity_format(buffer)
- import
- character (len=*) :: buffer
- integer (kind=kmp_size_t_kind) :: omp_get_affinity_format
- end function omp_get_affinity_format
-
- subroutine omp_display_affinity(format)
- character (len=*) :: format
- end subroutine omp_display_affinity
-
- function omp_capture_affinity(buffer, format)
- import
- character (len=*) :: format
- character (len=*) :: buffer
- integer (kind=kmp_size_t_kind) :: omp_capture_affinity
- end function omp_capture_affinity
-
- subroutine omp_set_num_teams(num_teams) bind(c)
- import
- integer (kind=omp_integer_kind), value :: num_teams
- end subroutine omp_set_num_teams
-
- function omp_get_max_teams() bind(c)
- import
- integer (kind=omp_integer_kind) omp_get_max_teams
- end function omp_get_max_teams
-
- subroutine omp_set_teams_thread_limit(thread_limit) bind(c)
- import
- integer (kind=omp_integer_kind), value :: thread_limit
- end subroutine omp_set_teams_thread_limit
-
- function omp_get_teams_thread_limit() bind(c)
- import
- integer (kind=omp_integer_kind) omp_get_teams_thread_limit
- end function omp_get_teams_thread_limit
-
- subroutine omp_display_env(verbose) bind(c)
- import
- logical (kind=omp_logical_kind), value :: verbose
- end subroutine omp_display_env
-
- function omp_target_alloc(size, device_num) bind(c)
- use, intrinsic :: iso_c_binding, only : c_ptr, c_size_t, c_int
- type(c_ptr) omp_target_alloc
- integer(c_size_t), value :: size
- integer(c_int), value :: device_num
- end function omp_target_alloc
-
- subroutine omp_target_free(device_ptr, device_num) bind(c)
- use, intrinsic :: iso_c_binding, only : c_ptr, c_int
- type(c_ptr), value :: device_ptr
- integer(c_int), value :: device_num
- end subroutine omp_target_free
-
- function omp_target_is_present(ptr, device_num) bind(c)
- use, intrinsic :: iso_c_binding, only : c_ptr, c_int
- integer(c_int) omp_target_is_present
- type(c_ptr), value :: ptr
- integer(c_int), value :: device_num
- end function omp_target_is_present
-
- function omp_target_memcpy(dst, src, length, dst_offset, &
- & src_offset, dst_device_num, src_device_num) bind(c)
- use, intrinsic :: iso_c_binding, only : c_ptr, c_int, c_size_t
- integer(c_int) omp_target_memcpy
- type(c_ptr), value :: dst, src
- integer(c_size_t), value :: length, dst_offset, src_offset
- integer(c_int), value :: dst_device_num, src_device_num
- end function omp_target_memcpy
-
- function omp_target_memcpy_rect(dst, src, element_size, &
- & num_dims, volume, dst_offsets, src_offsets, dst_dimensions, &
- & src_dimensions, dst_device_num, src_device_num) bind(c)
- use, intrinsic :: iso_c_binding, only : c_ptr, c_int, c_size_t
- integer(c_int) omp_target_memcpy_rect
- type(c_ptr), value :: dst, src
- integer(c_size_t), value :: element_size
- integer(c_int), value :: num_dims, dst_device_num, &
- & src_device_num
- integer(c_size_t), intent(in) :: volume(*), dst_offsets(*), &
- & src_offsets(*), dst_dimensions(*), src_dimensions(*)
- end function omp_target_memcpy_rect
-
- function omp_target_memcpy_async(dst, src, length, dst_offset, &
- & src_offset, dst_device_num, src_device_num, depobj_count, &
- & depobj_list) bind(c)
- use, intrinsic :: iso_c_binding, only : c_ptr, c_int, c_size_t
- import
- integer(c_int) omp_target_memcpy_async
- type(c_ptr), value :: dst, src
- integer(c_size_t), value :: length, dst_offset, src_offset
- integer(c_int), value :: dst_device_num, src_device_num, &
- & depobj_count
- integer(omp_depend_kind), optional :: depobj_list(*)
- end function omp_target_memcpy_async
-
- function omp_target_memcpy_rect_async(dst, src, element_size, &
- & num_dims, volume, dst_offsets, src_offsets, dst_dimensions, &
- & src_dimensions, dst_device_num, src_device_num, &
- & depobj_count, depobj_list) bind(c)
- use, intrinsic :: iso_c_binding, only : c_ptr, c_int, c_size_t
- import
- integer(c_int) omp_target_memcpy_rect_async
- type(c_ptr), value :: dst, src
- integer(c_size_t), value :: element_size
- integer(c_int), value :: num_dims, dst_device_num, &
- & src_device_num, depobj_count
- integer(c_size_t), intent(in) :: volume(*), dst_offsets(*), &
- & src_offsets(*), dst_dimensions(*), src_dimensions(*)
- integer(omp_depend_kind), optional :: depobj_list(*)
- end function omp_target_memcpy_rect_async
-
- function omp_target_memset(ptr, val, count, device_num) bind(c)
- use, intrinsic :: iso_c_binding, only : c_ptr, c_int, c_size_t
- type(c_ptr) :: omp_target_memset
- type(c_ptr), value :: ptr
- integer(c_int), value :: val
- integer(c_size_t), value :: count
- integer(c_int), value :: device_num
- end function
-
- function omp_target_memset_async(ptr, val, count, device_num, &
- & depobj_count, depobj_list) bind(c)
- use, intrinsic :: iso_c_binding, only : c_ptr, c_int, c_size_t
- import
- type(c_ptr) :: omp_target_memset_async
- type(c_ptr), value :: ptr
- integer(c_int), value :: val
- integer(c_size_t), value :: count
- integer(c_int), value :: device_num
- integer(c_int), value :: depobj_count
- integer(omp_depend_kind), optional :: depobj_list(*)
- end function
-
- function omp_target_associate_ptr(host_ptr, device_ptr, size, &
- & device_offset, device_num) bind(c)
- use, intrinsic :: iso_c_binding, only : c_ptr, c_size_t, c_int
- integer(c_int) omp_target_associate_ptr
- type(c_ptr), value :: host_ptr, device_ptr
- integer(c_size_t), value :: size, device_offset
- integer(c_int), value :: device_num
- end function omp_target_associate_ptr
-
- function omp_get_mapped_ptr(ptr, device_num) bind(c)
- use, intrinsic :: iso_c_binding, only : c_ptr, c_int
- type(c_ptr) omp_get_mapped_ptr
- type(c_ptr), value :: ptr
- integer(c_int), value :: device_num
- end function omp_get_mapped_ptr
-
- function omp_target_disassociate_ptr(ptr, device_num) bind(c)
- use, intrinsic :: iso_c_binding, only : c_ptr, c_int
- integer(c_int) omp_target_disassociate_ptr
- type(c_ptr), value :: ptr
- integer(c_int), value :: device_num
- end function omp_target_disassociate_ptr
-
- function omp_target_is_accessible(ptr, size, device_num) bind(c)
- use, intrinsic :: iso_c_binding, only : c_ptr, c_size_t, c_int
- integer(c_int) omp_target_is_accessible
- type(c_ptr), value :: ptr
- integer(c_size_t), value :: size
- integer(c_int), value :: device_num
- end function omp_target_is_accessible
-
- function omp_alloc(size, allocator) bind(c)
- use, intrinsic :: iso_c_binding, only : c_ptr, c_size_t
- import :: omp_allocator_handle_kind
- type(c_ptr) omp_alloc
- integer(c_size_t), value :: size
- integer(omp_allocator_handle_kind), value :: allocator
- end function omp_alloc
-
- function omp_aligned_alloc(alignment, size, allocator) bind(c)
- use, intrinsic :: iso_c_binding, only : c_ptr, c_size_t
- import :: omp_allocator_handle_kind
- type(c_ptr) omp_aligned_alloc
- integer(c_size_t), value :: alignment, size
- integer(omp_allocator_handle_kind), value :: allocator
- end function omp_aligned_alloc
-
- function omp_calloc(nmemb, size, allocator) bind(c)
- use, intrinsic :: iso_c_binding, only : c_ptr, c_size_t
- import :: omp_allocator_handle_kind
- type(c_ptr) omp_calloc
- integer(c_size_t), value :: nmemb, size
- integer(omp_allocator_handle_kind), value :: allocator
- end function omp_calloc
-
- function omp_aligned_calloc(alignment, nmemb, size, &
- & allocator) bind(c)
- use, intrinsic :: iso_c_binding, only : c_ptr, c_size_t
- import :: omp_allocator_handle_kind
- type(c_ptr) omp_aligned_calloc
- integer(c_size_t), value :: alignment, nmemb, size
- integer(omp_allocator_handle_kind), value :: allocator
- end function omp_aligned_calloc
-
- function omp_realloc(ptr, size, allocator, &
- & free_allocator) bind(c)
- use, intrinsic :: iso_c_binding, only : c_ptr, c_size_t
- import :: omp_allocator_handle_kind
- type(c_ptr) omp_realloc
- type(c_ptr), value :: ptr
- integer(c_size_t), value :: size
- integer(omp_allocator_handle_kind), value :: allocator
- integer(omp_allocator_handle_kind), value :: free_allocator
- end function omp_realloc
-
- subroutine omp_free(ptr, allocator) bind(c)
- use, intrinsic :: iso_c_binding, only : c_ptr
- import :: omp_allocator_handle_kind
- type(c_ptr), value :: ptr
- integer(omp_allocator_handle_kind), value :: allocator
- end subroutine omp_free
-
- function omp_in_explicit_task() bind(c)
- import
- logical (kind=omp_logical_kind) omp_in_explicit_task
- end function omp_in_explicit_task
-
- function omp_get_devices_memspace(ndevs, devs, memspace)
- import
- integer(omp_memspace_handle_kind) :: omp_get_devices_memspace
- integer, intent(in) :: ndevs
- integer, intent(in) :: devs(*)
- integer(omp_memspace_handle_kind), intent(in) :: memspace
- end function omp_get_devices_memspace
-
- function omp_get_device_memspace(dev, memspace)
- import
- integer(omp_memspace_handle_kind) :: omp_get_device_memspace
- integer, intent(in) :: dev
- integer(omp_memspace_handle_kind), intent(in) :: memspace
- end function omp_get_device_memspace
-
- function omp_get_devices_and_host_memspace(ndevs,devs,memspace)
- import
- integer(omp_memspace_handle_kind) :: &
- & omp_get_devices_and_host_memspace
- integer, intent(in) :: ndevs
- integer, intent(in) :: devs(*)
- integer(omp_memspace_handle_kind), intent(in) :: memspace
- end function omp_get_devices_and_host_memspace
-
- function omp_get_device_and_host_memspace(dev, memspace)
- import
- integer(omp_memspace_handle_kind) :: &
- & omp_get_device_and_host_memspace
- integer, intent(in) :: dev
- integer(omp_memspace_handle_kind), intent(in) :: memspace
- end function omp_get_device_and_host_memspace
-
- function omp_get_devices_all_memspace(memspace)
- import
- integer(omp_memspace_handle_kind)::omp_get_devices_all_memspace
- integer(omp_memspace_handle_kind), intent(in) :: memspace
- end function omp_get_devices_all_memspace
-
- function omp_get_devices_allocator(ndevs, devs, memspace)
- import
- integer(omp_allocator_handle_kind)::omp_get_devices_allocator
- integer, intent(in) :: ndevs
- integer, intent(in) :: devs(*)
- integer(omp_memspace_handle_kind), intent(in) :: memspace
- end function omp_get_devices_allocator
-
- function omp_get_device_allocator(dev, memspace)
- import
- integer(omp_allocator_handle_kind) :: omp_get_device_allocator
- integer, intent(in) :: dev
- integer(omp_memspace_handle_kind), intent(in) :: memspace
- end function omp_get_device_allocator
-
- function omp_get_devices_and_host_allocator(ndevs,devs,memspace)
- import
- integer(omp_allocator_handle_kind) :: &
- & omp_get_devices_and_host_allocator
- integer, intent(in) :: ndevs
- integer, intent(in) :: devs(*)
- integer(omp_memspace_handle_kind), intent(in) :: memspace
- end function omp_get_devices_and_host_allocator
-
- function omp_get_device_and_host_allocator(dev, memspace)
- import
- integer(omp_allocator_handle_kind) :: &
- & omp_get_device_and_host_allocator
- integer, intent(in) :: dev
- integer(omp_memspace_handle_kind), intent(in) :: memspace
- end function omp_get_device_and_host_allocator
-
- function omp_get_devices_all_allocator(memspace)
- import
- integer(omp_allocator_handle_kind) :: &
- & omp_get_devices_all_allocator
- integer(omp_memspace_handle_kind), intent(in) :: memspace
- end function omp_get_devices_all_allocator
-
- function omp_get_memspace_num_resources(memspace)
- import
- integer omp_get_memspace_num_resources
- integer(omp_memspace_handle_kind), intent(in) :: memspace
- end function omp_get_memspace_num_resources
-
- function omp_get_submemspace(memspace, num_resources, resources)
- import
- integer(omp_memspace_handle_kind) omp_get_submemspace
- integer(omp_memspace_handle_kind), intent(in) :: memspace
- integer, intent(in) :: num_resources
- integer, intent(in) :: resources(*)
- end function omp_get_submemspace
-
-
-! ***
-! *** 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)
- character (len=*) :: 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
- end interface
-
-#ifdef __INTEL_COMPILER
-!DIR$ IF DEFINED (__INTEL_OFFLOAD)
-
-!DIR$ IF(__INTEL_COMPILER.LT.1900)
-!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_device_num
-!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_pause_resource
-!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_pause_resource_all
-!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_get_supported_active_levels
-!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_fulfill_event
-!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 :: omp_set_affinity_format
-!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_get_affinity_format
-!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_display_affinity
-!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_capture_affinity
-!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$ ENDIF
-
-!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_device_num )
-!$omp declare target(omp_pause_resource )
-!$omp declare target(omp_pause_resource_all )
-!$omp declare target(omp_get_supported_active_levels )
-!$omp declare target(omp_fulfill_event)
-!$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(omp_set_affinity_format )
-!$omp declare target(omp_get_affinity_format )
-!$omp declare target(omp_display_affinity )
-!$omp declare target(omp_capture_affinity )
-!$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
-#endif
diff --git a/openmp/runtime/src/kmp.h b/openmp/runtime/src/kmp.h
index 3ffec41..36c40ab 100644
--- a/openmp/runtime/src/kmp.h
+++ b/openmp/runtime/src/kmp.h
@@ -2707,7 +2707,8 @@ typedef struct kmp_tasking_flags { /* Total struct must be exactly 32 bits */
unsigned tasking_ser : 1;
unsigned task_serial : 1;
unsigned tasktype : 1;
- unsigned reserved : 8;
+ unsigned reserved : 7;
+ unsigned transparent : 1;
unsigned free_agent_eligible : 1;
unsigned detachable : 1;
unsigned priority_specified : 1;
@@ -2731,7 +2732,8 @@ typedef struct kmp_tasking_flags { /* Total struct must be exactly 32 bits */
unsigned detachable : 1; /* 1 == can detach */
unsigned free_agent_eligible : 1; /* set if task can be executed by a
free-agent thread */
- unsigned reserved : 8; /* reserved for compiler use */
+ unsigned transparent : 1; /* transparent task support (compiler uses this) */
+ unsigned reserved : 7; /* reserved for compiler use */
/* Library flags */ /* Total library flags must be 16 bits */
unsigned tasktype : 1; /* task is either explicit(1) or implicit (0) */
diff --git a/openmp/runtime/src/kmp_csupport.cpp b/openmp/runtime/src/kmp_csupport.cpp
index 3ca32ba..a92fc46 100644
--- a/openmp/runtime/src/kmp_csupport.cpp
+++ b/openmp/runtime/src/kmp_csupport.cpp
@@ -1780,7 +1780,7 @@ void __kmpc_end_critical(ident_t *loc, kmp_int32 global_tid,
if (ompt_enabled.ompt_callback_mutex_released) {
ompt_callbacks.ompt_callback(ompt_callback_mutex_released)(
ompt_mutex_critical, (ompt_wait_id_t)(uintptr_t)lck,
- OMPT_LOAD_RETURN_ADDRESS(0));
+ OMPT_LOAD_RETURN_ADDRESS(global_tid));
}
#endif
diff --git a/openmp/runtime/src/kmp_ftn_entry.h b/openmp/runtime/src/kmp_ftn_entry.h
index 2b0063e..6adf60e 100644
--- a/openmp/runtime/src/kmp_ftn_entry.h
+++ b/openmp/runtime/src/kmp_ftn_entry.h
@@ -1543,13 +1543,40 @@ int FTN_STDCALL KMP_EXPAND_NAME(FTN_GET_MAX_TASK_PRIORITY)(void) {
#endif
}
-// This function will be defined in libomptarget. When libomptarget is not
-// loaded, we assume we are on the host and return KMP_HOST_DEVICE.
+// These functions will be defined in libomptarget. When libomptarget is not
+// loaded, we assume we are on the host.
// Compiler/libomptarget will handle this if called inside target.
int FTN_STDCALL FTN_GET_DEVICE_NUM(void) KMP_WEAK_ATTRIBUTE_EXTERNAL;
int FTN_STDCALL FTN_GET_DEVICE_NUM(void) {
return KMP_EXPAND_NAME(FTN_GET_INITIAL_DEVICE)();
}
+const char *FTN_STDCALL KMP_EXPAND_NAME(FTN_GET_UID_FROM_DEVICE)(int device_num)
+ KMP_WEAK_ATTRIBUTE_EXTERNAL;
+const char *FTN_STDCALL
+KMP_EXPAND_NAME(FTN_GET_UID_FROM_DEVICE)(int device_num) {
+#if KMP_OS_DARWIN || KMP_OS_WASI || defined(KMP_STUB)
+ return nullptr;
+#else
+ const char *(*fptr)(int);
+ if ((*(void **)(&fptr) = KMP_DLSYM_NEXT("omp_get_uid_from_device")))
+ return (*fptr)(device_num);
+ // Returns the same string as used by libomptarget
+ return "HOST";
+#endif
+}
+int FTN_STDCALL KMP_EXPAND_NAME(FTN_GET_DEVICE_FROM_UID)(const char *device_uid)
+ KMP_WEAK_ATTRIBUTE_EXTERNAL;
+int FTN_STDCALL
+KMP_EXPAND_NAME(FTN_GET_DEVICE_FROM_UID)(const char *device_uid) {
+#if KMP_OS_DARWIN || KMP_OS_WASI || defined(KMP_STUB)
+ return -2; // omp_invalid_device, see definition in omp.h
+#else
+ int (*fptr)(const char *);
+ if ((*(void **)(&fptr) = KMP_DLSYM_NEXT("omp_get_device_from_uid")))
+ return (*fptr)(device_uid);
+ return KMP_EXPAND_NAME(FTN_GET_INITIAL_DEVICE)();
+#endif
+}
// Compiler will ensure that this is only called from host in sequential region
int FTN_STDCALL KMP_EXPAND_NAME(FTN_PAUSE_RESOURCE)(kmp_pause_status_t kind,
@@ -1906,6 +1933,10 @@ KMP_VERSION_SYMBOL(FTN_SET_AFFINITY_FORMAT, 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");
+// OMP_6.0 versioned symbols
+KMP_VERSION_SYMBOL(FTN_GET_UID_FROM_DEVICE, 60, "OMP_6.0");
+KMP_VERSION_SYMBOL(FTN_GET_DEVICE_FROM_UID, 60, "OMP_6.0");
+
#endif // KMP_USE_VERSION_SYMBOLS
#ifdef __cplusplus
diff --git a/openmp/runtime/src/kmp_ftn_os.h b/openmp/runtime/src/kmp_ftn_os.h
index ae0ed06..c439a05 100644
--- a/openmp/runtime/src/kmp_ftn_os.h
+++ b/openmp/runtime/src/kmp_ftn_os.h
@@ -140,6 +140,8 @@
#define FTN_GET_MEMSPACE_NUM_RESOURCES omp_get_memspace_num_resources
#define FTN_GET_SUBMEMSPACE omp_get_submemspace
#define FTN_GET_DEVICE_NUM omp_get_device_num
+#define FTN_GET_UID_FROM_DEVICE omp_get_uid_from_device
+#define FTN_GET_DEVICE_FROM_UID omp_get_device_from_uid
#define FTN_SET_AFFINITY_FORMAT omp_set_affinity_format
#define FTN_GET_AFFINITY_FORMAT omp_get_affinity_format
#define FTN_DISPLAY_AFFINITY omp_display_affinity
@@ -289,6 +291,8 @@
#define FTN_ALLOC omp_alloc_
#define FTN_FREE omp_free_
#define FTN_GET_DEVICE_NUM omp_get_device_num_
+#define FTN_GET_UID_FROM_DEVICE omp_get_uid_from_device_
+#define FTN_GET_DEVICE_FROM_UID omp_get_device_from_uid_
#define FTN_SET_AFFINITY_FORMAT omp_set_affinity_format_
#define FTN_GET_AFFINITY_FORMAT omp_get_affinity_format_
#define FTN_DISPLAY_AFFINITY omp_display_affinity_
@@ -436,6 +440,8 @@
#define FTN_GET_MEMSPACE_NUM_RESOURCES OMP_GET_MEMSPACE_NUM_RESOURCES
#define FTN_GET_SUBMEMSPACE OMP_GET_SUBMEMSPACE
#define FTN_GET_DEVICE_NUM OMP_GET_DEVICE_NUM
+#define FTN_GET_UID_FROM_DEVICE OMP_GET_UID_FROM_DEVICE
+#define FTN_GET_DEVICE_FROM_UID OMP_GET_DEVICE_FROM_UID
#define FTN_SET_AFFINITY_FORMAT OMP_SET_AFFINITY_FORMAT
#define FTN_GET_AFFINITY_FORMAT OMP_GET_AFFINITY_FORMAT
#define FTN_DISPLAY_AFFINITY OMP_DISPLAY_AFFINITY
@@ -585,6 +591,8 @@
#define FTN_ALLOC OMP_ALLOC_
#define FTN_FREE OMP_FREE_
#define FTN_GET_DEVICE_NUM OMP_GET_DEVICE_NUM_
+#define FTN_GET_UID_FROM_DEVICE OMP_GET_UID_FROM_DEVICE_
+#define FTN_GET_DEVICE_FROM_UID OMP_GET_DEVICE_FROM_UID_
#define FTN_SET_AFFINITY_FORMAT OMP_SET_AFFINITY_FORMAT_
#define FTN_GET_AFFINITY_FORMAT OMP_GET_AFFINITY_FORMAT_
#define FTN_DISPLAY_AFFINITY OMP_DISPLAY_AFFINITY_
diff --git a/openmp/runtime/src/z_Linux_asm.S b/openmp/runtime/src/z_Linux_asm.S
index 684c7e2..12fea67 100644
--- a/openmp/runtime/src/z_Linux_asm.S
+++ b/openmp/runtime/src/z_Linux_asm.S
@@ -1358,10 +1358,10 @@ __tid = 8
PROC __kmp_invoke_microtask
PACBTI_C
- stp x29, x30, [sp, #-16]!
# if OMPT_SUPPORT
stp x19, x20, [sp, #-16]!
# endif
+ stp x29, x30, [sp, #-16]!
mov x29, sp
orr w9, wzr, #1
@@ -1415,11 +1415,11 @@ KMP_LABEL(kmp_1):
blr x8
orr w0, wzr, #1
mov sp, x29
+ ldp x29, x30, [sp], #16
# if OMPT_SUPPORT
str xzr, [x19]
ldp x19, x20, [sp], #16
# endif
- ldp x29, x30, [sp], #16
PACBTI_RET
ret
diff --git a/openmp/runtime/test/api/omp_device_uid.c b/openmp/runtime/test/api/omp_device_uid.c
new file mode 100644
index 0000000..40a1cbb
--- /dev/null
+++ b/openmp/runtime/test/api/omp_device_uid.c
@@ -0,0 +1,77 @@
+// RUN: %libomp-compile-and-run 2>&1 | FileCheck %s
+// Linking fails for icc 18
+// UNSUPPORTED: icc-18
+
+#include <omp_testsuite.h>
+#include <string.h>
+
+int test_omp_device_uid(int device_num) {
+ const char *device_uid = omp_get_uid_from_device(device_num);
+ if (device_uid == NULL) {
+ printf("FAIL for device %d: omp_get_uid_from_device returned NULL\n",
+ device_num);
+ return 0;
+ }
+
+ int device_num_from_uid = omp_get_device_from_uid(device_uid);
+ if (device_num_from_uid != device_num) {
+ printf(
+ "FAIL for device %d: omp_get_device_from_uid returned %d (UID: %s)\n",
+ device_num, device_num_from_uid, device_uid);
+ return 0;
+ }
+
+ if (device_num == omp_get_initial_device())
+ return 1;
+
+ int success = 1;
+
+// Note that the following code may be executed on the host if the host is the
+// device
+#pragma omp target map(tofrom : success) device(device_num)
+ {
+ int device_num = omp_get_device_num();
+
+ // omp_get_uid_from_device() in the device runtime is a dummy function
+ // returning NULL
+ const char *device_uid = omp_get_uid_from_device(device_num);
+
+ // omp_get_device_from_uid() in the device runtime is a dummy function
+ // returning omp_invalid_device.
+ int device_num_from_uid = omp_get_device_from_uid(device_uid);
+
+ // Depending on whether we're executing on the device or the host, we either
+ // got NULL as the device UID or the correct device UID. Consequently,
+ // omp_get_device_from_uid() either returned omp_invalid_device or the
+ // correct device number (aka omp_get_initial_device()).
+ if (device_uid ? device_num_from_uid != device_num
+ : device_num_from_uid != omp_invalid_device) {
+ printf("FAIL for device %d (target): omp_get_device_from_uid returned %d "
+ "(UID: %s)\n",
+ device_num, device_num_from_uid, device_uid);
+ success = 0;
+ }
+ }
+
+ return success;
+}
+
+int main() {
+ int num_devices = omp_get_num_devices();
+ int num_failed = 0;
+ // (also test initial device aka num_devices)
+ for (int i = 0; i < num_devices + 1; i++) {
+ if (!test_omp_device_uid(i)) {
+ printf("FAIL for device %d\n", i);
+ num_failed++;
+ }
+ }
+ if (num_failed) {
+ printf("FAIL\n");
+ return 1;
+ }
+ printf("PASS\n");
+ return 0;
+}
+
+// CHECK: PASS