From a8404832ce679d3941083d9624a4d8e5e261a573 Mon Sep 17 00:00:00 2001 From: Genoil Date: Wed, 30 Mar 2016 10:19:45 +0200 Subject: [PATCH] fix non-power of 2 opencl workgroup size bug. --- libethash-cl/ethash_cl_miner_kernel.cl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libethash-cl/ethash_cl_miner_kernel.cl b/libethash-cl/ethash_cl_miner_kernel.cl index 4fabec3ae..b513d0c5a 100644 --- a/libethash-cl/ethash_cl_miner_kernel.cl +++ b/libethash-cl/ethash_cl_miner_kernel.cl @@ -263,7 +263,7 @@ __kernel void ethash_search( // Threads work together in this phase in groups of 8. uint const thread_id = gid & 7; - uint const hash_id = (gid & (GROUP_SIZE - 1)) >> 3; + uint const hash_id = (gid % GROUP_SIZE) >> 3; for (int i = 0; i < THREADS_PER_HASH; i++) {