mirror of
https://github.com/GOSTSec/sgminer
synced 2025-01-22 20:44:19 +00:00
Use a new algorithm for choosing a thread concurrency when none or no shader value is specified for scrypt.
This commit is contained in:
parent
d0f18e83ad
commit
584fc013ab
5
ocl.c
5
ocl.c
@ -482,7 +482,10 @@ _clState *initCl(unsigned int gpu, char *name, size_t nameSize)
|
||||
cgpu->lookup_gap = cgpu->opt_lg;
|
||||
|
||||
if (!cgpu->opt_tc) {
|
||||
cgpu->thread_concurrency = cgpu->max_alloc / 32768 / cgpu->lookup_gap;
|
||||
unsigned int sixtyfours;
|
||||
|
||||
sixtyfours = cgpu->max_alloc / 131072 / 64 - 1;
|
||||
cgpu->thread_concurrency = sixtyfours * 64;
|
||||
if (cgpu->shaders && cgpu->thread_concurrency > cgpu->shaders) {
|
||||
cgpu->thread_concurrency -= cgpu->thread_concurrency % cgpu->shaders;
|
||||
if (cgpu->thread_concurrency > cgpu->shaders * 5)
|
||||
|
Loading…
x
Reference in New Issue
Block a user