Merge pull request #13 from psychocrypt/fix-kernelStartRestrictionNotFulfilled

fix `global_worker_size` calculation
This commit is contained in:
fireice-uk 2017-04-09 21:27:04 +01:00 committed by GitHub
commit ef114a1cd3
1 changed files with 1 additions and 1 deletions

View File

@ -677,7 +677,7 @@ size_t XMRRunJob(GpuContext* ctx, cl_uint* HashOutput)
return(ERR_OCL_API);
}
BranchNonces[i] += BranchNonces[i] + (w_size - (BranchNonces[i] & (w_size - 1)));
BranchNonces[i] = ((size_t)ceil( (double)BranchNonces[i] / (double)w_size) ) * w_size;
if((ret = clEnqueueNDRangeKernel(ctx->CommandQueues, ctx->Kernels[i + 3], 1, &ctx->Nonce, BranchNonces + i, &w_size, 0, NULL, NULL)) != CL_SUCCESS)
{
printer_print_msg("Error %s when calling clEnqueueNDRangeKernel for kernel %d.", err_to_str(ret), i + 3);