diff options
author | Jonathan Peyton <jonathan.l.peyton@intel.com> | 2018-07-30 17:48:33 +0000 |
---|---|---|
committer | Jonathan Peyton <jonathan.l.peyton@intel.com> | 2018-07-30 17:48:33 +0000 |
commit | 4aa544bb41d8c995b6bac4f38cb5563d746c0641 (patch) | |
tree | 93d20989bafeedd0dde97ecf2c59c20f64340c9d /runtime/src/kmp_os.h | |
parent | af1a3637c14fe451f391991073a457486900ae71 (diff) |
[OpenMP] Implement GOMP doacross compatibility
This change introduces GOMP doacross compatibility. There are 12 new interface
functions 6 for long type and 6 for unsigned long long type:
GOMP_doacross_post, GOMP_doacross_wait, GOMP_loop_doacross_[schedule]_start
where schedule can be static, dynamic, guided, or runtime.
These functions just translate the parameters if necessary and send them
to the corresponding kmp function.
E.g., GOMP_doacross_post() -> __kmpc_doacross_post()
For the GOMP_doacross_post function, there is template specialization to
account for when long is a four byte vs an eight byte type. If it is a
four byte type, then a temporary array has to be created to convert the
four byte integers into eight byte integers and then sending that into
__kmpc_doacross_post(). Because GOMP_doacross_wait uses varargs, it
always needs a temporary array and does not need template specialization.
Differential Revision: https://reviews.llvm.org/D49857
git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@338280 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'runtime/src/kmp_os.h')
-rw-r--r-- | runtime/src/kmp_os.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/runtime/src/kmp_os.h b/runtime/src/kmp_os.h index 60db7af..93743ad 100644 --- a/runtime/src/kmp_os.h +++ b/runtime/src/kmp_os.h @@ -313,9 +313,12 @@ extern "C" { #endif // Define KMP_VERSION_SYMBOL and KMP_EXPAND_NAME -#ifdef KMP_USE_VERSION_SYMBOLS +#ifndef KMP_STR #define KMP_STR(x) _KMP_STR(x) #define _KMP_STR(x) #x +#endif + +#ifdef KMP_USE_VERSION_SYMBOLS // If using versioned symbols, KMP_EXPAND_NAME prepends // __kmp_api_ to the real API name #define KMP_EXPAND_NAME(api_name) _KMP_EXPAND_NAME(api_name) |