/* * cuAmpcorChunk.h * Purpose: a group of chips processed at the same time */ #ifndef __CUAMPCORCHUNK_H #define __CUAMPCORCHUNK_H #include "GDALImage.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; GDALImage *masterImage; GDALImage *slaveImage; cuAmpcorParameter *param; cuArrays *offsetImage; cuArrays *snrImage; cuArrays *covImage; // added for test cuArrays *intImage1; cuArrays *floatImage1; // gpu buffer cuArrays * c_masterChunkRaw, * c_slaveChunkRaw; cuArrays * r_masterChunkRaw, * r_slaveChunkRaw; // gpu windows raw data cuArrays * c_masterBatchRaw, * c_slaveBatchRaw, * c_slaveBatchZoomIn; cuArrays * r_masterBatchRaw, * r_slaveBatchRaw; // gpu windows oversampled data 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; cuArrays *corrMaxValue; //SNR estimation cuArrays *r_corrBatchRawZoomIn; cuArrays *r_corrBatchSum; cuArrays *i_corrBatchZoomInValid, *i_corrBatchValidCount; cuArrays *r_snrValue; cuArrays *i_maxloc; cuArrays *r_maxval; // Varince estimation. cuArrays *r_covValue; public: cuAmpcorChunk() {} //cuAmpcorChunk(cuAmpcorParameter *param_, SlcImage *master_, SlcImage *slave_); void setIndex(int idxDown_, int idxAcross_); cuAmpcorChunk(cuAmpcorParameter *param_, GDALImage *master_, GDALImage *slave_, cuArrays *offsetImage_, cuArrays *snrImage_, cuArrays *covImage_, cuArrays *intImage1_, cuArrays *floatImage1_, cudaStream_t stream_); void loadMasterChunk(); void loadSlaveChunk(); void getRelativeOffset(int *rStartPixel, const int *oStartPixel, int diff); ~cuAmpcorChunk(); void run(int, int); }; #endif