[Piglit] [PATCH v2] cl: Add exp tests
Meng Mengmeng
mengmeng.meng at intel.com
Sun Jan 4 00:20:39 PST 2015
Signed-off-by: Meng Mengmeng <mengmeng.meng at intel.com>
---
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 ce16a6b..226bce9 100644
--- a/generated_tests/generate-cl-math-builtins.py
+++ b/generated_tests/generate-cl-math-builtins.py
@@ -26,7 +26,7 @@
import os
from genclbuiltins import gen, NEGNAN
-from math import acos, acosh, asin, asinh, atan, atan2, atanh, cos, cosh
+from math import acos, acosh, asin, asinh, atan, atan2, atanh, cos, cosh, exp
from math import fabs, fmod, log1p, pi, pow, sin, sinh, sqrt, tan, tanh
CLC_VERSION_MIN = {
@@ -45,6 +45,7 @@ CLC_VERSION_MIN = {
'cospi' : 10,
'erf' : 10,
'erfc' : 10,
+ 'exp' : 10,
'fabs' : 10,
'floor' : 10,
'fmod' : 10,
@@ -209,6 +210,15 @@ tests = {
],
'tolerance' : 16
},
+ 'exp' : {
+ 'arg_types' : [F, F],
+ 'function_type': 'ttt',
+ 'values' : [
+ [1.0, exp(0.95), exp(pi), exp(-pi), float("inf") ], # Result
+ [0.0, 0.95, pi, -pi, float("inf")] # Arg0
+ ],
+ 'tolerance' : 3
+ },
'fabs' : {
'arg_types' : [F, F],
'function_type': 'ttt',
--
1.9.3
More information about the Piglit
mailing list