11 #ifndef __UnloaderShare_h
12 #define __UnloaderShare_h
14 #include "dsp/PhaseSeriesUnloader.h"
15 #include "dsp/SignalPath.h"
16 #include "dsp/TimeDivide.h"
23 class PhaseSeriesUnloader;
105 std::vector< Reference::To<Storage> > storage;
143 Submit* clone () const;
158 void set_minimum_integration_length ( double seconds);
161 void set_cerr (std::ostream& os) const;
169 unsigned contributor;
177 Storage ( unsigned contributors, const std::vector<bool>& finished);
183 void set_profiles ( const PhaseSeries*);
186 PhaseSeries* get_profiles ();
189 void set_division (uint64_t);
192 uint64_t get_division ();
195 bool integrate ( unsigned contributor, uint64_t division, const PhaseSeries*);
198 void set_finished ( unsigned contributor);
201 bool get_finished ();
210 std::vector<bool> finished;
213 void print_finished ();
219 #endif // !defined(__UnloaderShare_h)
PhaseSeriesUnloader * get_unloader() const Get the shared file unloader. Definition: UnloaderShare.C:53
void unload(const PhaseSeries *, Submit *) Unload the PhaseSeries data. Definition: UnloaderShare.C:101
void nonblocking_unload(unsigned istore, Submit *) Unload the storage in parallel. Definition: UnloaderShare.C:341
void finish_all(unsigned contributor) Inform any waiting threads that contributor is finished. Definition: UnloaderShare.C:258
Contains all Baseband Data Reduction Library classes. Definition: ASCIIObservation.h:17
void set_wait_all(bool) When sub-integration is finished, wait for all other threads to finish. Definition: UnloaderShare.C:41
void finish() Unload all cached subintegrations. Definition: UnloaderShare.C:286
ThreadContext * context Thread coordination used in unload method. Definition: UnloaderShare.h:123
Data as a function of pulse phase. Definition: PhaseSeries.h:28
bool wait_all First contributor to complete a division waits for all others. Definition: UnloaderShare.h:126
double get_integration_length() const Get the number of seconds integrated. Definition: PhaseSeries.h:87
Unload PhaseSeries data from multiple threads. Definition: UnloaderShare.h:31
TimeDivide divider The time divider. Definition: UnloaderShare.h:111
unsigned contributors The number of contributors. Definition: UnloaderShare.h:117
void set_context(ThreadContext *) Set the context for control of shared resources. Definition: UnloaderShare.C:36
unsigned get_subint_turns() const Get the number of turns to fold into each sub-integration. Definition: UnloaderShare.C:82
void set_start_time(const MJD &start_time) Set the start time from which to begin counting sub-integrations. Definition: UnloaderShare.C:64
double get_subint_seconds() const Get the number of seconds to fold into each sub-integration. Definition: UnloaderShare.C:76
Base class for things that can unload PhaseSeries data somewhere. Definition: PhaseSeriesUnloader.h:30
Reference::To< PhaseSeriesUnloader > unloader File unloader. Definition: UnloaderShare.h:108
void set_unloader(PhaseSeriesUnloader *unloader) Set the shared file unloader. Definition: UnloaderShare.C:47
static bool verbose Global verbosity flag. Definition: Operation.h:48
bool all_finished() Return true when all threads have finished. Definition: UnloaderShare.C:278
MJD get_end_time() const Get the end time. Definition: PhaseSeries.h:94
void set_subint_seconds(double subint_seconds) Set the number of seconds to fold into each sub-integration. Definition: UnloaderShare.C:88
MJD get_start_time() const Get the start time from which to begin counting sub-integrations. Definition: UnloaderShare.C:70
std::vector< bool > finished_all Flags set when a contributor calls finish_all. Definition: UnloaderShare.h:129
std::vector< uint64_t > last_division The last division completed by a contributor. Definition: UnloaderShare.h:120
void set_subint_turns(unsigned subint_turns) Set the number of turns to fold into each sub-integration. Definition: UnloaderShare.C:94
Submit * new_Submit(unsigned contributor) Get submission interface for the specified contributor. Definition: UnloaderShare.C:458
std::vector< Reference::To< Storage > > storage Temporary storage of incomplete sub-integrations. Definition: UnloaderShare.h:105
PhaseSeries * clone() const Clone operator. Definition: PhaseSeries.C:88
UnloaderShare(unsigned contributors) Constructor. Definition: UnloaderShare.C:21
MJD get_start_time() const Return the start time of the leading edge of the first time sample. Definition: Observation.h:152
Calculates the boundaries of a division of time. Definition: TimeDivide.h:28
virtual ~UnloaderShare() Destructor. Definition: UnloaderShare.C:30
const TimeDivide * divider_copy Pointer to TimeDivide to be copied when needed. Definition: UnloaderShare.h:114
void copy(const TimeDivide *) Copy the Divider configuration. Definition: UnloaderShare.C:58
virtual void set_cerr(std::ostream &) const
Generated using doxygen 1.8.17
|