summaryrefslogtreecommitdiffstats
path: root/libclc/generic/lib/relational
Commit message (Collapse)AuthorAgeFilesLines
* Add initial support for half precision builtinsJan Vesely2018-05-1714-1/+186
| | | | | | | | | | | | | | 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
* select: simplify implementation and fix fp16Jan Vesely2018-04-061-18/+4
| | | | | | | | | | Fix half precision implementation Vector ?: operator should behave exactly as select Passes CTS on carrizo Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu> Reviewer: Jeroen Ketema <j.ketema@xs4all.nl> llvm-svn: 329462
* select: Add vector implementationJan Vesely2018-03-062-0/+54
| | | | | | | | Passes CTS on Carrizo Reviewed-by: Aaron Watry <awatry@gmail.com> Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu> llvm-svn: 326819
* Fix bitselect for float/double types v2Tom Stellard2015-03-052-0/+78
| | | | | | | | | | | | | | We need to reinterpret float/double types as uint/ulong in order to perform the bitwise operations. This has been tested with piglit, OpenCV, and the ocl conformance tests. v2: - Use vector operations rather than splitting vectors into scalar components. Reviewed-by: Aaron Watry <awatry@gmail.com> llvm-svn: 231373
* add isordered builtinJan Vesely2014-09-051-0/+23
| | | | | | Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu> Reviewed-by: Aaron Watry <awatry@gmail.com> llvm-svn: 217247
* add isunordered builtinJan Vesely2014-09-051-0/+22
| | | | | | | | v2: remove trailing newline Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu> Reviewed-by: Aaron Watry <awatry@gmail.com> llvm-svn: 217246
* add islessgreater builtinJan Vesely2014-09-051-0/+22
| | | | | | | | v2: remove trailing newline Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu> Reviewed-by: Aaron Watry <awatry@gmail.com> llvm-svn: 217245
* add isnormal builtinJan Vesely2014-09-051-0/+18
| | | | | | | | | v2: simplify and remove isnan leftovers remove trailing newline Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu> Reviewed-by: Aaron Watry <awatry@gmail.com> llvm-svn: 217244
* add isfinite builtinJan Vesely2014-09-051-0/+18
| | | | | | | | | v2: simplify and remove isinf leftovers remove trailing newline Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu> Reviewed-by: Aaron Watry <awatry@gmail.com> llvm-svn: 217243
* Implement isinf builtinTom Stellard2014-09-031-0/+18
| | | | llvm-svn: 217046
* relational: Add islessequal(floatN) builtinJan Vesely2014-08-011-0/+22
| | | | | | | | v2: remove the initial undef Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu> Reviewed-by: Aaron Watry <awatry@gmail.com> llvm-svn: 214568
* relational: Add isless(floatN) builtinJan Vesely2014-08-011-0/+22
| | | | | | | | v2: remove the initial undef Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu> Reviewed-by: Aaron Watry <awatry@gmail.com> llvm-svn: 214567
* relational: Implement isnotequalAaron Watry2014-07-171-0/+23
| | | | | | | | v2: Use relational macros instead of hand-rolled ones Signed-off-by: Aaron Watry <awatry@gmail.com> Reviewed-by: Tom Stellard <thomas.stellard@amd.com> llvm-svn: 213320
* relational: Implement isgreaterequalAaron Watry2014-07-171-0/+22
| | | | | | | | v2: Use relational macros instead of hand-rolled macros Signed-off-by: Aaron Watry <awatry@gmail.com> Reviewed-by: Tom Stellard <thomas.stellard@amd.com> llvm-svn: 213319
* relational: Implement isgreaterAaron Watry2014-07-171-0/+22
| | | | | | | | v2: Use relational macros instead of hand-rolled macros Signed-off-by: Aaron Watry <awatry@gmail.com> Reviewed-by: Tom Stellard <thomas.stellard@amd.com> llvm-svn: 213318
* relational/signbit: Refactor to use relational macrosAaron Watry2014-07-171-70/+2
| | | | | | Signed-off-by: Aaron Watry <awatry@gmail.com> Reviewed-by: Tom Stellard <thomas.stellard@amd.com> llvm-svn: 213317
* Fix isnan definition for vector resultsAaron Watry2014-07-171-3/+3
| | | | | | | | | Vector true is -1, not 1, which means we need to use the relational unary macro instead of the normal unary builtin one. Signed-off-by: Aaron Watry <awatry@gmail.com> Reviewed-by: Tom Stellard <thomas.stellard@amd.com> llvm-svn: 213316
* relational: create re-usable macros for relational declarationsAaron Watry2014-07-171-0/+117
| | | | | | | | | | | | | | | | | | relational.h includes relational macros for defining functions which need to return 1 for scalar true and -1 for vector true. I believe that this is the only place that this behavior is required, so the macro is placed at its lowest useful level (same directory as it is used in). This also creates re-usable unary/binary declaration and floatn includes which should simplify relational builtin declarations. Mostly patterned off of include/math/[binary_decl|unary_decl|floatn].inc but with required changes for relational functions. Signed-off-by: Aaron Watry <awatry@gmail.com> Reviewed-by: Tom Stellard <thomas.stellard@amd.com> llvm-svn: 213315
* relational: Fix signbitAaron Watry2014-06-251-7/+7
| | | | | | | | | The vector components were mistakenly using () instead of {}, which caused all but the last vector component to be dropped on the floor. Signed-off-by: Aaron Watry <awatry@gmail.com> Reviewed-by: Jeroen Ketema <j.ketema@imperial.ac.uk> llvm-svn: 211733
* relational: Implement signbitAaron Watry2014-06-251-0/+87
| | | | | | | | | | | v2 Changes: - use __builtin_signbit instead of shifting by hand - significantly improve vector shuffling - Works correctly now for signbit(float16) on radeonsi Signed-off-by: Aaron Watry <awatry@gmail.com> Reviewed-by: Tom Stellard <thomas.stellard@amd.com> llvm-svn: 211696
* Move clcmacro.h to avoid cluttering user namespace v2Jeroen Ketema2014-06-241-0/+1
| | | | | | | | | v2: - use quotes instead of <> - add include to r600/lib/math/nextafter.c changed Reviewed-by: Tom Stellard <tom@stellard.net> Reviewed-by: Aaron Watry <awatry@gmail.com> llvm-svn: 211576
* relational: Add isequal(floatN) builtinAaron Watry2014-06-161-0/+30
| | | | | | Signed-off-by: Aaron Watry <awatry@gmail.com> Reviewed-by: Tom Stellard <tom@stellard.net> llvm-svn: 211046
* Add all(igentype) builtinAaron Watry2014-06-161-0/+29
| | | | | | Signed-off-by: Aaron Watry <awatry@gmail.com> Reviewed-by: Tom Stellard <tom@stellard.net> llvm-svn: 211045
* Implement isnan() builtinTom Stellard2013-10-101-0/+17
| | | | llvm-svn: 192382
* Implement any() builtin. Patch by Tom Stellard!Peter Collingbourne2012-10-081-0/+30
llvm-svn: 165386
OpenPOWER on IntegriCloud