[Beignet] [PATCH] add scalar type builtin function "dot"
Lu, Guanqun
guanqun.lu at intel.com
Thu Oct 24 19:50:58 PDT 2013
LGTM.
> -----Original Message-----
> From: beignet-bounces+guanqun.lu=intel.com at lists.freedesktop.org
> [mailto:beignet-bounces+guanqun.lu=intel.com at lists.freedesktop.org] On
> Behalf Of Homer Hsing
> Sent: Thursday, October 24, 2013 10:45 AM
> To: beignet at lists.freedesktop.org
> Subject: [Beignet] [PATCH] add scalar type builtin function "dot"
>
> Signed-off-by: Homer Hsing <homer.xing at intel.com>
> ---
> backend/src/ocl_stdlib.tmpl.h | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/backend/src/ocl_stdlib.tmpl.h b/backend/src/ocl_stdlib.tmpl.h index
> a76469a..9fe38b6 100644
> --- a/backend/src/ocl_stdlib.tmpl.h
> +++ b/backend/src/ocl_stdlib.tmpl.h
> @@ -1727,6 +1727,9 @@ INLINE_OVERLOADABLE float rootn(float x, int n)
> { /////////////////////////////////////////////////////////////////////////////
> // Geometric functions (see 6.11.5 of OCL 1.1 spec)
> /////////////////////////////////////////////////////////////////////////////
> +INLINE_OVERLOADABLE float dot(float p0, float p1) {
> + return p0 * p1;
> +}
> INLINE_OVERLOADABLE float dot(float2 p0, float2 p1) {
> return mad(p0.x,p1.x,p0.y*p1.y);
> }
> --
> 1.8.3.2
>
> _______________________________________________
> Beignet mailing list
> Beignet at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/beignet
More information about the Beignet
mailing list