Fin du TP convolution. (Constant memory + Texture).
[GPU.git] / WCudaMSE / Student_Cuda_Image / src / cpp / core / 06_Convolution / moo / device / ConvolutionDevice.h
index 7044644..957015b 100644 (file)
@@ -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