[libclc] r184995 - libclc: Move max builtin to shared/

Tom Stellard thomas.stellard at amd.com
Wed Jun 26 11:21:06 PDT 2013


Author: tstellar
Date: Wed Jun 26 13:21:06 2013
New Revision: 184995

URL: http://llvm.org/viewvc/llvm-project?rev=184995&view=rev
Log:
libclc: Move max builtin to shared/

Max(x,y) is available for all integer/floating types.

Patch by: Aaron Watry

Added:
    libclc/trunk/generic/include/clc/shared/max.h
    libclc/trunk/generic/include/clc/shared/max.inc
      - copied, changed from r184994, libclc/trunk/generic/include/clc/integer/max.inc
    libclc/trunk/generic/lib/shared/max.cl
      - copied, changed from r184994, libclc/trunk/generic/lib/math/max.cl
    libclc/trunk/generic/lib/shared/max.inc
      - copied, changed from r184994, libclc/trunk/generic/lib/integer/max.inc
Removed:
    libclc/trunk/generic/include/clc/integer/max.h
    libclc/trunk/generic/include/clc/integer/max.inc
    libclc/trunk/generic/include/clc/math/max.h
    libclc/trunk/generic/include/clc/math/max.inc
    libclc/trunk/generic/lib/integer/max.cl
    libclc/trunk/generic/lib/integer/max.inc
    libclc/trunk/generic/lib/math/max.cl
    libclc/trunk/generic/lib/math/max.inc
Modified:
    libclc/trunk/generic/include/clc/clc.h
    libclc/trunk/generic/lib/SOURCES

Modified: libclc/trunk/generic/include/clc/clc.h
URL: http://llvm.org/viewvc/llvm-project/libclc/trunk/generic/include/clc/clc.h?rev=184995&r1=184994&r2=184995&view=diff
==============================================================================
--- libclc/trunk/generic/include/clc/clc.h (original)
+++ libclc/trunk/generic/include/clc/clc.h Wed Jun 26 13:21:06 2013
@@ -45,7 +45,6 @@
 #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>
@@ -64,11 +63,11 @@
 #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.2 and 6.11.3 Shared Integer/Math Functions */
 #include <clc/shared/clamp.h>
+#include <clc/shared/max.h>
 
 /* 6.11.5 Geometric Functions */
 #include <clc/geometric/cross.h>

Removed: libclc/trunk/generic/include/clc/integer/max.h
URL: http://llvm.org/viewvc/llvm-project/libclc/trunk/generic/include/clc/integer/max.h?rev=184994&view=auto
==============================================================================
--- libclc/trunk/generic/include/clc/integer/max.h (original)
+++ libclc/trunk/generic/include/clc/integer/max.h (removed)
@@ -1,2 +0,0 @@
-#define BODY <clc/integer/max.inc>
-#include <clc/integer/gentype.inc>

Removed: libclc/trunk/generic/include/clc/integer/max.inc
URL: http://llvm.org/viewvc/llvm-project/libclc/trunk/generic/include/clc/integer/max.inc?rev=184994&view=auto
==============================================================================
--- libclc/trunk/generic/include/clc/integer/max.inc (original)
+++ libclc/trunk/generic/include/clc/integer/max.inc (removed)
@@ -1 +0,0 @@
-_CLC_OVERLOAD _CLC_DECL GENTYPE max(GENTYPE a, GENTYPE b);

Removed: libclc/trunk/generic/include/clc/math/max.h
URL: http://llvm.org/viewvc/llvm-project/libclc/trunk/generic/include/clc/math/max.h?rev=184994&view=auto
==============================================================================
--- libclc/trunk/generic/include/clc/math/max.h (original)
+++ libclc/trunk/generic/include/clc/math/max.h (removed)
@@ -1,2 +0,0 @@
-#define BODY <clc/math/max.inc>
-#include <clc/math/gentype.inc>

Removed: libclc/trunk/generic/include/clc/math/max.inc
URL: http://llvm.org/viewvc/llvm-project/libclc/trunk/generic/include/clc/math/max.inc?rev=184994&view=auto
==============================================================================
--- libclc/trunk/generic/include/clc/math/max.inc (original)
+++ libclc/trunk/generic/include/clc/math/max.inc (removed)
@@ -1 +0,0 @@
-_CLC_OVERLOAD _CLC_DECL GENTYPE max(GENTYPE a, GENTYPE b);

Added: libclc/trunk/generic/include/clc/shared/max.h
URL: http://llvm.org/viewvc/llvm-project/libclc/trunk/generic/include/clc/shared/max.h?rev=184995&view=auto
==============================================================================
--- libclc/trunk/generic/include/clc/shared/max.h (added)
+++ libclc/trunk/generic/include/clc/shared/max.h Wed Jun 26 13:21:06 2013
@@ -0,0 +1,5 @@
+#define BODY <clc/shared/max.inc>
+#include <clc/integer/gentype.inc>
+
+#define BODY <clc/shared/max.inc>
+#include <clc/math/gentype.inc>

