X-Git-Url: http://git.euphorik.ch/?p=GPU.git;a=blobdiff_plain;f=WCudaMSE%2FStudent_Cuda_Image%2Fsrc%2Fcpp%2Fcore%2F06_Convolution%2Fmoo%2Fdevice%2FConvolutionDevice.h;fp=WCudaMSE%2FStudent_Cuda_Image%2Fsrc%2Fcpp%2Fcore%2F06_Convolution%2Fmoo%2Fdevice%2FConvolutionDevice.h;h=957015bded4cc0fbba10b9849ff416717660105b;hp=70446441ea7f9ef371af4d5852d75a5bf62f03bb;hb=52f4366920a116060ee62b84a2ed8b42f3c2d382;hpb=4182eb3a07b7143afb8ebebfe77e8ef8e8abc266 diff --git a/WCudaMSE/Student_Cuda_Image/src/cpp/core/06_Convolution/moo/device/ConvolutionDevice.h b/WCudaMSE/Student_Cuda_Image/src/cpp/core/06_Convolution/moo/device/ConvolutionDevice.h index 7044644..957015b 100644 --- a/WCudaMSE/Student_Cuda_Image/src/cpp/core/06_Convolution/moo/device/ConvolutionDevice.h +++ b/WCudaMSE/Student_Cuda_Image/src/cpp/core/06_Convolution/moo/device/ConvolutionDevice.h @@ -1,7 +1,31 @@ #ifndef CONVOLUTION_DEVICE_H #define CONVOLUTION_DEVICE_H +#include "ConstantMemoryLink.h" + +const int KERNEL_SIZE = 9; + +/** + * Accès à la mémoire constante. + */ +ConstantMemoryLink constantMemoryKernelLink(); + +/** + * Associe l'image source en tant que texture. + */ +void bindSouceAsTexture(uchar4* source, int w, int h); +void unbindSouceAsTexture(); + +/** + * Transforme l'image fournit en niveau de gris. + */ +__global__ +void toGrayscale(uchar4* ptrDevPixels, int w, int h); + +/** + * Convolution de l'image source 'textureImageSource' vers 'ptrDevOutput'. + */ __global__ -void convolution(uchar4* ptrDevPixels, int w, int h, float t); +void convolution(uchar4* ptrDevOutput, int w, int h); #endif