[Piglit] [PATCH 5/9] cl: Add cosh tests

Aaron Watry awatry at gmail.com
Thu Sep 25 13:01:10 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 2d41837..ad43ffe 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
+from math import acos, acosh, asin, asinh, atan, atan2, atanh, cos, cosh
 from math import fabs, fmod, pi, pow, sin, sqrt, tan
 
 CLC_VERSION_MIN = {
@@ -41,6 +41,7 @@ CLC_VERSION_MIN = {
     'ceil' : 10,
     'copysign' : 10,
     'cos' : 10,
+    'cosh' : 10,
     'fabs' : 10,
     'floor' : 10,
     'fmod' : 10,
@@ -160,6 +161,15 @@ tests = {
         ],
         'tolerance' : 2
     },
+    'cosh' : {
+        'arg_types' : [F, F],
+        'function_type': 'ttt',
+        'values' : [
+            [1.0, cosh(0.123456789), float("inf"), float("inf"),  float("nan")],# Result
+            [0.0, 0.123456789,       float("inf"), float("-inf"), float("nan")] # Arg0
+        ],
+        'tolerance' : 4
+    },
     'fabs' : {
         'arg_types' : [F, F],
         'function_type': 'ttt',
-- 
2.0.0



More information about the Piglit mailing list