[Piglit] [PATCH 4/9] cl: Add cbrt tests

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


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

diff --git a/generated_tests/generate-cl-math-builtins.py b/generated_tests/generate-cl-math-builtins.py
index 5a1fa02..2d41837 100644
--- a/generated_tests/generate-cl-math-builtins.py
+++ b/generated_tests/generate-cl-math-builtins.py
@@ -37,6 +37,7 @@ CLC_VERSION_MIN = {
     'atan' : 10,
     'atan2' : 10,
     'atanh' : 10,
+    'cbrt' : 10,
     'ceil' : 10,
     'copysign' : 10,
     'cos' : 10,
@@ -124,6 +125,15 @@ tests = {
         ],
         'tolerance' : 4
      },
+    'cbrt' : {
+        'arg_types': [F, F],
+        'function_type': 'ttt',
+        'values': [
+            [3.0,  -1.0, float("nan"), float("inf"), 0.123456789**(1/3.0) ],
+            [27.0, -1.0, float("nan"), float("inf"), 0.123456789 ]
+        ],
+        'tolerance' : 2
+    },
     'ceil' : {
         'arg_types': [F, F],
         'function_type': 'ttt',
-- 
2.0.0



More information about the Piglit mailing list