s/funtion/function/ On Wednesday, October 30, 2013 04:01:09 PM Yi Sun wrote: > 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') > >
Rather than setting a default you don't want and then overwriting it with one you do, why don't you just make the default the value what you want? > -def gen(types, minVersions, functions, testDefs, dirName): > +def gen(types, minVersions, functions, testDefs, dirName, sizes=[]): sizes=sorted([1] + VEC_WIDTHS) or sizes=sorted(ALL_WIDTHS); I don't know enough about CL testing to know whether ALL_WIDTHS is valid. Tom or Aaron would have to answer that. > # 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 + With the suggested changes you wouldn't need this if statement at all > for vecSize in sizes: > for testIdx in range(0, numTests): > print_test(f, fnName, dataType, functionDef, tests,
signature.asc
Description: This is a digitally signed message part.
_______________________________________________ Piglit mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/piglit
