From 5f795be64a1e04dbd8b4673b77cd0419f0cb57ea Mon Sep 17 00:00:00 2001 From: Noel Maersk Date: Thu, 23 Jan 2014 11:46:47 +0200 Subject: [PATCH] core: use kernel name defines now that version date is not in the filenames. Ideally, even this should not be needed, and specifying a kernel name string should search for the appropriate file in kernel-path. --- driver-opencl.c | 16 ++++++++-------- sgminer.c | 8 ++++---- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/driver-opencl.c b/driver-opencl.c index f45ec3ce..02fc34e9 100644 --- a/driver-opencl.c +++ b/driver-opencl.c @@ -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; @@ -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; diff --git a/sgminer.c b/sgminer.c index 8e8252ba..be02d1b4 100644 --- a/sgminer.c +++ b/sgminer.c @@ -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; } }