[Piglit] [PATCH 1/2] cl: Add some erf builtin tests
Jan Vesely
jan.vesely at rutgers.edu
Fri Oct 24 08:07:21 PDT 2014
On Fri, 2014-10-24 at 07:49 -0500, Aaron Watry wrote:
> Tested on Apple CL (CPU and GF9400m) down to 1 ULP precision, but
> the spec says 16ULP.
>
> Signed-off-by: Aaron Watry <awatry at gmail.com>
> ---
> 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..2919768 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 erf, fabs, fmod, log1p, pi, pow, sin, sinh, sqrt, tan, tanh
you import erf ^^^^
but don't use it, am I missing something?
same for the 2/2
otherwise both lgtm
i tested on intel-ocl too
jan
>
> CLC_VERSION_MIN = {
> 'acos' : 10,
> @@ -43,6 +43,7 @@ CLC_VERSION_MIN = {
> 'cos' : 10,
> 'cosh' : 10,
> 'cospi' : 10,
> + 'erf' : 10,
> 'fabs' : 10,
> 'floor' : 10,
> 'fmod' : 10,
> @@ -184,6 +185,15 @@ tests = {
> ],
> 'tolerance' : 4
> },
> + 'erf' : {
> + 'arg_types' : [F, F],
> + 'function_type': 'ttt',
> + 'values' : [
> + [0.0, 0.950004, 0.990005, -0.994999475, 0.27219439321703e-29, 1, -1], # Result
> + [0.0, 1.960/sqrt(2.0), 2.576/sqrt(2.0), -2.807/sqrt(2.0), 11.1, float("inf"), float("-inf")] # Arg0
> + ],
> + 'tolerance' : 16
> + },
> 'fabs' : {
> '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/20141024/423a91b4/attachment.sig>
More information about the Piglit
mailing list