Browse Source

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.
nfactor-troky
Noel Maersk 11 years ago
parent
commit
9d1db95a28
  1. 4
      Makefile.am
  2. 2
      configure.ac
  3. 8
      driver-opencl.c
  4. 0
      kernel/ckolivas.cl
  5. 2
      miner.h
  6. 10
      ocl.c
  7. 4
      sgminer.c

4
Makefile.am

@ -37,7 +37,7 @@ sgminer_SOURCES += ocl.c ocl.h
sgminer_SOURCES += findnonce.c findnonce.h sgminer_SOURCES += findnonce.c findnonce.h
sgminer_SOURCES += adl.c adl.h adl_functions.h sgminer_SOURCES += adl.c adl.h adl_functions.h
sgminer_SOURCES += scrypt.c scrypt.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

2
configure.ac

@ -317,7 +317,7 @@ fi
AC_DEFINE_UNQUOTED([SGMINER_PREFIX], ["$prefix/bin"], [Path to sgminer install]) 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) AC_SUBST(OPENCL_LIBS)

8
driver-opencl.c

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

0
scrypt130511.cl → kernel/ckolivas.cl

2
miner.h

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

10
ocl.c

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

4
sgminer.c

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

Loading…
Cancel
Save