Better cl_context wrapping.
This commit is contained in:
parent
b541960611
commit
10d2c0285c
7 changed files with 23 additions and 8 deletions
|
@ -27,6 +27,13 @@
|
|||
#include "backend/opencl/wrappers/OclContext.h"
|
||||
|
||||
|
||||
xmrig::OclContext::OclContext(const OclDevice &device)
|
||||
{
|
||||
std::vector<cl_device_id> ids = { device.id() };
|
||||
m_ctx = OclLib::createContext(ids);
|
||||
}
|
||||
|
||||
|
||||
xmrig::OclContext::~OclContext()
|
||||
{
|
||||
if (m_ctx) {
|
||||
|
|
|
@ -40,6 +40,7 @@ class OclContext
|
|||
{
|
||||
public:
|
||||
OclContext() = default;
|
||||
OclContext(const OclDevice &device);
|
||||
~OclContext();
|
||||
|
||||
bool init(const std::vector<OclDevice> &devices, std::vector<OclLaunchData> &threads);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue