You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
49 lines
1020 B
49 lines
1020 B
5 years ago
|
#ifndef IPROCESSSTRATEGY_H
|
||
|
#define IPROCESSSTRATEGY_H
|
||
|
|
||
5 years ago
|
//#include "CL/cl2.hpp"
|
||
5 years ago
|
#include <QObject>
|
||
|
#include <QMetaType>
|
||
5 years ago
|
//#include "Processor.h"
|
||
|
#include "utils/OpenCLHelper.h"
|
||
5 years ago
|
#include "ScenarioParams.h"
|
||
|
|
||
5 years ago
|
|
||
5 years ago
|
#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;
|
||
5 years ago
|
virtual Image* processKernel(Image* inputFrame, Buffer* scrathPad) = 0;
|
||
5 years ago
|
|
||
5 years ago
|
private:
|
||
|
// Context _CLContext;
|
||
|
// Device getDefaultDevice(const Context& context);
|
||
5 years ago
|
protected:
|
||
|
Kernel _kernel;
|
||
|
IProcessStrategy(const Context context,
|
||
|
const QString kernelPath,
|
||
5 years ago
|
const QString kernelName,
|
||
|
const QObject* parent);
|
||
|
|
||
5 years ago
|
|
||
|
Context _CLContext;
|
||
|
Device getDefaultDevice(const Context& context);
|
||
5 years ago
|
const QObject* _parent;
|
||
5 years ago
|
OpenCLHelper _openCLHelper;
|
||
|
|
||
|
};
|
||
5 years ago
|
//Q_DECLARE_METATYPE(IProcessStrategy*);
|
||
5 years ago
|
|
||
|
#endif // IPROCESSSTRATEGY_H
|