diff options
| author | Aaron Watry <awatry@gmail.com> | 2016-02-23 14:43:09 +0000 |
|---|---|---|
| committer | Aaron Watry <awatry@gmail.com> | 2016-02-23 14:43:09 +0000 |
| commit | d6d0454231ac489c50465d608ddf3f5d900e1535 (patch) | |
| tree | a05d48abebca3d4e4b28b27369f7869211f59829 /libclc/generic/include/clc/float | |
| parent | 4924c7a2b5e3b32512914e9cb527122640964b3f (diff) | |
| download | bcm5719-llvm-d6d0454231ac489c50465d608ddf3f5d900e1535.tar.gz bcm5719-llvm-d6d0454231ac489c50465d608ddf3f5d900e1535.zip | |
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
Diffstat (limited to 'libclc/generic/include/clc/float')
| -rw-r--r-- | libclc/generic/include/clc/float/definitions.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libclc/generic/include/clc/float/definitions.h b/libclc/generic/include/clc/float/definitions.h index 329b6238c3f..6010ed2c015 100644 --- a/libclc/generic/include/clc/float/definitions.h +++ b/libclc/generic/include/clc/float/definitions.h @@ -14,6 +14,9 @@ #define FLT_MIN 0x1.0p-126f #define FLT_EPSILON 0x1.0p-23f +#define FP_ILOGB0 (-2147483647 - 1) +#define FP_ILOGBNAN (-2147483647 - 1) + #define M_E_F 0x1.5bf0a8p+1f #define M_LOG2E_F 0x1.715476p+0f #define M_LOG10E_F 0x1.bcb7b2p-2f |

