summaryrefslogtreecommitdiff
path: root/gnuradio-runtime/python
diff options
context:
space:
mode:
authorMarcus Müller <mmueller@gnuradio.org>2021-07-17 16:22:30 +0200
committermormj <34754695+mormj@users.noreply.github.com>2021-07-30 20:41:54 -0400
commit001a949262436cc42d06976f6ba9b48ec8ad607d (patch)
tree5d56f9804408a2a141c85489bf95dc6f494246e4 /gnuradio-runtime/python
parent18488e31d4ad13077990383f7eb0e1ab7655bf23 (diff)
runtime: remove tag_checker
Deprecated on 3.9: `tag_checker` used to be meant for cases where you've gotten an unsorted tag vector (mostly, from `get_tags_in_range`), which you then had to go through in parallel to your samples, to check which tag applies at what sample. For that it sorts the tags; the tags coming from the `get_tags*` functions are sorted already The checking pattern (which `chunks_to_symbols` is the last consumer of) is inefficient: instead of taking the index of the first unprocessed tag and processing all samples up to that index, a check is performed on every sample, which includes calls and multiple indirections. So, since very likely nobody uses this, and because it's a design anti-pattern, deprecating this on 3.9 and removing it with 3.10. Signed-off-by: Marcus Müller <mmueller@gnuradio.org>
Diffstat (limited to 'gnuradio-runtime/python')
-rw-r--r--gnuradio-runtime/python/gnuradio/gr/bindings/CMakeLists.txt1
-rw-r--r--gnuradio-runtime/python/gnuradio/gr/bindings/docstrings/tag_checker_pydoc_template.h27
-rw-r--r--gnuradio-runtime/python/gnuradio/gr/bindings/python_bindings.cc2
-rw-r--r--gnuradio-runtime/python/gnuradio/gr/bindings/tag_checker_python.cc57
4 files changed, 0 insertions, 87 deletions
diff --git a/gnuradio-runtime/python/gnuradio/gr/bindings/CMakeLists.txt b/gnuradio-runtime/python/gnuradio/gr/bindings/CMakeLists.txt
index ef8f1f10dd..14eb501ddb 100644
--- a/gnuradio-runtime/python/gnuradio/gr/bindings/CMakeLists.txt
+++ b/gnuradio-runtime/python/gnuradio/gr/bindings/CMakeLists.txt
@@ -67,7 +67,6 @@ messages/msg_queue_python.cc
sync_decimator_python.cc
sync_interpolator_python.cc
sys_paths_python.cc
- tag_checker_python.cc
tagged_stream_block_python.cc
tags_python.cc
# thread_python.cc
diff --git a/gnuradio-runtime/python/gnuradio/gr/bindings/docstrings/tag_checker_pydoc_template.h b/gnuradio-runtime/python/gnuradio/gr/bindings/docstrings/tag_checker_pydoc_template.h
deleted file mode 100644
index 29d19d8e0f..0000000000
--- a/gnuradio-runtime/python/gnuradio/gr/bindings/docstrings/tag_checker_pydoc_template.h
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * Copyright 2020 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * SPDX-License-Identifier: GPL-3.0-or-later
- *
- */
-#include "pydoc_macros.h"
-#define D(...) DOC(gr, __VA_ARGS__)
-/*
- This file contains placeholders for docstrings for the Python bindings.
- Do not edit! These were automatically extracted during the binding process
- and will be overwritten during the build process
- */
-
-
-static const char* __doc_gr_tag_checker = R"doc()doc";
-
-
-static const char* __doc_gr_tag_checker_tag_checker_0 = R"doc()doc";
-
-
-static const char* __doc_gr_tag_checker_tag_checker_1 = R"doc()doc";
-
-
-static const char* __doc_gr_tag_checker_get_tags = R"doc()doc";
diff --git a/gnuradio-runtime/python/gnuradio/gr/bindings/python_bindings.cc b/gnuradio-runtime/python/gnuradio/gr/bindings/python_bindings.cc
index c180116c80..1f39775f81 100644
--- a/gnuradio-runtime/python/gnuradio/gr/bindings/python_bindings.cc
+++ b/gnuradio-runtime/python/gnuradio/gr/bindings/python_bindings.cc
@@ -77,7 +77,6 @@ void bind_sync_block(py::module&);
void bind_sync_decimator(py::module&);
void bind_sync_interpolator(py::module&);
void bind_sys_paths(py::module&);
-void bind_tag_checker(py::module&);
void bind_tagged_stream_block(py::module&);
void bind_tags(py::module&);
// void bind_thread(py::module&);
@@ -178,7 +177,6 @@ PYBIND11_MODULE(gr_python, m)
bind_sync_decimator(m);
bind_sync_interpolator(m);
bind_sys_paths(m);
- bind_tag_checker(m);
bind_tagged_stream_block(m);
bind_tags(m);
// // bind_thread(m);
diff --git a/gnuradio-runtime/python/gnuradio/gr/bindings/tag_checker_python.cc b/gnuradio-runtime/python/gnuradio/gr/bindings/tag_checker_python.cc
deleted file mode 100644
index e2043351ef..0000000000
--- a/gnuradio-runtime/python/gnuradio/gr/bindings/tag_checker_python.cc
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * Copyright 2020 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * SPDX-License-Identifier: GPL-3.0-or-later
- *
- */
-
-/***********************************************************************************/
-/* This file is automatically generated using bindtool and can be manually edited */
-/* The following lines can be configured to regenerate this file during cmake */
-/* If manual edits are made, the following tags should be modified accordingly. */
-/* BINDTOOL_GEN_AUTOMATIC(0) */
-/* BINDTOOL_USE_PYGCCXML(0) */
-/* BINDTOOL_HEADER_FILE(tag_checker.h) */
-/* BINDTOOL_HEADER_FILE_HASH(9ffac9df4d29f09b0c8506584e6f1f75) */
-/***********************************************************************************/
-
-#include <pybind11/complex.h>
-#include <pybind11/pybind11.h>
-#include <pybind11/stl.h>
-
-namespace py = pybind11;
-
-#include <gnuradio/tag_checker.h>
-// pydoc.h is automatically generated in the build directory
-#include <tag_checker_pydoc.h>
-
-void bind_tag_checker(py::module& m)
-{
-
- using tag_checker = ::gr::tag_checker;
-
-
- py::class_<tag_checker, std::shared_ptr<tag_checker>>(
- m, "tag_checker", D(tag_checker))
-
- .def(py::init<std::vector<gr::tag_t, std::allocator<gr::tag_t>>&>(),
- py::arg("tags"),
- D(tag_checker, tag_checker, 0))
- .def(py::init<gr::tag_checker const&>(),
- py::arg("arg0"),
- D(tag_checker, tag_checker, 1))
-
-
- .def("get_tags",
- &tag_checker::get_tags,
- py::arg("tag_list"),
- py::arg("offset"),
- D(tag_checker, get_tags))
-
- ;
-
-
- py::module m_messages = m.def_submodule("messages");
-}