summaryrefslogtreecommitdiff
path: root/libclc/generic/lib/integer/add_sat.cl
AgeCommit message (Collapse)Author
2025-05-20[libclc] Reorganize OpenCL builtins (#140557)Fraser Cormack
This commits moves all OpenCL builtins under a top-level 'opencl' directory, akin to how the CLC builtins are organized. This new structure aims to better convey the separation of the two layers and that 'CLC' is not a subset of OpenCL or a libclc target. In doing so this commit moves the location of the 'lib' directory to match CLC: libclc/generic/lib/ becomes libclc/opencl/lib/generic/. This allows us to remove some special casing in CMake and ensure a common directory structure. It also tries to better communicate that the OpenCL headers are libclc-specific OpenCL headers and should not be confused with or used as standard OpenCL headers. It does so by ensuring includes are of the form <clc/opencl/*>. It might be that we don't specifically need the libclc OpenCL headers and we simply could use clang's built-in declarations, but we can revisit that later. Aside from the code move, there is some code formatting and updating a couple of OpenCL builtin includes to use the readily available gentype helpers. This allows us to remove some '.inc' files.
2025-03-24[libclc] Add license headers to files missing them (#132239)Fraser Cormack
This commit bulk updates all '.h', '.cl', '.inc', and '.cpp' files to add any missing license headers. The remaining files are generally CMake, SOURCES, scripts, markdown, etc. There are still some '.ll' files which may benefit from a license header. I can't find an example of an LLVM IR file with a license header in the rest of LLVM, but unlike most other (sub)projects, libclc has examples of LLVM IR as source files, compiled and built into the library.
2025-01-29[libclc] Move (add|sub)_sat to CLC; optimize (#124903)Fraser Cormack
Using the `__builtin_elementwise_(add|sub)_sat` functions allows us to directly optimize to the desired intrinsic, and avoid scalarization for vector types.
2024-11-04[libclc] Move clcmacro.h to CLC library. NFC (#114845)Fraser Cormack
2017-10-02integer/add_sat: Use clang builtin instead of llvm asmJan Vesely
reviewer: Tom Stellard Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu> llvm-svn: 314702
2014-06-24Move clcmacro.h to avoid cluttering user namespace v2Jeroen Ketema
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
2012-08-05Fix declarations of __clc_add_sat_*. Patch by Lei Mou!Peter Collingbourne
llvm-svn: 161311
2012-01-08Initial commit.Peter Collingbourne
llvm-svn: 147756