llvm-project/openmp/runtime/src
Jonathan Peyton 76f3980a20 [OpenMP] Add omp_get_device_num() and update several other device API functions
Add omp_get_device_num() function for 5.0 which returns the number of the
device the current thread is running on. Currently, we are leaving it to the
compiler to handle this properly if it is called inside target.

Also, did some cleanup and updating of duplicate device API functions (in both
libomp and libomptarget) to make them into weak functions that check for the
symbol from libomptarget, and will call the version in libomptarget if it is
present. If any additional device API functions are implemented also in
libomptarget in the future, we should add the dlsym calls to the host functions.
Also, if the omp_target_* functions are to be implemented for the host (this has
been requested), they should attempt to call the libomptarget versions as well.

Patch by Terry Wilmarth

Differential Revision: https://reviews.llvm.org/D55578

llvm-svn: 350352
2019-01-03 21:14:19 +00:00
..
i18n [OpenMP] Implement OpenMP 5.0 affinity format functionality 2018-12-13 23:14:24 +00:00
include [OpenMP] Add omp_get_device_num() and update several other device API functions 2019-01-03 21:14:19 +00:00
thirdparty/ittnotify Support clang compiling under windows-gnu and windows-msvc 2018-12-10 13:45:00 +00:00
CMakeLists.txt [CMake] Unify install path for libraries 2018-05-25 15:56:41 +00:00
dllexports [OpenMP] Add omp_get_device_num() and update several other device API functions 2019-01-03 21:14:19 +00:00
exports_so.txt [OpenMP] Initial implementation of OMP 5.0 Memory Management routines 2018-09-07 18:25:49 +00:00
extractExternal.cpp Apply formatting changes 2017-10-20 19:30:57 +00:00
kmp.h [OpenMP] Add omp_get_device_num() and update several other device API functions 2019-01-03 21:14:19 +00:00
kmp_affinity.cpp [OpenMP] Implement OpenMP 5.0 affinity format functionality 2018-12-13 23:14:24 +00:00
kmp_affinity.h Support clang compiling under windows-gnu and windows-msvc 2018-12-10 13:45:00 +00:00
kmp_alloc.cpp [OpenMP] Initial implementation of OMP 5.0 Memory Management routines 2018-09-07 18:25:49 +00:00
kmp_atomic.cpp [OpenMP] Cleanup code 2018-08-09 22:04:30 +00:00
kmp_atomic.h [OMPT] First chunk of final OMPT 5.0 interface updates 2018-12-18 08:52:30 +00:00
kmp_barrier.cpp [OMPT] First chunk of final OMPT 5.0 interface updates 2018-12-18 08:52:30 +00:00
kmp_cancel.cpp [OMPT] Update types according to TR7 2018-09-10 14:34:54 +00:00
kmp_config.h.cmake Support clang compiling under windows-gnu and windows-msvc 2018-12-10 13:45:00 +00:00
kmp_csupport.cpp [OMPT] First chunk of final OMPT 5.0 interface updates 2018-12-18 08:52:30 +00:00
kmp_debug.cpp Apply formatting changes 2017-10-20 19:30:57 +00:00
kmp_debug.h [OpenMP] Cleanup code 2018-08-09 22:04:30 +00:00
kmp_debugger.cpp [OpenMP] Use C++11 Atomics - barrier, tasking, and lock code 2018-07-09 17:36:22 +00:00
kmp_debugger.h Apply formatting changes 2017-10-20 19:30:57 +00:00
kmp_dispatch.cpp Support clang compiling under windows-gnu and windows-msvc 2018-12-10 13:45:00 +00:00
kmp_dispatch.h [OpenMP][OMPT] A few improvements 2018-09-26 20:19:44 +00:00
kmp_dispatch_hier.h [OpenMP] Introduce hierarchical scheduling 2018-07-09 17:51:13 +00:00
kmp_environment.cpp Apply formatting changes 2017-10-20 19:30:57 +00:00
kmp_environment.h Remove const from variables with dynamic memory 2017-11-09 15:52:25 +00:00
kmp_error.cpp Remove const from variables with dynamic memory 2017-11-09 15:52:25 +00:00
kmp_error.h Apply formatting changes 2017-10-20 19:30:57 +00:00
kmp_ftn_cdecl.cpp [OpenMP] Convert KMP_DYNAMIC_LIB to a 0 or 1 guard everywhere 2018-10-05 17:59:39 +00:00
kmp_ftn_entry.h [OpenMP] Add omp_get_device_num() and update several other device API functions 2019-01-03 21:14:19 +00:00
kmp_ftn_extra.cpp Apply formatting changes 2017-10-20 19:30:57 +00:00
kmp_ftn_os.h [OpenMP] Add omp_get_device_num() and update several other device API functions 2019-01-03 21:14:19 +00:00
kmp_ftn_stdcall.cpp Apply formatting changes 2017-10-20 19:30:57 +00:00
kmp_global.cpp [OpenMP] Implement OpenMP 5.0 affinity format functionality 2018-12-13 23:14:24 +00:00
kmp_gsupport.cpp [OMPT] First chunk of final OMPT 5.0 interface updates 2018-12-18 08:52:30 +00:00
kmp_i18n.cpp [OMPT] Omissionin in OMPT Formatting 2018-02-17 09:54:10 +00:00
kmp_i18n.h Remove const from variables with dynamic memory 2017-11-09 15:52:25 +00:00
kmp_import.cpp Apply formatting changes 2017-10-20 19:30:57 +00:00
kmp_io.cpp [OpenMP] Implement OpenMP 5.0 affinity format functionality 2018-12-13 23:14:24 +00:00
kmp_io.h [OpenMP] Implement OpenMP 5.0 affinity format functionality 2018-12-13 23:14:24 +00:00
kmp_itt.cpp Improve stability of the runtime in parent/child processes 2018-01-10 18:21:48 +00:00
kmp_itt.h Improve stability of the runtime in parent/child processes 2018-01-10 18:21:48 +00:00
kmp_itt.inl Remove const from variables with dynamic memory 2017-11-09 15:52:25 +00:00
kmp_lock.cpp [OMPT] First chunk of final OMPT 5.0 interface updates 2018-12-18 08:52:30 +00:00
kmp_lock.h [OpenMP] Fixes for LIBOMP_OMP_VERSION=45/40 2018-12-15 09:23:39 +00:00
kmp_omp.h [OpenMP] Use C++11 Atomics - barrier, tasking, and lock code 2018-07-09 17:36:22 +00:00
kmp_os.h [OpenMP] Implement OpenMP 5.0 affinity format functionality 2018-12-13 23:14:24 +00:00
kmp_platform.h Support clang compiling under windows-gnu and windows-msvc 2018-12-10 13:45:00 +00:00
kmp_runtime.cpp [OMPT] First chunk of final OMPT 5.0 interface updates 2018-12-18 08:52:30 +00:00
kmp_safe_c_api.h [OpenMP] Implement OpenMP 5.0 affinity format functionality 2018-12-13 23:14:24 +00:00
kmp_sched.cpp [OMPT] Update types according to TR7 2018-09-10 14:34:54 +00:00
kmp_settings.cpp [OpenMP] Implement OpenMP 5.0 affinity format functionality 2018-12-13 23:14:24 +00:00
kmp_settings.h [OpenMP][OMPT] A few improvements 2018-09-26 20:19:44 +00:00
kmp_stats.cpp [OpenMP][Stats] Cleanup stats gathering code 2018-07-30 17:41:08 +00:00
kmp_stats.h [OpenMP][Stats] Cleanup stats gathering code 2018-07-30 17:41:08 +00:00
kmp_stats_timing.cpp [OpenMP][Stats] Cleanup stats gathering code 2018-07-30 17:41:08 +00:00
kmp_stats_timing.h Apply formatting changes 2017-10-20 19:30:57 +00:00
kmp_str.cpp [OpenMP] Implement OpenMP 5.0 affinity format functionality 2018-12-13 23:14:24 +00:00
kmp_str.h [OpenMP] Implement OpenMP 5.0 affinity format functionality 2018-12-13 23:14:24 +00:00
kmp_stub.cpp [OpenMP] Implement OpenMP 5.0 affinity format functionality 2018-12-13 23:14:24 +00:00
kmp_stub.h Apply formatting changes 2017-10-20 19:30:57 +00:00
kmp_taskdeps.cpp [OMPT] First chunk of final OMPT 5.0 interface updates 2018-12-18 08:52:30 +00:00
kmp_taskdeps.h Implementation of OpenMP 5.0 mutexinoutset task dependency type. 2018-11-07 12:19:57 +00:00
kmp_tasking.cpp [OMPT] First chunk of final OMPT 5.0 interface updates 2018-12-18 08:52:30 +00:00
kmp_taskq.cpp Apply formatting changes 2017-10-20 19:30:57 +00:00
kmp_threadprivate.cpp [OpenMP] Fix a few formatting issues 2018-07-09 18:09:25 +00:00
kmp_utility.cpp Support clang compiling under windows-gnu and windows-msvc 2018-12-10 13:45:00 +00:00
kmp_version.cpp [OpenMP] Convert KMP_DYNAMIC_LIB to a 0 or 1 guard everywhere 2018-10-05 17:59:39 +00:00
kmp_version.h Apply formatting changes 2017-10-20 19:30:57 +00:00
kmp_wait_release.cpp Block library shutdown until unreaped threads finish spin-waiting 2018-07-19 19:17:00 +00:00
kmp_wait_release.h [OMPT] First chunk of final OMPT 5.0 interface updates 2018-12-18 08:52:30 +00:00
kmp_wrapper_getpid.h Implement __kmp_gettid() for NetBSD 2018-12-11 18:34:33 +00:00
kmp_wrapper_malloc.h Support clang compiling under windows-gnu and windows-msvc 2018-12-10 13:45:00 +00:00
libomp.rc.var Support clang compiling under windows-gnu and windows-msvc 2018-12-10 13:45:00 +00:00
ompt-event-specific.h [OMPT] Update types according to TR7 2018-09-10 14:34:54 +00:00
ompt-general.cpp [OMPT] First chunk of final OMPT 5.0 interface updates 2018-12-18 08:52:30 +00:00
ompt-internal.h [OMPT] First chunk of final OMPT 5.0 interface updates 2018-12-18 08:52:30 +00:00
ompt-specific.cpp [OMPT] First chunk of final OMPT 5.0 interface updates 2018-12-18 08:52:30 +00:00
ompt-specific.h [OMPT] First chunk of final OMPT 5.0 interface updates 2018-12-18 08:52:30 +00:00
test-touch.c
tsan_annotations.cpp Clang-format and whitespace cleanup of source code 2017-05-12 18:01:32 +00:00
tsan_annotations.h Clang-format and whitespace cleanup of source code 2017-05-12 18:01:32 +00:00
z_Linux_asm.S Rename z_Linux_asm.s to z_Linux_asm.S 2017-07-11 18:04:56 +00:00
z_Linux_util.cpp [OpenMP] Fix transient divide by zero bug in 32-bit code 2018-12-13 23:18:55 +00:00
z_Windows_NT-586_asm.asm Clang-format and whitespace cleanup of source code 2017-05-12 18:01:32 +00:00
z_Windows_NT-586_util.cpp Apply formatting changes 2017-10-20 19:30:57 +00:00
z_Windows_NT_util.cpp Support clang compiling under windows-gnu and windows-msvc 2018-12-10 13:45:00 +00:00