Début du TP convolution. Pour l'instant uniquement lecture d'une vidéo.
[GPU.git] / WCudaMSE / Student_Cuda_Image / src / cpp / core / 06_Convolution / moo / host / Convolution.h
diff --git a/WCudaMSE/Student_Cuda_Image/src/cpp/core/06_Convolution/moo/host/Convolution.h b/WCudaMSE/Student_Cuda_Image/src/cpp/core/06_Convolution/moo/host/Convolution.h
new file mode 100644 (file)
index 0000000..e67adc2
--- /dev/null
@@ -0,0 +1,39 @@
+#ifndef CONVOLUTION_H
+#define CONVOLUTION_H
+
+#include "cudaTools.h"
+#include "Animable_I.h"
+#include "MathTools.h"
+#include "AleaTools.h"
+
+class Convolution : public Animable_I
+    {
+    public:
+        Convolution(int w, int h);
+        ~Convolution();
+
+        void runGPU(uchar4* ptrDevPixels) /*override*/;
+        void animationStep() /*override*/;
+
+        int getW() /*override*/;
+        int getH() /*override*/;
+
+        float getT() /*override*/;
+
+        std::string getTitle(void) /*override*/;
+
+    private:
+        float t;
+
+        const int w;
+        const int h;
+
+        const dim3 dg;
+        const dim3 db;
+
+        const std::string title;
+
+        static const float kernel[9][9];
+    };
+
+#endif