/* * cuAmpcorChunk.h * Purpose: a group of chips processed at the same time */ #ifndef __CUAMPCORCHUNK_H #define __CUAMPCORCHUNK_H #include "SlcImage.h" #include "cuArrays.h" #include "cuAmpcorParameter.h" #include "cuOverSampler.h" #include "cuSincOverSampler.h" #include "cuCorrFrequency.h" class cuAmpcorChunk{ private: int idxChunkDown; int idxChunkAcross; int idxChunk; int nWindowsDown; int nWindowsAcross; int devId; cudaStream_t stream; SlcImage *masterImage; SlcImage *slaveImage; cuAmpcorParameter *param; cuArrays *offsetImage; cuArrays *snrImage; cuArrays * c_masterChunkRaw, * c_slaveChunkRaw; cuArrays * c_masterBatchRaw, * c_slaveBatchRaw, * c_slaveBatchZoomIn; cuArrays * r_masterBatchRaw, * r_slaveBatchRaw; cuArrays * c_masterBatchOverSampled, * c_slaveBatchOverSampled; cuArrays * r_masterBatchOverSampled, * r_slaveBatchOverSampled; cuArrays * r_corrBatchRaw, * r_corrBatchZoomIn, * r_corrBatchZoomInOverSampled, * r_corrBatchZoomInAdjust; cuArrays *ChunkOffsetDown, *ChunkOffsetAcross; cuOverSamplerC2C *masterBatchOverSampler, *slaveBatchOverSampler; cuOverSamplerR2R *corrOverSampler; cuSincOverSamplerR2R *corrSincOverSampler; //for frequency domain cuFreqCorrelator *cuCorrFreqDomain, *cuCorrFreqDomain_OverSampled; cuArrays *offsetInit; cuArrays *offsetZoomIn; cuArrays *offsetFinal; //corr statistics cuArrays *i_maxloc; cuArrays *r_maxval; cuArrays *r_corrBatchSum; cuArrays *i_corrBatchZoomInValid, *i_corrBatchValidCount; cuArrays *corrMaxValue; cuArrays *r_snrValue; public: cuAmpcorChunk() {} //cuAmpcorChunk(cuAmpcorParameter *param_, SlcImage *master_, SlcImage *slave_); void setIndex(int idxDown_, int idxAcross_); cuAmpcorChunk(cuAmpcorParameter *param_, SlcImage *master_, SlcImage *slave_, cuArrays *offsetImage_, cuArrays *snrImage_, cudaStream_t stream_); void loadMasterChunk(); void loadSlaveChunk(); void getRelativeOffset(int *rStartPixel, const int *oStartPixel, int diff); ~cuAmpcorChunk(); void run(int, int); }; #endif