mirror of
https://github.com/xmrig/xmrig.git
synced 2026-04-20 14:02:46 -04:00
Better cl_context wrapping.
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user