Accelerated Computation Engine
opencl_context.h
1 #ifndef OPENCL_CONTEXT_H
2 #define OPENCL_CONTEXT_H
3 #include <CL/cl.h>
4 #include <QObject>
5 #include "opencl.h"
6 //
7 
8 
9 
10 namespace OpenCL
11 {
18  class Context : public QObject
19  {
20  Q_OBJECT
21  public:
22  explicit Context(const QList<Device*>& devices, QObject* parent = nullptr);
23  virtual ~Context() override final;
24  cl_context id() const;
25  const QList<Device*>& devices() const;
26  private:
30  cl_context _id;
34  QList<Device*> _devices;
35  };
36 }
37 
38 
39 
40 #endif
Definition: opencl_context.h:18
Context(const QList< Device *> &devices, QObject *parent=nullptr)
Definition: opencl_context.cpp:28
const QList< Device * > & devices() const
Definition: opencl_context.cpp:111
cl_context id() const
Definition: opencl_context.cpp:93
virtual ~Context() override final
Definition: opencl_context.cpp:76
Definition: opencl.h:5