summaryrefslogtreecommitdiff
path: root/generated_tests
diff options
context:
space:
mode:
authorAaron Watry <awatry@gmail.com>2016-02-10 20:50:01 -0600
committerAaron Watry <awatry@gmail.com>2016-02-23 19:15:35 -0600
commitac12945ccf629d11a1cbc954528052814003eb49 (patch)
tree40365e43c8bacea28f28b11876c5b91bc5e703c0 /generated_tests
parentf3a03b9796e2046382455b76f3a5e0f0598efe76 (diff)
cl/math: Add some basic ilogb builtin tests
Note: Doesn't test 0 or NaN as those inputs support multiple possible output values. Signed-off-by: Aaron Watry <awatry@gmail.com> Reviewed-by: Jan Vesely <jan.vesely@rutgers.edu>
Diffstat (limited to 'generated_tests')
-rw-r--r--generated_tests/gen_cl_math_builtins.py12
1 files changed, 11 insertions, 1 deletions
diff --git a/generated_tests/gen_cl_math_builtins.py b/generated_tests/gen_cl_math_builtins.py
index cd8d5aa88..b64ccda12 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,
+ 'ilogb' : 10,
'ldexp' : 10,
'log10' : 10,
'log1p' : 10,
@@ -308,7 +309,7 @@ tests = {
],
'tolerance' : 0
},
- 'fract' : {
+ 'fract' : {
'arg_types': [F, F, F],
'function_type': 'ttt',
# For fract we have two outputs per address space.
@@ -319,6 +320,15 @@ tests = {
],
'num_out_args' : 2
},
+ 'ilogb' : {
+ 'arg_types': [I, F],
+ 'function_type': 'ttt',
+ 'values': [
+ [0, 3, 1, 10, 2147483647, 2147483647],
+ [1.0, 10.0, -3.0, 1234.5, float("inf"), float("-inf")]
+ ],
+ 'tolerance' : 0
+ },
'ldexp' : {
'arg_types': [F, F, I],
'function_type': 'tss',