isce3 0.25.0
Loading...
Searching...
No Matches
cuAmpcorUtil.h
1/*
2 * @file cuAmpcorUtil.h
3 * @brief Header file to include various routines for cuAmpcor
4 *
5 *
6 */
7
8// code guard
9#ifndef __CUAMPCORUTIL_H
10#define __CUAMPCORUTIL_H
11
12#include "cuArrays.h"
13#include "cuAmpcorParameter.h"
14#include "cudaError.h"
15#include "debug.h"
16#include "cudaUtil.h"
17#include "float2.h"
18
19
20//in cuArraysCopy.cu: various utilities for copy images file in gpu memory
21void cuArraysCopyToBatch(cuArrays<float2> *image1, cuArrays<float2> *image2, int strideH, int strideW, cudaStream_t stream);
22void cuArraysCopyToBatchWithOffset(cuArrays<float2> *image1, const int lda1, cuArrays<float2> *image2,
23 const int *offsetH, const int* offsetW, cudaStream_t stream);
24void cuArraysCopyToBatchAbsWithOffset(cuArrays<float2> *image1, const int lda1, cuArrays<float2> *image2,
25 const int *offsetH, const int* offsetW, cudaStream_t stream);
26void cuArraysCopyToBatchWithOffsetR2C(cuArrays<float> *image1, const int lda1, cuArrays<float2> *image2,
27 const int *offsetH, const int* offsetW, cudaStream_t stream);
28void cuArraysCopyC2R(cuArrays<float2> *image1, cuArrays<float> *image2, int strideH, int strideW, cudaStream_t stream);
29
30// same routine name overloaded for different data type
31// extract data from a large image
32template<typename T>
33void cuArraysCopyExtract(cuArrays<T> *imagesIn, cuArrays<T> *imagesOut, cuArrays<int2> *offset, cudaStream_t);
34template<typename T_in, typename T_out>
35void cuArraysCopyExtract(cuArrays<T_in> *imagesIn, cuArrays<T_out> *imagesOut, int2 offset, cudaStream_t);
36
37template<typename T>
38void cuArraysCopyInsert(cuArrays<T> *in, cuArrays<T> *out, int offsetX, int offsetY, cudaStream_t);
39
40template<typename T_in, typename T_out>
41void cuArraysCopyPadded(cuArrays<T_in> *imageIn, cuArrays<T_out> *imageOut,cudaStream_t stream);
42void cuArraysSetConstant(cuArrays<float> *imageIn, float value, cudaStream_t stream);
43
44void cuArraysR2C(cuArrays<float> *image1, cuArrays<float2> *image2, cudaStream_t stream);
45void cuArraysC2R(cuArrays<float2> *image1, cuArrays<float> *image2, cudaStream_t stream);
46void cuArraysAbs(cuArrays<float2> *image1, cuArrays<float> *image2, cudaStream_t stream);
47
48// cuDeramp.cu: deramping phase
49void cuDeramp(int method, cuArrays<float2> *images, cudaStream_t stream);
50void cuDerampMethod1(cuArrays<float2> *images, cudaStream_t stream);
51
52// cuArraysPadding.cu: various utilities for oversampling padding
53void cuArraysPadding(cuArrays<float2> *image1, cuArrays<float2> *image2, cudaStream_t stream);
54void cuArraysPaddingMany(cuArrays<float2> *image1, cuArrays<float2> *image2, cudaStream_t stream);
55
56//in cuCorrNormalization.cu: utilities to normalize the cross correlation function
57void cuArraysSubtractMean(cuArrays<float> *images, cudaStream_t stream);
58void cuCorrNormalize(cuArrays<float> *templates, cuArrays<float> *images, cuArrays<float> *results, cudaStream_t stream);
59
60template<int Size>
61void cuCorrNormalizeFixed(cuArrays<float> *correlation, cuArrays<float> *reference, cuArrays<float> *secondary, cudaStream_t stream);
62
63// in cuCorrNormalizationSAT.cu: to normalize the cross correlation function with sum area table
64void cuCorrNormalizeSAT(cuArrays<float> *correlation, cuArrays<float> *reference, cuArrays<float> *secondary,
65 cuArrays<float> * referenceSum2, cuArrays<float> *secondarySAT, cuArrays<float> *secondarySAT2, cudaStream_t stream);
66
67//in cuOffset.cu: utitilies for determining the max location of cross correlations or the offset
68void cuArraysMaxloc2D(cuArrays<float> *images, cuArrays<int2> *maxloc, cuArrays<float> *maxval, cudaStream_t stream);
69void cuArraysMaxloc2D(cuArrays<float> *images, cuArrays<int2> *maxloc, cudaStream_t stream);
70void cuSubPixelOffset(cuArrays<int2> *offsetInit, cuArrays<int2> *offsetZoomIn, cuArrays<float2> *offsetFinal,
71 int OverSampleRatioZoomin, int OverSampleRatioRaw,
72 int xHalfRangeInit, int yHalfRangeInit,
73 cudaStream_t stream);
74
75void cuDetermineSecondaryExtractOffset(cuArrays<int2> *maxLoc, cuArrays<int2> *maxLocShift,
76 int xOldRange, int yOldRange, int xNewRange, int yNewRange, cudaStream_t stream);
77
78//in cuCorrTimeDomain.cu: cross correlation in time domain
79void cuCorrTimeDomain(cuArrays<float> *templates, cuArrays<float> *images, cuArrays<float> *results, cudaStream_t stream);
80
81//in cuCorrFrequency.cu: cross correlation in freq domain, also include fft correlatior class
82void cuArraysElementMultiply(cuArrays<float2> *image1, cuArrays<float2> *image2, cudaStream_t stream);
83void cuArraysElementMultiplyConjugate(cuArrays<float2> *image1, cuArrays<float2> *image2, float coef, cudaStream_t stream);
84
85
86// For SNR estimation on Correlation surface (Minyan Zhong)
87// implemented in cuArraysCopy.cu
88void cuArraysCopyExtractCorr(cuArrays<float> *imagesIn, cuArrays<float> *imagesOut, cuArrays<int> *imagesValid, cuArrays<int2> *maxloc, cudaStream_t stream);
89// implemented in cuCorrNormalization.cu
90void cuArraysSumCorr(cuArrays<float> *images, cuArrays<int> *imagesValid, cuArrays<float> *imagesSum, cuArrays<int> *imagesValidCount, cudaStream_t stream);
91
92// implemented in cuEstimateStats.cu
93void cuEstimateSnr(cuArrays<float> *corrSum, cuArrays<int> *corrValidCount, cuArrays<float> *maxval, cuArrays<float> *snrValue, cudaStream_t stream);
94
95// implemented in cuEstimateStats.cu
96void cuEstimateVariance(cuArrays<float> *corrBatchRaw, cuArrays<int2> *maxloc, cuArrays<float> *maxval, int templateSize, cuArrays<float3> *covValue, cudaStream_t stream);
97
98#endif
99
100// end of file
Definition cuArrays.h:25
Define error checking in cuda calls.
A class holds cuAmpcor process parameters.
Header file for cuArrays class.
Various cuda related parameters and utilities.
Define flags to control the debugging.

Generated for ISCE3.0 by doxygen 1.13.2.