[Piglit] [PATCH 7/9] cl: Add tanh tests
Aaron Watry
awatry at gmail.com
Thu Sep 25 13:01:12 PDT 2014
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 232f983..531106d 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
+from math import fabs, fmod, pi, pow, sin, sinh, sqrt, tan, tanh
CLC_VERSION_MIN = {
'acos' : 10,
@@ -52,6 +52,7 @@ CLC_VERSION_MIN = {
'sin' : 10,
'sinh' : 10,
'tan' : 10,
+ 'tanh' : 10,
'sqrt' : 10,
'trunc' : 10
}
@@ -270,6 +271,15 @@ tests = {
],
'tolerance': 5
},
+ 'tanh' : {
+ 'arg_types' : [F, F],
+ 'function_type': 'ttt',
+ 'values' : [
+ [0.0, tanh(0.123456789), tanh(15.123456789), 1.0, -1.0 , float("nan")],# Result
+ [0.0, 0.123456789, 15.123456789, float("inf"), float("-inf"), float("nan")] # Arg0
+ ],
+ 'tolerance': 5
+ },
'trunc' : {
'arg_types': [F, F],
'function_type': 'ttt',
--
2.0.0
More information about the Piglit
mailing list