summaryrefslogtreecommitdiff
path: root/gr-blocks/python
diff options
context:
space:
mode:
authorMarcus Müller <mmueller@gnuradio.org>2020-06-20 23:36:33 +0200
committermormj <34754695+mormj@users.noreply.github.com>2020-08-14 16:21:04 -0400
commited972766296683b671f59eca1e83c947f88060f4 (patch)
treea7f735a20bd16bf363a03a32a90356f0187805d1 /gr-blocks/python
parent17071332b1603878d05f139131d163d08efbae5a (diff)
blocks: remove log2_const
Was not standards-compliant (assert(0) in constexpr) Only used in packed_to_unpacked to get the log2(number of bits(type)) in packed_to_unpacked<type>. Was not wrapped to python nor public API. To little surprise, a static method compiles faster, and gets compile-time-calculated by a modern compiler, too.
Diffstat (limited to 'gr-blocks/python')
-rw-r--r--gr-blocks/python/blocks/bindings/CMakeLists.txt1
-rw-r--r--gr-blocks/python/blocks/bindings/docstrings/log2_const_pydoc_template.h48
-rw-r--r--gr-blocks/python/blocks/bindings/log2_const_python.cc43
-rw-r--r--gr-blocks/python/blocks/bindings/python_bindings.cc2
4 files changed, 0 insertions, 94 deletions
diff --git a/gr-blocks/python/blocks/bindings/CMakeLists.txt b/gr-blocks/python/blocks/bindings/CMakeLists.txt
index bc3d284b94..976e12d180 100644
--- a/gr-blocks/python/blocks/bindings/CMakeLists.txt
+++ b/gr-blocks/python/blocks/bindings/CMakeLists.txt
@@ -73,7 +73,6 @@ list(APPEND blocks_python_files
lfsr_15_1_0_python.cc
lfsr_32k_python.cc
lfsr_32k_source_s_python.cc
- # log2_const_python.cc
magphase_to_complex_python.cc
max_blk_python.cc
message_debug_python.cc
diff --git a/gr-blocks/python/blocks/bindings/docstrings/log2_const_pydoc_template.h b/gr-blocks/python/blocks/bindings/docstrings/log2_const_pydoc_template.h
deleted file mode 100644
index e31bf5582e..0000000000
--- a/gr-blocks/python/blocks/bindings/docstrings/log2_const_pydoc_template.h
+++ /dev/null
@@ -1,48 +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, blocks, __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_blocks_log2_const_0 = R"doc()doc";
-
-
-static const char* __doc_gr_blocks_log2_const_0 = R"doc()doc";
-
-
-static const char* __doc_gr_blocks_log2_const_0 = R"doc()doc";
-
-
-static const char* __doc_gr_blocks_log2_const_0 = R"doc()doc";
-
-
-static const char* __doc_gr_blocks_log2_const_0 = R"doc()doc";
-
-
-static const char* __doc_gr_blocks_log2_const_0 = R"doc()doc";
-
-
-static const char* __doc_gr_blocks_log2_const_0 = R"doc()doc";
-
-
-static const char* __doc_gr_blocks_log2_const_0 = R"doc()doc";
-
-
-static const char* __doc_gr_blocks_log2_const_0 = R"doc()doc";
-
-
-static const char* __doc_gr_blocks_log2_const_0 = R"doc()doc";
-
-
-static const char* __doc_gr_blocks_log2_const_0 = R"doc()doc";
diff --git a/gr-blocks/python/blocks/bindings/log2_const_python.cc b/gr-blocks/python/blocks/bindings/log2_const_python.cc
deleted file mode 100644
index 3c8327eaf8..0000000000
--- a/gr-blocks/python/blocks/bindings/log2_const_python.cc
+++ /dev/null
@@ -1,43 +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(log2_const.h) */
-/* BINDTOOL_HEADER_FILE_HASH(f4afb8807dd68b6561896201a8489a0c) */
-/***********************************************************************************/
-
-#include <pybind11/complex.h>
-#include <pybind11/pybind11.h>
-#include <pybind11/stl.h>
-
-namespace py = pybind11;
-
-#include <gnuradio/blocks/log2_const.h>
-
-void bind_log2_const(py::module& m)
-{
-
-
- m.def("log2_const", &gr::blocks::log2_const);
- m.def("log2_const", &gr::blocks::log2_const);
- m.def("log2_const", &gr::blocks::log2_const);
- m.def("log2_const", &gr::blocks::log2_const);
- m.def("log2_const", &gr::blocks::log2_const);
- m.def("log2_const", &gr::blocks::log2_const);
- m.def("log2_const", &gr::blocks::log2_const);
- m.def("log2_const", &gr::blocks::log2_const);
- m.def("log2_const", &gr::blocks::log2_const);
- m.def("log2_const", &gr::blocks::log2_const);
- m.def("log2_const", &gr::blocks::log2_const);
-}
diff --git a/gr-blocks/python/blocks/bindings/python_bindings.cc b/gr-blocks/python/blocks/bindings/python_bindings.cc
index 32dd5d657d..8cbec6d7fd 100644
--- a/gr-blocks/python/blocks/bindings/python_bindings.cc
+++ b/gr-blocks/python/blocks/bindings/python_bindings.cc
@@ -84,7 +84,6 @@ void bind_keep_one_in_n(py::module&);
void bind_lfsr_15_1_0(py::module&);
void bind_lfsr_32k(py::module&);
void bind_lfsr_32k_source_s(py::module&);
-// void bind_log2_const(py::module&);
void bind_magphase_to_complex(py::module&);
void bind_max_blk(py::module&);
void bind_message_debug(py::module&);
@@ -266,7 +265,6 @@ PYBIND11_MODULE(blocks_python, m)
bind_lfsr_15_1_0(m);
bind_lfsr_32k(m);
bind_lfsr_32k_source_s(m);
- // bind_log2_const(m);
bind_magphase_to_complex(m);
bind_max_blk(m);
bind_message_debug(m);