Browse Source

cpu/opencl: Always disable by default; removes deprecated -G option entirely

Luke Dashjr 12 years ago
parent
commit
6b71382a8c
3 changed files with 2 additions and 21 deletions
  1. 1 6
      driver-cpu.c
  2. 1 5
      driver-opencl.c
  3. 0 10
      miner.c

+ 1 - 6
driver-cpu.c

@@ -776,12 +776,7 @@ static int cpu_autodetect()
 
 static void cpu_detect()
 {
-	if ((opt_n_threads < 0 || !forced_n_threads)
-	 && ((total_devices || total_devices_new) && !opt_usecpu))
-		// If there are any other devices, only act if the user has explicitly enabled it
-		noserial_detect_manual(&cpu_drv, cpu_autodetect);
-	else
-		noserial_detect(&cpu_drv, cpu_autodetect);
+	noserial_detect_manual(&cpu_drv, cpu_autodetect);
 }
 
 static pthread_mutex_t cpualgo_lock;

+ 1 - 5
driver-opencl.c

@@ -1424,11 +1424,7 @@ static int opencl_autodetect()
 
 static void opencl_detect()
 {
-	if (total_devices || total_devices_new)
-		// If there are any other devices, only act if the user has explicitly enabled OpenCL
-		noserial_detect_manual(&opencl_api, opencl_autodetect);
-	else
-		noserial_detect(&opencl_api, opencl_autodetect);
+	noserial_detect_manual(&opencl_api, opencl_autodetect);
 }
 
 static void reinit_opencl_device(struct cgpu_info *gpu)

+ 0 - 10
miner.c

@@ -1064,12 +1064,6 @@ static char *add_serial(const char *arg)
 	return NULL;
 }
 
-static char *compat_disable_gpu(__maybe_unused void *arg)
-{
-	string_elist_add("opencl:noauto", &scan_devices);
-	return NULL;
-}
-
 static
 char *opt_string_elist_add(const char *arg, struct string_elist **elist)
 {
@@ -1789,10 +1783,6 @@ static struct opt_table opt_config_table[] = {
 	OPT_WITH_ARG("--device|-d",
 		     set_devices, NULL, NULL,
 	             "Select device to use, one value, range and/or comma separated (e.g. 0-2,4) default: all"),
-	OPT_WITHOUT_ARG("--disable-gpu|-G",
-			compat_disable_gpu, NULL,
-			opt_hidden
-	),
 	OPT_WITHOUT_ARG("--disable-rejecting",
 			opt_set_bool, &opt_disable_pool,
 			"Automatically disable pools that continually reject shares"),