|
|
@@ -50,7 +50,6 @@
|
|
|
/* TODO: cleanup externals ********************/
|
|
|
|
|
|
|
|
|
-#ifdef USE_OPENCL
|
|
|
/* Platform API */
|
|
|
CL_API_ENTRY cl_int CL_API_CALL
|
|
|
(*clGetPlatformIDs)(cl_uint /* num_entries */,
|
|
|
@@ -257,7 +256,6 @@ load_opencl_symbols() {
|
|
|
|
|
|
return true;
|
|
|
}
|
|
|
-#endif
|
|
|
|
|
|
|
|
|
struct opencl_kernel_interface {
|
|
|
@@ -371,7 +369,6 @@ const char *set_ ## PNAME(char *arg) \
|
|
|
#define _SET_INT_LIST(PNAME, VCHECK, FIELD) \
|
|
|
_SET_INT_LIST2(PNAME, VCHECK, ((struct opencl_device_data *)cgpu->device_data)->FIELD)
|
|
|
|
|
|
-#ifdef USE_OPENCL
|
|
|
_SET_INT_LIST(vector , (v == 1 || v == 2 || v == 4), vwidth )
|
|
|
_SET_INT_LIST(worksize, (v >= 1 && v <= 9999) , work_size)
|
|
|
|
|
|
@@ -435,7 +432,6 @@ const char *set_kernel(char *arg)
|
|
|
{
|
|
|
return _set_list(arg, "Invalid value passed to set_kernel", _set_kernel);
|
|
|
}
|
|
|
-#endif
|
|
|
|
|
|
static
|
|
|
const char *opencl_init_binary(struct cgpu_info * const proc, const char * const optname, const char * const newvalue, char * const replybuf, enum bfg_set_device_replytype * const out_success)
|
|
|
@@ -662,7 +658,6 @@ const char *opencl_set_gpu_vddc(struct cgpu_info * const proc, const char * cons
|
|
|
_SET_INT_LIST(temp_overheat, (v >= 0 && v < 200), adl.overtemp )
|
|
|
#endif
|
|
|
|
|
|
-#ifdef USE_OPENCL
|
|
|
double oclthreads_to_xintensity(const unsigned long oclthreads, const cl_uint max_compute_units)
|
|
|
{
|
|
|
return (double)oclthreads / (double)max_compute_units / 64.;
|
|
|
@@ -760,7 +755,6 @@ const char *set_intensity(char *arg)
|
|
|
}
|
|
|
|
|
|
_SET_INT_LIST2(gpu_threads, (v >= 1 && v <= 10), cgpu->threads)
|
|
|
-#endif
|
|
|
|
|
|
void write_config_opencl(FILE * const fcfg)
|
|
|
{
|
|
|
@@ -771,7 +765,6 @@ void write_config_opencl(FILE * const fcfg)
|
|
|
}
|
|
|
|
|
|
|
|
|
-#ifdef USE_OPENCL
|
|
|
BFG_REGISTER_DRIVER(opencl_api)
|
|
|
static const struct bfg_set_device_definition opencl_set_device_funcs_probe[];
|
|
|
static const struct bfg_set_device_definition opencl_set_device_funcs[];
|
|
|
@@ -784,16 +777,12 @@ char *print_ndevs_and_exit(int *ndevs)
|
|
|
applog(LOG_INFO, "%i GPU devices max detected", *ndevs);
|
|
|
exit(*ndevs);
|
|
|
}
|
|
|
-#endif
|
|
|
|
|
|
|
|
|
struct cgpu_info gpus[MAX_GPUDEVICES]; /* Maximum number apparently possible */
|
|
|
struct cgpu_info *cpus;
|
|
|
|
|
|
|
|
|
-
|
|
|
-#ifdef USE_OPENCL
|
|
|
-
|
|
|
/* In dynamic mode, only the first thread of each device will be in use.
|
|
|
* This potentially could start a thread that was stopped with the start-stop
|
|
|
* options if one were to disable dynamic from the menu on a paused GPU */
|
|
|
@@ -820,8 +809,6 @@ void pause_dynamic_threads(int gpu)
|
|
|
|
|
|
struct device_drv opencl_api;
|
|
|
|
|
|
-#endif /* USE_OPENCL */
|
|
|
-
|
|
|
float opencl_proc_get_intensity(struct cgpu_info * const proc, const char ** const iunit)
|
|
|
{
|
|
|
struct opencl_device_data * const data = proc->device_data;
|
|
|
@@ -839,7 +826,7 @@ float opencl_proc_get_intensity(struct cgpu_info * const proc, const char ** con
|
|
|
return intensity;
|
|
|
}
|
|
|
|
|
|
-#if defined(USE_OPENCL) && defined(HAVE_CURSES)
|
|
|
+#ifdef HAVE_CURSES
|
|
|
static
|
|
|
void opencl_wlogprint_status(struct cgpu_info *cgpu)
|
|
|
{
|
|
|
@@ -992,8 +979,6 @@ const char *opencl_tui_handle_choice(struct cgpu_info *cgpu, int input)
|
|
|
#endif
|
|
|
|
|
|
|
|
|
-#ifdef USE_OPENCL
|
|
|
-
|
|
|
#define CL_SET_BLKARG(blkvar) status |= clSetKernelArg(*kernel, num++, sizeof(uint), (void *)&blk->blkvar)
|
|
|
#define CL_SET_ARG(var) status |= clSetKernelArg(*kernel, num++, sizeof(var), (void *)&var)
|
|
|
#define CL_SET_VARG(args, var) status |= clSetKernelArg(*kernel, num++, args * sizeof(uint), (void *)var)
|
|
|
@@ -1268,7 +1253,6 @@ cl_int queue_scrypt_kernel(const struct opencl_kernel_info * const kinfo, _clSta
|
|
|
return status;
|
|
|
}
|
|
|
#endif
|
|
|
-#endif /* USE_OPENCL */
|
|
|
|
|
|
|
|
|
static
|
|
|
@@ -1286,7 +1270,6 @@ struct opencl_kernel_interface kernel_interfaces[] = {
|
|
|
};
|
|
|
|
|
|
|
|
|
-#ifdef USE_OPENCL
|
|
|
/* We have only one thread that ever re-initialises GPUs, thus if any GPU
|
|
|
* init command fails due to a completely wedged GPU, the thread will never
|
|
|
* return, unable to harm other GPUs. If it does return, it means we only had
|
|
|
@@ -1372,15 +1355,7 @@ select_cgpu:
|
|
|
out:
|
|
|
return NULL;
|
|
|
}
|
|
|
-#else
|
|
|
-void *reinit_gpu(__maybe_unused void *userdata)
|
|
|
-{
|
|
|
- return NULL;
|
|
|
-}
|
|
|
-#endif
|
|
|
|
|
|
-
|
|
|
-#ifdef USE_OPENCL
|
|
|
struct device_drv opencl_api;
|
|
|
|
|
|
static int opencl_autodetect()
|
|
|
@@ -1987,4 +1962,3 @@ struct device_drv opencl_api = {
|
|
|
.scanhash = opencl_scanhash,
|
|
|
.thread_shutdown = opencl_thread_shutdown,
|
|
|
};
|
|
|
-#endif
|