diff options
author | Josh Blum | 2013-09-09 00:01:07 -0700 |
---|---|---|
committer | Josh Blum | 2013-09-09 00:01:07 -0700 |
commit | f9c0d4c2e39aa28cc501ceb6479afc32f7849b11 (patch) | |
tree | 63a6677b3d4051c8a7776515ec733f6d475d1a15 /lib/block_config.cpp | |
parent | 7c4911c28c28305ed4d1aab9b5ea82f96b49f404 (diff) | |
download | sandhi-f9c0d4c2e39aa28cc501ceb6479afc32f7849b11.tar.gz sandhi-f9c0d4c2e39aa28cc501ceb6479afc32f7849b11.tar.bz2 sandhi-f9c0d4c2e39aa28cc501ceb6479afc32f7849b11.zip |
gras: work on global config that works on hier
Diffstat (limited to 'lib/block_config.cpp')
-rw-r--r-- | lib/block_config.cpp | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/lib/block_config.cpp b/lib/block_config.cpp index 165ab47..e34aa0c 100644 --- a/lib/block_config.cpp +++ b/lib/block_config.cpp @@ -11,6 +11,27 @@ GlobalBlockConfig::GlobalBlockConfig(void) interruptible_work = false; } +void GlobalBlockConfig::merge(const GlobalBlockConfig &config) +{ + //overwrite with global config only if maxium_items is not set (zero) + if (this->maximum_output_items == 0) + { + this->maximum_output_items = config.maximum_output_items; + } + + //overwrite with global node affinity setting for buffers if not set + if (this->buffer_affinity == -1) + { + this->buffer_affinity = config.buffer_affinity; + } + + //overwrite with global interruptable setting for work if not set + if (this->interruptible_work == false) + { + this->interruptible_work = config.interruptible_work; + } +} + InputPortConfig::InputPortConfig(void) { item_size = 1; |