This revision was automatically updated to reflect the committed changes.
Closed by commit rL258880: [CUDA] Implemented device-side support functions in
. (authored by tra).
Changed prior to commit:
http://reviews.llvm.org/D16593?vs=46055&id=46066#toc
Repository:
rL LLVM
http://reviews.llvm
tra added inline comments.
Comment at: lib/Headers/__clang_cuda_cmath.h:33
@@ +32,3 @@
+// builtins if CUDA does not provide a suitable function.
+// We also provide device-side std::abs() for integer types.
+
jlebar wrote:
> Why is std::abs a special case that ne
tra updated this revision to Diff 46055.
tra marked 6 inline comments as done.
tra added a comment.
Fixed few issues revealed by -Wdouble-promotion
http://reviews.llvm.org/D16593
Files:
lib/Headers/CMakeLists.txt
lib/Headers/__clang_cuda_cmath.h
lib/Headers/__clang_cuda_runtime_wrapper.h
tra updated this revision to Diff 46041.
tra marked 3 inline comments as done.
tra added a comment.
Added missing ::
http://reviews.llvm.org/D16593
Files:
lib/Headers/CMakeLists.txt
lib/Headers/__clang_cuda_cmath.h
lib/Headers/__clang_cuda_runtime_wrapper.h
Index: lib/Headers/__clang_cud
jlebar added a comment.
Missing (?) functions:
- div, ldiv, lldiv, imaxdiv
- imaxabs
If you left these out intentionally (I forget if nvidia supports div_t), that's
probably fine, but maybe add a comment?
wrt the "::" comments, some are nits because I think we end up calling the
right thing,
tra created this revision.
tra added a reviewer: jlebar.
tra added a subscriber: cfe-commits.
CUDA expects math functions in std:: namespace to work on device side.
In order to make it work with clang without allowing device-side code
generation for functions w/o appropriate target attributes, thi