Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

CGPU API for device kernel name

  • Loading branch information...
commit eca996547b6e0f9a33d83b8ead43b84d45c79927 1 parent f05a319
@luke-jr luke-jr authored
Showing with 19 additions and 0 deletions.
  1. +1 −0  driver-cpu.c
  2. +17 −0 driver-opencl.c
  3. +1 −0  miner.h
View
1  driver-cpu.c
@@ -743,6 +743,7 @@ static void cpu_detect()
cgpu->api = &cpu_api;
cgpu->deven = DEV_ENABLED;
cgpu->threads = 1;
+ cgpu->kname = algo_names[opt_algo];
add_cgpu(cgpu);
}
}
View
17 driver-opencl.c
@@ -1190,6 +1190,23 @@ static bool opencl_thread_prepare(struct thr_info *thr)
}
if (name && !cgpu->name)
cgpu->name = strdup(name);
+ if (!cgpu->kname)
+ {
+ switch (clStates[i]->chosen_kernel) {
+ case KL_DIABLO:
+ cgpu->kname = "diablo";
+ break;
+ case KL_DIAKGCN:
+ cgpu->kname = "diakgcn";
+ break;
+ case KL_PHATK:
+ cgpu->kname = "phatk";
+ break;
+ case KL_POCLBM:
+ cgpu->kname = "poclbm";
+ default:
+ }
+ }
applog(LOG_INFO, "initCl() finished. Found %s", name);
gettimeofday(&now, NULL);
get_datestamp(cgpu->init, &now);
View
1  miner.h
@@ -250,6 +250,7 @@ struct cgpu_info {
int virtual_gpu;
int intensity;
bool dynamic;
+ char *kname;
#ifdef HAVE_OPENCL
cl_uint vwidth;
size_t work_size;
Please sign in to comment.
Something went wrong with that request. Please try again.