1
0
mirror of https://github.com/GOSTSec/sgminer synced 2025-01-11 07:17:58 +00:00

Ignore negative intensities for scrypt.

This commit is contained in:
Con Kolivas 2012-07-21 16:05:50 +10:00
parent 04f55a0e66
commit ffe1318f70

View File

@ -1020,7 +1020,12 @@ static void set_threads_hashes(unsigned int vectors, unsigned int *threads,
int64_t *hashes, size_t *globalThreads, int64_t *hashes, size_t *globalThreads,
unsigned int minthreads, int intensity) unsigned int minthreads, int intensity)
{ {
*threads = 1 << ((opt_scrypt ? 0 : 15) + intensity); if (opt_scrypt) {
if (intensity < 0)
intensity = 0;
*threads = 1 << intensity;
} else
*threads = 1 << (15 + intensity);
if (*threads < minthreads) if (*threads < minthreads)
*threads = minthreads; *threads = minthreads;
*globalThreads = *threads; *globalThreads = *threads;