summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJosh Blum2012-10-05 18:43:00 -0700
committerJosh Blum2012-10-05 18:43:00 -0700
commitef98a2b26fe4457df3bb2de96ea0177889fd220b (patch)
treea10e87cab5dac6722a63c9c961e54c8c9e28b3e2
parente5f49c3b50b96c0ededfe6ba40be0ed8a28185ce (diff)
downloadsandhi-ef98a2b26fe4457df3bb2de96ea0177889fd220b.tar.gz
sandhi-ef98a2b26fe4457df3bb2de96ea0177889fd220b.tar.bz2
sandhi-ef98a2b26fe4457df3bb2de96ea0177889fd220b.zip
added global block config for buffer affinity
-rw-r--r--include/gnuradio/top_block.hpp9
-rw-r--r--lib/block_handlers.cpp6
-rw-r--r--lib/top_block.cpp1
3 files changed, 16 insertions, 0 deletions
diff --git a/include/gnuradio/top_block.hpp b/include/gnuradio/top_block.hpp
index 19daafc..ad9f02a 100644
--- a/include/gnuradio/top_block.hpp
+++ b/include/gnuradio/top_block.hpp
@@ -33,6 +33,15 @@ struct GRAS_API GlobalBlockConfig
* Default = 0 aka disabled.
*/
size_t maximum_output_items;
+
+ /*!
+ * Set the global memory node affinity.
+ * Blocks that have not been explicitly set,
+ * will take on this new buffer_affinity.
+ *
+ * Default = -1 aka no affinity.
+ */
+ long buffer_affinity;
};
struct GRAS_API TopBlock : HierBlock
diff --git a/lib/block_handlers.cpp b/lib/block_handlers.cpp
index 1366e68..ad0d721 100644
--- a/lib/block_handlers.cpp
+++ b/lib/block_handlers.cpp
@@ -123,6 +123,12 @@ void BlockActor::handle_top_config(
}
}
+ //overwrite with global node affinity setting for buffers if not set
+ if (this->buffer_affinity == -1)
+ {
+ this->buffer_affinity = message.buffer_affinity;
+ }
+
this->Send(0, from); //ACK
}
diff --git a/lib/top_block.cpp b/lib/top_block.cpp
index 4973b59..bcce1bf 100644
--- a/lib/top_block.cpp
+++ b/lib/top_block.cpp
@@ -23,6 +23,7 @@ using namespace gnuradio;
GlobalBlockConfig::GlobalBlockConfig(void)
{
maximum_output_items = 0;
+ buffer_affinity = -1;
}
TopBlock::TopBlock(void)