mirror of
https://github.com/GOSTSec/sgminer
synced 2025-01-11 07:17:58 +00:00
Limit thread concurrency for scrypt to 5xshaders if shaders is specified.
This commit is contained in:
parent
da1b996a39
commit
43752ee58c
5
ocl.c
5
ocl.c
@ -482,8 +482,11 @@ _clState *initCl(unsigned int gpu, char *name, size_t nameSize)
|
||||
}
|
||||
if (!cgpu->thread_concurrency) {
|
||||
cgpu->thread_concurrency = ma / 32768 / cgpu->lookup_gap;
|
||||
if (cgpu->shaders && cgpu->thread_concurrency > cgpu->shaders)
|
||||
if (cgpu->shaders && cgpu->thread_concurrency > cgpu->shaders) {
|
||||
cgpu->thread_concurrency -= cgpu->thread_concurrency % cgpu->shaders;
|
||||
if (cgpu->thread_concurrency > cgpu->shaders * 5)
|
||||
cgpu->thread_concurrency = cgpu->shaders * 5;
|
||||
}
|
||||
|
||||
applog(LOG_DEBUG, "GPU %d: selecting thread concurrency of %u",gpu, cgpu->thread_concurrency);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user