[Piglit] [PATCH 3/4] cl: Add tests for cos builtin
Tom Stellard
thomas.stellard at amd.com
Wed Jul 2 13:04:54 PDT 2014
---
generated_tests/generate-cl-math-builtins.py | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/generated_tests/generate-cl-math-builtins.py b/generated_tests/generate-cl-math-builtins.py
index edf93da..d93f09f 100644
--- a/generated_tests/generate-cl-math-builtins.py
+++ b/generated_tests/generate-cl-math-builtins.py
@@ -27,10 +27,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
@@ -52,6 +53,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',
--
1.8.1.4
More information about the Piglit
mailing list