Skip to content

Commit

Permalink
Don't display error messages when last prefix is found by a different
Browse files Browse the repository at this point in the history
OpenCL device.
  • Loading branch information
samr7 committed Aug 17, 2012
1 parent 9c6fae2 commit 17f97ce
Showing 1 changed file with 13 additions and 7 deletions.
20 changes: 13 additions & 7 deletions oclengine.c
Original file line number Diff line number Diff line change
Expand Up @@ -1502,11 +1502,8 @@ vg_ocl_prefix_rekey(vg_ocl_context_t *vocp)
if (vocp->voc_pattern_rewrite) {
/* Count number of range records */
i = vg_context_hash160_sort(vcp, NULL);
if (!i) {
fprintf(stderr,
"No range records available, exiting\n");
if (!i)
return 0;
}

if (i > vocp->voc_pattern_alloc) {
/* (re)allocate target buffer */
Expand Down Expand Up @@ -1989,9 +1986,16 @@ vg_opencl_loop(vg_exec_context_t *arg)
gettimeofday(&tvstart, NULL);

l_rekey:
if (vocp->voc_rekey_func &&
!vocp->voc_rekey_func(vocp))
goto enomem;
if (vocp->voc_rekey_func) {
switch (vocp->voc_rekey_func(vocp)) {
case 1:
break;
case 0:
goto nopatterns;
default:
goto enomem;
}
}

vg_exec_context_upgrade_lock(vxcp);

Expand Down Expand Up @@ -2171,6 +2175,8 @@ vg_opencl_loop(vg_exec_context_t *arg)
if (0) {
enomem:
fprintf(stderr, "ERROR: allocation failure?\n");
nopatterns:
;
}

if (halt) {
Expand Down

0 comments on commit 17f97ce

Please sign in to comment.