#ifndef IPROCESSSTRATEGY_H #define IPROCESSSTRATEGY_H #include #include #include "OpenCLHelper.h" #include "Utils.h" #include "ScenarioParams.h" #ifdef USE_DBL typedef double myflt; #else typedef float myflt; #endif using namespace cl; class IProcessStrategy : public QObject { Q_OBJECT public: virtual void cpuProcess(ScenGenOutput_t parameters) = 0; virtual void finalize() = 0; virtual void ReadParams(QString path, ScenGenOutput_t* params) = 0; virtual Image* processKernel(Image* inputFrame, Buffer* scratchPad) = 0; protected: Kernel _kernel; IProcessStrategy(const Context context, const QString kernelPath, const QString kernelName); Context _CLContext; Device getDefaultDevice(const Context& context); OpenCLHelper _openCLHelper; signals: void sgl_outputReady(Image* frames, Buffer* scratchPad); public slots: void slt_process(Image* frames, Buffer* scratchPad); }; #endif // IPROCESSSTRATEGY_H