From 37d66ea9ea701636f1ba9daa244433cbc94d8ee9 Mon Sep 17 00:00:00 2001 From: Campbell McDiarmid Date: Thu, 13 Jan 2022 09:14:04 +1300 Subject: [PATCH] Code for advanced block params This will allow script parameters/arguments to define buffer sizes and process affinity. I can't think of any unintended negative impacts as changes to any variables used to define affinity and buffer sizes would not be propagated through to affinity or buffer changes after initialization. Signed-off-by: Campbell --- core/generator/flow_graph.py.mako | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/core/generator/flow_graph.py.mako b/core/generator/flow_graph.py.mako index b1c3691..70ff426 100644 --- a/core/generator/flow_graph.py.mako +++ b/core/generator/flow_graph.py.mako @@ -213,13 +213,13 @@ gr.io_signature.makev(${len(io_sigs)}, ${len(io_sigs)}, [${', '.join(size_strs)} self.${blk.name}.set_block_alias("${blk.params['alias'].get_evaluated()}") % endif % if 'affinity' in blk.params and blk.params['affinity'].get_evaluated(): - self.${blk.name}.set_processor_affinity(${blk.params['affinity'].get_evaluated()}) + self.${blk.name}.set_processor_affinity(${blk.params['affinity'].to_code()}) % endif % if len(blk.sources) > 0 and 'minoutbuf' in blk.params and int(blk.params['minoutbuf'].get_evaluated()) > 0: - self.${blk.name}.set_min_output_buffer(${blk.params['minoutbuf'].get_evaluated()}) + self.${blk.name}.set_min_output_buffer(${blk.params['minoutbuf'].to_code()}) % endif % if len(blk.sources) > 0 and 'maxoutbuf' in blk.params and int(blk.params['maxoutbuf'].get_evaluated()) > 0: - self.${blk.name}.set_max_output_buffer(${blk.params['maxoutbuf'].get_evaluated()}) + self.${blk.name}.set_max_output_buffer(${blk.params['maxoutbuf'].to_code()}) % endif % endfor