diff --git a/ComputeGraph/examples/example1/generated/scheduler.h b/ComputeGraph/examples/example1/generated/scheduler.h index a907ece2..c1d5cb0d 100644 --- a/ComputeGraph/examples/example1/generated/scheduler.h +++ b/ComputeGraph/examples/example1/generated/scheduler.h @@ -7,8 +7,8 @@ The support classes and code is covered by CMSIS-DSP license. */ -#ifndef _SCHED_H_ -#define _SCHED_H_ +#ifndef _SCHEDULER_H_ +#define _SCHEDULER_H_ #ifdef __cplusplus extern "C" diff --git a/ComputeGraph/examples/example1/graph.py b/ComputeGraph/examples/example1/graph.py index 7c2981f4..76bbf3e5 100644 --- a/ComputeGraph/examples/example1/graph.py +++ b/ComputeGraph/examples/example1/graph.py @@ -37,8 +37,7 @@ class ProcessingNode(Node): floatType=CType(F32) src=Source("source",floatType,5) b=ProcessingNode("filter",floatType,7,5) -b.addLiteralArg(4) -b.addLiteralArg("Test") +b.addLiteralArg(4,"Test") b.addVariableArg("someVariable") sink=Sink("sink",floatType,5) diff --git a/PythonWrapper_README.md b/PythonWrapper_README.md index a3b122b0..b380285b 100644 --- a/PythonWrapper_README.md +++ b/PythonWrapper_README.md @@ -239,6 +239,11 @@ The wrapper is now containing the compute graph Python scripts and you should re # Change history +## Version 1.9.1: + +* Small fix to the compute graph generator. The `#ifdef` at beginning of the custom header should be different for different scheduler names +* Improve `addLiteralArg` and `addVariableArg` in compute graph to use variable number of arguments + ## Version 1.9.0: * New scheduling mode, in the compute graph generator, giving priority to sinks in the scheduling. The idea is to try to decrease the latency between sinks and sources. diff --git a/cmsisdsp/cg/static/scheduler/node.py b/cmsisdsp/cg/static/scheduler/node.py index 49d05988..3f20d969 100644 --- a/cmsisdsp/cg/static/scheduler/node.py +++ b/cmsisdsp/cg/static/scheduler/node.py @@ -300,17 +300,19 @@ class BaseNode: else: return(0) - def addLiteralArg(self,l): - if self.schedArgs: - self.schedArgs.append(ArgLiteral(l)) - else: - self.schedArgs=[ArgLiteral(l)] + def addLiteralArg(self,*ls): + for l in ls: + if self.schedArgs: + self.schedArgs.append(ArgLiteral(l)) + else: + self.schedArgs=[ArgLiteral(l)] - def addVariableArg(self,l): - if self.schedArgs: - self.schedArgs.append(VarLiteral(l)) - else: - self.schedArgs=[VarLiteral(l)] + def addVariableArg(self,*ls): + for l in ls: + if self.schedArgs: + self.schedArgs.append(VarLiteral(l)) + else: + self.schedArgs=[VarLiteral(l)] @property def isConstantNode(self): diff --git a/cmsisdsp/cg/static/scheduler/templates/code.h b/cmsisdsp/cg/static/scheduler/templates/code.h index 81405573..461f1865 100644 --- a/cmsisdsp/cg/static/scheduler/templates/code.h +++ b/cmsisdsp/cg/static/scheduler/templates/code.h @@ -7,8 +7,8 @@ The support classes and code is covered by CMSIS-DSP license. */ -#ifndef _SCHED_H_ -#define _SCHED_H_ +#ifndef _{{config.schedulerCFileName |replace(".h","")|upper()}}_H_ +#define _{{config.schedulerCFileName |replace(".h","")|upper()}}_H_ {% macro optionalargs() -%} {% if config.cOptionalArgs %},{{config.cOptionalArgs}}{% endif %} diff --git a/cmsisdsp/version.py b/cmsisdsp/version.py index 3c94aa56..ee1fe1bf 100755 --- a/cmsisdsp/version.py +++ b/cmsisdsp/version.py @@ -1,2 +1,2 @@ # Python wrapper version -__version__ = "1.9.0" +__version__ = "1.9.1"