From 4dd02dac2fcaf45f398c074735a7359330f78d77 Mon Sep 17 00:00:00 2001 From: Marcus Müller <mmueller@gnuradio.org> Date: Thu, 25 Mar 2021 18:13:35 +0100 Subject: analog/fastnoise: avoid modulo operation when picking indices MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When the pool is power-of-2-sized, index generation can be done using a simple bitmask. Document this, add logging info. - use unsigned and fixed-length int where due - avoid expensive integer modulo operation when possible - extract power-of-two constexpr - don't clutter the logs for small pool sizes Signed-off-by: Marcus Müller <marcus@hostalia.de> --- gr-analog/python/analog/bindings/fastnoise_source_python.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gr-analog/python/analog/bindings/fastnoise_source_python.cc') diff --git a/gr-analog/python/analog/bindings/fastnoise_source_python.cc b/gr-analog/python/analog/bindings/fastnoise_source_python.cc index e43184bb63..85f9d303d1 100644 --- a/gr-analog/python/analog/bindings/fastnoise_source_python.cc +++ b/gr-analog/python/analog/bindings/fastnoise_source_python.cc @@ -14,7 +14,7 @@ /* BINDTOOL_GEN_AUTOMATIC(0) */ /* BINDTOOL_USE_PYGCCXML(0) */ /* BINDTOOL_HEADER_FILE(fastnoise_source.h) */ -/* BINDTOOL_HEADER_FILE_HASH(a1bcac8382da0203f011bc01e8f42c98) */ +/* BINDTOOL_HEADER_FILE_HASH(8e91642118fc23a803672619b185d5cc) */ /***********************************************************************************/ #include <pybind11/complex.h> -- cgit v1.2.3