|
|
|
@ -743,10 +743,8 @@ static _clState *clStates[MAX_GPUDEVICES];
@@ -743,10 +743,8 @@ static _clState *clStates[MAX_GPUDEVICES];
|
|
|
|
|
static cl_int queue_poclbm_kernel(_clState *clState, dev_blk_ctx *blk, cl_uint threads) |
|
|
|
|
{ |
|
|
|
|
cl_kernel *kernel = &clState->kernel; |
|
|
|
|
cl_uint vwidth = clState->vwidth; |
|
|
|
|
unsigned int i, num = 0; |
|
|
|
|
unsigned int num = 0; |
|
|
|
|
cl_int status = 0; |
|
|
|
|
uint *nonces; |
|
|
|
|
|
|
|
|
|
CL_SET_BLKARG(ctx_a); |
|
|
|
|
CL_SET_BLKARG(ctx_b); |
|
|
|
@ -765,10 +763,15 @@ static cl_int queue_poclbm_kernel(_clState *clState, dev_blk_ctx *blk, cl_uint t
@@ -765,10 +763,15 @@ static cl_int queue_poclbm_kernel(_clState *clState, dev_blk_ctx *blk, cl_uint t
|
|
|
|
|
CL_SET_BLKARG(cty_g); |
|
|
|
|
CL_SET_BLKARG(cty_h); |
|
|
|
|
|
|
|
|
|
nonces = alloca(sizeof(uint) * vwidth); |
|
|
|
|
if (!clState->goffset) { |
|
|
|
|
cl_uint vwidth = clState->vwidth; |
|
|
|
|
uint *nonces = alloca(sizeof(uint) * vwidth); |
|
|
|
|
unsigned int i; |
|
|
|
|
|
|
|
|
|
for (i = 0; i < vwidth; i++) |
|
|
|
|
nonces[i] = blk->nonce + (i * threads); |
|
|
|
|
CL_SET_VARG(vwidth, nonces); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
CL_SET_BLKARG(fW0); |
|
|
|
|
CL_SET_BLKARG(fW1); |
|
|
|
@ -896,15 +899,19 @@ static cl_int queue_diakgcn_kernel(_clState *clState, dev_blk_ctx *blk,
@@ -896,15 +899,19 @@ static cl_int queue_diakgcn_kernel(_clState *clState, dev_blk_ctx *blk,
|
|
|
|
|
static cl_int queue_diablo_kernel(_clState *clState, dev_blk_ctx *blk, cl_uint threads) |
|
|
|
|
{ |
|
|
|
|
cl_kernel *kernel = &clState->kernel; |
|
|
|
|
cl_uint vwidth = clState->vwidth; |
|
|
|
|
unsigned int i, num = 0; |
|
|
|
|
unsigned int num = 0; |
|
|
|
|
cl_int status = 0; |
|
|
|
|
uint *nonces; |
|
|
|
|
|
|
|
|
|
nonces = alloca(sizeof(uint) * vwidth); |
|
|
|
|
if (!clState->goffset) { |
|
|
|
|
cl_uint vwidth = clState->vwidth; |
|
|
|
|
uint *nonces = alloca(sizeof(uint) * vwidth); |
|
|
|
|
unsigned int i; |
|
|
|
|
|
|
|
|
|
for (i = 0; i < vwidth; i++) |
|
|
|
|
nonces[i] = blk->nonce + (i * threads); |
|
|
|
|
CL_SET_VARG(vwidth, nonces); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
CL_SET_BLKARG(PreVal0); |
|
|
|
|
CL_SET_BLKARG(PreVal0addK7); |
|
|
|
@ -1338,6 +1345,14 @@ static uint64_t opencl_scanhash(struct thr_info *thr, struct work *work,
@@ -1338,6 +1345,14 @@ static uint64_t opencl_scanhash(struct thr_info *thr, struct work *work,
|
|
|
|
|
memset(thrdata->res, 0, BUFFERSIZE); |
|
|
|
|
clFinish(clState->commandQueue); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (clState->goffset) { |
|
|
|
|
size_t global_work_offset[1]; |
|
|
|
|
|
|
|
|
|
global_work_offset[0] = work->blk.nonce; |
|
|
|
|
status = clEnqueueNDRangeKernel(clState->commandQueue, *kernel, 1, global_work_offset, |
|
|
|
|
globalThreads, localThreads, 0, NULL, NULL); |
|
|
|
|
} else |
|
|
|
|
status = clEnqueueNDRangeKernel(clState->commandQueue, *kernel, 1, NULL, |
|
|
|
|
globalThreads, localThreads, 0, NULL, NULL); |
|
|
|
|
if (unlikely(status != CL_SUCCESS)) { |
|
|
|
|