mirror of
https://github.com/GOSTSec/sgminer
synced 2025-02-02 10:04:33 +00:00
kernel: integrate Zuikkis' kernel, selectable with --kernel=zuikkis
.
Kernel ckolivas is still the default. Needs documentation, too. https://github.com/veox/sgminer/issues/4
This commit is contained in:
parent
afdc8b5ffb
commit
7950c10374
@ -318,6 +318,7 @@ fi
|
||||
AC_DEFINE_UNQUOTED([SGMINER_PREFIX], ["$prefix/bin"], [Path to sgminer install])
|
||||
|
||||
AC_DEFINE_UNQUOTED([CKOLIVAS_KERNNAME], ["ckolivas"], [Filename for original scrypt kernel])
|
||||
AC_DEFINE_UNQUOTED([ZUIKKIS_KERNNAME], ["zuikkis"], [Filename for Zuikkis' optimised kernel])
|
||||
|
||||
|
||||
AC_SUBST(OPENCL_LIBS)
|
||||
|
@ -198,6 +198,8 @@ static enum cl_kernels select_kernel(char *arg)
|
||||
{
|
||||
if (!strcmp(arg, "ckolivas"))
|
||||
return KL_CKOLIVAS;
|
||||
if (!strcmp(arg, "zuikkis"))
|
||||
return KL_ZUIKKIS;
|
||||
|
||||
return KL_NONE;
|
||||
}
|
||||
@ -1211,7 +1213,10 @@ static bool opencl_thread_prepare(struct thr_info *thr)
|
||||
{
|
||||
switch (clStates[i]->chosen_kernel) {
|
||||
case KL_CKOLIVAS:
|
||||
cgpu->kname = "scrypt";
|
||||
cgpu->kname = "ckolivas";
|
||||
break;
|
||||
case KL_ZUIKKIS:
|
||||
cgpu->kname = "zuikkis";
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
@ -1244,6 +1249,9 @@ static bool opencl_thread_init(struct thr_info *thr)
|
||||
case KL_CKOLIVAS:
|
||||
thrdata->queue_kernel_parameters = &queue_scrypt_kernel;
|
||||
break;
|
||||
case KL_ZUIKKIS:
|
||||
thrdata->queue_kernel_parameters = &queue_scrypt_kernel;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
1
miner.h
1
miner.h
@ -373,6 +373,7 @@ enum dev_enable {
|
||||
enum cl_kernels {
|
||||
KL_NONE,
|
||||
KL_CKOLIVAS,
|
||||
KL_ZUIKKIS,
|
||||
};
|
||||
|
||||
enum dev_reason {
|
||||
|
6
ocl.c
6
ocl.c
@ -422,6 +422,12 @@ _clState *initCl(unsigned int gpu, char *name, size_t nameSize)
|
||||
/* Scrypt only supports vector 1 */
|
||||
cgpu->vwidth = 1;
|
||||
break;
|
||||
case KL_ZUIKKIS:
|
||||
strcpy(filename, ZUIKKIS_KERNNAME".cl");
|
||||
strcpy(binaryfilename, ZUIKKIS_KERNNAME);
|
||||
/* Scrypt only supports vector 1 */
|
||||
cgpu->vwidth = 1;
|
||||
break;
|
||||
case KL_NONE: /* Shouldn't happen */
|
||||
break;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user