diff options
author | Tom Stellard <thomas.stellard@amd.com> | 2013-06-26 18:20:46 +0000 |
---|---|---|
committer | Tom Stellard <thomas.stellard@amd.com> | 2013-06-26 18:20:46 +0000 |
commit | 485cf99dbb8ef2e08c3a7d5c970a556546df73a6 (patch) | |
tree | 6f7820188f25f78d37f4220d7e3bfd8ab0bff397 /generic/lib/integer/max.inc | |
parent | 7dc9242ba50572a73003bcada7a993b5eaa787a5 (diff) |
libclc: Add max() builtin function
Adds this function for both int and floating data types.
Patch by: Aaron Watry
git-svn-id: https://llvm.org/svn/llvm-project/libclc/trunk@184992 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'generic/lib/integer/max.inc')
-rw-r--r-- | generic/lib/integer/max.inc | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/generic/lib/integer/max.inc b/generic/lib/integer/max.inc new file mode 100644 index 0000000..37409fc --- /dev/null +++ b/generic/lib/integer/max.inc @@ -0,0 +1,3 @@ +_CLC_OVERLOAD _CLC_DEF GENTYPE max(GENTYPE a, GENTYPE b) { + return (a > b ? a : b); +} |