math: Add ilogb ported from amd-builtins
authorAaron Watry <awatry@gmail.com>
Tue, 23 Feb 2016 14:43:09 +0000 (14:43 +0000)
committerAaron Watry <awatry@gmail.com>
Tue, 23 Feb 2016 14:43:09 +0000 (14:43 +0000)
commitd6d0454231ac489c50465d608ddf3f5d900e1535
treea05d48abebca3d4e4b28b27369f7869211f59829
parent4924c7a2b5e3b32512914e9cb527122640964b3f
math: Add ilogb ported from amd-builtins

The scalar float/double function bodies are a direct copy/paste
with usage of the CLC wrappers to vectorize them.

This commit also adds in the FP_ILOGB0 and FP_ILOGBNAN macros which are
equal to the results of ilogb(0.0f) and ilogb(float nan) respectively.

v2: Add FP_ILOGB0 and FP_ILOGBNAN definitions

Signed-off-by: Aaron Watry <awatry@gmail.com>
Reviewed-by: Jan Vesely <jan.vesely@rutgers.edu>
v1 Reviewed-by: Tom Stellard <thomas.stellard@amd.com>

llvm-svn: 261639
libclc/generic/include/clc/clc.h
libclc/generic/include/clc/float/definitions.h
libclc/generic/include/clc/math/ilogb.h [new file with mode: 0644]
libclc/generic/include/clc/math/ilogb.inc [new file with mode: 0644]
libclc/generic/lib/SOURCES
libclc/generic/lib/math/ilogb.cl [new file with mode: 0644]