/* * 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 *referenceImage; GDALImage *secondaryImage; cuAmpcorParameter *param; cuArrays *offsetImage; cuArrays *snrImage; cuArrays *covImage; // added for test cuArrays *intImage1; cuArrays *floatImage1; // gpu buffer cuArrays * c_referenceChunkRaw, * c_secondaryChunkRaw; cuArrays * r_referenceChunkRaw, * r_secondaryChunkRaw; // gpu windows raw data cuArrays * c_referenceBatchRaw, * c_secondaryBatchRaw, * c_secondaryBatchZoomIn; cuArrays * r_referenceBatchRaw, * r_secondaryBatchRaw; // gpu windows oversampled data cuArrays * c_referenceBatchOverSampled, * c_secondaryBatchOverSampled; cuArrays * r_referenceBatchOverSampled, * r_secondaryBatchOverSampled; cuArrays * r_corrBatchRaw, * r_corrBatchZoomIn, * r_corrBatchZoomInOverSampled, * r_corrBatchZoomInAdjust; cuArrays *ChunkOffsetDown, *ChunkOffsetAcross; cuOverSamplerC2C *referenceBatchOverSampler, *secondaryBatchOverSampler; 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 *reference_, SlcImage *secondary_); void setIndex(int idxDown_, int idxAcross_); cuAmpcorChunk(cuAmpcorParameter *param_, GDALImage *reference_, GDALImage *secondary_, cuArrays *offsetImage_, cuArrays *snrImage_, cuArrays *covImage_, cuArrays *intImage1_, cuArrays *floatImage1_, cudaStream_t stream_); void loadReferenceChunk(); void loadSecondaryChunk(); void getRelativeOffset(int *rStartPixel, const int *oStartPixel, int diff); ~cuAmpcorChunk(); void run(int, int); }; #endif