diff options
author | psychocrypt <psychocrypt@users.noreply.github.com> | 2017-10-20 21:25:08 +0200 |
---|---|---|
committer | psychocrypt <psychocrypt@users.noreply.github.com> | 2017-10-20 21:25:08 +0200 |
commit | 630bcffb9f890c00cc9b95a51af1a2adcb50c9dd (patch) | |
tree | 3055a6e117d9d9145838e5b3d7d330cde77aef29 | |
parent | 6701b0c2025987674708c9984c1d76461428c09e (diff) | |
download | xmr-stak-630bcffb9f890c00cc9b95a51af1a2adcb50c9dd.zip xmr-stak-630bcffb9f890c00cc9b95a51af1a2adcb50c9dd.tar.gz |
fix assert in AMD backend
fix bug announced in #52
If the miner is compiled in debug mode the assert condition results in a compile time error.
-rw-r--r-- | xmrstak/backend/amd/amd_gpu/gpu.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/xmrstak/backend/amd/amd_gpu/gpu.cpp b/xmrstak/backend/amd/amd_gpu/gpu.cpp index ca81718..f9908cb 100644 --- a/xmrstak/backend/amd/amd_gpu/gpu.cpp +++ b/xmrstak/backend/amd/amd_gpu/gpu.cpp @@ -896,7 +896,7 @@ size_t XMRRunJob(GpuContext* ctx, cl_uint* HashOutput) // round up to next multiple of w_size BranchNonces[i] = ((BranchNonces[i] + w_size - 1u) / w_size) * w_size; // number of global threads must be a multiple of the work group size (w_size) - assert(BranchNonces%w_size == 0); + assert(BranchNonces[i]%w_size == 0); if((ret = clEnqueueNDRangeKernel(ctx->CommandQueues, ctx->Kernels[i + 3], 1, &ctx->Nonce, BranchNonces + i, &w_size, 0, NULL, NULL)) != CL_SUCCESS) { printer::inst()->print_msg(L1,"Error %s when calling clEnqueueNDRangeKernel for kernel %d.", err_to_str(ret), i + 3); |