[Piglit] [PATCH v3 1/1] cl: Add copysign tests
Jan Vesely
jan.vesely at rutgers.edu
Wed Sep 10 10:09:12 PDT 2014
On Tue, 2014-09-09 at 22:11 -0500, Aaron Watry wrote:
> I gave this a spin on libclc + evergreen/si and also checked against a
> geforce 9400m in my macbook. Tests pass on all 3 systems tested.
>
> Reviewed-by: Aaron Watry <awatry at gmail.com>
thanks, can you push it as well?
jan
>
> On Tue, Sep 9, 2014 at 6:34 PM, Jan Vesely <jan.vesely at rutgers.edu> wrote:
> > v2: Fix -NaN test
> > v3: Rebase
> >
> > Signed-off-by: Jan Vesely <jan.vesely at rutgers.edu>
> > ---
> > generated_tests/generate-cl-math-builtins.py | 12 +++++++++++-
> > 1 file changed, 11 insertions(+), 1 deletion(-)
> >
> > diff --git a/generated_tests/generate-cl-math-builtins.py b/generated_tests/generate-cl-math-builtins.py
> > index 11105a5..fcdcc94 100644
> > --- a/generated_tests/generate-cl-math-builtins.py
> > +++ b/generated_tests/generate-cl-math-builtins.py
> > @@ -24,7 +24,7 @@
> >
> > import os
> >
> > -from genclbuiltins import gen
> > +from genclbuiltins import gen, NEGNAN
> > from math import acos, asin, atan, atan2, fmod, pi, sin, sqrt, cos, fabs, tan, pow
> >
> > CLC_VERSION_MIN = {
> > @@ -33,6 +33,7 @@ CLC_VERSION_MIN = {
> > 'atan' : 10,
> > 'atan2' : 10,
> > 'ceil' : 10,
> > + 'copysign' : 10,
> > 'cos' : 10,
> > 'fabs' : 10,
> > 'floor' : 10,
> > @@ -99,6 +100,15 @@ tests = {
> > [0.5, -0.5, 0.0, -0.0, float("nan"), -3.99]
> > ]
> > },
> > + 'copysign' : {
> > + 'arg_types': [F, F, F],
> > + 'function_type': 'ttt',
> > + 'values': [
> > + [0.0, -0.0, 1.0, -1.0, float("nan"), float("nan"), NEGNAN, float("-inf"), float("inf") ], # Result
> > + [0.0, 0.0, 1.0, -1.0, float("nan"), -4.0, float("nan"), float("inf"), float("-inf") ], # Arg0
> > + [1.0, -1.0, 2.0, -2.0, float("nan"), float("nan"), -4.0, -3.0, float("inf") ], # Arg1
> > + ]
> > + },
> > 'cos' : {
> > 'arg_types' : [F, F],
> > 'function_type': 'ttt',
> > --
> > 1.9.3
> >
--
Jan Vesely <jan.vesely at rutgers.edu>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part
URL: <http://lists.freedesktop.org/archives/piglit/attachments/20140910/2a347e96/attachment-0001.sig>
More information about the Piglit
mailing list