[Openmp-commits] [PATCH] D49857: [OpenMP] Implement GOMP doacross compatibility

Jonathan Peyton via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Thu Jul 26 08:22:52 PDT 2018

jlpeyton created this revision.
jlpeyton added reviewers: tlwilmar, AndreyChurbanov, hbae, omalyshe.
jlpeyton added a project: OpenMP.
Herald added a subscriber: guansong.

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.

  rOMP OpenMP



-------------- next part --------------
A non-text attachment was scrubbed...
Name: D49857.157489.patch
Type: text/x-patch
Size: 43778 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20180726/8d2d82e1/attachment-0001.bin>

More information about the Openmp-commits mailing list