casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Member Functions | Private Member Functions | Private Attributes
casa::MultiThreadedVisibilityResampler Class Reference

#include <MultiThreadedVisResampler.h>

Inheritance diagram for casa::MultiThreadedVisibilityResampler:
casa::VisibilityResamplerBase

List of all members.

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)
MultiThreadedVisibilityResamplerclone ()
 This version will make a clone with shared data buffers (the complex grids and the sum-of-weights arrays).
MultiThreadedVisibilityResampleroperator= (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< VBStorevbsVec_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

Detailed Description

Definition at line 48 of file MultiThreadedVisResampler.h.


Constructor & Destructor Documentation

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().

Definition at line 68 of file MultiThreadedVisResampler.h.

References cleanup(), currentVBS_p, and nelements_p.

Definition at line 75 of file MultiThreadedVisResampler.h.

References copy().


Member Function Documentation

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().

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 GridToData(VBStore& vbs, Array<Complex>& griddedData);

Implements casa::VisibilityResamplerBase.

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().

template<class T >
void casa::MultiThreadedVisibilityResampler::DataToGridImpl_p ( Array< T > &  griddedData,
VBStore vb,
Matrix< Double > &  sumwt,
const Bool dopsf,
Bool  useConjFreqCF = False 
) [private]


----------------------------Private parts-------------------------------------

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]
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]
void casa::MultiThreadedVisibilityResampler::initializePutBuffers ( const Array< Complex > &  griddedData,
const Matrix< Double > &  sumwt 
) [virtual]

Definition at line 96 of file MultiThreadedVisResampler.h.

References nelements_p.

MultiThreadedVisibilityResampler& casa::MultiThreadedVisibilityResampler::operator= ( const MultiThreadedVisibilityResampler other)
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]
virtual void casa::MultiThreadedVisibilityResampler::setConvFunc ( const CFStore cfs) [virtual]
virtual void casa::MultiThreadedVisibilityResampler::setFreqMaps ( const Matrix< Double > &  spwChanFreqs,
const Matrix< Double > &  spwChanConjFreqs 
) [virtual]
virtual void casa::MultiThreadedVisibilityResampler::setMaps ( const Vector< Int > &  chanMap,
const Vector< Int > &  polMap 
) [virtual]
virtual void casa::MultiThreadedVisibilityResampler::setParams ( const Vector< Double > &  uvwScale,
const Vector< Double > &  offset,
const Vector< Double > &  dphase 
) [virtual]

Member Data Documentation

Definition at line 189 of file MultiThreadedVisResampler.h.

Referenced by ~MultiThreadedVisibilityResampler().

Definition at line 174 of file MultiThreadedVisResampler.h.

Definition at line 172 of file MultiThreadedVisResampler.h.

Definition at line 177 of file MultiThreadedVisResampler.h.

Definition at line 173 of file MultiThreadedVisResampler.h.

Definition at line 175 of file MultiThreadedVisResampler.h.

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.

async::Mutex *mutexForResamplers_p;

Definition at line 187 of file MultiThreadedVisResampler.h.

Definition at line 188 of file MultiThreadedVisResampler.h.


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