CMSIS-DSP: Added SVM Functions and tests
Added more tests for BasicMathFunctions
Added script to postprocess result of benchmarks.
diff --git a/CMSIS/DSP/Testing/processTests.py b/CMSIS/DSP/Testing/processTests.py
index d2caba8..8b1e9cd 100644
--- a/CMSIS/DSP/Testing/processTests.py
+++ b/CMSIS/DSP/Testing/processTests.py
@@ -1,45 +1,8 @@
import argparse
import TestScripts.NewParser as parse
import TestScripts.CodeGen
-from collections import deque
+import TestScripts.Deprecate as d
-# When deprecation is forced on some nodes
-# we ensure that a parent of a valid node is also valid
-def correctDeprecation(node):
- current = node.data["deprecated"]
- for c in node.children:
- if not correctDeprecation(c):
- current = False
- node.data["deprecated"] = current
- return(current)
-
-def deprecateRec(root,others,deprecated):
- if others:
- newOthers=others.copy()
- newOthers.popleft()
- if root.kind == TestScripts.Parser.TreeElem.TEST:
- if others[0].isdigit() and int(root.id) == int(others[0]):
- root.data["deprecated"]=False
- for c in root.children:
- deprecateRec(c,newOthers,False)
- else:
- root.data["deprecated"]=True
- for c in root.children:
- deprecateRec(c,others,deprecated)
- else:
- if root.data["class"] == others[0]:
- root.data["deprecated"]=False
- for c in root.children:
- deprecateRec(c,newOthers,False)
- else:
- root.data["deprecated"]=deprecated
- for c in root.children:
- deprecateRec(c,others,deprecated)
-
-def deprecate(root,others):
- if others:
- deprecateRec(root,deque(others),True)
- correctDeprecation(root)
parser = argparse.ArgumentParser(description='Parse test description')
parser.add_argument('-f', nargs='?',type = str, default="test.txt", help="File path")
@@ -65,7 +28,7 @@
c = TestScripts.CodeGen.CodeGen(args.p,args.d, args.e)
# Parse the test description.
root = p.parse(args.f)
- deprecate(root,args.others)
+ d.deprecate(root,args.others)
print(root)
# Generate code with the tree of tests
c.genCodeForTree(root)