<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Feb 26, 2015 at 11:07 AM, Tom Stellard <span dir="ltr"><<a href="mailto:tom@stellard.net" target="_blank">tom@stellard.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span class="">On Wed, Feb 25, 2015 at 08:34:07PM -0600, Aaron Watry wrote:<br>
> On Wed, Feb 25, 2015 at 6:28 PM, Matt Arsenault <<a href="mailto:Matthew.Arsenault@amd.com">Matthew.Arsenault@amd.com</a>><br>
> wrote:<br>
><br>
> >  On 02/25/2015 04:24 PM, Aaron Watry wrote:<br>
> ><br>
> >  Looks good to me.<br>
> ><br>
> >  Do we have a test case for this somewhere?<br>
> ><br>
> >  --Aaron<br>
> ><br>
> >  Things like this are the main thing the OpenCL conformance tests are<br>
> > good at<br>
> ><br>
> ><br>
> Yeah, that's something that I don't have access to...  I'll assume that<br>
> someone's been running this against the conformance tests and that the<br>
> tests pass.<br>
><br>
> It just helps to note (and builds confidence in correctness) that new<br>
> built-in implementations have been tested against piglit, opencv, the CL<br>
> conformance tests, webcl conformance, etc. just to note that the<br>
> implementation has been tested on something other than the local dev's<br>
> machine.<br>
><br>
<br>
</span>I usually test against piglit, OpenCV, and a subset of the conformance<br>
tests before I send patches.  I can add a note in the commit message<br>
that these tests pass conformance.<br>
<br>
-Tom<br></blockquote><div><br></div><div>I almost always check piglit for new test cases, but since OpenCV has a tendency to lock my machine up (at least in the past), I don't often run new patches against that.<br><br></div><div>If you've tested against opencv/conformance, there's a good chance I won't look there and a note would be helpful :)<br><br></div><div>It's not a requirement by any means, but sometimes it'll save me time if I know there's other existing test cases that have been run.  Mostly because if I see new built-ins and piglit doesn't have tests for that function, my first instinct is usually to write tests before finishing my review of the implementation.<br></div><div><br></div><div>--Aaron<br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div><div class="h5"><br>
> --Aaron<br>
><br>
> ><br>
> >  On Tue, Feb 24, 2015 at 2:15 PM, Tom Stellard <<a href="mailto:thomas.stellard@amd.com">thomas.stellard@amd.com</a>><br>
> > wrote:<br>
> ><br>
> >> ---<br>
> >>  generic/include/clc/clc.h                 |  1 +<br>
> >>  generic/include/clc/geometric/degrees.h   | 24 +++++++++++++++++<br>
> >>  generic/include/clc/geometric/degrees.inc | 23 ++++++++++++++++<br>
> >>  generic/lib/SOURCES                       |  1 +<br>
> >>  generic/lib/geometric/<a href="http://degrees.cl" target="_blank">degrees.cl</a>          | 45<br>
> >> +++++++++++++++++++++++++++++++<br>
> >>  5 files changed, 94 insertions(+)<br>
> >>  create mode 100644 generic/include/clc/geometric/degrees.h<br>
> >>  create mode 100644 generic/include/clc/geometric/degrees.inc<br>
> >>  create mode 100644 generic/lib/geometric/<a href="http://degrees.cl" target="_blank">degrees.cl</a><br>
> >><br>
> >> diff --git a/generic/include/clc/clc.h b/generic/include/clc/clc.h<br>
> >> index bd92fdb..02ecc1c 100644<br>
> >> --- a/generic/include/clc/clc.h<br>
> >> +++ b/generic/include/clc/clc.h<br>
> >> @@ -110,6 +110,7 @@<br>
> >><br>
> >>  /* 6.11.5 Geometric Functions */<br>
> >>  #include <clc/geometric/cross.h><br>
> >> +#include <clc/geometric/degrees.h><br>
> >>  #include <clc/geometric/dot.h><br>
> >>  #include <clc/geometric/length.h><br>
> >>  #include <clc/geometric/normalize.h><br>
> >> diff --git a/generic/include/clc/geometric/degrees.h<br>
> >> b/generic/include/clc/geometric/degrees.h<br>
> >> new file mode 100644<br>
> >> index 0000000..dfccdd3<br>
> >> --- /dev/null<br>
> >> +++ b/generic/include/clc/geometric/degrees.h<br>
> >> @@ -0,0 +1,24 @@<br>
> >> +/*<br>
> >> + * Copyright (c) 2014,2015 Advanced Micro Devices, Inc.<br>
> >> + *<br>
> >> + * Permission is hereby granted, free of charge, to any person obtaining<br>
> >> a copy<br>
> >> + * of this software and associated documentation files (the "Software"),<br>
> >> to deal<br>
> >> + * in the Software without restriction, including without limitation the<br>
> >> rights<br>
> >> + * to use, copy, modify, merge, publish, distribute, sublicense, and/or<br>
> >> sell<br>
> >> + * copies of the Software, and to permit persons to whom the Software is<br>
> >> + * furnished to do so, subject to the following conditions:<br>
> >> + *<br>
> >> + * The above copyright notice and this permission notice shall be<br>
> >> included in<br>
> >> + * all copies or substantial portions of the Software.<br>
> >> + *<br>
> >> + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,<br>
> >> EXPRESS OR<br>
> >> + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF<br>
> >> MERCHANTABILITY,<br>
> >> + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT<br>
> >> SHALL THE<br>
> >> + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER<br>
> >> + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,<br>
> >> ARISING FROM,<br>
> >> + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER<br>
> >> DEALINGS IN<br>
> >> + * THE SOFTWARE.<br>
> >> + */<br>
> >> +<br>
> >> +#define __CLC_BODY <clc/geometric/degrees.inc><br>
> >> +#include <clc/geometric/floatn.inc><br>
> >> diff --git a/generic/include/clc/geometric/degrees.inc<br>
> >> b/generic/include/clc/geometric/degrees.inc<br>
> >> new file mode 100644<br>
> >> index 0000000..c4b2247<br>
> >> --- /dev/null<br>
> >> +++ b/generic/include/clc/geometric/degrees.inc<br>
> >> @@ -0,0 +1,23 @@<br>
> >> +/*<br>
> >> + * Copyright (c) 2014,2015 Advanced Micro Devices, Inc.<br>
> >> + *<br>
> >> + * Permission is hereby granted, free of charge, to any person obtaining<br>
> >> a copy<br>
> >> + * of this software and associated documentation files (the "Software"),<br>
> >> to deal<br>
> >> + * in the Software without restriction, including without limitation the<br>
> >> rights<br>
> >> + * to use, copy, modify, merge, publish, distribute, sublicense, and/or<br>
> >> sell<br>
> >> + * copies of the Software, and to permit persons to whom the Software is<br>
> >> + * furnished to do so, subject to the following conditions:<br>
> >> + *<br>
> >> + * The above copyright notice and this permission notice shall be<br>
> >> included in<br>
> >> + * all copies or substantial portions of the Software.<br>
> >> + *<br>
> >> + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,<br>
> >> EXPRESS OR<br>
> >> + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF<br>
> >> MERCHANTABILITY,<br>
> >> + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT<br>
> >> SHALL THE<br>
> >> + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER<br>
> >> + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,<br>
> >> ARISING FROM,<br>
> >> + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER<br>
> >> DEALINGS IN<br>
> >> + * THE SOFTWARE.<br>
> >> + */<br>
> >> +<br>
> >> +_CLC_OVERLOAD _CLC_DECL __CLC_FLOATN degrees(__CLC_FLOATN x);<br>
> >> diff --git a/generic/lib/SOURCES b/generic/lib/SOURCES<br>
> >> index b76fec9..fd90781 100644<br>
> >> --- a/generic/lib/SOURCES<br>
> >> +++ b/generic/lib/SOURCES<br>
> >> @@ -29,6 +29,7 @@ cl_khr_local_int32_extended_atomics/<a href="http://atom_xor.cl" target="_blank">atom_xor.cl</a><br>
> >>  <a href="http://convert.cl" target="_blank">convert.cl</a><br>
> >>  common/<a href="http://sign.cl" target="_blank">sign.cl</a><br>
> >>  geometric/<a href="http://cross.cl" target="_blank">cross.cl</a><br>
> >> +geometric/<a href="http://degrees.cl" target="_blank">degrees.cl</a><br>
> >>  geometric/<a href="http://dot.cl" target="_blank">dot.cl</a><br>
> >>  geometric/<a href="http://length.cl" target="_blank">length.cl</a><br>
> >>  geometric/<a href="http://normalize.cl" target="_blank">normalize.cl</a><br>
> >> diff --git a/generic/lib/geometric/<a href="http://degrees.cl" target="_blank">degrees.cl</a> b/generic/lib/geometric/<br>
> >> <a href="http://degrees.cl" target="_blank">degrees.cl</a><br>
> >> new file mode 100644<br>
> >> index 0000000..5de56f8<br>
> >> --- /dev/null<br>
> >> +++ b/generic/lib/geometric/<a href="http://degrees.cl" target="_blank">degrees.cl</a><br>
> >> @@ -0,0 +1,45 @@<br>
> >> +/*<br>
> >> + * Copyright (c) 2014,2015 Advanced Micro Devices, Inc.<br>
> >> + *<br>
> >> + * Permission is hereby granted, free of charge, to any person obtaining<br>
> >> a copy<br>
> >> + * of this software and associated documentation files (the "Software"),<br>
> >> to deal<br>
> >> + * in the Software without restriction, including without limitation the<br>
> >> rights<br>
> >> + * to use, copy, modify, merge, publish, distribute, sublicense, and/or<br>
> >> sell<br>
> >> + * copies of the Software, and to permit persons to whom the Software is<br>
> >> + * furnished to do so, subject to the following conditions:<br>
> >> + *<br>
> >> + * The above copyright notice and this permission notice shall be<br>
> >> included in<br>
> >> + * all copies or substantial portions of the Software.<br>
> >> + *<br>
> >> + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,<br>
> >> EXPRESS OR<br>
> >> + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF<br>
> >> MERCHANTABILITY,<br>
> >> + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT<br>
> >> SHALL THE<br>
> >> + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER<br>
> >> + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,<br>
> >> ARISING FROM,<br>
> >> + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER<br>
> >> DEALINGS IN<br>
> >> + * THE SOFTWARE.<br>
> >> + */<br>
> >> +<br>
> >> +#include <clc/clc.h><br>
> >> +<br>
> >> +#include "../clcmacro.h"<br>
> >> +<br>
> >> +_CLC_OVERLOAD _CLC_DEF float degrees(float radians) {<br>
> >> +  // 180/pi = ~57.29577951308232087685 or 0x1.ca5dc1a63c1f8p+5 or<br>
> >> 0x1.ca5dc2p+5F<br>
> >> +  return 0x1.ca5dc2p+5F * radians;<br>
> >> +}<br>
> >> +<br>
> >> +_CLC_UNARY_VECTORIZE(_CLC_OVERLOAD _CLC_DEF, float, degrees, float);<br>
> >> +<br>
> >> +<br>
> >> +#ifdef cl_khr_fp64<br>
> >> +#pragma OPENCL EXTENSION cl_khr_fp64 : enable<br>
> >> +<br>
> >> +_CLC_OVERLOAD _CLC_DEF double degrees(double radians) {<br>
> >> +  // 180/pi = ~57.29577951308232087685 or 0x1.ca5dc1a63c1f8p+5 or<br>
> >> 0x1.ca5dc2p+5F<br>
> >> +  return 0x1.ca5dc1a63c1f8p+5 * radians;<br>
> >> +}<br>
> >> +<br>
> >> +_CLC_UNARY_VECTORIZE(_CLC_OVERLOAD _CLC_DEF, double, degrees, double);<br>
> >> +<br>
> >> +#endif<br>
> >> --<br>
> >> 2.0.4<br>
> >><br>
> >><br>
> >> _______________________________________________<br>
> >> Libclc-dev mailing list<br>
> >> <a href="mailto:Libclc-dev@pcc.me.uk">Libclc-dev@pcc.me.uk</a><br>
> >> <a href="http://www.pcc.me.uk/cgi-bin/mailman/listinfo/libclc-dev" target="_blank">http://www.pcc.me.uk/cgi-bin/mailman/listinfo/libclc-dev</a><br>
> >><br>
> ><br>
> ><br>
> ><br>
> > _______________________________________________<br>
</div></div>> > Libclc-dev mailing listLibclc-dev@pcc.me.ukhttp://<a href="http://www.pcc.me.uk/cgi-bin/mailman/listinfo/libclc-dev" target="_blank">www.pcc.me.uk/cgi-bin/mailman/listinfo/libclc-dev</a><br>
<div class=""><div class="h5">> ><br>
> ><br>
> ><br>
<br>
> _______________________________________________<br>
> Libclc-dev mailing list<br>
> <a href="mailto:Libclc-dev@pcc.me.uk">Libclc-dev@pcc.me.uk</a><br>
> <a href="http://www.pcc.me.uk/cgi-bin/mailman/listinfo/libclc-dev" target="_blank">http://www.pcc.me.uk/cgi-bin/mailman/listinfo/libclc-dev</a><br>
<br>
</div></div></blockquote></div><br></div></div>