Fin du TP convolution. (Constant memory + Texture).
[GPU.git] / WCudaMSE / Student_Cuda_Image / src / cpp / core / 06_Convolution / moo / host / Convolution.h
1 #ifndef CONVOLUTION_H
2 #define CONVOLUTION_H
3
4 #include "cudaTools.h"
5 #include "Animable_I.h"
6 #include "MathTools.h"
7 #include "AleaTools.h"
8
9 #include "ConvolutionDevice.h"
10
11 class Convolution : public Animable_I
12 {
13 public:
14 Convolution(int w, int h);
15 ~Convolution();
16
17 void runGPU(uchar4* ptrDevPixels) /*override*/;
18 void animationStep() /*override*/;
19
20 int getW() /*override*/;
21 int getH() /*override*/;
22 float getT() /*override*/;
23
24 std::string getTitle(void) /*override*/;
25
26 private:
27 float t;
28
29 const int w;
30 const int h;
31
32 const dim3 dg;
33 const dim3 db;
34
35 const std::string title;
36
37 uchar4* ptrDevImageSource;
38
39 static const float kernel[KERNEL_SIZE][KERNEL_SIZE];
40 };
41
42 #endif