[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 25 16:36:23 PDT 2020


jdoerfert added inline comments.


================
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()))
----------------
JonChesterfield wrote:
> Doesn't matter hugely given inlining, but I'm surprised to see std::complex taken by const & instead of by value.
I took this from the libc++, I hope they know ;)


================
Comment at: clang/test/Headers/Inputs/include/type_traits:3
+
+#pragma once
+
----------------
JonChesterfield wrote:
> In order to run the tests without libc++/libstdc++ available?
yes. this allows to include the header in the test w/o any system dependence.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D85777



More information about the cfe-commits mailing list