Browse Source

opencl: Remove ancient gpu_threads variable, not really needed anymore

Luke Dashjr 12 years ago
parent
commit
7f0d67e0d9
3 changed files with 1 additions and 10 deletions
  1. 1 1
      api.c
  2. 0 8
      miner.c
  3. 0 1
      miner.h

+ 1 - 1
api.c

@@ -2115,7 +2115,7 @@ static void gpuenable(struct io_data *io_data, __maybe_unused SOCKETTYPE c, char
 {
 	int id;
 
-	if (gpu_threads == 0) {
+	if (!nDevs) {
 		message(io_data, MSG_GPUNON, 0, NULL, isjson);
 		return;
 	}

+ 0 - 8
miner.c

@@ -155,7 +155,6 @@ unsigned long global_quota_gcd = 1;
 int opt_dynamic_interval = 7;
 int nDevs;
 int opt_g_threads = -1;
-int gpu_threads;
 #endif
 #ifdef USE_SCRYPT
 static char detect_algo = 1;
@@ -10172,11 +10171,6 @@ void register_device(struct cgpu_info *cgpu)
 #ifdef HAVE_CURSES
 	adj_width(mining_threads, &dev_width);
 #endif
-#ifdef HAVE_OPENCL
-	if (cgpu->drv == &opencl_api) {
-		gpu_threads += cgpu->threads;
-	}
-#endif
 
 	rwlock_init(&cgpu->qlock);
 	cgpu->queued_work = NULL;
@@ -10302,7 +10296,6 @@ void drv_detect_all()
 #ifdef HAVE_OPENCL
 	if (!opt_nogpu)
 		opencl_api.drv_detect();
-	gpu_threads = 0;
 #endif
 }
 
@@ -11063,7 +11056,6 @@ begin_bench:
 	}
 
 #ifdef HAVE_OPENCL
-	applog(LOG_INFO, "%d gpu miner threads started", gpu_threads);
 	for (i = 0; i < nDevs; i++)
 		pause_dynamic_threads(i);
 #endif

+ 0 - 1
miner.h

@@ -1066,7 +1066,6 @@ extern bool opt_quiet;
 extern struct thr_info *control_thr;
 extern struct thr_info **mining_thr;
 extern struct cgpu_info gpus[MAX_GPUDEVICES];
-extern int gpu_threads;
 #ifdef USE_SCRYPT
 extern bool opt_scrypt;
 #else