[PATCH] D85777: [OpenMP] Support std::complex math functions in target regions

Johannes Doerfert via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Aug 11 13:42:19 PDT 2020


jdoerfert created this revision.
jdoerfert added reviewers: JonChesterfield, jhuber6, ABataev.
Herald added subscribers: guansong, bollu, yaxunl, mgorny.
Herald added a project: clang.
jdoerfert requested review of this revision.
Herald added a subscriber: sstefan1.

The last (big) missing piece to get "math" working in OpenMP target
regions (that I know of) was complex math functions, e.g.,
`std::sin(std::complex<double>)`. With this patch we overload the system
template functions for these operations with versions that have been
distilled from `libcxx/include/complex`. We use the same

  `omp begin/end declare variant`

mechanism we use for other math functions before, except that we this
time overload templates (via D85735 <https://reviews.llvm.org/D85735>).


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D85777

Files:
  clang/lib/Headers/CMakeLists.txt
  clang/lib/Headers/openmp_wrappers/complex
  clang/lib/Headers/openmp_wrappers/complex_cmath.h
  clang/test/Headers/Inputs/include/complex
  clang/test/Headers/nvptx_device_math_complex.c
  clang/test/Headers/nvptx_device_math_complex.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D85777.284878.patch
Type: text/x-patch
Size: 25055 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200811/52144557/attachment-0001.bin>


More information about the cfe-commits mailing list