libclc/math: Add cospi
authorAaron Watry <awatry@gmail.com>
Thu, 26 Feb 2015 15:42:00 +0000 (15:42 +0000)
committerAaron Watry <awatry@gmail.com>
Thu, 26 Feb 2015 15:42:00 +0000 (15:42 +0000)
commitf89bcca0b783ab1003ac8e1f1af2424c751b0361
tree1c2db37912261b7fd7cac2b4b729cd27ea7774db
parentf72bdbfbb11f6562d44d6039b92eb69d133c7776
libclc/math: Add cospi

Ported from the libclc/amd-builtins branch

v2: Rename sincos_f_piby4 to __libclc__sincosf_piby4
    Add cospi(double) implementation instead of using llvm.cos

Notes:
The sincosD_piby4.h file is mostly the same as the builtin implementation
released by AMD. The inline attribute declaration is changed, and M_PI is
used instead of a constant double. Otherwise, the only difference is that
the header explicitly enables the fp64 pragma.

Signed-off-by: Aaron Watry <awatry@gmail.com>
Reviewed-by: Jeroen Ketema <j.ketema@imperial.ac.uk>
CC: Tom Stellard <tom@stellard.net>
CC: Matt Arsenault <Matthew.Arsenault@amd.com>
llvm-svn: 230641
libclc/generic/include/clc/clc.h
libclc/generic/include/clc/math/cospi.h [new file with mode: 0644]
libclc/generic/include/clc/math/cospi.inc [new file with mode: 0644]
libclc/generic/lib/SOURCES
libclc/generic/lib/math/cospi.cl [new file with mode: 0644]
libclc/generic/lib/math/sincosD_piby4.h [new file with mode: 0644]
libclc/generic/lib/math/sincospiF_piby4.h [new file with mode: 0644]