libclc: Move max builtin to shared/

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

Patch by: Aaron Watry

llvm-svn: 184995
This commit is contained in:
Tom Stellard 2013-06-26 18:21:06 +00:00
parent fe23a30ef5
commit cb133c9322
11 changed files with 10 additions and 16 deletions

View File

@ -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>

View File

@ -1,2 +0,0 @@
#define BODY <clc/integer/max.inc>
#include <clc/integer/gentype.inc>

View File

@ -1,2 +0,0 @@
#define BODY <clc/math/max.inc>
#include <clc/math/gentype.inc>

View File

@ -1 +0,0 @@
_CLC_OVERLOAD _CLC_DECL GENTYPE max(GENTYPE a, GENTYPE b);

View File

@ -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>

View File

@ -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

View File

@ -1,4 +0,0 @@
#include <clc/clc.h>
#define BODY <max.inc>
#include <clc/integer/gentype.inc>

View File

@ -1,3 +0,0 @@
_CLC_OVERLOAD _CLC_DEF GENTYPE max(GENTYPE a, GENTYPE b) {
return (a > b ? a : b);
}

View File

@ -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