[Piglit] [PATCH 2/9] cl: Add asinh tests

Aaron Watry awatry at gmail.com
Thu Sep 25 13:01:07 PDT 2014


Also re-organize math imports slightly

Signed-off-by: Aaron Watry <awatry at gmail.com>
---
 generated_tests/generate-cl-math-builtins.py | 14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)

diff --git a/generated_tests/generate-cl-math-builtins.py b/generated_tests/generate-cl-math-builtins.py
index 7f98d68..7d30766 100644
--- a/generated_tests/generate-cl-math-builtins.py
+++ b/generated_tests/generate-cl-math-builtins.py
@@ -26,13 +26,14 @@
 import os
 
 from genclbuiltins import gen, NEGNAN
-from math import acos, acosh, asin, atan, atan2, fmod, pi, sin, sqrt, cos, fabs
-from math import tan, pow
+from math import acos, acosh, asin, asinh, atan, atan2, cos
+from math import fabs, fmod, pi, pow, sin, sqrt, tan
 
 CLC_VERSION_MIN = {
     'acos' : 10,
     'acosh' : 10,
     'asin' : 10,
+    'asinh' : 10,
     'atan' : 10,
     'atan2' : 10,
     'ceil' : 10,
@@ -85,6 +86,15 @@ tests = {
         ],
         'tolerance' : 4
      },
+    'asinh' : {
+        'arg_types' : [F, F],
+        'function_type': 'ttt',
+        'values' : [
+            [0.0, asinh(1.0), asinh(-1.12345), float("nan"), asinh(123456789.01234)], #Result
+            [0.0, 1.0,              -1.12345,  float("nan"),       123456789.01234 ]  #Arg0
+        ],
+        'tolerance' : 4
+     },
     'atan' : {
         'arg_types' : [F, F],
         'function_type': 'ttt',
-- 
2.0.0



More information about the Piglit mailing list