From ac12945ccf629d11a1cbc954528052814003eb49 Mon Sep 17 00:00:00 2001 From: Aaron Watry Date: Wed, 10 Feb 2016 20:50:01 -0600 Subject: 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 Reviewed-by: Jan Vesely --- generated_tests/gen_cl_math_builtins.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'generated_tests') 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', -- cgit v1.2.3