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.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.h')
-rw-r--r-- | runtime/src/kmp.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/runtime/src/kmp.h b/runtime/src/kmp.h index ec9dd31..29d09e6 100644 --- a/runtime/src/kmp.h +++ b/runtime/src/kmp.h @@ -3807,11 +3807,12 @@ struct kmp_dim { // loop bounds info casted to kmp_int64 kmp_int64 st; // stride }; KMP_EXPORT void __kmpc_doacross_init(ident_t *loc, kmp_int32 gtid, - kmp_int32 num_dims, struct kmp_dim *dims); + kmp_int32 num_dims, + const struct kmp_dim *dims); KMP_EXPORT void __kmpc_doacross_wait(ident_t *loc, kmp_int32 gtid, - kmp_int64 *vec); + const kmp_int64 *vec); KMP_EXPORT void __kmpc_doacross_post(ident_t *loc, kmp_int32 gtid, - kmp_int64 *vec); + const kmp_int64 *vec); KMP_EXPORT void __kmpc_doacross_fini(ident_t *loc, kmp_int32 gtid); #endif |