summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAaron Watry <awatry@gmail.com>2017-10-01 02:37:53 -0400
committerJan Vesely <jan.vesely@rutgers.edu>2017-10-11 16:58:50 -0400
commit5fce448db9856e9ce4bc8846567a4fc0e2dca739 (patch)
treeac9c47a46cafacdc3d6d6afbf4850ff4e09b74eb
parent17d26adf86379f895a46b5c375739811cb05eb14 (diff)
cl: Add basic remainder(float, float) builtin tests
Tested with libclc on a Radeon HD 7850. Hex output values were generated via remainderf(float, float). No implications as to the quality of the inputs is intended. Signed-off-by: Aaron Watry <awatry@gmail.com> Reviewed-by: Jan Vesely <jan.vesely@rutgers.edu>
-rw-r--r--generated_tests/gen_cl_math_builtins.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/generated_tests/gen_cl_math_builtins.py b/generated_tests/gen_cl_math_builtins.py
index 4df4918e6..31e0e9750 100644
--- a/generated_tests/gen_cl_math_builtins.py
+++ b/generated_tests/gen_cl_math_builtins.py
@@ -64,6 +64,7 @@ CLC_VERSION_MIN = {
'log10' : 10,
'log1p' : 10,
'nextafter' : 10,
+ 'remainder' : 10,
'round' : 10,
'sin' : 10,
'sinh' : 10,
@@ -388,6 +389,18 @@ tests = {
[1.0, -1.0 , 2.0, 0.0, 3.4, float("nan"), 5.0], # Arg1
]
},
+ 'remainder' : {
+ 'arg_types': [F, F, F],
+ 'function_type': 'ttt',
+ 'values': [
+ [float.fromhex("-0x1.ccccdp-1"), float.fromhex("0x1.ccccdp-1"),
+ float.fromhex("-0x1.ccccdp-1"), float.fromhex("0x1.ccccdp-1"),
+ 0.0, -0.0, 5.1, float("-nan")
+ ], # Result
+ [ 5.1, -5.1, 5.1, -5.1, 0.0, -0.0, 5.1, 5.1], # Arg0
+ [ 3.0, 3.0, -3.0, -3.0, 1.0, 1.0, float("inf"), 0.0], # Arg1
+ ]
+ },
'round' : {
'arg_types': [F, F],
'function_type': 'ttt',