isce3 0.25.0
Loading...
Searching...
No Matches
gpuLooks.h
1#pragma once
2
3#include "forward.h"
4
5#include <valarray>
6#include <thrust/complex.h>
7#include <isce3/core/Common.h>
8
9namespace isce3::cuda::signal {
10
11template<class T>
12class gpuLooks {
13 public:
14 gpuLooks() {};
15 ~gpuLooks() {};
16
18 void multilook(std::valarray<T> &input,
19 std::valarray<T> &output);
20
21 void multilook(std::valarray<std::complex<T>> &input,
22 std::valarray<std::complex<T>> &output);
23
25 void multilook(std::valarray<T> &input,
26 std::valarray<T> &output,
27 std::valarray<T> &weights);
28
30 void multilook(std::valarray<T> &input,
31 std::valarray<T> &output,
32 T noDataValue);
33 void multilook(std::valarray<std::complex<T>> &input,
34 std::valarray<std::complex<T>> &output,
35 std::complex<T> noDataValue);
36
38 void multilook(std::valarray<std::complex<T>> &input,
39 std::valarray<T> &output,
40 int p);
41
42 void nrows(size_t n) { _nrows = n; };
43 void ncols(size_t n) { _ncols = n; };
44 void nrowsLooked(size_t n) { _nrowsLooked = n; };
45 void ncolsLooked(size_t n) { _ncolsLooked = n; };
46 void rowsLooks(size_t n) { _rowsLooks = n; };
47 void colsLooks(size_t n) { _colsLooks = n; };
48 size_t nrows() { return _nrows; };
49 size_t ncols() { return _ncols; };
50 size_t nrowsLooked() { return _nrowsLooked; };
51 size_t ncolsLooked() { return _ncolsLooked; };
52 size_t rowsLooks() { return _rowsLooks; };
53 size_t colsLooks() { return _colsLooks; };
54
55 private:
56 // number of rows before multilooking/downsampling
57 size_t _nrows;
58
59 // number of columns before multilooking/downsampling
60 size_t _ncols;
61
62 // number of rows after multilooking/downsampling
63 size_t _nrowsLooked;
64
65 // number of columns after multilooking/downsampling
66 size_t _ncolsLooked;
67
68 // number of looks in range direction (columns) i.e. downsampling factor in range
69 size_t _colsLooks;
70
71 // numbe of looks in azimuth direction (rows) i.e. downsampling factor in azimuth
72 size_t _rowsLooks;
73
74};
75
76template<class T>
77CUDA_GLOBAL void multilooks_g(T *lo_res,
78 const T* __restrict__ hi_res,
79 size_t n_cols_hi,
80 size_t n_cols_lo,
81 int row_resize,
82 int col_resize,
83 size_t sz_lo,
84 T blk_sz);
85
86template<class T>
87CUDA_GLOBAL void multilooks_g(thrust::complex<T> *lo_res,
88 const thrust::complex<T>* __restrict__ hi_res,
89 size_t n_cols_hi,
90 size_t n_cols_lo,
91 int row_resize,
92 int col_resize,
93 size_t sz_lo,
94 T blk_sz);
95
96template<class T>
97CUDA_GLOBAL void multilooks_no_data_g(T *lo_res,
98 const T* __restrict__ hi_res,
99 T no_data_value,
100 size_t n_cols_hi,
101 size_t n_cols_lo,
102 int row_resize,
103 int col_resize,
104 size_t sz_lo,
105 T blk_sz);
106
107template<class T>
108CUDA_GLOBAL void multilooks_no_data_g(thrust::complex<T> *lo_res,
109 const thrust::complex<T>* __restrict__ hi_res,
110 thrust::complex<T> no_data_value,
111 size_t n_cols_hi,
112 size_t n_cols_lo,
113 int row_resize,
114 int col_resize,
115 size_t sz_lo,
116 T blk_sz);
117
118template<class T>
119CUDA_GLOBAL void multilooks_weighted_g(T *lo_res,
120 const T* __restrict__ hi_res,
121 const T* __restrict__ weights,
122 size_t n_cols_hi,
123 size_t n_cols_lo,
124 int row_resize,
125 int col_resize,
126 size_t sz_lo);
127
128template<class T>
129CUDA_GLOBAL void multilooks_power_g(T *lo_res,
130 const thrust::complex<T>* __restrict__ hi_res,
131 int power,
132 size_t n_cols_hi,
133 size_t n_cols_lo,
134 int row_resize,
135 int col_resize,
136 size_t sz_lo,
137 T blk_sz);
138
139} // namespace isce3::cuda::signal
void multilook(std::valarray< T > &input, std::valarray< T > &output)
Multi-looking an array of real data.
Definition gpuLooks.cu:15
Definition GDALDataTypeUtil.h:10

Generated for ISCE3.0 by doxygen 1.13.2.