cl: Add frexp generated tests

Submitted by Aaron Watry on Feb. 5, 2016, 4 a.m.

Details

Message ID 1454644817-8169-1-git-send-email-awatry@gmail.com
State New
Headers show
Series "cl: Add frexp generated tests" ( rev: 1 ) in Piglit

Not browsing as part of any series.

Commit Message

Aaron Watry Feb. 5, 2016, 4 a.m.
Tested on MacOS Intel CPU CL and GeForce 9400M.

Signed-off-by: Aaron Watry <awatry@gmail.com>
---
This applies on top of Tom/Jan's 2-patch series to add fract generated tests and 2-output builtins

 generated_tests/gen_cl_math_builtins.py | 12 ++++++++++++
 1 file changed, 12 insertions(+)

Patch hide | download patch | download mbox

diff --git a/generated_tests/gen_cl_math_builtins.py b/generated_tests/gen_cl_math_builtins.py
index b6bae2a..c00321c 100644
--- a/generated_tests/gen_cl_math_builtins.py
+++ b/generated_tests/gen_cl_math_builtins.py
@@ -57,6 +57,7 @@  CLC_VERSION_MIN = {
     'fmin' : 10,
     'fmod' : 10,
     'fract' : 10,
+    'frexp' : 10,
     'ldexp' : 10,
     'log10' : 10,
     'log1p' : 10,
@@ -319,6 +320,17 @@  tests = {
         ],
         'num_out_args' : 2
     },
+   'frexp' : {
+        'arg_types': [F, I, F],
+        'function_type': 'ttt',
+        # For frexp we have two outputs per address space.
+        'values': [
+            [0.602783203125, 0.5, float("nan"), float("nan"),  float("inf"), float("-inf"), 0.0],
+            [11,             1,   0,            0,             0,            0,             0],
+            [1234.5,         1.0, float("nan"), float("-nan"), float("inf"), float("-inf"), 0.0]
+        ],
+        'num_out_args' : 2
+    },
     'ldexp' : {
         'arg_types': [F, F, I],
         'function_type': 'tss',

Comments

On Thu, 2016-02-04 at 22:00 -0600, Aaron Watry wrote:
> Tested on MacOS Intel CPU CL and GeForce 9400M.
> 
> Signed-off-by: Aaron Watry <awatry@gmail.com>

Reviewed-by: Jan Vesely <jan.vesely@rutgers.edu>

passes on AMD Turks and Kaveri with your libclc patch

> ---
> This applies on top of Tom/Jan's 2-patch series to add fract
> generated tests and 2-output builtins
> 
>  generated_tests/gen_cl_math_builtins.py | 12 ++++++++++++
>  1 file changed, 12 insertions(+)
> 
> diff --git a/generated_tests/gen_cl_math_builtins.py
> b/generated_tests/gen_cl_math_builtins.py
> index b6bae2a..c00321c 100644
> --- a/generated_tests/gen_cl_math_builtins.py
> +++ b/generated_tests/gen_cl_math_builtins.py
> @@ -57,6 +57,7 @@ CLC_VERSION_MIN = {
>      'fmin' : 10,
>      'fmod' : 10,
>      'fract' : 10,
> +    'frexp' : 10,
>      'ldexp' : 10,
>      'log10' : 10,
>      'log1p' : 10,
> @@ -319,6 +320,17 @@ tests = {
>          ],
>          'num_out_args' : 2
>      },
> +   'frexp' : {
> +        'arg_types': [F, I, F],
> +        'function_type': 'ttt',
> +        # For frexp we have two outputs per address space.
> +        'values': [
> +            [0.602783203125, 0.5, float("nan"),
> float("nan"),  float("inf"), float("-inf"), 0.0],
> +            [11,             1,   0,            0,             0,   
>          0,             0],
> +            [1234.5,         1.0, float("nan"), float("-nan"),
> float("inf"), float("-inf"), 0.0]
> +        ],
> +        'num_out_args' : 2
> +    },
>      'ldexp' : {
>          'arg_types': [F, F, I],
>          'function_type': 'tss',