1
0
mirror of https://github.com/GOSTSec/sgminer synced 2025-01-09 06:18:06 +00:00

misc: move scrypt130511.cl kernel file to kernel/ckolivas.cl

Prepare for more kernels. :)

Get rid of the kernel date, since this fudges up commit history.

Named after Con Kolivas, the most recent committer.
This commit is contained in:
Noel Maersk 2014-01-20 16:04:43 +02:00
parent 875db702b3
commit 9d1db95a28
7 changed files with 15 additions and 15 deletions

View File

@ -37,7 +37,7 @@ sgminer_SOURCES += ocl.c ocl.h
sgminer_SOURCES += findnonce.c findnonce.h
sgminer_SOURCES += adl.c adl.h adl_functions.h
sgminer_SOURCES += scrypt.c scrypt.h
sgminer_SOURCES += *.cl
sgminer_SOURCES += kernel/*.cl
bin_SCRIPTS = $(top_srcdir)/*.cl
bin_SCRIPTS = $(top_srcdir)/kernel/*.cl

View File

@ -317,7 +317,7 @@ fi
AC_DEFINE_UNQUOTED([SGMINER_PREFIX], ["$prefix/bin"], [Path to sgminer install])
AC_DEFINE_UNQUOTED([SCRYPT_KERNNAME], ["scrypt130511"], [Filename for scrypt kernel])
AC_DEFINE_UNQUOTED([CKOLIVAS_KERNNAME], ["ckolivas"], [Filename for original scrypt kernel])
AC_SUBST(OPENCL_LIBS)

View File

@ -196,8 +196,8 @@ char *set_thread_concurrency(char *arg)
static enum cl_kernels select_kernel(char *arg)
{
if (!strcmp(arg, "scrypt"))
return KL_SCRYPT;
if (!strcmp(arg, "ckolivas"))
return KL_CKOLIVAS;
return KL_NONE;
}
@ -1210,7 +1210,7 @@ static bool opencl_thread_prepare(struct thr_info *thr)
if (!cgpu->kname)
{
switch (clStates[i]->chosen_kernel) {
case KL_SCRYPT:
case KL_CKOLIVAS:
cgpu->kname = "scrypt";
break;
default:
@ -1241,7 +1241,7 @@ static bool opencl_thread_init(struct thr_info *thr)
}
switch (clState->chosen_kernel) {
case KL_SCRYPT:
case KL_CKOLIVAS:
thrdata->queue_kernel_parameters = &queue_scrypt_kernel;
break;
default:

View File

@ -372,7 +372,7 @@ enum dev_enable {
enum cl_kernels {
KL_NONE,
KL_SCRYPT,
KL_CKOLIVAS,
};
enum dev_reason {

10
ocl.c
View File

@ -400,8 +400,8 @@ _clState *initCl(unsigned int gpu, char *name, size_t nameSize)
char numbuf[16];
if (cgpu->kernel == KL_NONE) {
applog(LOG_INFO, "Selecting scrypt kernel");
clState->chosen_kernel = KL_SCRYPT;
applog(LOG_INFO, "Selecting kernel ckolivas");
clState->chosen_kernel = KL_CKOLIVAS;
cgpu->kernel = clState->chosen_kernel;
} else {
clState->chosen_kernel = cgpu->kernel;
@ -416,9 +416,9 @@ _clState *initCl(unsigned int gpu, char *name, size_t nameSize)
preferred_vwidth = 2;
switch (clState->chosen_kernel) {
case KL_SCRYPT:
strcpy(filename, SCRYPT_KERNNAME".cl");
strcpy(binaryfilename, SCRYPT_KERNNAME);
case KL_CKOLIVAS:
strcpy(filename, CKOLIVAS_KERNNAME".cl");
strcpy(binaryfilename, CKOLIVAS_KERNNAME);
/* Scrypt only supports vector 1 */
cgpu->vwidth = 1;
break;

View File

@ -4121,8 +4121,8 @@ void write_config(FILE *fcfg)
switch (gpus[i].kernel) {
case KL_NONE: // Shouldn't happen
break;
case KL_SCRYPT:
fprintf(fcfg, "scrypt");
case KL_CKOLIVAS:
fprintf(fcfg, "ckolivas");
break;
}
}