LSSTApplications  10.0+286,10.0+36,10.0+46,10.0-2-g4f67435,10.1+152,10.1+37,11.0,11.0+1,11.0-1-g47edd16,11.0-1-g60db491,11.0-1-g7418c06,11.0-2-g04d2804,11.0-2-g68503cd,11.0-2-g818369d,11.0-2-gb8b8ce7
LSSTDataManagementBasePackage
convCUDA.h
Go to the documentation of this file.
1 // -*- LSST-C++ -*-
2 
3 /*
4  * LSST Data Management System
5  * Copyright 2008, 2009, 2010 LSST Corporation.
6  *
7  * This product includes software developed by the
8  * LSST Project (http://www.lsst.org/).
9  *
10  * This program is free software: you can redistribute it and/or modify
11  * it under the terms of the GNU General Public License as published by
12  * the Free Software Foundation, either version 3 of the License, or
13  * (at your option) any later version.
14  *
15  * This program is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18  * GNU General Public License for more details.
19  *
20  * You should have received a copy of the LSST License Statement and
21  * the GNU General Public License along with this program. If not,
22  * see <http://www.lsstcorp.org/LegalNotices/>.
23  */
24 
39 namespace lsst {
40 namespace afw {
41 namespace math {
42 namespace detail {
43 
46 typedef double KerPixel;
47 
48 namespace gpu {
49 
50 const int maxGpuSfCount=100;
51 
52 #ifdef GPU_BUILD
53 
54 // image block size per GPU block. (The size of the image that one GPU block processes)
55 #define blockSizeX 32
56 #define blockSizeY 16
57 
58 template <typename T>
59 void CallTestGpuKernel(T* ret);
60 
61 void Call_ChebyshevImageValues(
62  double* out, int outW, int outH,
63  int order,
64  double* params,
65  double* rowPos,
66  double* colPos,
67  double minX, double minY, double maxX, double maxY,
68  int sharedMemorySize
69 );
70 
71 void Call_PolynomialImageValues(
72  double* out, int outW, int outH,
73  int order,
74  double* params,
75  double* rowPos,
76  double* colPos,
77  int sharedMemorySize
78 );
79 
80 void Call_NormalizationImageValues(
81  double* out, int outW, int outH,
82  double** sFn, int n,
83  double* kernelSum,
84  bool* isDivideByZeroGPU,
85  int blockN,
86  int sharedMemorySize
87 );
88 
89 template <typename OutPixelT, typename InPixelT>
90 void Call_SpatiallyInvariantImageConvolutionKernel(
91  InPixelT* inImageGPU, int inImageWidth, int inImageHeight,
92  KerPixel* allKernelsGPU, int kernelTotalN,
93  int kernelW, int kernelH,
94  OutPixelT* outImageGPU[],
95  int blockN,
96  int sharedMemorySize
97 );
98 
99 void Call_SpatiallyInvariantMaskConvolutionKernel(
100  MskPixel* inImageGPU, int inImageWidth, int inImageHeight,
101  KerPixel* allKernelsGPU, int kernelTotalN,
102  int kernelW, int kernelH,
103  MskPixel* outImageGPU[],
104  int blockN,
105  int sharedMemorySize
106 );
107 
108 template <typename OutPixelT, typename InPixelT>
109 void Call_ConvolutionKernel_LC_Img(
110  InPixelT* inImageGPU, int inImageWidth, int inImageHeight,
111  KerPixel* kernelGPU, int kernelTotalN,
112  int kernelW, int kernelH,
113  double* sfValGPU[],
114  double* normGPU,
115  OutPixelT* outImageGPU,
116  int blockN,
117  int sharedMemorySize
118 );
119 
120 void Call_ConvolutionKernel_LC_Var(
121  VarPixel* inImageGPU, int inImageWidth, int inImageHeight,
122  MskPixel* inMskGPU,
123  KerPixel* kernelGPU, int kernelTotalN,
124  int kernelW, int kernelH,
125  double* sfValGPU[],
126  double* normGPU,
127  VarPixel* outImageGPU,
128  MskPixel* outMskGPU,
129  int blockN,
130  int sharedMemorySize
131 );
132 
133 #endif //GPU_BUILD
134 
135 }
136 }
137 }
138 }
139 } //namespace lsst::afw::math::detail::gpu ends
140 
lsst::afw::image::MaskPixel MskPixel
Definition: CudaLanczos.h:49
boost::uint16_t MaskPixel
lsst::afw::image::VariancePixel VarPixel
Definition: CudaLanczos.h:48
lsst::afw::image::VariancePixel VarPixel
Definition: convCUDA.h:44
lsst::afw::image::MaskPixel MskPixel
Definition: convCUDA.h:45
float VariancePixel
! default type for Masks and MaskedImage Masks