Multiple pipeline threads. More...

#include <MultiThread.h>

Inheritance diagram for dsp::MultiThread:
dsp::Pipeline Reference::Able Reference::HeapTracked dsp::LoadToFilN dsp::LoadToFITSN dsp::LoadToFoldN

Public Member Functions

 MultiThread ()
 Constructor.
 
 ~MultiThread ()
 Destructor.
 
void set_nthread (unsigned)
 Set the number of thread to be used.
 
void set_configuration (SingleThread::Config *)
 Set the configuration to be used by each thread. More...
 
void set_source (Source *)
 Set the Input from which data are read. More...
 
Sourceget_source ()
 Get the Input from which data are read.
 
void construct ()
 Build the signal processing pipeline.
 
void prepare ()
 Prepare to fold the input TimeSeries.
 
virtual void share ()
 Set up any resources that must be shared.
 
void run ()
 Run through the data.
 
void finish ()
 Finish everything.
 
uint64_t get_minimum_samples () const
 Get the minimum number of samples required to process.
 
- Public Member Functions inherited from Reference::Able
 Able (const Able &)
 
Ableoperator= (const Able &)
 
unsigned get_reference_count () const
 
- Public Member Functions inherited from Reference::HeapTracked
 HeapTracked (const HeapTracked &)
 
HeapTrackedoperator= (const HeapTracked &)
 
bool __is_on_heap () const
 

Protected Member Functions

virtual SingleThreadnew_thread ()=0
 The creator of new SingleThread threads.
 
void launch_threads ()
 
- Protected Member Functions inherited from Reference::Able
Handle__reference (bool active) const
 
void __dereference (bool auto_delete=true) const
 

Static Protected Member Functions

static void * thread (void *)
 
static void wait (SingleThread *fold, SingleThread::State st)
 
static void signal (SingleThread *fold, SingleThread::State st)
 

Protected Attributes

Reference::To< Sourcesource
 Source of data. More...
 
ThreadContextsource_context
 Thread lock for Input::load.
 
ThreadContextstate_changes
 Condition for processing thread state changes.
 
std::vector< Reference::To< SingleThread > > threads
 The pipeline threads.
 
Reference::To< SingleThread::Configconfiguration
 The shared thread configuration.
 
std::vector< pthread_t > ids
 The thread ids.
 

Additional Inherited Members

- Static Public Member Functions inherited from Reference::Able
static size_t get_instance_count ()
 
- Static Public Member Functions inherited from Reference::HeapTracked
static void * operator new (size_t size, void *ptr=0)
 
static void operator delete (void *location, void *ptr)
 
static void operator delete (void *location)
 
static size_t get_heap_queue_size ()
 

Detailed Description

Multiple pipeline threads.

Member Function Documentation

◆ set_configuration()

void dsp::MultiThread::set_configuration ( SingleThread::Config config)

Set the configuration to be used by each thread.

Set the configuration to be used in prepare and run.

◆ set_source()

void dsp::MultiThread::set_source ( Source _source)
virtual

Set the Input from which data are read.

Set the Source from which data will be read.

Implements dsp::Pipeline.

References dsp::Source::clone(), dsp::Source::set_context(), and dsp::Source::share().

Member Data Documentation

◆ source

Reference::To<Source> dsp::MultiThread::source
protected

Source of data.

call to set_input may precede set_nthread


The documentation for this class was generated from the following files:

Generated using doxygen 1.8.17