[Beignet] [PATCH] add scalar type builtin function "dot"
Homer Hsing
homer.xing at intel.com
Wed Oct 23 19:44:41 PDT 2013
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
More information about the Beignet
mailing list