Skip to content
This repository has been archived by the owner on Jan 9, 2021. It is now read-only.

Commit

Permalink
kernel: slight refactor, add warnings about new kernels, and known li…
Browse files Browse the repository at this point in the history
…mitations of zuikkis.

Limitations of alexkar* kernels are not known to me.

Closes https://github.com/veox/sgminer/issues/28
  • Loading branch information
veox committed Jan 23, 2014
1 parent 7a69044 commit e8978db
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions ocl.c
Original file line number Diff line number Diff line change
Expand Up @@ -415,30 +415,32 @@ _clState *initCl(unsigned int gpu, char *name, size_t nameSize)
else if (preferred_vwidth > 2)
preferred_vwidth = 2;

/* All available kernels only support vector 1 */
cgpu->vwidth = 1;

switch (clState->chosen_kernel) {
case KL_ALEXKARNEW:
applog(LOG_WARNING, "Kernel alexkarnew is experimental.");
strcpy(filename, ALEXKARNEW_KERNNAME".cl");
strcpy(binaryfilename, ALEXKARNEW_KERNNAME);
/* Kernel only supports vector 1 */
cgpu->vwidth = 1;
break;
case KL_ALEXKAROLD:
applog(LOG_WARNING, "Kernel alexkarold is experimental.");
strcpy(filename, ALEXKAROLD_KERNNAME".cl");
strcpy(binaryfilename, ALEXKAROLD_KERNNAME);
/* Kernel only supports vector 1 */
cgpu->vwidth = 1;
break;
case KL_CKOLIVAS:
strcpy(filename, CKOLIVAS_KERNNAME".cl");
strcpy(binaryfilename, CKOLIVAS_KERNNAME);
/* Kernel only supports vector 1 */
cgpu->vwidth = 1;
break;
case KL_ZUIKKIS:
applog(LOG_WARNING, "Kernel zuikkis is experimental.");
strcpy(filename, ZUIKKIS_KERNNAME".cl");
strcpy(binaryfilename, ZUIKKIS_KERNNAME);
/* Kernel only supports vector 1 */
cgpu->vwidth = 1;
/* Kernel only supports lookup-gap 2 */
cgpu->lookup_gap = 2;
/* Kernel only supports worksize 256 */
cgpu->work_size = 256;
break;
case KL_NONE: /* Shouldn't happen */
break;
Expand Down

0 comments on commit e8978db

Please sign in to comment.