llvm-project/clang/lib/Headers
Artem Belevich c5f41a34e5 [CUDA] Implemented device-side support functions in <cmath>.
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.
https://github.com/thrust/thrust/tree/master/testing

Differential Revision: http://reviews.llvm.org/D16593

llvm-svn: 258880
2016-01-26 23:37:29 +00:00
..
CMakeLists.txt [CUDA] Implemented device-side support functions in <cmath>. 2016-01-26 23:37:29 +00:00
Intrin.h Intrin.h: implement __emul and __emulu 2015-10-14 16:24:28 +00:00
__clang_cuda_cmath.h [CUDA] Implemented device-side support functions in <cmath>. 2016-01-26 23:37:29 +00:00
__clang_cuda_runtime_wrapper.h [CUDA] Implemented device-side support functions in <cmath>. 2016-01-26 23:37:29 +00:00
__stddef_max_align_t.h Restore the libc++ definition of max_align_t on Apple platforms 2015-02-24 01:06:22 +00:00
__wmmintrin_aes.h [X86] Add missing typecasts in intrinsic macros. This should make them more robust against inputs that aren't already the right type. 2015-11-11 03:47:10 +00:00
__wmmintrin_pclmul.h [X86] Fix bad intrinsic header comment. NFC. 2015-11-10 05:08:00 +00:00
adxintrin.h [X86] Rename DEFAULT_FN_ATTR macro to __DEFAULT_FN_ATTR 2015-06-30 13:36:19 +00:00
altivec.h [PPC] Add long long/double support for vec_cts, vec_ctu and vec_ctf 2016-01-08 02:00:48 +00:00
ammintrin.h Clean up trailing whitespace in the builtin headers 2015-09-12 02:55:19 +00:00
arm_acle.h [ARM,AArch64] Fix __rev16l and __rev16ll intrinsics 2015-11-16 14:58:50 +00:00
avx2intrin.h [X86] Improve codegen for AVX2 gather with an all 1s mask. 2015-12-01 07:12:59 +00:00
avx512bwintrin.h [X86][AVX512BW] Remove whitespaces 2015-07-30 06:52:26 +00:00
avx512cdintrin.h Headers: Switch some headers to LF line endings for consistency. 2015-10-15 10:33:27 +00:00
avx512dqintrin.h re-apply r.247881 2015-09-17 14:53:37 +00:00
avx512erintrin.h [x86][avx512] more changes in intrinsics to be align with gcc format 2015-12-08 12:34:38 +00:00
avx512fintrin.h [AVX512] Fix typo in r226298 2016-01-19 02:02:25 +00:00
avx512vlbwintrin.h [X86] Header formatting fixes. NFC 2015-11-11 08:00:39 +00:00
avx512vldqintrin.h [X86] Header formatting fixes. NFC 2015-11-11 08:00:39 +00:00
avx512vlintrin.h Handle target builtin options that are all required rather than 2015-10-27 06:11:03 +00:00
avxintrin.h [X86] Add missing typecasts in intrinsic macros. This should make them more robust against inputs that aren't already the right type. 2015-11-11 03:47:10 +00:00
bmi2intrin.h [X86] Rename DEFAULT_FN_ATTR macro to __DEFAULT_FN_ATTR 2015-06-30 13:36:19 +00:00
bmiintrin.h bmiintrin.h: Allow using the tzcnt intrinsics for non-BMI targets 2015-11-17 18:46:48 +00:00
cpuid.h Fix trailing commas in AMD define. 2014-10-01 21:22:17 +00:00
cuda_builtin_vars.h [cuda] Added support for CUDA built-in variables. 2015-04-21 22:14:13 +00:00
emmintrin.h [X86] Add 'pause' builtin that's already in llvm and use it instead of inline assembly to implement _mm_pause. 2015-11-11 08:13:33 +00:00
f16cintrin.h 2 missing intrinsics _cvtss_sh and _mm_cvtps_ph were added to the intrinsics header f16intrin.h 2016-01-22 06:50:50 +00:00
float.h <float.h>: Don't seek #include_next if -ffreestanding for targeting mingw. 2014-10-22 01:25:49 +00:00
fma4intrin.h [X86] Rename DEFAULT_FN_ATTR macro to __DEFAULT_FN_ATTR 2015-06-30 13:36:19 +00:00
fmaintrin.h [X86] Rename DEFAULT_FN_ATTR macro to __DEFAULT_FN_ATTR 2015-06-30 13:36:19 +00:00
fxsrintrin.h [X86] Add fxsr feature name for fxsave/fxrestore builtins. 2015-10-16 06:22:36 +00:00
htmintrin.h [SystemZ] Support transactional execution on zEC12 2015-04-01 12:54:25 +00:00
htmxlintrin.h Clean up trailing whitespace in the builtin headers 2015-09-12 02:55:19 +00:00
ia32intrin.h Reimplement __readeflags and __writeeflags on top of intrinsics 2016-01-01 06:50:08 +00:00
immintrin.h [X86][PKU] add clang intrinsic for {RD|WR}PKRU 2015-12-31 14:14:07 +00:00
inttypes.h Add an inttypes.h wrapper that fixes up some macros in Microsoft mode. 2015-06-26 00:13:18 +00:00
iso646.h
limits.h Fix two pedantic issues with our builtin headers. The __STDC_VERSION__ 2014-02-19 23:38:18 +00:00
lzcntintrin.h [X86] Rename DEFAULT_FN_ATTR macro to __DEFAULT_FN_ATTR 2015-06-30 13:36:19 +00:00
mm3dnow.h Add subtarget feature support for 3dnowa to the 3dnowa intrinsics. 2015-10-13 18:40:17 +00:00
mm_malloc.h
mmintrin.h [X86] Add missing m64/int64 conversions 2015-12-20 12:37:18 +00:00
module.modulemap [SystemZ] Add support for vecintrin.h vector built-in functions 2015-07-30 14:10:43 +00:00
nmmintrin.h Update the intel intrinsic headers to use the target attribute support. 2015-06-17 07:09:32 +00:00
pkuintrin.h [X86][PKU] add clang intrinsic for {RD|WR}PKRU 2015-12-31 14:14:07 +00:00
pmmintrin.h Clean up trailing whitespace in the builtin headers 2015-09-12 02:55:19 +00:00
popcntintrin.h [X86] Add signed aliases for popcnt intrinsics 2015-12-20 12:35:35 +00:00
prfchwintrin.h [X86] Add missing _m_prefetch intrinsic 2015-07-27 19:01:52 +00:00
rdseedintrin.h [X86] Rename DEFAULT_FN_ATTR macro to __DEFAULT_FN_ATTR 2015-06-30 13:36:19 +00:00
rtmintrin.h [X86] Rename DEFAULT_FN_ATTR macro to __DEFAULT_FN_ATTR 2015-06-30 13:36:19 +00:00
s390intrin.h [SystemZ] Add support for vecintrin.h vector built-in functions 2015-07-30 14:10:43 +00:00
shaintrin.h [X86] Add missing typecasts in intrinsic macros. This should make them more robust against inputs that aren't already the right type. 2015-11-11 03:47:10 +00:00
smmintrin.h [X86] Add missing typecasts in intrinsic macros. This should make them more robust against inputs that aren't already the right type. 2015-11-11 03:47:10 +00:00
stdalign.h
stdarg.h Added standard macro guard. In case __GNUC_VA_LIST was not 2014-07-02 15:25:03 +00:00
stdatomic.h Don't use BCPL comments here, in case someone wants to use <stdatomic.h> from C89 mode. 2015-01-29 03:34:39 +00:00
stdbool.h
stddef.h Fix interaction of max_align_t and modules. 2014-10-03 00:31:35 +00:00
stdint.h Clean up trailing whitespace in the builtin headers 2015-09-12 02:55:19 +00:00
stdnoreturn.h
tbmintrin.h [X86] Add missing typecasts in intrinsic macros. This should make them more robust against inputs that aren't already the right type. 2015-11-11 03:47:10 +00:00
tgmath.h Clean up trailing whitespace in the builtin headers 2015-09-12 02:55:19 +00:00
tmmintrin.h [X86] Remove temporary variables from macros in x86 intrinsic headers. Prevents duplicate names appearing from multiple macro expansions. NFC 2015-11-10 05:08:05 +00:00
unwind.h Headers: Don't use attribute keywords which aren't reserved 2015-02-04 00:26:10 +00:00
vadefs.h Intercept __crt_va_* used by MSVC "14" 2014-11-20 22:44:03 +00:00
varargs.h
vecintrin.h [SystemZ] Add support for vecintrin.h vector built-in functions 2015-07-30 14:10:43 +00:00
wmmintrin.h Update the intel intrinsic headers to use the target attribute support. 2015-06-17 07:09:32 +00:00
x86intrin.h Update the intel intrinsic headers to use the target attribute support. 2015-06-17 07:09:32 +00:00
xmmintrin.h [X86] Remove temporary variables from macros in x86 intrinsic headers. Prevents duplicate names appearing from multiple macro expansions. NFC 2015-11-10 05:08:05 +00:00
xopintrin.h [X86] Remove temporary variables from macros in x86 intrinsic headers. Prevents duplicate names appearing from multiple macro expansions. NFC 2015-11-10 05:08:05 +00:00
xsavecintrin.h Headers: Switch some headers to LF line endings for consistency. 2015-10-15 10:33:27 +00:00
xsaveintrin.h Headers: Switch some headers to LF line endings for consistency. 2015-10-15 10:33:27 +00:00
xsaveoptintrin.h Headers: Switch some headers to LF line endings for consistency. 2015-10-15 10:33:27 +00:00
xsavesintrin.h Headers: Switch some headers to LF line endings for consistency. 2015-10-15 10:33:27 +00:00
xtestintrin.h Move xtest to its own file to match the gcc header organization. 2015-06-17 18:42:07 +00:00