summaryrefslogtreecommitdiff
path: root/generic/include
diff options
context:
space:
mode:
authorTom Stellard <thomas.stellard@amd.com>2013-06-26 18:21:38 +0000
committerTom Stellard <thomas.stellard@amd.com>2013-06-26 18:21:38 +0000
commita8b6a9c793b7b3e0fd39fe63445b88f23cee3fa3 (patch)
treeebf601109f250b5a2ce5fae2e38f1f1f46e89334 /generic/include
parent547d4512a5515de8dbbe433a4502f2e0ff20fce5 (diff)
libclc: implement initial version of min()
This doesn't handle the integer cases for min(vector, scalar). Patch by: Aaron Watry git-svn-id: https://llvm.org/svn/llvm-project/libclc/trunk@185001 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'generic/include')
-rw-r--r--generic/include/clc/clc.h1
-rw-r--r--generic/include/clc/shared/min.h5
-rw-r--r--generic/include/clc/shared/min.inc1
3 files changed, 7 insertions, 0 deletions
diff --git a/generic/include/clc/clc.h b/generic/include/clc/clc.h
index 72f518a..74f1126 100644
--- a/generic/include/clc/clc.h
+++ b/generic/include/clc/clc.h
@@ -69,6 +69,7 @@
/* 6.11.2 and 6.11.3 Shared Integer/Math Functions */
#include <clc/shared/clamp.h>
#include <clc/shared/max.h>
+#include <clc/shared/min.h>
/* 6.11.5 Geometric Functions */
#include <clc/geometric/cross.h>
diff --git a/generic/include/clc/shared/min.h b/generic/include/clc/shared/min.h
new file mode 100644
index 0000000..e16b45d
--- /dev/null
+++ b/generic/include/clc/shared/min.h
@@ -0,0 +1,5 @@
+#define BODY <clc/shared/min.inc>
+#include <clc/integer/gentype.inc>
+
+#define BODY <clc/shared/min.inc>
+#include <clc/math/gentype.inc>
diff --git a/generic/include/clc/shared/min.inc b/generic/include/clc/shared/min.inc
new file mode 100644
index 0000000..3bc9880
--- /dev/null
+++ b/generic/include/clc/shared/min.inc
@@ -0,0 +1 @@
+_CLC_OVERLOAD _CLC_DECL GENTYPE min(GENTYPE a, GENTYPE b);