summaryrefslogtreecommitdiffstats
path: root/libclc/generic/include/clc/shared
diff options
context:
space:
mode:
authorTom Stellard <thomas.stellard@amd.com>2013-06-26 18:21:44 +0000
committerTom Stellard <thomas.stellard@amd.com>2013-06-26 18:21:44 +0000
commit075b31a2fa8b5405ce8c1afa736cd240016f1ec8 (patch)
tree1380fe587234faf8e9ea855847a43fda88cedfba /libclc/generic/include/clc/shared
parent0be3acfc7067d6f1d951735f8d7d3c5e1c0a316c (diff)
downloadbcm5719-llvm-075b31a2fa8b5405ce8c1afa736cd240016f1ec8.tar.gz
bcm5719-llvm-075b31a2fa8b5405ce8c1afa736cd240016f1ec8.zip
libclc: Implement the min(vec, scalar) version of the min builtin.
Checks if the current GENTYPE is scalar, and if not, then defines a separate implementation of the function which casts the second arg to vector before proceeding. Patch by: Aaron Watry llvm-svn: 185002
Diffstat (limited to 'libclc/generic/include/clc/shared')
-rw-r--r--libclc/generic/include/clc/shared/min.inc4
1 files changed, 4 insertions, 0 deletions
diff --git a/libclc/generic/include/clc/shared/min.inc b/libclc/generic/include/clc/shared/min.inc
index 3bc98803900..cf3afaf085a 100644
--- a/libclc/generic/include/clc/shared/min.inc
+++ b/libclc/generic/include/clc/shared/min.inc
@@ -1 +1,5 @@
_CLC_OVERLOAD _CLC_DECL GENTYPE min(GENTYPE a, GENTYPE b);
+
+#ifndef SCALAR
+_CLC_OVERLOAD _CLC_DECL GENTYPE min(GENTYPE a, SCALAR_GENTYPE b);
+#endif \ No newline at end of file
OpenPOWER on IntegriCloud