[PATCH] D16593: [CUDA] Implemented device-side support for functions in <cmath>.

Artem Belevich via cfe-commits cfe-commits at lists.llvm.org
Tue Jan 26 11:32:06 PST 2016

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, this patch
provides device-side implementations for <cmath> functions. Most of
them call global-scope math functions provided by CUDA headers. In few
cases we use clang builtins.
Tested out-of tree by compiling and running thrust's unit_tests.



-------------- next part --------------
A non-text attachment was scrubbed...
Name: D16593.46019.patch
Type: text/x-patch
Size: 12592 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20160126/6d02faa3/attachment-0001.bin>

More information about the cfe-commits mailing list