diff options
author | David Sorber <david.sorber@blacklynx.tech> | 2021-07-29 11:34:37 -0400 |
---|---|---|
committer | mormj <34754695+mormj@users.noreply.github.com> | 2021-10-25 11:27:01 -0400 |
commit | f3c558d88bc68d865f823c31e7d9aa78b3feab59 (patch) | |
tree | 026d8ff5568bc2c5ab731df29d87901cf1177e00 /gnuradio-runtime/lib/block_executor.cc | |
parent | 788827ae116bef871e144abd39b1e4482208eabe (diff) |
runtime: Custom Buffer/Accelerator Device Support - Milestone 2
Completion of custom buffer/accelerator device support changes:
* Improved custom buffer interface by removing awkward memory
allocation functions from the block class
* Increased flexibility for creating custom buffers by allowing
creation of buffer_single_mapped subclasses
* Fully incorporated data movement abstraction into the custom
buffer interface and the runtime itself; accelerated blocks are no
longer directly responsible for their own data movement
* Zero copy back-to-back accelerated blocks are now supported (data
no longer needs to be moved back to the host between each block)
Signed-off-by: David Sorber <david.sorber@blacklynx.tech>
Signed-off-by: Mike Mason <mike.mason@blacklynx.tech>
Diffstat (limited to 'gnuradio-runtime/lib/block_executor.cc')
-rw-r--r-- | gnuradio-runtime/lib/block_executor.cc | 22 |
1 files changed, 8 insertions, 14 deletions
diff --git a/gnuradio-runtime/lib/block_executor.cc b/gnuradio-runtime/lib/block_executor.cc index 6fbf2c5c17..ea59196571 100644 --- a/gnuradio-runtime/lib/block_executor.cc +++ b/gnuradio-runtime/lib/block_executor.cc @@ -59,9 +59,11 @@ static int min_available_space(block* m, int min_noutput_items, int& output_idx) { +#if ENABLE_LOGGING gr::logger_ptr logger; gr::logger_ptr debug_logger; gr::configure_default_loggers(logger, debug_logger, "min_available_space"); +#endif int min_space = std::numeric_limits<int>::max(); if (min_noutput_items == 0) @@ -285,7 +287,7 @@ block_executor::state block_executor::run_one_iteration() // determine the minimum available output space output_idx = 0; - out_try_again: + blkd_out_try_again: noutput_items = min_available_space( m, d, m->output_multiple(), m->min_noutput_items(), output_idx); noutput_items = std::min(noutput_items, max_noutput_items); @@ -312,7 +314,7 @@ block_executor::state block_executor::run_one_iteration() msg << m << " -- BLKD_OUT -- ([1] try again idx: " << output_idx << ")"; GR_LOG_INFO(d_debug_logger, msg.str());); - goto out_try_again; + goto blkd_out_try_again; } } else { return BLKD_OUT; @@ -329,7 +331,6 @@ block_executor::state block_executor::run_one_iteration() d_input_done.resize(d->ninputs()); d_output_items.resize(0); d_start_nitems_read.resize(d->ninputs()); - // LOG(GR_LOG_INFO(d_debug_logger, "sink");); LOG(std::ostringstream msg; msg << m << " -- sink"; GR_LOG_INFO(d_debug_logger, msg.str());); @@ -367,7 +368,6 @@ block_executor::state block_executor::run_one_iteration() GR_LOG_INFO(d_debug_logger, msg.str());); if (noutput_items == 0) { // we're blocked on input - // LOG(GR_LOG_INFO(d_debug_logger, "BLKD_IN");); LOG(std::ostringstream msg; msg << m << " -- BLKD_IN"; GR_LOG_INFO(d_debug_logger, msg.str())); return BLKD_IN; @@ -400,7 +400,7 @@ block_executor::state block_executor::run_one_iteration() // determine the minimum available output space output_idx = 0; - out_try_again2: + blkd_out_try_again2: noutput_items = min_available_space( m, d, m->output_multiple(), m->min_noutput_items(), output_idx); if (ENABLE_LOGGING) { @@ -415,7 +415,6 @@ block_executor::state block_executor::run_one_iteration() goto were_done; if (noutput_items == 0) { // we're output blocked - // LOG(GR_LOG_INFO(d_debug_logger, "BLKD_OUT");); LOG(std::ostringstream msg; msg << m << " -- BLKD_OUT"; GR_LOG_INFO(d_debug_logger, msg.str())); @@ -435,7 +434,7 @@ block_executor::state block_executor::run_one_iteration() msg << m << " -- BLKD_OUT -- ([2] try again idx: " << output_idx << ")"; GR_LOG_INFO(d_debug_logger, msg.str());); - goto out_try_again2; + goto blkd_out_try_again2; } } else { return BLKD_OUT; @@ -532,10 +531,6 @@ block_executor::state block_executor::run_one_iteration() buffer_reader_sptr in_buf = d->input(i); - LOG(std::ostringstream msg; - msg << m << " (t: " << this << ") -- pre-callback"; - GR_LOG_DEBUG(d_debug_logger, msg.str())); - if (in_buf->input_blkd_cb_ready(d_ninput_items_required[i])) { gr::custom_lock lock(std::ref(*in_buf->mutex()), in_buf->buffer()); if (in_buf->input_blocked_callback(d_ninput_items_required[i], @@ -681,8 +676,8 @@ block_executor::state block_executor::run_one_iteration() GR_LOG_DEBUG(d_debug_logger, msg.str());); gr::custom_lock lock(std::ref(*out_buf->mutex()), out_buf); out_buf->output_blocked_callback(m->output_multiple(), true); - LOG(std::ostringstream msg; msg << m << " -- NO OUTPUT -- [" << i - << "] -- OUTPUT BLOCKED CBACK: " << rc; + LOG(std::ostringstream msg; + msg << m << " -- NO OUTPUT -- [" << i << "] -- OUTPUT BLOCKED CBACK "; GR_LOG_DEBUG(d_debug_logger, msg.str());); } @@ -692,7 +687,6 @@ block_executor::state block_executor::run_one_iteration() GR_LOG_ERROR(d_logger, "invalid state while going through iteration state machine"); were_done: - // LOG(GR_LOG_INFO(d_debug_logger, "we're done");); LOG(std::ostringstream msg; msg << m << " -- we're done"; GR_LOG_INFO(d_debug_logger, msg.str())); d->set_done(true); |