diff options
author | Tom Stellard <thomas.stellard@amd.com> | 2014-07-02 13:03:13 -0700 |
---|---|---|
committer | Tom Stellard <thomas.stellard@amd.com> | 2014-07-23 10:11:12 -0400 |
commit | 62085cbe9fe9451b0854858b79f152924f775847 (patch) | |
tree | 6179eadfd21f44850a90486f97c7e5b2e81d7808 | |
parent | 19ed138216a913281cc77380710951a292b369da (diff) |
cl: Add tests for sin builtin
-rw-r--r-- | generated_tests/generate-cl-math-builtins.py | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/generated_tests/generate-cl-math-builtins.py b/generated_tests/generate-cl-math-builtins.py index 487631dc6..9739f908b 100644 --- a/generated_tests/generate-cl-math-builtins.py +++ b/generated_tests/generate-cl-math-builtins.py @@ -25,14 +25,15 @@ import os from genclbuiltins import gen -from math import atan, pi, cos +from math import atan, pi, sin, cos CLC_VERSION_MIN = { 'atan' : 10, 'cos' : 10, 'mix' : 10, 'nextafter' : 10, - 'sign' : 10 + 'sign' : 10, + 'sin' : 10 } DATA_TYPES = ['float'] @@ -87,6 +88,15 @@ tests = { [1.0, -1.0, 0.0, -0.0, 0.0], [0.5, -0.5, 0.0, -0.0, float("nan")] ] + }, + 'sin' : { + 'arg_types' : [F, F], + 'function_type': 'ttt', + 'values' : [ + [0.0, 1.0, 0.0, -1.0, 0.0, sin(2.234567)], # Result + [0.0, pi / 2, pi, 3 * pi / 2, 2 * pi, 2.234567] # Arg0 + ], + 'tolerance': 2 } } |