[Piglit] [PATCH v2] cl: Add exp tests
Jan Vesely
jan.vesely at rutgers.edu
Sun Jan 4 01:41:11 PST 2015
On Sun, 2015-01-04 at 16:20 +0800, Meng Mengmeng wrote:
> Signed-off-by: Meng Mengmeng <mengmeng.meng at intel.com>
It would be nice to have a test case that actually hits the accuracy
tolerance. Either way
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 ce16a6b..226bce9 100644
> --- a/generated_tests/generate-cl-math-builtins.py
> +++ b/generated_tests/generate-cl-math-builtins.py
> @@ -26,7 +26,7 @@
> import os
>
> from genclbuiltins import gen, NEGNAN
> -from math import acos, acosh, asin, asinh, atan, atan2, atanh, cos, cosh
> +from math import acos, acosh, asin, asinh, atan, atan2, atanh, cos, cosh, exp
> from math import fabs, fmod, log1p, pi, pow, sin, sinh, sqrt, tan, tanh
>
> CLC_VERSION_MIN = {
> @@ -45,6 +45,7 @@ CLC_VERSION_MIN = {
> 'cospi' : 10,
> 'erf' : 10,
> 'erfc' : 10,
> + 'exp' : 10,
> 'fabs' : 10,
> 'floor' : 10,
> 'fmod' : 10,
> @@ -209,6 +210,15 @@ tests = {
> ],
> 'tolerance' : 16
> },
> + 'exp' : {
> + 'arg_types' : [F, F],
> + 'function_type': 'ttt',
> + 'values' : [
> + [1.0, exp(0.95), exp(pi), exp(-pi), float("inf") ], # Result
> + [0.0, 0.95, pi, -pi, float("inf")] # Arg0
> + ],
> + 'tolerance' : 3
> + },
> '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/20150104/a5235db0/attachment.sig>
More information about the Piglit
mailing list