[Piglit] [PATCH 4/4] cl: Add tests for sin builtin
Tom Stellard
thomas.stellard at amd.com
Wed Jul 2 13:04:55 PDT 2014
---
generated_tests/generate-cl-math-builtins.py | 14 ++++++++++++--
1 file changed, 12 insertions(+), 2 deletions(-)
diff --git a/generated_tests/generate-cl-math-builtins.py b/generated_tests/generate-cl-math-builtins.py
index d93f09f..ea6fefa 100644
--- a/generated_tests/generate-cl-math-builtins.py
+++ b/generated_tests/generate-cl-math-builtins.py
@@ -27,14 +27,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']
@@ -89,6 +90,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
}
}
--
1.8.1.4
More information about the Piglit
mailing list