[Piglit] [PATCH 8/9] cl: Add cospi tests

Aaron Watry awatry at gmail.com
Thu Sep 25 13:01:13 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 531106d..9f5d75c 100644
--- a/generated_tests/generate-cl-math-builtins.py
+++ b/generated_tests/generate-cl-math-builtins.py
@@ -42,6 +42,7 @@ CLC_VERSION_MIN = {
     'copysign' : 10,
     'cos' : 10,
     'cosh' : 10,
+    'cospi' : 10,
     'fabs' : 10,
     'floor' : 10,
     'fmod' : 10,
@@ -172,6 +173,15 @@ tests = {
         ],
         'tolerance' : 4
     },
+    'cospi' : {
+        'arg_types' : [F, F],
+        'function_type': 'ttt',
+        'values' : [
+            [1.0, cos(pi*pi/2), cos(pi*3*pi/2), cos(2*pi*pi), cos(pi*1.12345)], # Result
+            [0.0, pi / 2, pi,   3 * pi / 2,     2 * pi,       1.12345        ]  # Arg0
+        ],
+        'tolerance' : 4
+    },
     'fabs' : {
         'arg_types' : [F, F],
         'function_type': 'ttt',
-- 
2.0.0



More information about the Piglit mailing list