diff options
author | Tom Stellard <thomas.stellard@amd.com> | 2014-07-02 13:02:57 -0700 |
---|---|---|
committer | Tom Stellard <thomas.stellard@amd.com> | 2014-07-23 10:11:12 -0400 |
commit | 19ed138216a913281cc77380710951a292b369da (patch) | |
tree | 7e8ea6f955357cbd7ff4fc52096c787a0edb6b0b | |
parent | 6adec8a68e2068114b9ff34ea462f22c32f80620 (diff) |
cl: Add tests for cos builtin
-rw-r--r-- | generated_tests/generate-cl-math-builtins.py | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/generated_tests/generate-cl-math-builtins.py b/generated_tests/generate-cl-math-builtins.py index 44b1a9a16..487631dc6 100644 --- a/generated_tests/generate-cl-math-builtins.py +++ b/generated_tests/generate-cl-math-builtins.py @@ -25,10 +25,11 @@ import os from genclbuiltins import gen -from math import atan, pi +from math import atan, pi, cos CLC_VERSION_MIN = { 'atan' : 10, + 'cos' : 10, 'mix' : 10, 'nextafter' : 10, 'sign' : 10 @@ -50,6 +51,15 @@ tests = { ], 'tolerance' : 2 }, + 'cos' : { + 'arg_types' : [F, F], + 'function_type': 'ttt', + 'values' : [ + [1.0, 0.0, -1.0, 0.0, 1.0, cos(1.12345)], # Result + [0.0, pi / 2, pi, 3 * pi / 2, 2 * pi, 1.12345] # Arg0 + ], + 'tolerance' : 2 + }, 'mix' : { #x + (y - x) * a 'arg_types': [F, F, F, F], 'function_type': 'tts', |