[LLVMbugs] [Bug 22826] constexpr and CUDA
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Fri Mar 6 13:56:39 PST 2015
http://llvm.org/bugs/show_bug.cgi?id=22826
Richard Smith <richard-llvm at metafoo.co.uk> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
CC| |richard-llvm at metafoo.co.uk
Resolution|--- |INVALID
--- Comment #1 from Richard Smith <richard-llvm at metafoo.co.uk> ---
That's not true. A `constexpr` function call is not required to be evaluated
during compilation in most cases, and *cannot* be evaluated during compilation
in some cases. For instance:
__device__ constexpr int f(int n) { return n * 2; }
__host__ int g(int n) { return f(n); }
Here, 'g' will call 'f' at runtime.
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20150306/af3aa278/attachment.html>
More information about the llvm-bugs
mailing list