Skip to content
This repository has been archived by the owner on Jan 9, 2021. It is now read-only.

Commit

Permalink
core: use kernel name defines now that version date is not in the fil…
Browse files Browse the repository at this point in the history
…enames.

Ideally, even this should not be needed, and specifying a kernel name string
should search for the appropriate file in kernel-path.
  • Loading branch information
veox committed Jan 23, 2014
1 parent 35a2394 commit 5f795be
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
16 changes: 8 additions & 8 deletions driver-opencl.c
Original file line number Diff line number Diff line change
Expand Up @@ -196,13 +196,13 @@ char *set_thread_concurrency(char *arg)

static enum cl_kernels select_kernel(char *arg)
{
if (!strcmp(arg, "alexkarnew"))
if (!strcmp(arg, ALEXKARNEW_KERNNAME))
return KL_ALEXKARNEW;
if (!strcmp(arg, "alexkarold"))
if (!strcmp(arg, ALEXKAROLD_KERNNAME))
return KL_ALEXKAROLD;
if (!strcmp(arg, "ckolivas"))
if (!strcmp(arg, CKOLIVAS_KERNNAME))
return KL_CKOLIVAS;
if (!strcmp(arg, "zuikkis"))
if (!strcmp(arg, ZUIKKIS_KERNNAME))
return KL_ZUIKKIS;

return KL_NONE;
Expand Down Expand Up @@ -1217,16 +1217,16 @@ static bool opencl_thread_prepare(struct thr_info *thr)
{
switch (clStates[i]->chosen_kernel) {
case KL_ALEXKARNEW:
cgpu->kname = "alexkarnew";
cgpu->kname = ALEXKARNEW_KERNNAME;
break;
case KL_ALEXKAROLD:
cgpu->kname = "alexkarold";
cgpu->kname = ALEXKAROLD_KERNNAME;
break;
case KL_CKOLIVAS:
cgpu->kname = "ckolivas";
cgpu->kname = CKOLIVAS_KERNNAME;
break;
case KL_ZUIKKIS:
cgpu->kname = "zuikkis";
cgpu->kname = ZUIKKIS_KERNNAME;
break;
default:
break;
Expand Down
8 changes: 4 additions & 4 deletions sgminer.c
Original file line number Diff line number Diff line change
Expand Up @@ -4122,16 +4122,16 @@ void write_config(FILE *fcfg)
case KL_NONE: // Shouldn't happen
break;
case KL_ALEXKARNEW:
fprintf(fcfg, "alexkarnew");
fprintf(fcfg, ALEXKARNEW_KERNNAME);
break;
case KL_ALEXKAROLD:
fprintf(fcfg, "alexkarold");
fprintf(fcfg, ALEXKAROLD_KERNNAME);
break;
case KL_CKOLIVAS:
fprintf(fcfg, "ckolivas");
fprintf(fcfg, CKOLIVAS_KERNNAME);
break;
case KL_ZUIKKIS:
fprintf(fcfg, "zuikkis");
fprintf(fcfg, ZUIKKIS_KERNNAME);
break;
}
}
Expand Down

0 comments on commit 5f795be

Please sign in to comment.