[Piglit] [PATCH 2/2] cl: Add generated tests for fract
Jan Vesely
jan.vesely at rutgers.edu
Thu Feb 4 01:37:05 CET 2016
From: Tom Stellard <thomas.stellard at amd.com>
v2 (jan): Drop custom generator in favour of new multiple output mechanism
Passes on Intel CPU OCL and nVidia
Clover on Kaveri has issues (0x3ffffe instead of 0x3fffff)
---
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 9e51079..40104a4 100644
--- a/generated_tests/gen_cl_math_builtins.py
+++ b/generated_tests/gen_cl_math_builtins.py
@@ -56,6 +56,7 @@ CLC_VERSION_MIN = {
'fmax' : 10,
'fmin' : 10,
'fmod' : 10,
+ 'fract' : 10,
'ldexp' : 10,
'log10' : 10,
'log1p' : 10,
@@ -307,6 +308,17 @@ tests = {
],
'tolerance' : 0
},
+ 'fract' : {
+ 'arg_types': [F, F, F],
+ 'function_type': 'ttt',
+ # For fract we have two outputs per address space.
+ 'values': [
+ [float("nan"), 0.0, 0.5, 0.0, float.fromhex('0x1.33333p-2'), float.fromhex('0x1.fffffep-1') ], #fract (global)
+ [float("nan"), float("inf"), 1.0, 2.0, -2.0, -1.0], #floor (global)
+ [float("nan"), float("inf"), 1.5, 2.0,float.fromhex('-0x1.b33334p+0'), float.fromhex('-0x1.000242p-24')] #src0
+ ],
+ 'num_out_args' : 2
+ },
'ldexp' : {
'arg_types': [F, F, I],
'function_type': 'tss',
--
2.5.0
More information about the Piglit
mailing list