From 04f55a0e66f169d57d950383e4ea5dfe7fddd51f Mon Sep 17 00:00:00 2001 From: Con Kolivas Date: Sat, 21 Jul 2012 13:56:54 +1000 Subject: [PATCH] Change the scale of intensity for scrypt kernel and fix a build warning. --- driver-opencl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/driver-opencl.c b/driver-opencl.c index 1eaf758a..c578a98c 100644 --- a/driver-opencl.c +++ b/driver-opencl.c @@ -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;