1
0
mirror of https://github.com/GOSTSec/sgminer synced 2025-01-29 16:04:33 +00:00

Change the scale of intensity for scrypt kernel and fix a build warning.

This commit is contained in:
Con Kolivas 2012-07-21 13:56:54 +10:00
parent e45ebb62a9
commit 04f55a0e66

View File

@ -995,7 +995,7 @@ static cl_int queue_diablo_kernel(_clState *clState, dev_blk_ctx *blk, cl_uint t
#ifdef USE_SCRYPT
static cl_int queue_scrypt_kernel(_clState *clState, dev_blk_ctx *blk, __maybe_unused cl_uint threads)
{
char *midstate = blk->work->midstate;
unsigned char *midstate = blk->work->midstate;
cl_kernel *kernel = &clState->kernel;
unsigned int num = 0;
cl_uint le_target;
@ -1020,7 +1020,7 @@ static void set_threads_hashes(unsigned int vectors, unsigned int *threads,
int64_t *hashes, size_t *globalThreads,
unsigned int minthreads, int intensity)
{
*threads = 1 << (15 + intensity);
*threads = 1 << ((opt_scrypt ? 0 : 15) + intensity);
if (*threads < minthreads)
*threads = minthreads;
*globalThreads = *threads;