mirror of
https://github.com/GOSTSec/sgminer
synced 2025-01-25 14:04:25 +00:00
Fix !HAVE_OPENCL build.
This commit is contained in:
parent
dfcb98debf
commit
527e611b74
42
cgminer.c
42
cgminer.c
@ -2327,6 +2327,7 @@ void write_config(FILE *fcfg)
|
|||||||
fputs("\"intensity\" : \"", fcfg);
|
fputs("\"intensity\" : \"", fcfg);
|
||||||
for(i = 0; i < nDevs; i++)
|
for(i = 0; i < nDevs; i++)
|
||||||
fprintf(fcfg, gpus[i].dynamic ? "%sd" : "%s%d", i > 0 ? "," : "", gpus[i].intensity);
|
fprintf(fcfg, gpus[i].dynamic ? "%sd" : "%s%d", i > 0 ? "," : "", gpus[i].intensity);
|
||||||
|
#ifdef HAVE_OPENCL
|
||||||
fputs("\",\n\"vectors\" : \"", fcfg);
|
fputs("\",\n\"vectors\" : \"", fcfg);
|
||||||
for(i = 0; i < nDevs; i++)
|
for(i = 0; i < nDevs; i++)
|
||||||
fprintf(fcfg, "%s%d", i > 0 ? "," : "",
|
fprintf(fcfg, "%s%d", i > 0 ? "," : "",
|
||||||
@ -2335,6 +2336,26 @@ void write_config(FILE *fcfg)
|
|||||||
for(i = 0; i < nDevs; i++)
|
for(i = 0; i < nDevs; i++)
|
||||||
fprintf(fcfg, "%s%d", i > 0 ? "," : "",
|
fprintf(fcfg, "%s%d", i > 0 ? "," : "",
|
||||||
(int)gpus[i].work_size);
|
(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
|
#ifdef HAVE_ADL
|
||||||
fputs("\",\n\"gpu-engine\" : \"", fcfg);
|
fputs("\",\n\"gpu-engine\" : \"", fcfg);
|
||||||
for(i = 0; i < nDevs; i++)
|
for(i = 0; i < nDevs; i++)
|
||||||
@ -2364,26 +2385,7 @@ void write_config(FILE *fcfg)
|
|||||||
for(i = 0; i < nDevs; i++)
|
for(i = 0; i < nDevs; i++)
|
||||||
fprintf(fcfg, "%s%d", i > 0 ? "," : "", gpus[i].adl.targettemp);
|
fprintf(fcfg, "%s%d", i > 0 ? "," : "", gpus[i].adl.targettemp);
|
||||||
#endif
|
#endif
|
||||||
fputs("\",\n\"kernel\" : \"", fcfg);
|
#endif
|
||||||
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;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
fputs("\"", fcfg);
|
fputs("\"", fcfg);
|
||||||
#ifdef WANT_CPUMINE
|
#ifdef WANT_CPUMINE
|
||||||
fputs(",\n", fcfg);
|
fputs(",\n", fcfg);
|
||||||
|
4
miner.h
4
miner.h
@ -245,13 +245,14 @@ struct cgpu_info {
|
|||||||
|
|
||||||
unsigned int max_hashes;
|
unsigned int max_hashes;
|
||||||
|
|
||||||
#ifdef HAVE_OPENCL
|
|
||||||
int virtual_gpu;
|
int virtual_gpu;
|
||||||
int intensity;
|
int intensity;
|
||||||
bool dynamic;
|
bool dynamic;
|
||||||
|
#ifdef HAVE_OPENCL
|
||||||
cl_uint vwidth;
|
cl_uint vwidth;
|
||||||
size_t work_size;
|
size_t work_size;
|
||||||
enum cl_kernels kernel;
|
enum cl_kernels kernel;
|
||||||
|
#endif
|
||||||
|
|
||||||
float temp;
|
float temp;
|
||||||
int cutofftemp;
|
int cutofftemp;
|
||||||
@ -268,7 +269,6 @@ struct cgpu_info {
|
|||||||
int gpu_memdiff;
|
int gpu_memdiff;
|
||||||
int gpu_powertune;
|
int gpu_powertune;
|
||||||
float gpu_vddc;
|
float gpu_vddc;
|
||||||
#endif
|
|
||||||
#endif
|
#endif
|
||||||
int last_share_pool;
|
int last_share_pool;
|
||||||
time_t last_share_pool_time;
|
time_t last_share_pool_time;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user