[Piglit] [PATCH 1/1] cl: add log10 test

Jan Vesely jan.vesely at rutgers.edu
Thu Jan 22 14:46:40 PST 2015


ping

On Tue, 2014-10-21 at 20:01 -0400, Jan Vesely wrote:
> Signed-off-by: Jan Vesely <jan.vesely at rutgers.edu>
> ---
> 
> passes on r600 (with posted libclc patch) and intel cpu ocl
> 
>  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 cc9b60b..5a93e80 100644
> --- a/generated_tests/generate-cl-math-builtins.py
> +++ b/generated_tests/generate-cl-math-builtins.py
> @@ -27,7 +27,7 @@ import os
>  
>  from genclbuiltins import gen, NEGNAN
>  from math import acos, acosh, asin, asinh, atan, atan2, atanh, cos, cosh
> -from math import fabs, fmod, log1p, pi, pow, sin, sinh, sqrt, tan, tanh
> +from math import fabs, fmod, log10, log1p, pi, pow, sin, sinh, sqrt, tan, tanh
>  
>  CLC_VERSION_MIN = {
>      'acos' : 10,
> @@ -46,6 +46,7 @@ CLC_VERSION_MIN = {
>      'fabs' : 10,
>      'floor' : 10,
>      'fmod' : 10,
> +    'log10' : 10,
>      'log1p' : 10,
>      'mix' : 10,
>      'nextafter' : 10,
> @@ -211,6 +212,15 @@ tests = {
>          ],
>          'tolerance' : 0
>      },
> +    'log10' : {
> +        'arg_types': [F, F],
> +        'function_type': 'ttt',
> +        'values': [
> +            [log10(0.5), float("-inf"), log10(1.e-15), float("nan")],
> +            [0.5,        0.0,           1.e-15,        float("nan")]
> +        ],
> +        'tolerance' : 2
> +    },
>      'log1p' : {
>          '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/20150122/bfb21d58/attachment.sig>


More information about the Piglit mailing list