summaryrefslogtreecommitdiff
path: root/gnuradio-runtime/include/gnuradio/block.h
diff options
context:
space:
mode:
Diffstat (limited to 'gnuradio-runtime/include/gnuradio/block.h')
-rw-r--r--gnuradio-runtime/include/gnuradio/block.h60
1 files changed, 8 insertions, 52 deletions
diff --git a/gnuradio-runtime/include/gnuradio/block.h b/gnuradio-runtime/include/gnuradio/block.h
index ee90a35d2c..5fd1316951 100644
--- a/gnuradio-runtime/include/gnuradio/block.h
+++ b/gnuradio-runtime/include/gnuradio/block.h
@@ -524,7 +524,8 @@ public:
void allocate_detail(int ninputs,
int noutputs,
const std::vector<int>& downstream_max_nitems_vec,
- const std::vector<uint64_t>& downstream_lcm_nitems_vec);
+ const std::vector<uint64_t>& downstream_lcm_nitems_vec,
+ const std::vector<uint32_t>& downstream_max_out_mult_vec);
// --------------- Custom buffer-related functions -------------
@@ -539,55 +540,8 @@ public:
* that is incompatible with the default buffer type created by this block.
*
*/
- buffer_sptr replace_buffer(uint32_t out_port, block_sptr block_owner);
-
- /*!
- * \brief Return the type of custom buffer used by the block
- *
- * \details
- * Blocks that wish to allocate custom buffers should override this function.
- */
- virtual buffer_type_t get_buffer_type()
- {
-#if DEBUG_SINGLE_MAPPED
- return buftype_CUSTOM_HOST::get();
-#else
- return buftype_DEFAULT_NON_CUSTOM::get();
-#endif
- }
-
- /*!
- * \brief Allocate a custom buffer for the block
- *
- * \details
- * Blocks that wish to allocate custom buffers should override this function.
- *
- * \param size the size of the buffer to allocate in bytes
- */
- virtual char* allocate_custom_buffer(size_t size)
- {
-#if DEBUG_SINGLE_MAPPED
- return new char[size]();
-#else
- return nullptr;
-#endif
- }
-
- /*!
- * \brief Free a custom buffer previously allocated by allocate_custom_buffer()
- *
- * \details
- * Blocks that wish to allocate custom buffers should override this function.
- *
- * \param buffer a pointer to the buffer
- */
- virtual void free_custom_buffer(char* buffer)
- {
-#if DEBUG_SINGLE_MAPPED
- delete[] buffer;
-#endif
- }
-
+ buffer_sptr
+ replace_buffer(uint32_t src_port, uint32_t dst_port, block_sptr block_owner);
// --------------- Performance counter functions -------------
@@ -989,8 +943,10 @@ protected:
* that the downstream max number of items must be passed in to this
* function for consideration.
*/
- buffer_sptr
- allocate_buffer(int port, int downstream_max_nitems, uint64_t downstream_lcm_nitems);
+ buffer_sptr allocate_buffer(int port,
+ int downstream_max_nitems,
+ uint64_t downstream_lcm_nitems,
+ uint32_t downstream_max_out_mult);
std::vector<long> d_max_output_buffer;
std::vector<long> d_min_output_buffer;