[Piglit] [PATCH 2/2] The return code of the fucntion isnan is -1 for vector types.
Yi Sun
yi.sun at intel.com
Wed Oct 30 09:01:10 CET 2013
According to the OpenCL spec version 1.2/1.1 chacpter 6.12.6:
The functions isequal, isnotequal, isgreater, isgreaterequal, isless, islessequal, islessgreater,
isfinite, isinf, isnan, isnormal, isordered, isunordered and signbit described in table 6.14 shall
return a 0 if the specified relation is false and a 1 if the specified relation is true for scalar
argument types. These functions shall return a 0 if the specified relation is false and a –1 (i.e. all
bits set) if the specified relation is true for vector argument types.
So, here we can remove the scalar argument types. And change the output from 1 to -1.
Signed-off-by: Yi Sun <yi.sun at intel.com>
diff --git a/generated_tests/generate-cl-relational-builtins.py b/generated_tests/generate-cl-relational-builtins.py
old mode 100644
new mode 100755
index af6849f..5ed73ca
--- a/generated_tests/generate-cl-relational-builtins.py
+++ b/generated_tests/generate-cl-relational-builtins.py
@@ -47,7 +47,7 @@ tests = {
'arg_types': [I, F],
'function_type': 'ttt',
'values': [
- [0, 1, 0, 0], # Result
+ [0, -1, 0, 0], # Result
[0.0, float("nan"), 1.0, float("inf") ] # Arg0
]
}
@@ -63,7 +63,7 @@ def main():
for fnName in functions:
testDefs[(dataType, fnName)] = tests[fnName]
- gen(DATA_TYPES, CLC_VERSION_MIN, functions, testDefs, dirName)
+ gen(DATA_TYPES, CLC_VERSION_MIN, functions, testDefs, dirName, [2, 4, 8, 16])
main()
--
1.7.6.4
More information about the Piglit
mailing list