diff options
| author | Jonathan Peyton <jonathan.l.peyton@intel.com> | 2018-09-07 18:25:49 +0000 |
|---|---|---|
| committer | Jonathan Peyton <jonathan.l.peyton@intel.com> | 2018-09-07 18:25:49 +0000 |
| commit | 92ca61884b6a675a3c2be33244ef3dfca61f94ae (patch) | |
| tree | 256075a55b79eed432512c0f4c2264ba0d5b8c5c /openmp/runtime/src/kmp_csupport.cpp | |
| parent | b97d18945b821fe4f9b4c7059eb87e2a8734ab5d (diff) | |
| download | bcm5719-llvm-92ca61884b6a675a3c2be33244ef3dfca61f94ae.tar.gz bcm5719-llvm-92ca61884b6a675a3c2be33244ef3dfca61f94ae.zip | |
[OpenMP] Initial implementation of OMP 5.0 Memory Management routines
Implemented omp_alloc, omp_free, omp_{set,get}_default_allocator entries,
and OMP_ALLOCATOR environment variable.
Added support for HBW memory on Linux if libmemkind.so library is accessible
(dynamic library only, no support for static libraries).
Only used stable API (hbwmalloc) of the memkind library
though we may consider using experimental API in future.
The ICV def-allocator-var is implemented per implicit task similar to
place-partition-var. In the absence of a requested allocator, the uses the
default allocator.
Predefined allocators (the only ones currently available) are made similar
for C and Fortran, - pointers (long integers) with values 1 to 8.
Patch by Andrey Churbanov
Differential Revision: https://reviews.llvm.org/D51232
llvm-svn: 341687
Diffstat (limited to 'openmp/runtime/src/kmp_csupport.cpp')
| -rw-r--r-- | openmp/runtime/src/kmp_csupport.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/openmp/runtime/src/kmp_csupport.cpp b/openmp/runtime/src/kmp_csupport.cpp index 7ab5a82671a..74c6e4fcd28 100644 --- a/openmp/runtime/src/kmp_csupport.cpp +++ b/openmp/runtime/src/kmp_csupport.cpp @@ -11,6 +11,7 @@ // //===----------------------------------------------------------------------===// +#define __KMP_IMP #include "omp.h" /* extern "C" declarations of user-visible routines */ #include "kmp.h" #include "kmp_error.h" @@ -540,6 +541,9 @@ void __kmpc_end_serialized_parallel(ident_t *loc, kmp_int32 global_tid) { serial_team->t.t_dispatch->th_disp_buffer->next; __kmp_free(disp_buffer); } +#if OMP_50_ENABLED + this_thr->th.th_def_allocator = serial_team->t.t_def_allocator; // restore +#endif --serial_team->t.t_serialized; if (serial_team->t.t_serialized == 0) { |

