[Beignet] [PATCH 5/5] Backend: add double support to bitselect
Song, Ruiling
ruiling.song at intel.com
Fri Mar 10 02:58:36 UTC 2017
LGTM
- Ruiling
> -----Original Message-----
> From: Beignet [mailto:beignet-bounces at lists.freedesktop.org] On Behalf Of
> rander
> Sent: Tuesday, March 7, 2017 9:56 AM
> To: beignet at freedesktop.org
> Cc: Wang, Rander <rander.wang at intel.com>
> Subject: [Beignet] [PATCH 5/5] Backend: add double support to bitselect
>
> Signed-off-by: rander <rander.wang at intel.com>
> ---
> backend/src/libocl/tmpl/ocl_relational.tmpl.cl | 3 +++
> backend/src/libocl/tmpl/ocl_relational.tmpl.h | 1 +
> 2 files changed, 4 insertions(+)
>
> diff --git a/backend/src/libocl/tmpl/ocl_relational.tmpl.cl
> b/backend/src/libocl/tmpl/ocl_relational.tmpl.cl
> index eb3ec7c..3cf78b4 100644
> --- a/backend/src/libocl/tmpl/ocl_relational.tmpl.cl
> +++ b/backend/src/libocl/tmpl/ocl_relational.tmpl.cl
> @@ -268,6 +268,9 @@ DEF(long); DEF(ulong)
> OVERLOADABLE float bitselect(float a, float b, float c) {
> return as_float(bitselect(as_int(a), as_int(b), as_int(c)));
> }
> +OVERLOADABLE double bitselect(double a, double b, double c) {
> + return as_double(bitselect(as_long(a), as_long(b), as_long(c)));
> +}
>
>
> // select
> diff --git a/backend/src/libocl/tmpl/ocl_relational.tmpl.h
> b/backend/src/libocl/tmpl/ocl_relational.tmpl.h
> index a4d67aa..0540a91 100644
> --- a/backend/src/libocl/tmpl/ocl_relational.tmpl.h
> +++ b/backend/src/libocl/tmpl/ocl_relational.tmpl.h
> @@ -128,6 +128,7 @@ DEF(long) DEF(ulong)
> #undef DEF
> OVERLOADABLE float bitselect(float a, float b, float c);
> OVERLOADABLE half bitselect(half a, half b, half c);
> +OVERLOADABLE double bitselect(double a, double b, double c);
>
>
> #define DEF(TYPE1, TYPE2) \
> --
> 2.7.4
>
> _______________________________________________
> Beignet mailing list
> Beignet at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/beignet
More information about the Beignet
mailing list