1
0
mirror of https://github.com/GOSTSec/sgminer synced 2025-08-31 16:21:49 +00:00

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
This commit is contained in:
Noel Maersk 2014-01-23 20:05:57 +02:00
parent 7a69044cff
commit e8978db55f

18
ocl.c
View File

@ -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;