Browse Source

Fix !HAVE_OPENCL build.

nfactor-troky
Con Kolivas 13 years ago
parent
commit
527e611b74
  1. 42
      cgminer.c
  2. 4
      miner.h

42
cgminer.c

@ -2327,6 +2327,7 @@ void write_config(FILE *fcfg) @@ -2327,6 +2327,7 @@ void write_config(FILE *fcfg)
fputs("\"intensity\" : \"", fcfg);
for(i = 0; i < nDevs; i++)
fprintf(fcfg, gpus[i].dynamic ? "%sd" : "%s%d", i > 0 ? "," : "", gpus[i].intensity);
#ifdef HAVE_OPENCL
fputs("\",\n\"vectors\" : \"", fcfg);
for(i = 0; i < nDevs; i++)
fprintf(fcfg, "%s%d", i > 0 ? "," : "",
@ -2335,6 +2336,26 @@ void write_config(FILE *fcfg) @@ -2335,6 +2336,26 @@ void write_config(FILE *fcfg)
for(i = 0; i < nDevs; i++)
fprintf(fcfg, "%s%d", i > 0 ? "," : "",
(int)gpus[i].work_size);
fputs("\",\n\"kernel\" : \"", fcfg);
for(i = 0; i < nDevs; i++) {
fprintf(fcfg, "%s", i > 0 ? "," : "");
switch (gpus[i].kernel) {
case KL_NONE: // Shouldn't happen
break;
case KL_POCLBM:
fprintf(fcfg, "poclbm");
break;
case KL_PHATK:
fprintf(fcfg, "phatk");
break;
case KL_DIAKGCN:
fprintf(fcfg, "diakgcn");
break;
case KL_DIABLO:
fprintf(fcfg, "diablo");
break;
}
}
#ifdef HAVE_ADL
fputs("\",\n\"gpu-engine\" : \"", fcfg);
for(i = 0; i < nDevs; i++)
@ -2364,26 +2385,7 @@ void write_config(FILE *fcfg) @@ -2364,26 +2385,7 @@ void write_config(FILE *fcfg)
for(i = 0; i < nDevs; i++)
fprintf(fcfg, "%s%d", i > 0 ? "," : "", gpus[i].adl.targettemp);
#endif
fputs("\",\n\"kernel\" : \"", fcfg);
for(i = 0; i < nDevs; i++) {
fprintf(fcfg, "%s", i > 0 ? "," : "");
switch (gpus[i].kernel) {
case KL_NONE: // Shouldn't happen
break;
case KL_POCLBM:
fprintf(fcfg, "poclbm");
break;
case KL_PHATK:
fprintf(fcfg, "phatk");
break;
case KL_DIAKGCN:
fprintf(fcfg, "diakgcn");
break;
case KL_DIABLO:
fprintf(fcfg, "diablo");
break;
}
}
#endif
fputs("\"", fcfg);
#ifdef WANT_CPUMINE
fputs(",\n", fcfg);

4
miner.h

@ -245,13 +245,14 @@ struct cgpu_info { @@ -245,13 +245,14 @@ struct cgpu_info {
unsigned int max_hashes;
#ifdef HAVE_OPENCL
int virtual_gpu;
int intensity;
bool dynamic;
#ifdef HAVE_OPENCL
cl_uint vwidth;
size_t work_size;
enum cl_kernels kernel;
#endif
float temp;
int cutofftemp;
@ -268,7 +269,6 @@ struct cgpu_info { @@ -268,7 +269,6 @@ struct cgpu_info {
int gpu_memdiff;
int gpu_powertune;
float gpu_vddc;
#endif
#endif
int last_share_pool;
time_t last_share_pool_time;

Loading…
Cancel
Save