[Piglit] [PATCH 6/9] cl: Add sinh tests

Aaron Watry awatry at gmail.com
Thu Sep 25 13:01:11 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 ad43ffe..232f983 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, sqrt, tan
+from math import fabs, fmod, pi, pow, sin, sinh, sqrt, tan
 
 CLC_VERSION_MIN = {
     'acos' : 10,
@@ -50,6 +50,7 @@ CLC_VERSION_MIN = {
     'round' : 10,
     'sign' : 10,
     'sin' : 10,
+    'sinh' : 10,
     'tan' : 10,
     'sqrt' : 10,
     'trunc' : 10
@@ -242,6 +243,15 @@ tests = {
         ],
         'tolerance': 2
     },
+    'sinh' : {
+        'arg_types' : [F, F],
+        'function_type': 'ttt',
+        'values' : [
+            [0.0, sinh(0.123456789), float("inf"), float("-inf"), float("nan")],# Result
+            [0.0, 0.123456789,       float("inf"), float("-inf"), float("nan")] # Arg0
+        ],
+        'tolerance': 4
+    },
     'sqrt' : {
         'arg_types': [F, F],
         'function_type': 'ttt',
-- 
2.0.0



More information about the Piglit mailing list