isce3
0.25.0
Loading...
Searching...
No Matches
cxx
isce3
cuda
matchtemplate
pycuampcor
cuCorrNormalizer.h
1
/*
2
* @file cuNormalizer.h
3
* @brief normalize the correlation surface
4
*
5
* cuNormalizeProcessor is an abstract class for processors to normalize the correlation surface.
6
* It has different implementations wrt different image sizes.
7
* cuNormalizeFixed<64/128/.../1024> use a shared memory accelerated algorithm, which are limited by the number of cuda threads in a block.
8
* cuNormalizeSAT uses the sum area table based algorithm, which applies to any size (used for >1024).
9
* cuNormalizer is a wrapper class which determines which processor to use.
10
*/
11
12
#ifndef __CUNORMALIZER_H
13
#define __CUNORMALIZER_H
14
15
#include "
cuArrays.h
"
16
#include "
cudaUtil.h
"
17
22
class
cuNormalizeProcessor {
23
public
:
24
// default constructor and destructor
25
cuNormalizeProcessor() {}
26
~cuNormalizeProcessor() {}
27
// execute interface
28
virtual
void
execute(
cuArrays<float>
* correlation,
cuArrays<float>
*reference,
cuArrays<float>
*secondary, cudaStream_t stream) = 0;
29
};
30
31
class
cuNormalizer {
32
private
:
33
cuNormalizeProcessor
*processor;
34
public
:
35
// disable the default constructor
36
cuNormalizer() =
delete
;
37
// constructor with the secondary dimension
38
cuNormalizer(
int
secondaryNX,
int
secondaryNY,
int
count);
39
// destructor
40
~cuNormalizer();
41
// execute correlation surface normalization
42
void
execute(
cuArrays<float>
*correlation,
cuArrays<float>
*reference,
cuArrays<float>
*secondary,
43
cudaStream_t stream);
44
};
45
46
47
template
<
int
Size>
48
class
cuNormalizeFixed
:
public
cuNormalizeProcessor
49
{
50
public
:
51
void
execute(
cuArrays<float>
* correlation,
cuArrays<float>
*reference,
cuArrays<float>
*search, cudaStream_t stream)
override
;
52
};
53
54
class
cuNormalizeSAT :
public
cuNormalizeProcessor
55
{
56
private
:
57
cuArrays<float>
*referenceSum2;
58
cuArrays<float>
*secondarySAT;
59
cuArrays<float>
*secondarySAT2;
60
61
public
:
62
cuNormalizeSAT(
int
secondaryNX,
int
secondaryNY,
int
count);
63
~cuNormalizeSAT();
64
void
execute(
cuArrays<float>
* correlation,
cuArrays<float>
*reference,
cuArrays<float>
*search, cudaStream_t stream)
override
;
65
};
66
67
#endif
68
// end of file
cuArrays
Definition
cuArrays.h:25
cuNormalizeFixed
Definition
cuCorrNormalizer.h:49
cuNormalizeProcessor
Abstract class interface for correlation surface normalization processor with different implementatio...
Definition
cuCorrNormalizer.h:22
cuArrays.h
Header file for cuArrays class.
cudaUtil.h
Various cuda related parameters and utilities.
Generated for ISCE3.0 by
1.13.2.