[llvm] r287184 - [CUDA] Update docs to indicate that clang now supports std::complex in CUDA mode.

Justin Lebar via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 16 17:03:42 PST 2016


Author: jlebar
Date: Wed Nov 16 19:03:42 2016
New Revision: 287184

URL: http://llvm.org/viewvc/llvm-project?rev=287184&view=rev
Log:
[CUDA] Update docs to indicate that clang now supports std::complex in CUDA mode.

The last remaining necessary change was D25403, landed as r287012.

Modified:
    llvm/trunk/docs/CompileCudaWithLLVM.rst

Modified: llvm/trunk/docs/CompileCudaWithLLVM.rst
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/CompileCudaWithLLVM.rst?rev=287184&r1=287183&r2=287184&view=diff
==============================================================================
--- llvm/trunk/docs/CompileCudaWithLLVM.rst (original)
+++ llvm/trunk/docs/CompileCudaWithLLVM.rst Wed Nov 16 19:03:42 2016
@@ -171,16 +171,9 @@ below).  However, we have heard from imp
 into situations where nvcc will omit a call to an ``std::complex`` function,
 especially when compiling without optimizations.
 
-clang does not yet support ``std::complex``.  Because we interpret the
-"wrong-side rule" more strictly than nvcc, ``std::complex`` doesn't work in
-``__device__`` or ``__host__ __device__`` code.
-
-In the meantime, you can get limited ``std::complex`` support in clang by
-building your code for C++14.  In clang, all ``constexpr`` functions are always
-implicitly ``__host__ __device__`` (this corresponds to nvcc's
-``--relaxed-constexpr`` flag).  In C++14, many ``std::complex`` functions are
-``constexpr``, so you can use these with clang.  (nvcc does not currently
-support C++14.)
+As of 2016-11-16, clang supports ``std::complex`` without these caveats.  It is
+tested with libstdc++ 4.8.5 and newer, but is known to work only with libc++
+newer than 2016-11-16.
 
 ``<algorithm>``
 ---------------




More information about the llvm-commits mailing list