A single Pipeline thread. More...

#include <SingleThread.h>

Inheritance diagram for dsp::SingleThread:
dsp::Pipeline Reference::Able Reference::HeapTracked dsp::LoadToFil dsp::LoadToFITS dsp::LoadToFold dsp::LoadToQuantize

Classes

class  Config
 Per-thread configuration options. More...
 

Public Member Functions

 SingleThread ()
 Constructor.
 
 ~SingleThread ()
 Destructor.
 
void set_configuration (Config *)
 Set the configuration.
 
void set_source (Source *)
 Set the Source from which data are obtained. More...
 
Sourceget_source ()
 Get the Source from which data are obtained.
 
void initialize ()
 Initialize resources required by signal procesing pipline.
 
void construct ()
 Build the signal processing pipeline.
 
void prepare ()
 Prepare the signal processing pipeline.
 
void seek_epoch (const MJD &)
 Seek such that output starts at the specified epoch.
 
void run ()
 Run through the data.
 
virtual void share (SingleThread *)
 Share any necessary resources with the specified thread.
 
virtual void combine (const SingleThread *)
 Combine the results from another processing thread.
 
void finish ()
 Finish everything. More...
 
uint64_t get_minimum_samples () const
 Get the minimum number of samples required to process.
 
void take_ostream (std::ostream *newlog)
 Take and manage a new ostream instance.
 
void set_affinity (int core)
 
const std::vector< Reference::To< Operation > > get_operations ()
 get the operations being performed
 
uint64_t set_block_size (uint64_t minimum_samples, uint64_t input_overlap=0)
 Set the number of time samples per block, based on RAM constraints.
 
- 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
 

Public Attributes

std::ostream cerr
 The verbose output stream shared by all operations.
 
unsigned thread_id
 

Protected Types

enum  State {
  Fail, Idle, Construct, Constructed,
  Prepare, Prepared, Run, Done,
  Joined
}
 Processing thread states. More...
 

Protected Member Functions

virtual void end_of_data ()
 Any special operations that must be performed at the end of data.
 
virtual void prepare (Source *)
 Configure the source, if possible.
 
void configure_overlap (Source *, Memory *)
 Configure overlap memory, if possible.
 
TimeSeriesnew_time_series ()
 Create a new TimeSeries instance.
 
TimeSeriesnew_TimeSeries ()
 
void insert_dump_point (const std::string &transformation_name)
 Insert a dump point before the named operation.
 
void insert_mask (const std::string &transformation_name)
 Insert a mask before the named operation.
 
const std::string & app ()
 The name of the application running this thread.
 
- Protected Member Functions inherited from Reference::Able
Handle__reference (bool active) const
 
void __dereference (bool auto_delete=true) const
 

Protected Attributes

std::ostream * log
 Pointer to the ostream.
 
State state
 Processing state.
 
Error error
 Error status.
 
ThreadContextstate_change
 State change communication.
 
ThreadContextsource_context
 Mutex protecting source.
 
SingleThreadcolleague
 Processing thread with whom sharing will occur.
 
Reference::To< Sourcesource
 Manages loading and unpacking.
 
Reference::To< TimeSeriessource_output
 The TimeSeries into which the Source outputs data.
 
Reference::To< Configconfig
 Configuration information.
 
std::vector< Reference::To< Operation > > operations
 The operations to be performed.
 
Reference::To< Scratchscratch
 The scratch space shared by all operations.
 
uint64_t minimum_samples
 The minimum number of samples required to process.
 
Reference::To< Memorydevice_memory
 
void * gpu_stream
 
int gpu_device
 

Friends

class MultiThread
 The MultiThread class may access private attributes.
 

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

A single Pipeline thread.

Member Enumeration Documentation

◆ State

enum dsp::SingleThread::State
protected

Processing thread states.

Enumerator
Idle 

an error has occurred

Construct 

nothing happening

Constructed 

request to construct

Prepare 

construction completed

Prepared 

request to prepare

Run 

preparations completed

Done 

processing started

Joined 

processing completed

completion acknowledged

Member Function Documentation

◆ finish()

void dsp::SingleThread::finish ( )
virtual

Finish everything.

Run through the data.

Implements dsp::Pipeline.

Reimplemented in dsp::LoadToFold.

References dsp::Operation::record_time.

Referenced by dsp::MultiThread::finish().

◆ set_source()

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

Set the Source from which data are obtained.

Set the source from which data will be read.

Implements dsp::Pipeline.

References dsp::Operation::verbose.


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

Generated using doxygen 1.8.17