Define double OpenCL threads in simple way.

This commit is contained in:
XMRig 2019-09-05 09:27:29 +07:00
parent e7b2b4fc3d
commit 1ad30d50a6
11 changed files with 73 additions and 67 deletions

View file

@ -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));
}