diff options
author | Tom Stellard <thomas.stellard@amd.com> | 2013-06-26 18:20:56 +0000 |
---|---|---|
committer | Tom Stellard <thomas.stellard@amd.com> | 2013-06-26 18:20:56 +0000 |
commit | fe23a30ef5febddf512d669e89e08f35a14872ee (patch) | |
tree | 14caf45c01dd290da691473d6ffa6464edfc0a28 /libclc/generic/include | |
parent | cd88a4ebb61ed01575633e9955b89202927c33ff (diff) | |
download | bcm5719-llvm-fe23a30ef5febddf512d669e89e08f35a14872ee.tar.gz bcm5719-llvm-fe23a30ef5febddf512d669e89e08f35a14872ee.zip |
libclc: Add clamp() builtin for integer/floating point
Created under a new shared/ directory for functions which are available for
both integer and floating point types.
Patch by: Aaron Watry
llvm-svn: 184994
Diffstat (limited to 'libclc/generic/include')
-rw-r--r-- | libclc/generic/include/clc/clc.h | 3 | ||||
-rw-r--r-- | libclc/generic/include/clc/shared/clamp.h | 5 | ||||
-rw-r--r-- | libclc/generic/include/clc/shared/clamp.inc | 1 |
3 files changed, 9 insertions, 0 deletions
diff --git a/libclc/generic/include/clc/clc.h b/libclc/generic/include/clc/clc.h index f6668a36675..80ecd0175f3 100644 --- a/libclc/generic/include/clc/clc.h +++ b/libclc/generic/include/clc/clc.h @@ -67,6 +67,9 @@ #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> + /* 6.11.5 Geometric Functions */ #include <clc/geometric/cross.h> #include <clc/geometric/dot.h> diff --git a/libclc/generic/include/clc/shared/clamp.h b/libclc/generic/include/clc/shared/clamp.h new file mode 100644 index 00000000000..5c2ebd06e9d --- /dev/null +++ b/libclc/generic/include/clc/shared/clamp.h @@ -0,0 +1,5 @@ +#define BODY <clc/shared/clamp.inc> +#include <clc/integer/gentype.inc> + +#define BODY <clc/shared/clamp.inc> +#include <clc/math/gentype.inc> diff --git a/libclc/generic/include/clc/shared/clamp.inc b/libclc/generic/include/clc/shared/clamp.inc new file mode 100644 index 00000000000..3e3a4357d38 --- /dev/null +++ b/libclc/generic/include/clc/shared/clamp.inc @@ -0,0 +1 @@ +_CLC_OVERLOAD _CLC_DECL GENTYPE clamp(GENTYPE x, GENTYPE y, GENTYPE z); |