[libclc] r231137 - Move mix from math to common

Aaron Watry awatry at gmail.com
Tue Mar 3 13:25:09 PST 2015


Author: awatry
Date: Tue Mar  3 15:25:08 2015
New Revision: 231137

URL: http://llvm.org/viewvc/llvm-project?rev=231137&view=rev
Log:
Move mix from math to common

It has been part of the common functions since 1.0

Signed-off-by: Aaron Watry <awatry at gmail.com>
Reviewed-by: Tom Stellard <thomas.stellard at amd.com>

Added:
    libclc/trunk/generic/include/clc/common/mix.h
    libclc/trunk/generic/include/clc/common/mix.inc
      - copied, changed from r230970, libclc/trunk/generic/include/clc/math/mix.inc
    libclc/trunk/generic/lib/common/mix.cl
      - copied, changed from r230970, libclc/trunk/generic/lib/math/mix.cl
    libclc/trunk/generic/lib/common/mix.inc
      - copied, changed from r230970, libclc/trunk/generic/lib/math/mix.inc
Removed:
    libclc/trunk/generic/include/clc/math/mix.h
    libclc/trunk/generic/include/clc/math/mix.inc
    libclc/trunk/generic/lib/math/mix.cl
    libclc/trunk/generic/lib/math/mix.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=231137&r1=231136&r2=231137&view=diff
==============================================================================
--- libclc/trunk/generic/include/clc/clc.h (original)
+++ libclc/trunk/generic/include/clc/clc.h Tue Mar  3 15:25:08 2015
@@ -55,7 +55,6 @@
 #include <clc/math/log1p.h>
 #include <clc/math/log2.h>
 #include <clc/math/mad.h>
-#include <clc/math/mix.h>
 #include <clc/math/nextafter.h>
 #include <clc/math/pow.h>
 #include <clc/math/pown.h>
@@ -110,6 +109,7 @@
 /* 6.11.4 Common Functions */
 #include <clc/common/degrees.h>
 #include <clc/common/radians.h>
+#include <clc/common/mix.h>
 #include <clc/common/sign.h>
 #include <clc/common/smoothstep.h>
 #include <clc/common/step.h>

Added: libclc/trunk/generic/include/clc/common/mix.h
URL: http://llvm.org/viewvc/llvm-project/libclc/trunk/generic/include/clc/common/mix.h?rev=231137&view=auto
==============================================================================
--- libclc/trunk/generic/include/clc/common/mix.h (added)
+++ libclc/trunk/generic/include/clc/common/mix.h Tue Mar  3 15:25:08 2015
@@ -0,0 +1,2 @@
+#define __CLC_BODY <clc/common/mix.inc>
+#include <clc/math/gentype.inc>

Copied: libclc/trunk/generic/include/clc/common/mix.inc (from r230970, libclc/trunk/generic/include/clc/math/mix.inc)
URL: http://llvm.org/viewvc/llvm-project/libclc/trunk/generic/include/clc/common/mix.inc?p2=libclc/trunk/generic/include/clc/common/mix.inc&p1=libclc/trunk/generic/include/clc/math/mix.inc&r1=230970&r2=231137&rev=231137&view=diff
==============================================================================
    (empty)

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

Removed: libclc/trunk/generic/include/clc/math/mix.inc
URL: http://llvm.org/viewvc/llvm-project/libclc/trunk/generic/include/clc/math/mix.inc?rev=231136&view=auto
==============================================================================
--- libclc/trunk/generic/include/clc/math/mix.inc (original)
+++ libclc/trunk/generic/include/clc/math/mix.inc (removed)
@@ -1,5 +0,0 @@
-_CLC_OVERLOAD _CLC_DECL __CLC_GENTYPE mix(__CLC_GENTYPE a, __CLC_GENTYPE b, __CLC_GENTYPE c);
-
-#ifndef __CLC_SCALAR
-_CLC_OVERLOAD _CLC_DECL __CLC_GENTYPE mix(__CLC_GENTYPE a, __CLC_GENTYPE b, __CLC_SCALAR_GENTYPE c);
-#endif

Modified: libclc/trunk/generic/lib/SOURCES
URL: http://llvm.org/viewvc/llvm-project/libclc/trunk/generic/lib/SOURCES?rev=231137&r1=231136&r2=231137&view=diff
==============================================================================
--- libclc/trunk/generic/lib/SOURCES (original)
+++ libclc/trunk/generic/lib/SOURCES Tue Mar  3 15:25:08 2015
@@ -28,6 +28,7 @@ cl_khr_local_int32_extended_atomics/atom
 cl_khr_local_int32_extended_atomics/atom_xor.cl
 convert.cl
 common/degrees.cl
+common/mix.cl
 common/radians.cl
 common/sign.cl
 common/smoothstep.cl
@@ -71,7 +72,6 @@ math/hypot.cl
 math/log10.cl
 math/log1p.cl
 math/mad.cl
-math/mix.cl
 math/tables.cl
 math/clc_nextafter.cl
 math/nextafter.cl

Copied: libclc/trunk/generic/lib/common/mix.cl (from r230970, libclc/trunk/generic/lib/math/mix.cl)
URL: http://llvm.org/viewvc/llvm-project/libclc/trunk/generic/lib/common/mix.cl?p2=libclc/trunk/generic/lib/common/mix.cl&p1=libclc/trunk/generic/lib/math/mix.cl&r1=230970&r2=231137&rev=231137&view=diff
==============================================================================
    (empty)

Copied: libclc/trunk/generic/lib/common/mix.inc (from r230970, libclc/trunk/generic/lib/math/mix.inc)
URL: http://llvm.org/viewvc/llvm-project/libclc/trunk/generic/lib/common/mix.inc?p2=libclc/trunk/generic/lib/common/mix.inc&p1=libclc/trunk/generic/lib/math/mix.inc&r1=230970&r2=231137&rev=231137&view=diff
==============================================================================
    (empty)

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

Removed: libclc/trunk/generic/lib/math/mix.inc
URL: http://llvm.org/viewvc/llvm-project/libclc/trunk/generic/lib/math/mix.inc?rev=231136&view=auto
==============================================================================
--- libclc/trunk/generic/lib/math/mix.inc (original)
+++ libclc/trunk/generic/lib/math/mix.inc (removed)
@@ -1,9 +0,0 @@
-_CLC_OVERLOAD _CLC_DEF __CLC_GENTYPE mix(__CLC_GENTYPE x, __CLC_GENTYPE y, __CLC_GENTYPE a) {
-  return mad( y - x, a, x );
-}
-
-#ifndef __CLC_SCALAR
-_CLC_OVERLOAD _CLC_DEF __CLC_GENTYPE mix(__CLC_GENTYPE x, __CLC_GENTYPE y, __CLC_SCALAR_GENTYPE a) {
-    return mix(x, y, (__CLC_GENTYPE)a);
-}
-#endif





More information about the cfe-commits mailing list