1
0
mirror of https://github.com/GOSTSec/sgminer synced 2025-01-10 06:48:05 +00:00

Fixed tc_limit calculation.

This commit is contained in:
unknown 2014-02-19 22:54:16 +01:00
parent e82f938afa
commit c8e4ec33dd

2
ocl.c
View File

@ -496,7 +496,7 @@ _clState *initCl(unsigned int gpu, char *name, size_t nameSize)
cgpu->thread_concurrency = sixtyfours * 64;
if (cgpu->shaders && cgpu->thread_concurrency > cgpu->shaders) {
cgpu->thread_concurrency -= cgpu->thread_concurrency % cgpu->shaders;
size_t tc_limit = cgpu->shaders * use_nscrypt ? 11 : 5;
size_t tc_limit = cgpu->shaders * (use_nscrypt ? 11 : 5);
if (cgpu->thread_concurrency > tc_limit)
cgpu->thread_concurrency = tc_limit;
}