[Piglit] [PATCH 1/3] cl: add acospi test

Jan Vesely jan.vesely at rutgers.edu
Wed Mar 25 10:33:49 PDT 2015


copied from acos.
tested on clover and intel ocl

Signed-off-by: Jan Vesely <jan.vesely at rutgers.edu>
---
 generated_tests/gen_cl_math_builtins.py | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/generated_tests/gen_cl_math_builtins.py b/generated_tests/gen_cl_math_builtins.py
index 30d0c43..0890fa1 100644
--- a/generated_tests/gen_cl_math_builtins.py
+++ b/generated_tests/gen_cl_math_builtins.py
@@ -33,6 +33,7 @@ from math import fabs, fmod, log10, log1p, pi, pow, sin, sinh, sqrt, tan, tanh
 CLC_VERSION_MIN = {
     'acos' : 10,
     'acosh' : 10,
+    'acospi' : 10,
     'asin' : 10,
     'asinh' : 10,
     'atan' : 10,
@@ -96,6 +97,15 @@ tests = {
         ],
         'tolerance' : 4
      },
+    'acospi' : {
+        'arg_types' : [F, F],
+        'function_type': 'ttt',
+        'values' : [
+            [ 1,  1/2, 0.0, acos(0.12345) / pi, float("nan")], # Result
+            [-1.0, 0.0,  1.0,      0.12345,  float("nan")]  # Arg0
+        ],
+        'tolerance' : 5
+     },
     'asin' : {
         'arg_types' : [F, F],
         'function_type': 'ttt',
-- 
2.1.0



More information about the Piglit mailing list