Class dsp::Operation
-
class Operation : public OwnStream
Defines the interface by which operations are performed on data.
This pure virtual base class defines the manner in which various digital signal processing routines are performed on baseband data
Subclassed by dsp::Sink< TimeSeries >, dsp::Sink< BitSeries >, dsp::Transformation< TimeSeries, TimeSeries >, dsp::Transformation< TimeSeries, Response >, dsp::Transformation< BitSeries, TimeSeries >, dsp::Transformation< TimeSeries, BitSeries >, dsp::Transformation< TimeSeries, PhaseSeries >, dsp::Transformation< ParallelBitSeries, TimeSeries >, dsp::Transformation< BitSeries, BitSeries >, dsp::Transformation< PhaseSeries, PhaseSeries >, dsp::FoldManager, dsp::Input, dsp::OperationThread, dsp::OperationThread::Wait, dsp::ParallelInput, dsp::Simultaneous, dsp::Sink< In >, dsp::Source, dsp::Switcher, dsp::Transformation< In, Out >
Public Types
Public Functions
-
Operation(const char *name)
All sub-classes must specify a unique name.
-
virtual ~Operation()
Virtual destructor.
-
virtual void operate()
Call this method to operate on data.
Throws exception on failure
-
virtual void prepare()
Prepare for data operations.
This method enables optimizations by some derived classes
-
virtual void reserve()
Reserve the maximum amount of memory required.
This avoids the need to reallocate and copy later
-
virtual void add_extensions(Extensions*)
Add any extensions.
-
virtual void combine(const Operation*)
Combine accumulated results with another operation.
This method enables results from multiple threads to be combined
-
virtual void report() const
Report operation statistics.
-
virtual void reset()
Reset accumulated results to initial values.
-
virtual void reset_time() const
Reset accumulated wall time to zero.
Note that optime is mutable and this method is const so that it can be called on constant Operation instances; elapsed wall time is informational and not critical, and therefore not protected.
-
inline std::string get_name() const
Return the unique name of this operation.
-
virtual uint64_t get_total_weights() const
Return the total number of timesample weights encountered.
-
virtual uint64_t get_discarded_weights() const
Return the number of invalid timesample weights encountered.
-
inline int get_id()
Inquire the unique instantiation id.
-
inline virtual double get_delay_time() const
Get the time delay of this operation, if any, in seconds.
-
inline virtual uint64_t bytes_storage() const
The number of bytes of additional storage used by the operation.
-
inline virtual uint64_t bytes_scratch() const
The number of bytes of scratch space used by the operation.
Scratch space is temporary and can be shared.
-
inline virtual const PerformanceMetrics *get_performance_metrics()
Get the current performance metrics for the operation.
Public Members
-
PerformanceMetrics *performance_metrics = nullptr
Declaration of the performance metrics.
Public Static Attributes
-
static bool record_time
Global flag enables stopwatch to record the time spent operating.
-
static bool report_time
Global flag enables report of time spent in operation on destruction.
-
static bool verbose
Global verbosity flag.
-
static bool check_state
Operations should perform internal consistency checks.
-
class PerformanceMetrics
a class that captures the performance metrics of operations.
Subclasses of
See also
Operation are expected to return the metrics of per loop of a pipeline.
Public Members
-
double total_data_time = 0.0
Total time spanned by the data that operation has processed in seconds.
-
double total_processing_time = 0.0
The total amount of processing time for the operation in seconds.
-
uint64_t total_bytes_processed = 0
The total number of input bytes the operation has processed.
-
double total_data_time = 0.0
-
Operation(const char *name)