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.
25 lines
605 B
25 lines
605 B
#include "model/processor/IProcessStrategy.h"
|
|
#include <QImage>
|
|
#include <QPixmap>
|
|
|
|
IProcessStrategy::IProcessStrategy(const Context context,
|
|
const QString kernelPath,
|
|
const QString kernelName,
|
|
const QObject* parent)
|
|
{
|
|
try
|
|
{
|
|
_CLContext = context;
|
|
_kernel = _openCLHelper.createKernel(context, kernelPath, kernelName);
|
|
}
|
|
catch(...)
|
|
{
|
|
qDebug() << "An error occured while creating CL strategy.";
|
|
throw;
|
|
}
|
|
}
|
|
|
|
Device IProcessStrategy::getDefaultDevice(const Context &context)
|
|
{
|
|
return (_openCLHelper.getDevicesByContext(context)[0]);
|
|
}
|
|
|