Fin du TP convolution. (Constant memory + Texture).
[GPU.git] / WCudaMSE / Student_Cuda_Image / src / cpp / core / 06_Convolution / moo / device / ConvolutionDevice.h
1 #ifndef CONVOLUTION_DEVICE_H
2 #define CONVOLUTION_DEVICE_H
3
4 #include "ConstantMemoryLink.h"
5
6 const int KERNEL_SIZE = 9;
7
8 /**
9 * Accès à la mémoire constante.
10 */
11 ConstantMemoryLink constantMemoryKernelLink();
12
13 /**
14 * Associe l'image source en tant que texture.
15 */
16 void bindSouceAsTexture(uchar4* source, int w, int h);
17 void unbindSouceAsTexture();
18
19 /**
20 * Transforme l'image fournit en niveau de gris.
21 */
22 __global__
23 void toGrayscale(uchar4* ptrDevPixels, int w, int h);
24
25 /**
26 * Convolution de l'image source 'textureImageSource' vers 'ptrDevOutput'.
27 */
28 __global__
29 void convolution(uchar4* ptrDevOutput, int w, int h);
30
31 #endif