Browse Source

kernel: slight refactor, add warnings about new kernels, and known limitations of zuikkis.

Limitations of alexkar* kernels are not known to me.

Closes https://github.com/veox/sgminer/issues/28
nfactor-troky
Noel Maersk 11 years ago
parent
commit
e8978db55f
  1. 18
      ocl.c

18
ocl.c

@ -415,30 +415,32 @@ _clState *initCl(unsigned int gpu, char *name, size_t nameSize) @@ -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;

Loading…
Cancel
Save