<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Exchange Server">
<!-- converted from rtf -->
<style><!-- .EmailQuote { margin-left: 1pt; padding-left: 4pt; border-left: #800000 2px solid; } --></style>
</head>
<body>
<font face="Calibri" size="2"><span style="font-size:10.5pt;">
<div>One inline comment below<font face="Courier New">.</font></div>
<div>And is it conforme to openCL spec section 7.5.1?</div>
<div><font face="Times New Roman"> </font></div>
<div>-----Original Message-----<br>
From: beignet-bounces+rong.r.yang=intel.com@lists.freedesktop.org [<a href="mailto:beignet-bounces+rong.r.yang=intel.com@lists.freedesktop.org">mailto:beignet-bounces+rong.r.yang=intel.com@lists.freedesktop.org</a>] On Behalf Of Homer Hsing<br>
Sent: Monday, September 02, 2013 8:49 AM<br>
To: beignet@lists.freedesktop.org<br>
Subject: [Beignet] [PATCH] add built-in function "atan2pi"</div>
<div><font face="Times New Roman"> </font></div>
<div><font face="Times New Roman"> </font></div>
<div>Signed-off-by: Homer Hsing <<a href="mailto:homer.xing@intel.com">homer.xing@intel.com</a>></div>
<div>---</div>
<div> backend/src/builtin_vector_proto.def | 2 +-</div>
<div> backend/src/ocl_stdlib.tmpl.h | 4 ++++</div>
<div> 2 files changed, 5 insertions(+), 1 deletion(-)</div>
<div> </div>
<div>diff --git a/backend/src/builtin_vector_proto.def b/backend/src/builtin_vector_proto.def</div>
<div>index b24e7ea..82dd36c 100644</div>
<div>--- a/backend/src/builtin_vector_proto.def</div>
<div>+++ b/backend/src/builtin_vector_proto.def</div>
<div>@@ -9,7 +9,7 @@ gentype atan (gentype y_over_x) gentype atan2 (gentype y, gentype x) gentype atanh (gentype) gentype atanpi (gentype x) -#gentype atan2pi (gentype y, gentype x)</div>
<div>+gentype atan2pi (gentype y, gentype x)</div>
<div> gentype cbrt (gentype)</div>
<div> gentype ceil (gentype)</div>
<div> gentype copysign (gentype x, gentype y) diff --git a/backend/src/ocl_stdlib.tmpl.h b/backend/src/ocl_stdlib.tmpl.h index 7f1032f..d8e8afc 100644</div>
<div>--- a/backend/src/ocl_stdlib.tmpl.h</div>
<div>+++ b/backend/src/ocl_stdlib.tmpl.h</div>
<div>@@ -1364,6 +1364,9 @@ INLINE_OVERLOADABLE float __gen_ocl_internal_atan2(float y, float x) {</div>
<div> return - M_PI_F + z;</div>
<div> }</div>
<div> }</div>
<div>+INLINE_OVERLOADABLE float __gen_ocl_internal_atan2pi(float y, float x) </div>
<div>+{</div>
<div>+ return __gen_ocl_internal_atan2pi(y, x) / M_PI_F; }</div>
<div><font face="Times New Roman"> </font></div>
<div>Is it <font color="red">__gen_ocl_internal_atan2</font><font color="red"> </font>here?</div>
<div><font face="Times New Roman"> </font></div>
<div><font face="Times New Roman"> </font></div>
<div> INLINE_OVERLOADABLE float __gen_ocl_internal_fabs(float x) { return __gen_ocl_fabs(x); } INLINE_OVERLOADABLE float __gen_ocl_internal_trunc(float x) { return __gen_ocl_rndz(x); } INLINE_OVERLOADABLE float __gen_ocl_internal_round(float x) { return
__gen_ocl_rnde(x); } @@ -1397,6 +1400,7 @@ INLINE_OVERLOADABLE float __gen_ocl_internal_rint(float x) { #define tanh __gen_ocl_internal_tanh #define atan __gen_ocl_internal_atan #define atan2 __gen_ocl_internal_atan2</div>
<div>+#define atan2pi __gen_ocl_internal_atan2pi</div>
<div> #define atanpi __gen_ocl_internal_atanpi #define atanh __gen_ocl_internal_atanh #define pow powr</div>
<div>--</div>
<div>1.8.1.2</div>
<div> </div>
<div>_______________________________________________</div>
<div>Beignet mailing list</div>
<div><font face="Times New Roman"><a href="mailto:Beignet@lists.freedesktop.org"><font face="Calibri">Beignet@lists.freedesktop.org</font></a></font></div>
<div><font face="Times New Roman"><a href="http://lists.freedesktop.org/mailman/listinfo/beignet"><font face="Calibri">http://lists.freedesktop.org/mailman/listinfo/beignet</font></a></font></div>
<div><font face="Times New Roman"> </font></div>
</span></font>
</body>
</html>