summaryrefslogtreecommitdiff
path: root/generic/include
diff options
context:
space:
mode:
authorTom Stellard <thomas.stellard@amd.com>2013-06-26 18:20:46 +0000
committerTom Stellard <thomas.stellard@amd.com>2013-06-26 18:20:46 +0000
commit485cf99dbb8ef2e08c3a7d5c970a556546df73a6 (patch)
tree6f7820188f25f78d37f4220d7e3bfd8ab0bff397 /generic/include
parent7dc9242ba50572a73003bcada7a993b5eaa787a5 (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/include')
-rw-r--r--generic/include/clc/clc.h2
-rw-r--r--generic/include/clc/integer/max.h2
-rw-r--r--generic/include/clc/integer/max.inc1
-rw-r--r--generic/include/clc/math/max.h2
-rw-r--r--generic/include/clc/math/max.inc1
5 files changed, 8 insertions, 0 deletions
diff --git a/generic/include/clc/clc.h b/generic/include/clc/clc.h
index 4394c9e..f6668a3 100644
--- a/generic/include/clc/clc.h
+++ b/generic/include/clc/clc.h
@@ -45,6 +45,7 @@
#include <clc/math/log.h>
#include <clc/math/log2.h>
#include <clc/math/mad.h>
+#include <clc/math/max.h>
#include <clc/math/pow.h>
#include <clc/math/sin.h>
#include <clc/math/sqrt.h>
@@ -63,6 +64,7 @@
#include <clc/integer/abs.h>
#include <clc/integer/abs_diff.h>
#include <clc/integer/add_sat.h>
+#include <clc/integer/max.h>
#include <clc/integer/sub_sat.h>
/* 6.11.5 Geometric Functions */
diff --git a/generic/include/clc/integer/max.h b/generic/include/clc/integer/max.h
new file mode 100644
index 0000000..e74a459
--- /dev/null
+++ b/generic/include/clc/integer/max.h
@@ -0,0 +1,2 @@
+#define BODY <clc/integer/max.inc>
+#include <clc/integer/gentype.inc>
diff --git a/generic/include/clc/integer/max.inc b/generic/include/clc/integer/max.inc
new file mode 100644
index 0000000..ce6c6d0
--- /dev/null
+++ b/generic/include/clc/integer/max.inc
@@ -0,0 +1 @@
+_CLC_OVERLOAD _CLC_DECL GENTYPE max(GENTYPE a, GENTYPE b);
diff --git a/generic/include/clc/math/max.h b/generic/include/clc/math/max.h
new file mode 100644
index 0000000..3d158f1
--- /dev/null
+++ b/generic/include/clc/math/max.h
@@ -0,0 +1,2 @@
+#define BODY <clc/math/max.inc>
+#include <clc/math/gentype.inc>
diff --git a/generic/include/clc/math/max.inc b/generic/include/clc/math/max.inc
new file mode 100644
index 0000000..ce6c6d0
--- /dev/null
+++ b/generic/include/clc/math/max.inc
@@ -0,0 +1 @@
+_CLC_OVERLOAD _CLC_DECL GENTYPE max(GENTYPE a, GENTYPE b);