Improvements to CG

Small bug fix to make it easier to use several scheduler.
Improvement to declare new arguments for a node.
pull/64/head
Christophe Favergeon 3 years ago
parent 5a99a5c5ad
commit 568e45afc6

@ -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"

@ -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)

@ -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.

@ -300,13 +300,15 @@ class BaseNode:
else:
return(0)
def addLiteralArg(self,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):
def addVariableArg(self,*ls):
for l in ls:
if self.schedArgs:
self.schedArgs.append(VarLiteral(l))
else:

@ -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 %}

@ -1,2 +1,2 @@
# Python wrapper version
__version__ = "1.9.0"
__version__ = "1.9.1"

Loading…
Cancel
Save