summaryrefslogtreecommitdiff
path: root/generated_tests
diff options
context:
space:
mode:
authorTom Stellard <thomas.stellard@amd.com>2016-02-03 18:36:22 -0500
committerJan Vesely <jan.vesely@rutgers.edu>2016-02-23 10:35:55 -0500
commitf3a03b9796e2046382455b76f3a5e0f0598efe76 (patch)
treee68041e3a409acf9abcc8bc680290905408a17aa /generated_tests
parent13d12cb5d91464ae25e44ffa6643a2056ad925b4 (diff)
cl: Add generated tests for fract
v2 (jan): Drop custom generator in favour of new multiple output mechanism Acked-by: Aaron Watry <awatry@gmail.com>
Diffstat (limited to 'generated_tests')
-rw-r--r--generated_tests/gen_cl_math_builtins.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/generated_tests/gen_cl_math_builtins.py b/generated_tests/gen_cl_math_builtins.py
index df4e94bec..cd8d5aa88 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
+ [float("nan"), float("inf"), 1.0, 2.0, -2.0, -1.0], #floor
+ [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',