Skip to content

Commit 3aa6c5d

Browse files
author
git apple-llvm automerger
committed
Merge commit '911cee2fd086' from llvm.org/main into next
2 parents afcd0ce + 911cee2 commit 3aa6c5d

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

clang/lib/Headers/openmp_wrappers/complex_cmath.h

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,13 @@ template <class _Tp> __DEVICE__ _Tp norm(const std::complex<_Tp> &__c) {
6464
}
6565

6666
// conj
67-
68-
template <class _Tp> std::complex<_Tp> conj(const std::complex<_Tp> &__c) {
67+
#ifdef _GLIBCXX20_CONSTEXPR
68+
#define CXX20_CONSTEXPR_DEVICE __DEVICE__
69+
#else
70+
#define CXX20_CONSTEXPR_DEVICE
71+
#endif
72+
template <class _Tp>
73+
CXX20_CONSTEXPR_DEVICE std::complex<_Tp> conj(const std::complex<_Tp> &__c) {
6974
return std::complex<_Tp>(__c.real(), -__c.imag());
7075
}
7176

0 commit comments

Comments
 (0)