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

Jon Chesterfield via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Tue Aug 25 16:22:48 PDT 2020


JonChesterfield accepted this revision.
JonChesterfield added a comment.
This revision is now accepted and ready to land.

The duplication from libc++ doesn't feel good but I can see how it happened. Dependency breaking etc.



================
Comment at: clang/lib/Headers/openmp_wrappers/complex_cmath.h:58
+
+template <class _Tp> __DEVICE__ _Tp norm(const std::complex<_Tp> &__c) {
+  if (std::isinf(__c.real()))
----------------
Doesn't matter hugely given inlining, but I'm surprised to see std::complex taken by const & instead of by value.


================
Comment at: clang/test/Headers/Inputs/include/type_traits:3
+
+#pragma once
+
----------------
In order to run the tests without libc++/libstdc++ available?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D85777/new/

https://reviews.llvm.org/D85777



More information about the Openmp-commits mailing list