nodes_bench.py 711 B

123456789101112131415161718192021222324
  1. # Include definitions from the Python package
  2. from cmsisdsp.cg.scheduler import GenericNode,GenericSink,GenericSource
  3. class ArraySink(GenericSink):
  4. def __init__(self,name,theType,inLength):
  5. GenericSink.__init__(self,name)
  6. self.addInput("i",theType,inLength)
  7. @property
  8. def typeName(self):
  9. """The name of the C++ class implementing this node"""
  10. return "ArraySink"
  11. class ArraySource(GenericSource):
  12. def __init__(self,name,theType,outLength):
  13. GenericSource.__init__(self,name)
  14. self.addOutput("o",theType,outLength)
  15. @property
  16. def typeName(self):
  17. """The name of the C++ class implementing this node"""
  18. return "ArraySource"