mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-04-01 12:43:47 +00:00
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:
parent
fe23a30ef5
commit
cb133c9322
@ -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>
|
||||
|
@ -1,2 +0,0 @@
|
||||
#define BODY <clc/integer/max.inc>
|
||||
#include <clc/integer/gentype.inc>
|
@ -1,2 +0,0 @@
|
||||
#define BODY <clc/math/max.inc>
|
||||
#include <clc/math/gentype.inc>
|
@ -1 +0,0 @@
|
||||
_CLC_OVERLOAD _CLC_DECL GENTYPE max(GENTYPE a, GENTYPE b);
|
5
libclc/generic/include/clc/shared/max.h
Normal file
5
libclc/generic/include/clc/shared/max.h
Normal 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>
|
@ -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
|
||||
|
@ -1,4 +0,0 @@
|
||||
#include <clc/clc.h>
|
||||
|
||||
#define BODY <max.inc>
|
||||
#include <clc/integer/gentype.inc>
|
@ -1,3 +0,0 @@
|
||||
_CLC_OVERLOAD _CLC_DEF GENTYPE max(GENTYPE a, GENTYPE b) {
|
||||
return (a > b ? a : b);
|
||||
}
|
@ -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
|
Loading…
x
Reference in New Issue
Block a user