diff options
author | Matthias P. Braendli <matthias.braendli@mpb.li> | 2024-10-05 17:24:31 +0200 |
---|---|---|
committer | Matthias P. Braendli <matthias.braendli@mpb.li> | 2024-10-05 17:24:31 +0200 |
commit | b563b465e8b3df367da7799e789d29e0009cb96a (patch) | |
tree | 2ddc718b8c4df52625f074f2810b7a7c21559665 /src | |
parent | d59e9588660c1f7fe956aa2b97e3691070a4ce04 (diff) | |
download | dabmod-b563b465e8b3df367da7799e789d29e0009cb96a.tar.gz dabmod-b563b465e8b3df367da7799e789d29e0009cb96a.tar.bz2 dabmod-b563b465e8b3df367da7799e789d29e0009cb96a.zip |
Move typedef of complexf to Buffer.h
Diffstat (limited to 'src')
-rw-r--r-- | src/Buffer.h | 2 | ||||
-rw-r--r-- | src/CicEqualizer.h | 5 | ||||
-rw-r--r-- | src/DabMod.cpp | 5 | ||||
-rw-r--r-- | src/DabModulator.h | 4 | ||||
-rw-r--r-- | src/DifferentialModulator.cpp | 8 | ||||
-rw-r--r-- | src/FIRFilter.h | 7 | ||||
-rw-r--r-- | src/FrameMultiplexer.cpp | 12 | ||||
-rw-r--r-- | src/FrequencyInterleaver.cpp | 7 | ||||
-rw-r--r-- | src/GainControl.h | 4 | ||||
-rw-r--r-- | src/GuardIntervalInserter.cpp | 2 | ||||
-rw-r--r-- | src/MemlessPoly.h | 5 | ||||
-rw-r--r-- | src/ModPlugin.h | 2 | ||||
-rw-r--r-- | src/NullSymbol.cpp | 9 | ||||
-rw-r--r-- | src/OfdmGenerator.h | 2 | ||||
-rw-r--r-- | src/PAPRStats.cpp | 1 | ||||
-rw-r--r-- | src/PAPRStats.h | 5 | ||||
-rw-r--r-- | src/QpskSymbolMapper.cpp | 4 | ||||
-rw-r--r-- | src/Resampler.h | 3 | ||||
-rw-r--r-- | src/TII.cpp | 7 |
19 files changed, 16 insertions, 78 deletions
diff --git a/src/Buffer.h b/src/Buffer.h index af52e93..077d654 100644 --- a/src/Buffer.h +++ b/src/Buffer.h @@ -33,6 +33,8 @@ #include <vector> #include <memory> +#include <complex> +typedef std::complex<float> complexf; /* Buffer is a container for a byte array, which is memory-aligned * to 32 bytes for SSE performance. diff --git a/src/CicEqualizer.h b/src/CicEqualizer.h index 792da02..70c3ae9 100644 --- a/src/CicEqualizer.h +++ b/src/CicEqualizer.h @@ -25,19 +25,14 @@ # include <config.h> #endif - #include "ModPlugin.h" #include <vector> #include <sys/types.h> -#include <complex> #ifdef __SSE__ # include <xmmintrin.h> #endif - -typedef std::complex<float> complexf; - class CicEqualizer : public ModCodec { public: diff --git a/src/DabMod.cpp b/src/DabMod.cpp index 6b02d75..4e338f9 100644 --- a/src/DabMod.cpp +++ b/src/DabMod.cpp @@ -31,10 +31,8 @@ #endif #include <memory> -#include <complex> #include <string> #include <iostream> -#include <iomanip> #include <cstdlib> #include <stdexcept> #include <cstdio> @@ -51,7 +49,6 @@ #include "Utils.h" #include "Log.h" #include "DabModulator.h" -#include "InputMemory.h" #include "OutputFile.h" #include "FormatConverter.h" #include "FrameMultiplexer.h" @@ -83,8 +80,6 @@ static const float normalise_factor_file_fix = 81000.0f; static const float normalise_factor_file_var = 46000.0f; static const float normalise_factor_file_max = 46000.0f; -typedef std::complex<float> complexf; - using namespace std; volatile sig_atomic_t running = 1; diff --git a/src/DabModulator.h b/src/DabModulator.h index 093a782..82782cd 100644 --- a/src/DabModulator.h +++ b/src/DabModulator.h @@ -40,12 +40,8 @@ #include "EtiReader.h" #include "Flowgraph.h" #include "FormatConverter.h" -#include "GainControl.h" #include "OutputMemory.h" #include "RemoteControl.h" -#include "Log.h" -#include "TII.h" - class DabModulator : public ModInput, public ModMetadata, public RemoteControllable { diff --git a/src/DifferentialModulator.cpp b/src/DifferentialModulator.cpp index 97a7998..54e97e2 100644 --- a/src/DifferentialModulator.cpp +++ b/src/DifferentialModulator.cpp @@ -22,13 +22,9 @@ #include "DifferentialModulator.h" #include "PcDebug.h" -#include <stdio.h> +#include <cstdio> #include <stdexcept> -#include <complex> -#include <string.h> - -typedef std::complex<float> complexf; - +#include <cstring> DifferentialModulator::DifferentialModulator(size_t carriers) : ModMux(), diff --git a/src/FIRFilter.h b/src/FIRFilter.h index a4effa1..2d8fba9 100644 --- a/src/FIRFilter.h +++ b/src/FIRFilter.h @@ -33,21 +33,14 @@ #include "RemoteControl.h" #include "ModPlugin.h" -#include "PcDebug.h" #include <sys/types.h> -#include <complex> -#include <thread> #include <vector> -#include <time.h> #include <cstdio> #include <string> -#include <memory> #define FIRFILTER_PIPELINE_DELAY 1 -typedef std::complex<float> complexf; - class FIRFilter : public PipelinedModCodec, public RemoteControllable { public: diff --git a/src/FrameMultiplexer.cpp b/src/FrameMultiplexer.cpp index e893120..ebd8b76 100644 --- a/src/FrameMultiplexer.cpp +++ b/src/FrameMultiplexer.cpp @@ -25,17 +25,11 @@ */ #include "FrameMultiplexer.h" -#include "PcDebug.h" -#include <stdio.h> #include <string> -#include <stdexcept> -#include <complex> -#include <memory> -#include <assert.h> -#include <string.h> - -typedef std::complex<float> complexf; +#include <cstdio> +#include <cassert> +#include <cstring> FrameMultiplexer::FrameMultiplexer( const EtiSource& etiSource) : diff --git a/src/FrequencyInterleaver.cpp b/src/FrequencyInterleaver.cpp index e76d525..a62e9f4 100644 --- a/src/FrequencyInterleaver.cpp +++ b/src/FrequencyInterleaver.cpp @@ -22,13 +22,10 @@ #include "FrequencyInterleaver.h" #include "PcDebug.h" -#include <stdio.h> #include <stdexcept> #include <string> -#include <stdlib.h> -#include <complex> - -typedef std::complex<float> complexf; +#include <cstdio> +#include <cstdlib> FrequencyInterleaver::FrequencyInterleaver(size_t mode) : diff --git a/src/GainControl.h b/src/GainControl.h index 04f6b58..d40a7d7 100644 --- a/src/GainControl.h +++ b/src/GainControl.h @@ -35,7 +35,6 @@ #include "RemoteControl.h" #include <sys/types.h> -#include <complex> #include <string> #include <mutex> @@ -43,9 +42,6 @@ # include <xmmintrin.h> #endif - -typedef std::complex<float> complexf; - enum class GainMode { GAIN_FIX = 0, GAIN_MAX = 1, GAIN_VAR = 2 }; class GainControl : public PipelinedModCodec, public RemoteControllable diff --git a/src/GuardIntervalInserter.cpp b/src/GuardIntervalInserter.cpp index 3c2db14..e200b84 100644 --- a/src/GuardIntervalInserter.cpp +++ b/src/GuardIntervalInserter.cpp @@ -29,10 +29,8 @@ #include <cstring> #include <cassert> #include <stdexcept> -#include <complex> #include <mutex> -typedef std::complex<float> complexf; GuardIntervalInserter::GuardIntervalInserter( size_t nbSymbols, diff --git a/src/MemlessPoly.h b/src/MemlessPoly.h index 91e6860..72de62c 100644 --- a/src/MemlessPoly.h +++ b/src/MemlessPoly.h @@ -32,13 +32,10 @@ #include "RemoteControl.h" #include "ModPlugin.h" -#include "PcDebug.h" #include "ThreadsafeQueue.h" #include <sys/types.h> #include <array> -#include <complex> -#include <memory> #include <string> #include <thread> #include <vector> @@ -47,8 +44,6 @@ #define MEMLESSPOLY_PIPELINE_DELAY 1 -typedef std::complex<float> complexf; - enum class dpd_type_t { odd_only_poly, lookup_table diff --git a/src/ModPlugin.h b/src/ModPlugin.h index 470508f..bb3ee2c 100644 --- a/src/ModPlugin.h +++ b/src/ModPlugin.h @@ -33,9 +33,7 @@ #include "Buffer.h" #include "ThreadsafeQueue.h" #include "TimestampDecoder.h" -#include <cstddef> #include <vector> -#include <memory> #include <thread> #include <atomic> diff --git a/src/NullSymbol.cpp b/src/NullSymbol.cpp index 4684dfe..023ae42 100644 --- a/src/NullSymbol.cpp +++ b/src/NullSymbol.cpp @@ -27,12 +27,9 @@ #include "NullSymbol.h" #include "PcDebug.h" -#include <stdio.h> -#include <stdlib.h> -#include <complex> -#include <string.h> - -typedef std::complex<float> complexf; +#include <cstdio> +#include <cstdlib> +#include <cstring> NullSymbol::NullSymbol(size_t nbCarriers) : ModInput(), diff --git a/src/OfdmGenerator.h b/src/OfdmGenerator.h index dc1ad46..cab936e 100644 --- a/src/OfdmGenerator.h +++ b/src/OfdmGenerator.h @@ -39,8 +39,6 @@ #include <complex> #include <atomic> -typedef std::complex<float> complexf; - class OfdmGenerator : public ModCodec, public RemoteControllable { public: diff --git a/src/PAPRStats.cpp b/src/PAPRStats.cpp index 0c9764a..103f02f 100644 --- a/src/PAPRStats.cpp +++ b/src/PAPRStats.cpp @@ -33,7 +33,6 @@ # include <iostream> #endif - PAPRStats::PAPRStats(size_t num_blocks_to_accumulate) : m_num_blocks_to_accumulate(num_blocks_to_accumulate) { diff --git a/src/PAPRStats.h b/src/PAPRStats.h index 86ad8b0..a4ded86 100644 --- a/src/PAPRStats.h +++ b/src/PAPRStats.h @@ -31,12 +31,9 @@ #endif #include <cstddef> -#include <vector> #include <deque> #include <complex> -typedef std::complex<float> complexf; - /* Helper class to calculate Peak-to-average-power ratio. * Definition of PAPR: * @@ -53,6 +50,8 @@ typedef std::complex<float> complexf; */ class PAPRStats { + typedef std::complex<float> complexf; + public: PAPRStats(size_t num_blocks_to_accumulate); diff --git a/src/QpskSymbolMapper.cpp b/src/QpskSymbolMapper.cpp index e26853a..c9b01fb 100644 --- a/src/QpskSymbolMapper.cpp +++ b/src/QpskSymbolMapper.cpp @@ -23,7 +23,6 @@ #include <cstdio> #include <cstring> #include <stdexcept> -#include <complex> #include <cmath> #ifdef __SSE__ # include <xmmintrin.h> @@ -32,9 +31,6 @@ #include "QpskSymbolMapper.h" #include "PcDebug.h" - -typedef std::complex<float> complexf; - QpskSymbolMapper::QpskSymbolMapper(size_t carriers) : ModCodec(), d_carriers(carriers) { } diff --git a/src/Resampler.h b/src/Resampler.h index d1a9f7a..2c810f6 100644 --- a/src/Resampler.h +++ b/src/Resampler.h @@ -37,9 +37,6 @@ #define FFT_TYPE fftwf_complex #define FFT_PLAN fftwf_plan -#include <complex> -typedef std::complex<float> complexf; - class Resampler : public ModCodec { diff --git a/src/TII.cpp b/src/TII.cpp index 2656cbf..155d1c9 100644 --- a/src/TII.cpp +++ b/src/TII.cpp @@ -27,11 +27,8 @@ #include "TII.h" #include "PcDebug.h" -#include <stdio.h> -#include <stdexcept> -#include <string.h> - -typedef std::complex<float> complexf; +#include <cstdio> +#include <cstring> /* TII pattern for TM I, II, IV */ const int pattern_tm1_2_4[][8] = { // {{{ |