Via the new arg, we can configure the vector size while generating the test.cl. For NOT disturbing previous test cases, set a default value.
Signed-off-by: Yi Sun <[email protected]> diff --git a/generated_tests/genclbuiltins.py b/generated_tests/genclbuiltins.py index 721191e..bdb18e9 100644 --- a/generated_tests/genclbuiltins.py +++ b/generated_tests/genclbuiltins.py @@ -332,7 +332,7 @@ def print_test(f, fnName, argType, functionDef, tests, testIdx, vecSize, tss): f.write('\n') -def gen(types, minVersions, functions, testDefs, dirName): +def gen(types, minVersions, functions, testDefs, dirName, sizes=[]): # Create the output directory if required if not os.path.exists(dirName): os.makedirs(dirName) @@ -377,8 +377,10 @@ def gen(types, minVersions, functions, testDefs, dirName): numTests = len(outputValues) # Handle all available scalar/vector widths - sizes = sorted(VEC_WIDTHS) - sizes.insert(0, 1) # Add 1-wide scalar to the vector widths + if sizes == []: + sizes = sorted(VEC_WIDTHS) + sizes.insert(0, 1) # Add 1-wide scalar to the vector widths + for vecSize in sizes: for testIdx in range(0, numTests): print_test(f, fnName, dataType, functionDef, tests, -- 1.7.6.4 _______________________________________________ Piglit mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/piglit
