[Piglit] [PATCH 1/1] cl: Add copysign tests

Jan Vesely jan.vesely at rutgers.edu
Tue Sep 2 14:58:59 PDT 2014


Signed-off-by: Jan Vesely <jan.vesely at rutgers.edu>
---

This patch applies on top of Aaron's series.

 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 a20f921..414e397 100644
--- a/generated_tests/generate-cl-math-builtins.py
+++ b/generated_tests/generate-cl-math-builtins.py
@@ -31,6 +31,7 @@ CLC_VERSION_MIN = {
     'acos' : 10,
     'atan' : 10,
     'ceil' : 10,
+    'copysign' : 10,
     'cos' : 10,
     'floor' : 10,
     'mix' : 10,
@@ -75,6 +76,15 @@ tests = {
             [0.5, -0.5, 0.0, -0.0, float("nan"), -3.99]
         ]
     },
+    'copysign' : {
+        'arg_types': [F, F, F],
+        'function_type': 'ttt',
+        'values': [
+            [0.0, -0.0, 1.0, -1.0, float("nan"), float("-nan"), float("nan"), float("-inf"), float("inf")  ], # Result
+            [0.0,  0.0, 1.0, -1.0, float("nan"), -4.0, float("-nan"), float("inf"), float("-inf") ], # Arg0
+            [1.0, -1.0, 2.0, -2.0, float("nan"), float("nan"), 4.0, -3.0, float("inf")  ], # Arg1
+        ]
+    },
     'cos' : {
         'arg_types' : [F, F],
         'function_type': 'ttt',
-- 
1.9.3



More information about the Piglit mailing list