casa
$Rev:20696$
|
#include <MultiThreadedVisResampler.h>
Public Member Functions | |
MultiThreadedVisibilityResampler () | |
enum VBLoader {NOONE=-1, DATATOGRID=0, GRIDTODATA, RESIDUALCALC}; | |
MultiThreadedVisibilityResampler (const Bool &doublePrecision, const Int &n=DEFAULTNOOFCORES) | |
MultiThreadedVisibilityResampler (const Bool &doublePrecision, CountedPtr< VisibilityResamplerBase > &visResampler, const Int &n=DEFAULTNOOFCORES) | |
virtual | ~MultiThreadedVisibilityResampler () |
MultiThreadedVisibilityResampler (const MultiThreadedVisibilityResampler &other) | |
MultiThreadedVisibilityResampler * | clone () |
This version will make a clone with shared data buffers (the complex grids and the sum-of-weights arrays). | |
MultiThreadedVisibilityResampler & | operator= (const MultiThreadedVisibilityResampler &other) |
void | cleanup () |
void | releaseBuffers () |
void | copy (const MultiThreadedVisibilityResampler &other) |
virtual Int | nelements () |
virtual void | setParams (const Vector< Double > &uvwScale, const Vector< Double > &offset, const Vector< Double > &dphase) |
virtual void | setMaps (const Vector< Int > &chanMap, const Vector< Int > &polMap) |
virtual void | setCFMaps (const Vector< Int > &cfMap, const Vector< Int > &conjCFMap) |
virtual void | setFreqMaps (const Matrix< Double > &spwChanFreqs, const Matrix< Double > &spwChanConjFreqs) |
virtual void | setConvFunc (const CFStore &cfs) |
void | init (const Bool &doublePrecision) |
Forward looking genealogical baggage -- required for the MultiThreadedVisibilityResampler. | |
virtual void | DataToGrid (Array< DComplex > &griddedData, VBStore &vbs, Matrix< Double > &sumwt, const Bool &dopsf, Bool=False) |
virtual void | DataToGrid (Array< Complex > &griddedData, VBStore &vbs, Matrix< Double > &sumwt, const Bool &dopsf, Bool=False) |
void | GatherGrids (Array< DComplex > &griddedData, Matrix< Double > &sumwt) |
This is the gather operation on griddedData for nelements > 1. | |
void | GatherGrids (Array< Complex > &griddedData, Matrix< Double > &sumwt) |
void | initializePutBuffers (const Array< DComplex > &griddedData, const Matrix< Double > &sumwt) |
void | initializePutBuffers (const Array< Complex > &griddedData, const Matrix< Double > &sumwt) |
virtual void | GridToData (VBStore &vbs, const Array< Complex > &griddedData) |
virtual void | ComputeResiduals (VBStore &vbs) |
virtual void GridToData(VBStore& vbs, Array<Complex>& griddedData); | |
Private Member Functions | |
template<class T > | |
void | DataToGridImpl_p (Array< T > &griddedData, VBStore &vb, Matrix< Double > &sumwt, const Bool &dopsf, Bool useConjFreqCF=False) |
----------------------------Private parts------------------------------------- | |
void | allocateBuffers (Bool newDataBuffers=True) |
template <class t>=""> void GatherGrids_p(const Array<T>& griddedData, const Matrix<Double>& sumwt); | |
void | makeInfrastructureContainers () |
Double | allocateDataBuffers () |
void | startThreads () |
void | scatter (Matrix< VBStore > &vbsStores, const VBStore &vbs) |
Private Attributes | |
Int | nelements_p |
Bool | doublePrecision_p |
Vector< CountedPtr < VisibilityResamplerBase > > | resamplers_p |
Vector< CountedPtr< Array < DComplex > > > | doubleGriddedData_p |
Vector< CountedPtr< Array < Complex > > > | singleGriddedData_p |
Vector< CountedPtr< Matrix < Double > > > | sumwt_p |
Vector< CountedPtr < ResamplerWorklet > > | gridderWorklets_p |
Matrix< VBStore > | vbsVec_p |
Vector<VBStore> vbsVec_p;. | |
CountedPtr< ThreadCoordinator < Int > > | threadClerk_p |
Bool | threadStarted_p |
casa::utilj::DeltaThreadTimes | tSetupG |
casa::utilj::DeltaThreadTimes | tSendDataG |
casa::utilj::DeltaThreadTimes | tWaitForWorkG |
casa::utilj::DeltaThreadTimes | tOutsideG |
casa::utilj::DeltaThreadTimes | tSetupDG |
casa::utilj::DeltaThreadTimes | tSendDataDG |
casa::utilj::DeltaThreadTimes | tWaitForWorkDG |
casa::utilj::DeltaThreadTimes | tOutsideDG |
casa::utilj::ThreadTimes | t4G_p |
casa::utilj::ThreadTimes | t4DG_p |
CountedPtr < VisibilityResamplerBase > | visResamplerCtor_p |
async::Mutex *mutexForResamplers_p; | |
Int | whoLoadedVB_p |
Int | currentVBS_p |
Definition at line 48 of file MultiThreadedVisResampler.h.
enum VBLoader {NOONE=-1, DATATOGRID=0, GRIDTODATA, RESIDUALCALC};
nelements_p=DEFAULTNOOFCORES;
Definition at line 52 of file MultiThreadedVisResampler.h.
References FTMachineNumThreadsEnvVar, casa::SynthesisUtils::getenv(), and nelements_p.
Referenced by clone().
casa::MultiThreadedVisibilityResampler::MultiThreadedVisibilityResampler | ( | const Bool & | doublePrecision, |
const Int & | n = DEFAULTNOOFCORES |
||
) |
casa::MultiThreadedVisibilityResampler::MultiThreadedVisibilityResampler | ( | const Bool & | doublePrecision, |
CountedPtr< VisibilityResamplerBase > & | visResampler, | ||
const Int & | n = DEFAULTNOOFCORES |
||
) |
virtual casa::MultiThreadedVisibilityResampler::~MultiThreadedVisibilityResampler | ( | ) | [inline, virtual] |
Definition at line 68 of file MultiThreadedVisResampler.h.
References cleanup(), currentVBS_p, and nelements_p.
casa::MultiThreadedVisibilityResampler::MultiThreadedVisibilityResampler | ( | const MultiThreadedVisibilityResampler & | other | ) | [inline] |
Definition at line 75 of file MultiThreadedVisResampler.h.
References copy().
void casa::MultiThreadedVisibilityResampler::allocateBuffers | ( | Bool | newDataBuffers = True | ) | [private] |
template <class t>=""> void GatherGrids_p(const Array<T>& griddedData, const Matrix<Double>& sumwt);
template <class t>=""> void initializeBuffers(const Array<T>& griddedData, const Matrix<Double>& sumwt);
Referenced by clone().
Referenced by ~MultiThreadedVisibilityResampler().
MultiThreadedVisibilityResampler* casa::MultiThreadedVisibilityResampler::clone | ( | ) | [inline, virtual] |
This version will make a clone with shared data buffers (the complex grids and the sum-of-weights arrays).
Allocate a new instance, and copy the internals.
Now reset the data buffers with independent buffers (arrays of size 0)
Implements casa::VisibilityResamplerBase.
Definition at line 79 of file MultiThreadedVisResampler.h.
References allocateDataBuffers(), and MultiThreadedVisibilityResampler().
virtual void casa::MultiThreadedVisibilityResampler::ComputeResiduals | ( | VBStore & | vbs | ) | [virtual] |
virtual void GridToData(VBStore& vbs, Array<Complex>& griddedData);
Implements casa::VisibilityResamplerBase.
void casa::MultiThreadedVisibilityResampler::copy | ( | const MultiThreadedVisibilityResampler & | other | ) |
Referenced by MultiThreadedVisibilityResampler().
virtual void casa::MultiThreadedVisibilityResampler::DataToGrid | ( | Array< DComplex > & | griddedData, |
VBStore & | vbs, | ||
Matrix< Double > & | sumwt, | ||
const Bool & | dopsf, | ||
Bool | = False |
||
) | [inline, virtual] |
Re-sample the griddedData on the VisBuffer (a.k.a gridding).
In this class, these just call the private templated version. The first variant grids onto a double precision grid while the second one does it on a single precision grid.
Implements casa::VisibilityResamplerBase.
Definition at line 115 of file MultiThreadedVisResampler.h.
References DataToGridImpl_p().
virtual void casa::MultiThreadedVisibilityResampler::DataToGrid | ( | Array< Complex > & | griddedData, |
VBStore & | vbs, | ||
Matrix< Double > & | sumwt, | ||
const Bool & | dopsf, | ||
Bool | = False |
||
) | [inline, virtual] |
Implements casa::VisibilityResamplerBase.
Definition at line 121 of file MultiThreadedVisResampler.h.
References DataToGridImpl_p().
void casa::MultiThreadedVisibilityResampler::DataToGridImpl_p | ( | Array< T > & | griddedData, |
VBStore & | vb, | ||
Matrix< Double > & | sumwt, | ||
const Bool & | dopsf, | ||
Bool | useConjFreqCF = False |
||
) | [private] |
Referenced by DataToGrid().
void casa::MultiThreadedVisibilityResampler::GatherGrids | ( | Array< DComplex > & | griddedData, |
Matrix< Double > & | sumwt | ||
) | [virtual] |
This is the gather operation on griddedData for nelements > 1.
Implements casa::VisibilityResamplerBase.
void casa::MultiThreadedVisibilityResampler::GatherGrids | ( | Array< Complex > & | griddedData, |
Matrix< Double > & | sumwt | ||
) | [virtual] |
Implements casa::VisibilityResamplerBase.
virtual void casa::MultiThreadedVisibilityResampler::GridToData | ( | VBStore & | vbs, |
const Array< Complex > & | griddedData | ||
) | [virtual] |
Re-sample VisBuffer to a regular grid (griddedData) (a.k.a. de-gridding)
Implements casa::VisibilityResamplerBase.
void casa::MultiThreadedVisibilityResampler::init | ( | const Bool & | doublePrecision | ) | [virtual] |
Forward looking genealogical baggage -- required for the MultiThreadedVisibilityResampler.
Implements casa::VisibilityResamplerBase.
void casa::MultiThreadedVisibilityResampler::initializePutBuffers | ( | const Array< DComplex > & | griddedData, |
const Matrix< Double > & | sumwt | ||
) | [virtual] |
Implements casa::VisibilityResamplerBase.
void casa::MultiThreadedVisibilityResampler::initializePutBuffers | ( | const Array< Complex > & | griddedData, |
const Matrix< Double > & | sumwt | ||
) | [virtual] |
Implements casa::VisibilityResamplerBase.
void casa::MultiThreadedVisibilityResampler::makeInfrastructureContainers | ( | ) | [private] |
virtual Int casa::MultiThreadedVisibilityResampler::nelements | ( | ) | [inline, virtual] |
Definition at line 96 of file MultiThreadedVisResampler.h.
References nelements_p.
MultiThreadedVisibilityResampler& casa::MultiThreadedVisibilityResampler::operator= | ( | const MultiThreadedVisibilityResampler & | other | ) |
void casa::MultiThreadedVisibilityResampler::releaseBuffers | ( | ) | [virtual] |
Implements casa::VisibilityResamplerBase.
void casa::MultiThreadedVisibilityResampler::scatter | ( | Matrix< VBStore > & | vbsStores, |
const VBStore & | vbs | ||
) | [private] |
virtual void casa::MultiThreadedVisibilityResampler::setCFMaps | ( | const Vector< Int > & | cfMap, |
const Vector< Int > & | conjCFMap | ||
) | [virtual] |
Implements casa::VisibilityResamplerBase.
virtual void casa::MultiThreadedVisibilityResampler::setConvFunc | ( | const CFStore & | cfs | ) | [virtual] |
Implements casa::VisibilityResamplerBase.
virtual void casa::MultiThreadedVisibilityResampler::setFreqMaps | ( | const Matrix< Double > & | spwChanFreqs, |
const Matrix< Double > & | spwChanConjFreqs | ||
) | [virtual] |
Implements casa::VisibilityResamplerBase.
virtual void casa::MultiThreadedVisibilityResampler::setMaps | ( | const Vector< Int > & | chanMap, |
const Vector< Int > & | polMap | ||
) | [virtual] |
Implements casa::VisibilityResamplerBase.
virtual void casa::MultiThreadedVisibilityResampler::setParams | ( | const Vector< Double > & | uvwScale, |
const Vector< Double > & | offset, | ||
const Vector< Double > & | dphase | ||
) | [virtual] |
Implements casa::VisibilityResamplerBase.
void casa::MultiThreadedVisibilityResampler::startThreads | ( | ) | [private] |
Definition at line 189 of file MultiThreadedVisResampler.h.
Referenced by ~MultiThreadedVisibilityResampler().
Vector<CountedPtr<Array<DComplex> > > casa::MultiThreadedVisibilityResampler::doubleGriddedData_p [private] |
Definition at line 174 of file MultiThreadedVisResampler.h.
Definition at line 172 of file MultiThreadedVisResampler.h.
Vector<CountedPtr<ResamplerWorklet> > casa::MultiThreadedVisibilityResampler::gridderWorklets_p [private] |
Definition at line 177 of file MultiThreadedVisResampler.h.
Definition at line 171 of file MultiThreadedVisResampler.h.
Referenced by MultiThreadedVisibilityResampler(), nelements(), and ~MultiThreadedVisibilityResampler().
Vector<CountedPtr<VisibilityResamplerBase> > casa::MultiThreadedVisibilityResampler::resamplers_p [private] |
Definition at line 173 of file MultiThreadedVisResampler.h.
Vector<CountedPtr<Array<Complex> > > casa::MultiThreadedVisibilityResampler::singleGriddedData_p [private] |
Definition at line 175 of file MultiThreadedVisResampler.h.
Vector<CountedPtr<Matrix<Double> > > casa::MultiThreadedVisibilityResampler::sumwt_p [private] |
Definition at line 176 of file MultiThreadedVisResampler.h.
Definition at line 185 of file MultiThreadedVisResampler.h.
Definition at line 185 of file MultiThreadedVisResampler.h.
Definition at line 181 of file MultiThreadedVisResampler.h.
Definition at line 182 of file MultiThreadedVisResampler.h.
Definition at line 184 of file MultiThreadedVisResampler.h.
Definition at line 183 of file MultiThreadedVisResampler.h.
Definition at line 184 of file MultiThreadedVisResampler.h.
Definition at line 183 of file MultiThreadedVisResampler.h.
Definition at line 184 of file MultiThreadedVisResampler.h.
Definition at line 183 of file MultiThreadedVisResampler.h.
Definition at line 184 of file MultiThreadedVisResampler.h.
Definition at line 183 of file MultiThreadedVisResampler.h.
Vector<VBStore> vbsVec_p;.
Definition at line 179 of file MultiThreadedVisResampler.h.
CountedPtr<VisibilityResamplerBase> casa::MultiThreadedVisibilityResampler::visResamplerCtor_p [private] |
async::Mutex *mutexForResamplers_p;
Definition at line 187 of file MultiThreadedVisResampler.h.
Definition at line 188 of file MultiThreadedVisResampler.h.