From 4ad190c40131c34357d2afd0bd44ce25dad12347 Mon Sep 17 00:00:00 2001 From: f4exb Date: Sun, 14 Jul 2024 00:05:10 +0200 Subject: [PATCH] WDSP: removed useless atomic --- wdsp/TXA.hpp | 4 +--- wdsp/iqc.hpp | 6 ++---- wdsp/rmatch.hpp | 8 +++----- wdsp/siphon.hpp | 4 +--- wdsp/slew.cpp | 11 ++++++++++- wdsp/slew.hpp | 14 ++++++++++---- 6 files changed, 27 insertions(+), 20 deletions(-) diff --git a/wdsp/TXA.hpp b/wdsp/TXA.hpp index a48375d58..0ed9253c7 100644 --- a/wdsp/TXA.hpp +++ b/wdsp/TXA.hpp @@ -28,8 +28,6 @@ warren@wpratt.com #ifndef wdsp_txa_h #define wdsp_txa_h -#include - #include "comm.hpp" #include "unit.hpp" @@ -127,7 +125,7 @@ public: float f_low; float f_high; double meter[TXA_METERTYPE_LAST]; - std::atomic upslew; + long upslew; struct { diff --git a/wdsp/iqc.hpp b/wdsp/iqc.hpp index 3ac5df8b2..bf8bac161 100644 --- a/wdsp/iqc.hpp +++ b/wdsp/iqc.hpp @@ -28,8 +28,6 @@ warren@wpratt.com #ifndef wdsp_iqc_h #define wdsp_iqc_h -#include - #include "export.h" namespace WDSP { @@ -39,8 +37,8 @@ class TXA; class WDSP_API IQC { public: - std::atomic run; - std::atomic busy; + long run; + long busy; int size; float* in; float* out; diff --git a/wdsp/rmatch.hpp b/wdsp/rmatch.hpp index df24d5895..a71e1d363 100644 --- a/wdsp/rmatch.hpp +++ b/wdsp/rmatch.hpp @@ -28,8 +28,6 @@ warren@wpratt.com #ifndef wdsp_rmatch_h #define wdsp_rmatch_h -#include - #include "export.h" namespace WDSP { @@ -76,7 +74,7 @@ public: class WDSP_API RMATCH { public: - std::atomic run; + long run; float* in; float* out; int insize; @@ -126,8 +124,8 @@ public: unsigned int write_startup; int control_flag; // diagnostics - std::atomic underflows; - std::atomic overflows; + long underflows; + long overflows; int force; float fvar; diff --git a/wdsp/siphon.hpp b/wdsp/siphon.hpp index 6f3f3cfc2..5af4176ea 100644 --- a/wdsp/siphon.hpp +++ b/wdsp/siphon.hpp @@ -34,8 +34,6 @@ warren@wpratt.com #include "fftw3.h" #include "export.h" -#include - namespace WDSP { class RXA; @@ -57,7 +55,7 @@ public: float* sipout; int fftsize; float* specout; - std::atomic specmode; + long specmode; fftwf_plan sipplan; float* window; diff --git a/wdsp/slew.cpp b/wdsp/slew.cpp index 5492b44dd..ef6eeb10c 100644 --- a/wdsp/slew.cpp +++ b/wdsp/slew.cpp @@ -64,7 +64,16 @@ void USLEW::decalc_uslew (USLEW *a) delete[] (a->cup); } -USLEW* USLEW::create_uslew (TXA *txa, std::atomic *ch_upslew, int size, float* in, float* out, float rate, float tdelay, float tupslew) +USLEW* USLEW::create_uslew ( + TXA *txa, + long *ch_upslew, + int size, + float* in, + float* out, + float rate, + float tdelay, + float tupslew +) { USLEW *a = new USLEW; a->txa = txa; diff --git a/wdsp/slew.hpp b/wdsp/slew.hpp index b811c1499..3569701b1 100644 --- a/wdsp/slew.hpp +++ b/wdsp/slew.hpp @@ -28,8 +28,6 @@ warren@wpratt.com #ifndef wdsp_slew_h #define wdsp_slew_h -#include - #include "export.h" namespace WDSP { @@ -40,7 +38,7 @@ class WDSP_API USLEW { public: TXA *txa; - std::atomic *ch_upslew; + long *ch_upslew; int size; float* in; float* out; @@ -54,7 +52,15 @@ public: int ntup; float* cup; - static USLEW* create_uslew (TXA *txa, std::atomic *ch_upslew, int size, float* in, float* out, float rate, float tdelay, float tupslew); + static USLEW* create_uslew ( + TXA *txa, + long *ch_upslew, + int size, float* in, + float* out, + float rate, + float tdelay, + float tupslew + ); static void destroy_uslew (USLEW *a); static void flush_uslew (USLEW *a); static void xuslew (USLEW *a);