summaryrefslogtreecommitdiffstats
path: root/libclc/generic/include/clc/float
Commit message (Collapse)AuthorAgeFilesLines
* Add initial support for half precision builtinsJan Vesely2018-05-171-1/+6
| | | | | | | | | | | | | | v2: fix fmax implementation use consistent checks for __CLC_FP_SIZE add missing TODOs fix whitespace in definitions.h v3: undef ZERO in modf.inc Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu> reviewer: Jeroen Ketema <j.ketema@xs4all.nl> Reviewed-by: Aaron Watry <awatry@gmail.com> Tested-by: Aaron Watry <awatry@gmail.com> llvm-svn: 332677
* math: Use precomputed constant for log2(10.0)Jan Vesely2017-11-131-0/+8
| | | | | | | | exp10 CTS fails with or without this change Reviewer: Jeroen Ketema Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu> llvm-svn: 318063
* math: Add ilogb ported from amd-builtinsAaron Watry2016-02-231-0/+3
| | | | | | | | | | | | | | | | 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
* Add several missing double constant definitionsAaron Watry2014-07-171-0/+11
| | | | | | | | | | | These were present in CL 1.0, just not implemented yet. v2: Use hex values and fix commit message Signed-off-by: Aaron Watry <awatry@gmail.com> Reviewed-by: Jeroen Ketema <j.ketema@imperial.ac.uk> CC: Matt Arsenault <Matthew.Arsenault@amd.com> llvm-svn: 213321
* OpenCL 1.1 does not define CL_VERSION_1_2 so use hardcoded number insteadJeroen Ketema2014-06-261-1/+1
| | | | | | | | Otherwise the test evaluates to true on OpenCL 1.1 and earlier. Since we therefore cannot use the CL_VERSION_?_? macros move them to the proper position in the top-level header. llvm-svn: 211787
* Add half limitsJeroen Ketema2014-06-241-0/+15
| | | | | | | | | | | These are apparently only defined in OpenCL 1.2. HALF_MAX, HALF_MIN and HALF_EPSILON are currently omitted. Clang does not seem to support the ‘h’ suffix for half float constants even with the cl_khr_fp16 extension enabled. Reviewed-by: Tom Sellard <tom@stellard.net> llvm-svn: 211579
* Add MAXFLOATJeroen Ketema2014-06-241-5/+6
| | | | | | | Align definitions while we are here. Reviewed-by: Tom Stellard <tom@stellard.net> llvm-svn: 211577
* Fix definition of INFINITY and add NAN/HUGE_VAL[F]Aaron Watry2014-06-161-0/+6
| | | | | | | | | | | | v3: change __builtin_nanf() to __builtin_nanf("") This doesn't work yet, but it was agreed to commit as-is with the logic that "broken" is better than "completely missing" and this should be fixed in clang. v2: use __builtin_inff() and also add nan/huge_val definitions Signed-off-by: Aaron Watry <awatry@gmail.com> llvm-svn: 211065
* Add remaining float constantsJeroen Ketema2014-06-161-0/+8
| | | | | Reviewed-by: Aaron Watry <awatry@gmail.com> llvm-svn: 211062
* Add more log related float constantsJeroen Ketema2014-05-291-0/+3
| | | | llvm-svn: 209850
* Fix _F definitionsJeroen Ketema2014-05-291-2/+2
| | | | | | | | | The 'f' was missing and, hence, the values were considered to be doubles instead of floats. Reviewed by: Tom Stellard llvm-svn: 209849
* Add definition for M_PIJeroen Ketema2014-05-291-0/+1
| | | | | | Reviewed by: Tom Stellard llvm-svn: 209848
* Introduce M_LOG2E_F and M_LOG2ETom Stellard2014-03-281-1/+4
| | | | | | Patch by: Jeroen Ketema llvm-svn: 205055
* Replace tabs by spacesTom Stellard2014-03-281-19/+19
| | | | | | Patch by: Jeroen Ketema llvm-svn: 205054
* Add definition for M_PI_F v3Tom Stellard2014-03-241-0/+2
| | | | | | | | | | v2: - Use a hexadecimal constant. v3: - Use a hexadecimal constant in floating-point notation. llvm-svn: 204666
* Add floating-point macro definitions v2Tom Stellard2013-12-201-0/+24
v2: - Fix typo. Reviewed-by: Jan Vesely <jan.vesely@rutgers.edu> llvm-svn: 197784
OpenPOWER on IntegriCloud