Copied: libclc/trunk/generic/include/clc/shared/max.inc (from r184994, libclc/trunk/generic/include/clc/integer/max.inc)
URL: http://llvm.org/viewvc/llvm-project/libclc/trunk/generic/include/clc/shared/max.inc?p2=libclc/trunk/generic/include/clc/shared/max.inc&p1=libclc/trunk/generic/include/clc/integer/max.inc&r1=184994&r2=184995&rev=184995&view=diff
==============================================================================
    (empty)

Modified: libclc/trunk/generic/lib/SOURCES
URL: http://llvm.org/viewvc/llvm-project/libclc/trunk/generic/lib/SOURCES?rev=184995&r1=184994&r2=184995&view=diff
==============================================================================
--- libclc/trunk/generic/lib/SOURCES (original)
+++ libclc/trunk/generic/lib/SOURCES Wed Jun 26 13:21:06 2013
@@ -8,7 +8,6 @@ integer/abs_diff.cl
 integer/add_sat.cl
 integer/add_sat.ll
 integer/add_sat_impl.ll
-integer/max.cl
 integer/sub_sat.cl
 integer/sub_sat.ll
 integer/sub_sat_impl.ll
@@ -16,8 +15,8 @@ math/fmax.cl
 math/fmin.cl
 math/hypot.cl
 math/mad.cl
-math/max.cl
 relational/any.cl
 shared/clamp.cl
+shared/max.cl
 workitem/get_global_id.cl
 workitem/get_global_size.cl

Removed: libclc/trunk/generic/lib/integer/max.cl
URL: http://llvm.org/viewvc/llvm-project/libclc/trunk/generic/lib/integer/max.cl?rev=184994&view=auto
==============================================================================
--- libclc/trunk/generic/lib/integer/max.cl (original)
+++ libclc/trunk/generic/lib/integer/max.cl (removed)
@@ -1,4 +0,0 @@
-#include <clc/clc.h>
-
-#define BODY <max.inc>
-#include <clc/integer/gentype.inc>

Removed: libclc/trunk/generic/lib/integer/max.inc
URL: http://llvm.org/viewvc/llvm-project/libclc/trunk/generic/lib/integer/max.inc?rev=184994&view=auto
==============================================================================
--- libclc/trunk/generic/lib/integer/max.inc (original)
+++ libclc/trunk/generic/lib/integer/max.inc (removed)
@@ -1,3 +0,0 @@
-_CLC_OVERLOAD _CLC_DEF GENTYPE max(GENTYPE a, GENTYPE b) {
-  return (a > b ? a : b);
-}

Removed: libclc/trunk/generic/lib/math/max.cl
URL: http://llvm.org/viewvc/llvm-project/libclc/trunk/generic/lib/math/max.cl?rev=184994&view=auto
==============================================================================
--- libclc/trunk/generic/lib/math/max.cl (original)
+++ libclc/trunk/generic/lib/math/max.cl (removed)
@@ -1,8 +0,0 @@
-#include <clc/clc.h>
-
-#ifdef cl_khr_fp64
-#pragma OPENCL EXTENSION cl_khr_fp64 : enable
-#endif
-
-#define BODY <max.inc>
-#include <clc/math/gentype.inc>

Removed: libclc/trunk/generic/lib/math/max.inc
URL: http://llvm.org/viewvc/llvm-project/libclc/trunk/generic/lib/math/max.inc?rev=184994&view=auto
==============================================================================
--- libclc/trunk/generic/lib/math/max.inc (original)
+++ libclc/trunk/generic/lib/math/max.inc (removed)
@@ -1,3 +0,0 @@
-_CLC_OVERLOAD _CLC_DEF GENTYPE max(GENTYPE a, GENTYPE b) {
-  return (a > b ? a : b);
-}

Copied: libclc/trunk/generic/lib/shared/max.cl (from r184994, libclc/trunk/generic/lib/math/max.cl)
URL: http://llvm.org/viewvc/llvm-project/libclc/trunk/generic/lib/shared/max.cl?p2=libclc/trunk/generic/lib/shared/max.cl&p1=libclc/trunk/generic/lib/math/max.cl&r1=184994&r2=184995&rev=184995&view=diff
==============================================================================
--- libclc/trunk/generic/lib/math/max.cl (original)
+++ libclc/trunk/generic/lib/shared/max.cl Wed Jun 26 13:21:06 2013
@@ -1,5 +1,8 @@
 #include <clc/clc.h>
 
+#define BODY <max.inc>
+#include <clc/integer/gentype.inc>
+
 #ifdef cl_khr_fp64
 #pragma OPENCL EXTENSION cl_khr_fp64 : enable
 #endif

Copied: libclc/trunk/generic/lib/shared/max.inc (from r184994, libclc/trunk/generic/lib/integer/max.inc)
URL: http://llvm.org/viewvc/llvm-project/libclc/trunk/generic/lib/shared/max.inc?p2=libclc/trunk/generic/lib/shared/max.inc&p1=libclc/trunk/generic/lib/integer/max.inc&r1=184994&r2=184995&rev=184995&view=diff
==============================================================================
    (empty)





More information about the cfe-commits mailing list