[Piglit] [PATCH 2/2] CL: Add ldexp tests

Aaron Watry awatry at gmail.com
Fri Dec 12 13:05:26 PST 2014


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

diff --git a/generated_tests/generate-cl-math-builtins.py b/generated_tests/generate-cl-math-builtins.py
index 7e475f2..490c0b8 100644
--- a/generated_tests/generate-cl-math-builtins.py
+++ b/generated_tests/generate-cl-math-builtins.py
@@ -48,6 +48,7 @@ CLC_VERSION_MIN = {
     'fabs' : 10,
     'floor' : 10,
     'fmod' : 10,
+    'ldexp' : 10,
     'log1p' : 10,
     'mix' : 10,
     'nextafter' : 10,
@@ -68,6 +69,10 @@ F = {
     'float' : 'float'
 }
 
+I = {
+    'float' : 'int'
+}
+
 tests = {
     'acos' : {
         'arg_types' : [F, F],
@@ -231,6 +236,16 @@ tests = {
         ],
         'tolerance' : 0
     },
+    'ldexp' : {
+        'arg_types': [F, F, I],
+        'function_type': 'tss',
+        'values': [
+            [0.0, 4.0, 15.2, 1.75, float("nan"), float("inf")],
+            [0.0, 1.0, 0.95, 3.5,  float("nan"), 1.12312312],
+            [0,   2,   4,    -1,   1,            2031231231]
+        ],
+        'tolerance' : 0
+    },
     'log1p' : {
         'arg_types': [F, F],
         'function_type': 'ttt',
-- 
2.1.0



More information about the Piglit mailing list