[Piglit] [PATCH] cl: Add log1p tests
Tom Stellard
tom at stellard.net
Fri Sep 26 11:12:06 PDT 2014
On Fri, Sep 26, 2014 at 01:05:35PM -0500, Aaron Watry wrote:
> Signed-off-by: Aaron Watry <awatry at gmail.com>
> ---
Reviewed-by: Tom Stellard <thomas.stellard at amd.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 dfc1d1d..48b4507 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, pi, pow, sin, sinh, sqrt, tan, tanh
> +from math import fabs, fmod, 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,
> + 'log1p' : 10,
> 'mix' : 10,
> 'nextafter' : 10,
> 'round' : 10,
> @@ -210,6 +211,15 @@ tests = {
> ],
> 'tolerance' : 0
> },
> + 'log1p' : {
> + 'arg_types': [F, F],
> + 'function_type': 'ttt',
> + 'values': [
> + [log1p(0.5), float("-inf"), log1p(1.e-15), float("nan")],
> + [0.5, -1.0, 1.e-15, float("nan")]
> + ],
> + 'tolerance' : 2
> + },
> 'mix' : { #x + (y - x) * a
> 'arg_types': [F, F, F, F],
> 'function_type': 'tts',
> --
> 2.1.0
>
> _______________________________________________
> Piglit mailing list
> Piglit at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/piglit
More information about the Piglit
mailing list