summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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)