[Piglit] [PATCH 2/3] cl: Add sqrt tests

Jan Vesely jan.vesely at rutgers.edu
Tue Sep 2 14:46:22 PDT 2014


On Fri, 2014-08-29 at 17:37 -0500, Aaron Watry wrote:
> Signed-off-by: Aaron Watry <awatry at gmail.com>

Reviewed-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 dfcad50..11882d4 100644
> --- a/generated_tests/generate-cl-math-builtins.py
> +++ b/generated_tests/generate-cl-math-builtins.py
> @@ -25,7 +25,7 @@
>  import os
>  
>  from genclbuiltins import gen
> -from math import atan, pi, sin, cos
> +from math import atan, pi, sin, sqrt, cos
>  
>  CLC_VERSION_MIN = {
>      'atan' : 10,
> @@ -37,6 +37,7 @@ CLC_VERSION_MIN = {
>      'round' : 10,
>      'sign' : 10,
>      'sin' : 10,
> +    'sqrt' : 10,
>      'trunc' : 10
>  }
>  
> @@ -126,6 +127,15 @@ tests = {
>          ],
>          'tolerance': 2
>      },
> +    'sqrt' : {
> +        'arg_types': [F, F],
> +        'function_type': 'ttt',
> +        'values': [
> +            [1.0, 2.0,  6.0, 2.5 , float("nan"), 4.0,  sqrt(0.0), sqrt(7.0), sqrt(pi)], # Result
> +            [1.0, 4.0, 36.0, 6.25, float("nan"), 16.0, 0.0, 7.0, pi], # Arg1
> +        ],
> +        'tolerance': 3
> +    },
>      'trunc' : {
>          'arg_types': [F, F],
>          'function_type': 'ttt',

-- 
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/20140902/cad22e1a/attachment.sig>


More information about the Piglit mailing list