mirror of
https://github.com/xmrig/xmrig.git
synced 2025-12-25 21:52:54 -05:00
Define double OpenCL threads in simple way.
This commit is contained in:
@@ -184,14 +184,9 @@ void xmrig::OclDevice::generate(const Algorithm &algorithm, OclThreads &threads)
|
||||
const uint32_t worksize = getWorksize(algorithm);
|
||||
const uint32_t stridedIndex = getStridedIndex(algorithm);
|
||||
const uint32_t memChunk = getMemChunk(algorithm);
|
||||
const uint32_t threadCount = ((globalMem() - intensity * 2 * algorithm.l3()) > 128 * oneMiB) ? 2 : 1;
|
||||
|
||||
intensity -= intensity % worksize;
|
||||
|
||||
threads.add(OclThread(index(), intensity, worksize, stridedIndex, memChunk));
|
||||
|
||||
if ((globalMem() - intensity * 2 * algorithm.l3()) > 128 * oneMiB) {
|
||||
threads.add(OclThread(index(), intensity, worksize, stridedIndex, memChunk));
|
||||
}
|
||||
threads.add(OclThread(index(), intensity, worksize, stridedIndex, memChunk, threadCount));
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -34,8 +34,8 @@
|
||||
#include "base/tools/String.h"
|
||||
|
||||
|
||||
typedef struct _cl_device_id *cl_device_id;
|
||||
typedef struct _cl_platform_id *cl_platform_id;
|
||||
using cl_device_id = struct _cl_device_id *;
|
||||
using cl_platform_id = struct _cl_platform_id *;
|
||||
|
||||
|
||||
namespace xmrig {
|
||||
@@ -59,7 +59,7 @@ public:
|
||||
Navi_10
|
||||
};
|
||||
|
||||
OclDevice() = default;
|
||||
OclDevice() = delete;
|
||||
OclDevice(uint32_t index, cl_device_id id, cl_platform_id platform);
|
||||
|
||||
size_t freeMem() const;
|
||||
|
||||
Reference in New Issue
Block a user